RexHeadlong
Programmer
Hi, all.
I am using Crystal Reports Developer 8.5, MS SQL Server 2000, and Visual C++ 6.0
Background: In my .rpt file, the underlying query joins a table to itself, and displays the same column twice in the report. The underlying query looks somewhat like this:
If table1 has a row in it where part_number = "XXX"
and table2 has 2 rows in it:
then my query should return:
The problem: The above works and is fine in print-preview, print, and most exports. But, when I export this report to an Access database (presumably other databases as well), I get an error because Crystal is trying to create a table that has two columns with the same name.
Is there any way in the report designer to rename or alias one of the column names to a different name so that I can export this report to an Access database?
Thanks for any help, sorry this was longwinded.
I am using Crystal Reports Developer 8.5, MS SQL Server 2000, and Visual C++ 6.0
Background: In my .rpt file, the underlying query joins a table to itself, and displays the same column twice in the report. The underlying query looks somewhat like this:
Code:
select m.part_number, a1.col1, a2.col1
from table1 m inner join table2 a1 on m.part_number = a1.part_number and a1.flag = 0
inner join table2 a2 on m.part_number = a2.part_number and
a2.flag = 1
If table1 has a row in it where part_number = "XXX"
and table2 has 2 rows in it:
Code:
part_number col1 flag
XXX 13 0
XXX 24 1
then my query should return:
Code:
part_number a1.col1 a2.col1
XXX 13 24
The problem: The above works and is fine in print-preview, print, and most exports. But, when I export this report to an Access database (presumably other databases as well), I get an error because Crystal is trying to create a table that has two columns with the same name.
Is there any way in the report designer to rename or alias one of the column names to a different name so that I can export this report to an Access database?
Thanks for any help, sorry this was longwinded.