Sunday, February 26, 2012

Exp0001 in subreports stored procedure

Hi,

I have a report file that was made with Crystal 8.5.
The report has been working for years.
I open VisualStudio .NET 2005 and open the report file.
Without changing anything, I save the report.
Visual Studio asks if I want to convert to the version of Crystal that comes with VS .NET 2005.
I accept and the report is converted.
Then I chose Verify Database and it connects to the database, selects the Microsoft SQL Server stored procedure that provides the data for the report, etc.
This stored procedure has a simple select statement, and the first column it returns is "Code".
But the Verify Database ends up showing a field named "Exp0001" that it cannot map to any of the report's fields.
This has happened to me before with another report converted from Crystal 8.5

Any hints or help on why is this happening or how to correct it will be greatly appreciated.

Thanks in advance,

RichardIn your query if you used sum or any other aggretate functions, you need to specify the alias name

Select max(code) as code from table|||Thanks for the hint. In this case, the query does not use aggregates.
The query is something like:

SELECT Product_Code AS 'Code', Product_Description AS 'Description' FROM ORDER_LINE WHERE Order_ID = @.Order_ID

The column named "Code" appears as "Exp0001" even though this select statement is simple enough... Any help will be appreciated.

Thanks in advance,

Richard|||Remove single quotes in alias name and try

SELECT Product_Code AS Code, Product_Description AS Description FROM ORDER_LINE WHERE Order_ID = @.Order_ID

No comments:

Post a Comment