views:

267

answers:

1

I have the following SQL Expression Field in my Crystal Report 11.5

{fn CONCAT({fn CONCAT("SPR_PRODUCT"."PRODUCT_ID","SPR_PRODUCT_SUB_ITEM"."P_SUB_ITEM_ID" )},{fn CONCAT("SPR_PRODUCT_ITEM"."P_ITEM_ID","SPR_PRODUCT_GROUP"."P_GROUP_ID" )} )}  

It works well in the Preview Mode.

But when I use the report in my VB.NET 2008 Project it says the following:

Error in compiling SQL Expression :  
SQL Expressions can not be used in this report..  
Error in File <...>.rpt:  
SQL Expression error: Error in compiling SQL Expression :  
SQL Expressions can not be used in this report...  

Please help me by telling how can I use the SQL Expression field in VB.NET ?

Thanks in Advance.

A: 

Are you binding a different data source to the report when you run it from your project? If one of the field names is different, you could get an error like this.

Ray
I have used Dataset. My Report works well before installing SQL Expression Field to the report. What can I do now?
Tareq
I have only used a dataset once in a report, and I use the Crystal Reports embedded in Visual Studio, so I may not be able to help. My dataset-based report does not allow me to create a sql expression. I don't know if this is a feature of 11.5 or some confusion in the question. So, my theory for now is that the dataset used to design the report is somehow different from the one created when you run it in VB.
Ray