cancel
Showing results for 
Search instead for 
Did you mean: 

Create a table alias & column alias

Former Member
0 Kudos

Hello All,

I've a crystal report that points to a table A(Invoice_Details_Prn). I need to modify the crystal report to point it to table B (InvoiceDetails) with an alias Invoice_Details_Prn(similar to table A). Using database expert, I can add the table B and rename it to Invoice_Details_Prn. I also have to use the column alias for the table B to match it to table A. How can I alias column names in crystal report?

Thanks,

Amol

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

You can't do this directly.  The only way I know of would be to use a command (SQL Select statement) to set the field alias.  However, DO NOT combine a command and tables in a report - it can significantly slow your report down.  Instead, a single command should contain ALL of the data that you need for your report.  Also, when using a command, put all of the filter conditions in the Where clause of the command - DO NOT use the Select Expert.

When you combine a  command with tables or another command or when you use the Select Expert to filter a command, Crystal can't push the joins or filter criteria down to the database.  Instead, it will pull ALL of the data into memory and do the joins and/or filtering there where it's not as efficient, thus slowing the report.

-Dell

Answers (1)

Answers (1)

raghavendra_hullur
Active Contributor
0 Kudos

Hi,

I don't think you can rename a column for tables used directly, unless you use a command object.

If you use a command object where in you can write a select statement and can use alias names for columns as well as tables.

Thanks,

Raghavendra