472,973 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 software developers and data experts.

Formula error using Crystal Reports for VS.NET 2003

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
Jul 21 '05 #1
1 3821
I found the cause of my problem. I have to wrap RtnCode and RtnSeq in
ToText().

bb

"B. Broadwell" wrote:
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

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RedZebra | last post by:
Hi I am calling and viewing Crystal Reports in internet explorer(using ASP pages) by passing them the selection formula for the main report. Its working fine. The problem is when the report has...
1
by: Ron Holmes | last post by:
I posted this question on the Crystal Reports Support site and I am still waiting for an answer. Using Crystal Reports 9.0 Developer Full edition: My Crystal report .RPT file has a Picture box...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
0
by: Augustin Prasanna. J | last post by:
Hi We have developed the reports using Reports for our asp.net web application using the Crystal Report assemblies that comes along with Visual Studio.Net 2003. the report works fine in our...
0
by: Srijith Augustine | last post by:
Hi, Record selection Formaula is not working while exporting the report to Excel There is absolutely no problem while using a crystal report viewer but if i export it to a excel the selection...
0
by: =?Utf-8?B?Q29ubnVsbA==?= | last post by:
I have designed a Report in Crystal Reports and receive no errors. If I view this Report in the Crystal Report Viewer in VB.net (2003) I get an error stating there is a problem with one of my...
0
by: Claire | last post by:
I've created a formula field called "BaseField" in a crystal report in VS 2003. At run time, I dynamically change the formula depending which field the user selects to view for example ...
2
by: =?Utf-8?B?Um9iZXJ0?= | last post by:
About the time we installed Windows Server 2003 SP2 on our Web servers, our exports to Excel stopped working from Crystal Reports .NET within all our ASP.NET applications. However, the exports to...
0
by: =?Utf-8?B?Q2FybG9z?= | last post by:
We have an existing Microsoft Visual Studio .Net Windows Forms application that uses the bundled version of Crystal Reports 9. There are now 5 versions of this application (8.0, 8.1, 8.2, 8.3, 8.4...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.