The following line in my crystal reports formula is giving the error:
NumberVar sales0405 := Sum ({sp_YES_AccountSnapshot;1.ST0405_Ext}, {sp_YES_AccountSnapshot;1.Cust}) + Sum ({sp_YES_AccountSnapshot;1.DR0405_Ext}, {sp_YES_AccountSnapshot;1.Cust});
The error:
"The ) is missing"
The report was created using Crystal reports 11.
The report runs fine when I run it from within Crystal Reports.
However, when I run the report from an ASP.NET web app utilizing the Crystal Reports Basic for Visual Studio .NET 2008 (Updated May 2008) (provided at http://resources.businessobjects.com/support/additional_downloads/runtime.asp#09), this is when I get the error.
I'm guessing there is some change in summations with the newer versions of Crystal Reports, but I've been unable to find any documentation on this specific issue.
I have verified that there are no null values coming in on my test case that produces an error.
The line that is producing the error is the first line of the formula.
Thanks in advance for your time
Edit: Here's the entire formula
*NumberVar sales0405 := Sum ({sp_YES_AccountSnapshot;1.ST0405_Ext}, {sp_YES_AccountSnapshot;1.Cust}) + Sum ({sp_YES_AccountSnapshot;1.DR0405_Ext}, {sp_YES_AccountSnapshot;1.Cust}); NumberVar sales0304 := Sum ({sp_YES_AccountSnapshot;1.ST0304_Ext}, {sp_YES_AccountSnapshot;1.Cust}) + Sum ({sp_YES_AccountSnapshot;1.DR0304_Ext}, {sp_YES_AccountSnapshot;1.Cust}); if sales0304 = 0 then ToText ("Increase in Sales: N/A") else if(sales0405 < sales0304) then ToText ("") else "Increase in Sales: " + Replace (ToText (Int(RoundUp ((((sales0405 - sales0304) / sales0304) * 100)))), ".00", "") + "%"*
As it turns out, it's that last line that's causing the problem. Any Idea why? I fixed it by removing the Replace, Int, and Roundup functions from it (eliminating a few parentheses in the process.
Note: sorry about the poor formatting with that code, I couldn't get the code tag to place nice with the multi-line copy paste from crystal.