Crystal Reports 9 to 2010 code upgrade problem

Hi,

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!!!
TerryDeanAsked:
Who is Participating?
 
mlmccCommented:
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.

mlmcc
0
 
TerryDeanAuthor Commented:
Thank you for your quick response!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.