Hi,
Today I created a simple report which mostly contains text labels and few variables. I used already prepared portions of text from a word document and pasted it in Caption property of labels and also in Source Expression property of textboxes.
When report was done I saved it and ran it, but as I forgot to assign a value to one of the date variables that I use, report completed with error. So I opened object designer again, found this report and clicked Design button... Navision crashed...
Tried to export object as a text file to find out what is the problem, but with no success, crash again.
I exported object in fob file and import it in NAV5 SP1 (I'm currently on NAV4 SP2) but this version also crashes if I try to open report designer.
Does anyone know what could be the problem?
0
Comments
1- do you get any error message when it crashes?
2- What did you put into the captions?
RIS Plus, LLC
No, I don't get any error messages. It just stops responding and then dialog, with option to send info about error, shows up.
I selected 2-3 short sentences of text from Word document and pasted it into caption property. It was just simple text but maybe there were some special characters that are pasted and now are causing all the truble.
RIS Plus, LLC
This is an example of text that I put in the caption:
Svi troškovi koji nastanu nakon tog dana padaju na vaš teret (startni honorar advokatske kancelarije je 1.000 KM, na koji se dodaju svi ostali troškovi, uključujući i njihove dnevnice, zatim sudski troškovi i takse...).
The way I would approach this is to take the original report, and do one label at a time. Paste what you need where you need it, one control at a time. Paste, Compile, Save, close the object, reopen it. That way you can see exactly at what point it starts causing errors.
RIS Plus, LLC
BUT, if I paste text which is 255 chars long then it is ok:
If I add one more character, after saving and reopening I get this in Source Expression:
If I add ten more characters, after saving and reopening I get this in Source Expression:
If I paste following text (255 chars between ''):
I get this:
It seems that Source Expression is limited to 255 chars max, but why it allows me to enter more than 255 chars if it can't read it later?!
Is it a bug or normal behaviour?
UPDATE:
I solved this by using Text constant where I placed the text, and used that constant in Source Expression. I should do that in the first place #-o
Basically whenever one hits the limit of something, it is probably bad design that causes the problem
Good work figuring this one out, and thanks for sharing it with us. Your solution of using a text constant is a very good choice =D>
RIS Plus, LLC
I am not certain, but I think this stems from a bug in an earlier version of NAV. Basically in that version, if you had a normal user license, lets say you have a table and a form. You have code that references a field in the table. You open the table and delete the field. Now open the form and obviously you get a "Variable not found error" but this would place the cursor on the code with the error. Basically like hitting F9, so now you have full access to start writing code, which of course should not be possible without a full developer license.
So the next version changed this that an error like this would just give an error and bomb out. As I said it sounds like something similar. I know that a similar issue happens if you have a line of C/SIDE that references fields, and is at the limit of line length. If you change the name of the field and increase it, and then the line is longer than the limit, then it just kills the line and the object is a mess.
They should fix this somehow, or at least notify user that entering more than 255 chars could/will cause object corruption.
How?
There just isn't anyway to know. For example the case I mentioned above. How can the compiler knowthat in the future you will increase the length of the contents of a variable?
RIS Plus, LLC
Stop letting your cat run across your keyboard
"Show All..."
"Oh..."