Formula error using Crystal Reports for VS.NET 2003

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
 
G

Guest

I found the cause of my problem. I have to wrap RtnCode and RtnSeq in
ToText().

bb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top