Hi! I make a complex Report with Navision Attain. I need to use some code. When I use following code Navision Crash: Note: When I save Report, Navision strip ‘"’ from invoice… I can use numeric code insted of ::invoice but… Is a bug or I mistake? (Compiler doesn’t tell me anything).[V][?] Note: DocsVal is an integer Note: “Cust. Ledger Entry” is a table Note: “Document Type” is a field. Option type. Note: DocState is a Text. I am sure that Crash is caused for
What do you mean Navision crashes? Is the program closed by Windows or do you simply get an error message? The “” are not saved because the option has no special characters (spaces, etc.) in it. It is not a bug. If DocState is a text variable, SALDO and CARTERA should be used within single quotes ‘’ (e.g. ‘SALDO’).
quote:
Originally posted by nelson
What do you mean Navision crashes? Is the program closed by Windows or do you simply get an error message?
Client crash. Windows Program Crash. It says “Windows Program will close. You ,Must reestart program…” >If DocState is a text variable, SALDO and CARTERA should be used >within single quotes ‘’ (e.g. ‘SALDO’). Sorry, SALDO and CARTERA are text constants.
Hi You will find this is a problem with printer drivers. It also happens if you only preview a report. You should find the latest driver for your printer or try changing the default printer. Paul Baxter
quote:
Originally posted by triff
Hi You will find this is a problem with printer drivers. It also happens if you only preview a report. You should find the latest driver for your printer or try changing the default printer. Paul Baxter
I try with different printers ans it’s still crashing. I think that my problem is with any function I created… I must find out when…
quote:
Originally posted by triff
Hi You will find this is a problem with printer drivers. It also happens if you only preview a report. You should find the latest driver for your printer or try changing the default printer. Paul Baxter
I find out what it happends… I call a function who tell mi if a bill or invoice must be process. If I must not process I call currreport.SKIP. I believe that SKIP ignore rest of code… At the end i put a currreport.BREAK. Now don’t Crash. Thanks…
Each time I’ve experienced a crash when printing a report, it was due to the printer driver. It’s simple to make a quick diagnostic : run the same report on a different PC pointing to a different printer than the one where the crash occurs …
It could also be an endless loop, or a problem with where (i.e. in which trigger) the code is written. There’s so much stuff that can go wrong in a report, it’s not even funny. Your safest bet I would say is to take a really close look at the entire object (export it in text format and look at it in notepad) and check for endless loops. All I can say is… do NOT write any code that manipulates data in any section trigger, but write that code in dataitem triggers. If you have to run codeunits from a report, remember that write transactions from a report can be tricky. We have a number of clients that only have the report writer in their license, so they write their own stuff in report code all the time, and we’re getting support issue after support issue trying to correct their code.
quote:
Originally posted by Tarek Demiati
Each time I’ve experienced a crash when printing a report, it was due to the printer driver. It’s simple to make a quick diagnostic : run the same report on a different PC pointing to a different printer than the one where the crash occurs …
In this case it was a different problem. I use a showoutput based on a varible “show”. Depend of its value show one format or another (It’s a report what i am programming). I use currentreport.SKIP. This one execute a part of code that i didn’t want to. So, I make an invalid operation. So, It Crash… bad design. I must to look for use Debuger but for the moment I have problems. Thanks – Roger