Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formula causing exception at runtime Post Reply Post New Topic
Author Message
asingh
Newbie
Newbie


Joined: 15 Dec 2010
Online Status: Offline
Posts: 1
Quote asingh Replybullet Topic: Formula causing exception at runtime
     Posted: 15 Dec 2010 at 12:29pm
Hi,
I seem to have a problem with a particular report which has been ported from Crystal 8.5 to Crystal 10. I am using Visual Studio 2008 to preview the report and it all works correctly, shows the correct data no problems.
 
When I try to load the same report with the same parameters within the cyrstal report viewer in ASP.Net I get an exception in one of the formula fields. The formula is below:
 
stringVar sAddress := "";
 
If NOT IsNull ({usp_CMLSIMClaimReport;1.Address 1}) THEN
    sAddress := Trim ({usp_CMLSIMClaimReport;1.Address 1}) + ", ";
If NOT IsNull ({usp_CMLSIMClaimReport;1.Address 2}) THEN
    sAddress := sAddress + Trim ({usp_CMLSIMClaimReport;1.Address 2}) + ", ";
If NOT IsNull ({usp_CMLSIMClaimReport;1.Address 3}) THEN
    sAddress := sAddress + Trim ({usp_CMLSIMClaimReport;1.Address 3}) + "  ";
 
sAddress
 
The exception is "a string is required here". My question is, why is this report working fine from with in VS when I select preview however it is causing a run time error through ASP.Net. Any help would be greatly appericated.
 
Cheers,
Ash
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum