Skip to Content

Error in file temp after upgrade


my project was in .netframework 1.1(vs 2003) and I upgrade it to .net 4.8 (vs 2019).

I Install SAP crystal report in windows 10.

I can preview the report in vs2019 report viewer.

but when run program and click on "Show Report" button display this error :

error in file temp : {5456a4sd-5a64sd...}

Error in formula 'formula name'

Global NumberVar 'var name'

I remove line 1 but 'WhilePrintingRecords' display error.

how can I fix it?

capture.png (67.9 kB)
capture1.png (8.7 kB)
capture4.png (11.6 kB)
capture3.png (12.5 kB)
Add a comment
10|10000 characters needed characters exceeded

  • Hello Mahdi,
    Warm welcome and thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with (if you haven't already), as it provides tips for preparing questions that draw responses from our members. Should you wish, you can revise your question by selecting Actions, then Edit (although once someone answers your question, you'll lose the ability to edit the question -- but if that happens, you can leave more details in a comment).
    Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: By personalizing your profile with a photo of you, you encourage readers to respond.

    Best regards,
    Lena (SAP Community Global Moderator)

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 16, 2020 at 02:01 PM

    Try changing your formula to this:

    Global numberVar var_SumInQuanti;
    If OnFirstRecord then var_SumInQuanti := 0;
    If {Command1.SIO_OrderReceiptType} in [1, 3, 8] then
      var_SumInQuanti := var_SumInQuanti + {Command1.SIO_Number_Quantity);

    You have a couple of issues in your version of the formula

    1. You never initialize the value of var_SumInQuanti before trying to use it. It does not default to 0. This is probably what is causing the error. I made the assumption that this is a grand total for the whole report, so the formula sets it to 0 on the first record.

    2. You don't need the long "or" set in the If statement - it's easier to read if you use "in". I assumed Crystal syntax. If you're using VB syntax, you'll do "in Array(1, 3, 8)".


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.