Skip to Content

SAP imported Crystal gives error "String length is less than 0 or not an integer"

Experts,

When I run the Crystal Report, I get no error. But when I import this to SAP, it gives me the "String length is less than 0 or not an integer" error on the Account Name formula. This Account Name formula is just to shorten the GL account not to show the segments.

Left({GetCurrentBalanceWithFX.AcctName}, Instr({GetCurrentBalanceWithFX.AcctName},'(STCAN')-1)

This error started when I copied (imported) one Sub-Report to another Sub-Report as they are similar, just pulling from different DB's. Before that the Main Report and one Sub-Report worked with this formula in Crystal and SAP B1.

error-114.png (106.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Correction: When imported to SAP I do not get the error for the Main report, when I suppress the sub-reports. I get the error only when I activate the sub-reports again.

  • Get RSS Feed

1 Answer

  • Jan 24 at 07:32 PM

    Hi Marli,

    This usually happens if the field is NULL or empty. Have your formula check for a valid string like:

    If Not ISNULL ({GetCurrentBalanceWithFX.AcctName}) Or 
         {GetCurrentBalanceWithFX.AcctName} <> "" Then 
         Left({GetCurrentBalanceWithFX.AcctName}, Instr({GetCurrentBalanceWithFX.AcctName},'(STCAN')-1) 
    Else ""; 
    

    When the subreport is suppressed, it doesn't run so you don't get the error.

    Good luck,

    Brian

    Add comment
    10|10000 characters needed characters exceeded

    • Brian,

      I'll test that change a little later.

      I have added field by field to the sub-report, and tested each time, to see which one was causing issues and accidentally found that it had to do with Data Source locations. When it was incorrectly set, I did not have this issue, when I corrected it, the issue presented itself - Therefor I'm thinking this is an issue on the Stored Procedure....

      I'll try your suggestion and see what happens.

      Thanks.