Skip to Content
avatar image
Former Member

Create a table alias & column alias

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 29, 2014 at 02:32 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 27, 2014 at 12:53 AM

    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

    Add comment
    10|10000 characters needed characters exceeded