smpross
asked on
Crystal Error in C# application due to crystal Reports formula
Hi All,
I am placing this question in this area because the crystal problem is occuring in our application even though the formula shows "No errors found" in the crystal formula wizard. We are using Visual Studio 2003 and Crystal Reports 10.0. We are passing data to Crystal using an XSD. I should note that without the Formula fields, the report displays properly in the application.
However, when I create a formula and add it to the report, I get an error message.
The formula:
tringVar BillByName :="";
StringVar BillByAddress1 :="";
StringVar BillByAddress2 :="";
StringVar BillByCity :="";
StringVar BillByRegionCode :="";
StringVar BillByPostalCode :="";
StringVar BillByCountryCode :="";
if {InvoiceHeader.DivisonName } <> "" then BillByName = ({InvoiceHeader.DivisonNam e} + chr(13) + chr(10));
if {InvoiceHeader.RemitAddres s1} <> "" then BillByAddress1 = {InvoiceHeader.RemitAddres s1} + chr(13) + chr(10);
if {InvoiceHeader.RemitAddres s2} <> "" then BillByAddress2 = {InvoiceHeader.RemitAddres s2} + chr(13) + chr(10);
if {InvoiceHeader.RemitCity} <> "" then BillByCity = {InvoiceHeader.RemitCity} + ", ";
if {InvoiceHeader.RemitRegion Code} <> "" then BillByRegionCode = {InvoiceHeader.RemitRegion Code} + " ";
if {InvoiceHeader.RemitPostal Code} <> "" then BillByPostalCode = {InvoiceHeader.RemitPostal Code};
BillByName + BillByAddress1 + BillByAddress2 + BillByCity + BillByRegionCode + BillByPostalCode;
The Error message that I receive is as follows
The Field name is not known.
Details: errorKind
Error in File c:\Program name\Invoice.rpt
Error in formula <BilledBy>
'StringVar BillByName :="";
'
The field name is not known.
Details: errorKind
Crystal Reports says that the formula is ok inside of the CRW. Also the Error in formula seems to always be the first line of the formula.
Any help would be greatly appreciated.
Scott
I am placing this question in this area because the crystal problem is occuring in our application even though the formula shows "No errors found" in the crystal formula wizard. We are using Visual Studio 2003 and Crystal Reports 10.0. We are passing data to Crystal using an XSD. I should note that without the Formula fields, the report displays properly in the application.
However, when I create a formula and add it to the report, I get an error message.
The formula:
tringVar BillByName :="";
StringVar BillByAddress1 :="";
StringVar BillByAddress2 :="";
StringVar BillByCity :="";
StringVar BillByRegionCode :="";
StringVar BillByPostalCode :="";
StringVar BillByCountryCode :="";
if {InvoiceHeader.DivisonName
if {InvoiceHeader.RemitAddres
if {InvoiceHeader.RemitAddres
if {InvoiceHeader.RemitCity} <> "" then BillByCity = {InvoiceHeader.RemitCity} + ", ";
if {InvoiceHeader.RemitRegion
if {InvoiceHeader.RemitPostal
BillByName + BillByAddress1 + BillByAddress2 + BillByCity + BillByRegionCode + BillByPostalCode;
The Error message that I receive is as follows
The Field name is not known.
Details: errorKind
Error in File c:\Program name\Invoice.rpt
Error in formula <BilledBy>
'StringVar BillByName :="";
'
The field name is not known.
Details: errorKind
Crystal Reports says that the formula is ok inside of the CRW. Also the Error in formula seems to always be the first line of the formula.
Any help would be greatly appreciated.
Scott
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
When I put those fields into the report individually, they appear without any problem even when I run the application... Any other idesas?
Thanks for the suggestion.
Scott