cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Report Viewer Error

Former Member
0 Kudos

I have a report that works, but the user wanted more information to be added. I create a sub Report to include the added information.

Now I get an ERROR

Crystal Report Viewer

CRAXDRT Error Occured on Server- 247191650; String length is less than 0 or not an Integer.

If I take the Sub Report out the report works. So I know It has something to do with the sub  Report.

Could it be the Linking???

Any help would be great.

There a screen shot of the error attached.

Thanks for your time.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi David,

Do you have a formula in the Subreport that checks for string length or does something based on the length of a string?

If you do, then try adding an exception block in the formula that also checks for Null values.

-Abhilash

Former Member
0 Kudos

the original formula reads as follow

whileprintingrecords;

stringvar Scode;

left(Scode,len(Scode)-2);

Should it read like this??

whileprintingrecords;

stringvar Scode;

//left(Scode,len(Scode)-2);

if isnull({Command.SCODE}) then "" else left(Scode,len(Scode)-2)

abhilash_kumar
Active Contributor
0 Kudos

Yes, you may add one more condition just in case the string is not being read as a null:

if isnull({Command.SCODE}) or {Command.SCODE} = "" then

""

else

left(Scode,len(Scode)-2);

-Abhilash

Answers (0)