Crystal Reports 9 to 2010 code upgrade problem

Posted on 2011-04-20
Medium Priority
Last Modified: 2013-11-26

I am attempting to upgrade a c# application that calls Crystal Reports 9 to export pages of a report as separate PDF files.  The report queries the database and produces a page for each record.  On each page two of the formula fields contain the unique information that I need to properly name the exported PDF page.

When using Crystal Reports 9 I could get the required data from the formula fields on the ReportSection_Format event as shown in the following code:

private void ReportSection_Format(object pFormattingInfo)
            if (GotFormulas == false)
                foreach (FormulaFieldDefinition oFieldDef in CrystalReport.FormulaFields)
                    if (oFieldDef.Name == "{@First_text}")
                        FirstNum = System.Convert.ToString(oFieldDef.Value);
                        GotFormulas = true;
                    else if (oFieldDef.Name == "{@Second_text}")
                        SecondNum = System.Convert.ToString(oFieldDef.Value);
                        GotFormulas = true;

Now I need to upgrade the application to run on 64bit but it appears Crystal Reports 9 exports corrupt PDF files.  I upgrade the application to used the latest version of Crystal Reports and it now exports good PDFs but it no longer exposes the same ReportSection_Format event.  How can I get the value of the formula fields at runtime and for each page (db record)?

Thanks for your help!!!
Question by:TerryDean
LVL 101

Accepted Solution

mlmcc earned 2000 total points
ID: 35433140
The .Net version of Crystal doesn't have that capability.

There are third-party tools that can do it for you or you may need to change the application to run the report 1 page at a time.


Author Closing Comment

ID: 35433747
Thank you for your quick response!

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month16 days, 1 hour left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question