473,503 Members | 2,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3838
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
7747
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
5808
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
4978
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
623
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
2826
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
1017
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
2105
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
9862
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
1139
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
7282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7342
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1516
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
391
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.