Formula error using Crystal Reports for VS.NET 2003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report created in Crystal Reports 8 that I'm attempting to use in a
..NET application. I have the following formula that works in the Crystal 8
designer and when the report is run using the Crystal 8 OCX in a VB 6
application:

WhilePrintingRecords;
Numbervar nTaxAdjTotal;

if OnFirstRecord then
nTaxAdjTotal := ToNumber
({TaxLiabilityAnalysisSQLFieldDef.RoundingAdj}) + ToNumber
({TaxLiabilityAnalysisSQLFieldDef.TaxAdj}) + nTaxAdjTotal
else
if {TaxLiabilityAnalysisSQLFieldDef.RtnCode} +
{TaxLiabilityAnalysisSQLFieldDef.RtnSeq} <>
Previous({TaxLiabilityAnalysisSQLFieldDef.RtnCode}) +
Previous({TaxLiabilityAnalysisSQLFieldDef.RtnSeq}) then
nTaxAdjTotal := ToNumber
({TaxLiabilityAnalysisSQLFieldDef.RoundingAdj}) + ToNumber
({TaxLiabilityAnalysisSQLFieldDef.TaxAdj}) + nTaxAdjTotal

When I attempt to run this report in my .NET application (C# using the
Crystal Reports Engine) I get the following error:

Error in formula <IncTaxAdjustment>.
'WhilePrintingRecords;
'
A string is required here.

I'm baffled. Any help will be greatly appreciated.

Thanks.

bb
 
Back
Top