473,794 Members | 2,729 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:

WhilePrintingRe cords;
Numbervar nTaxAdjTotal;

if OnFirstRecord then
nTaxAdjTotal := ToNumber
({TaxLiabilityA nalysisSQLField Def.RoundingAdj }) + ToNumber
({TaxLiabilityA nalysisSQLField Def.TaxAdj}) + nTaxAdjTotal
else
if {TaxLiabilityAn alysisSQLFieldD ef.RtnCode} +
{TaxLiabilityAn alysisSQLFieldD ef.RtnSeq} <>
Previous({TaxLi abilityAnalysis SQLFieldDef.Rtn Code}) +
Previous({TaxLi abilityAnalysis SQLFieldDef.Rtn Seq}) then
nTaxAdjTotal := ToNumber
({TaxLiabilityA nalysisSQLField Def.RoundingAdj }) + ToNumber
({TaxLiabilityA nalysisSQLField Def.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 <IncTaxAdjustme nt>.
'WhilePrintingR ecords;
'
A string is required here.

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

Thanks.

bb
Jul 21 '05 #1
1 3851
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:

WhilePrintingRe cords;
Numbervar nTaxAdjTotal;

if OnFirstRecord then
nTaxAdjTotal := ToNumber
({TaxLiabilityA nalysisSQLField Def.RoundingAdj }) + ToNumber
({TaxLiabilityA nalysisSQLField Def.TaxAdj}) + nTaxAdjTotal
else
if {TaxLiabilityAn alysisSQLFieldD ef.RtnCode} +
{TaxLiabilityAn alysisSQLFieldD ef.RtnSeq} <>
Previous({TaxLi abilityAnalysis SQLFieldDef.Rtn Code}) +
Previous({TaxLi abilityAnalysis SQLFieldDef.Rtn Seq}) then
nTaxAdjTotal := ToNumber
({TaxLiabilityA nalysisSQLField Def.RoundingAdj }) + ToNumber
({TaxLiabilityA nalysisSQLField Def.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 <IncTaxAdjustme nt>.
'WhilePrintingR ecords;
'
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
7759
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 one or more subreport which also requires selection formulas for them. I tried to find out from docs but it seems there is no info on it, neither in the docs nor on any forum! :-( Does anybody have any idea how to do this?
1
5840
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 which is an OLE Object located in the Page Header section of my .RPT file. This is the call which works perfectly in VB6 to format the crystal reports Page Header section of my report file EquipLst.rpt.
7
5026
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. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version, which I did, then reran WebSetup.msi and keeps giving me this error. "The installer was interrupted...
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 development environment. When we deployed the app on our production servers (it has Crystal Reports For .Net 9 version), we are getting the below error when trying to view the reports "Error in File...
0
2840
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 formula dosen't seems to have any effect . For the Report I am using a Stored procedure . Selection Formula is working Fine wile I am using a Crystal report viewer .
0
1038
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 formulas (missing field). Can anbody assist?
0
2115
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 FieldName = "{@DistanceKm}"; rpt.DataDefinition.FormulaFields.Text = FieldName; At run time, even though I've set decimal places to 2 in the property editor
2
9888
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 pdf and Word still work. Is anyone else having this problem and have you found a resolution? We are using ..NET Framework 1.1. The web apps were created in Visual Studio 2003.
0
1146
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 all VS .Net 2003 apps). When upgrading this application from one version to the next the Crystal Reports don't work on alternate installations. So they work for version 8.0, don't work when upgrading to 8.1, then work again for upgrade to 8.2, and...
0
9671
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9518
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10212
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10161
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6777
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.