Crystal Reports 9 to 2010 code upgrade problem

Posted on 2011-04-20
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 100

    Accepted Solution

    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

    Thank you for your quick response!

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    730 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now