FieldAliases Syntax

edited 2:10PM in FastReport VCL 5
Hello,

I have a TfrxDBDataSet, wich gets it??s DataSet during Runtime.
The DataSet Contains a SQL with 2 Collumns with the same name.

How can i make an Alias for one of this collumns?

I already have:
TfrxDBDataSet.FieldAliases
But i don??t know the syntax for FieldAliases

Comments

  • gpigpi
    edited 2:10PM
    FieldName=Field Alias
    See FRDemo CustomersDS.FieldAliases
    CustNo=Cust No
    Company=Company
    Addr1=Addr1
    Addr2=Addr2
    City=City
    State=State
    Zip=Zip
    Country=Country
    Phone=Phone
    FAX=FAX
    TaxRate=Tax Rate
    Contact=Contact
    LastInvoiceDate=Last Invoice Date
    
  • LurkingKiwiLurkingKiwi Wellington, New Zealand
    edited 2:10PM
    I think the right approach is probably to name the columns in the SQL query result with "AS" clauses, if they actually have different values and aren't there by mistake when joining.
    select tbl1.name as tbl1_name, tbl2.name as tbl2_name from tbl1 cross join tbl2 on ...

Leave a Comment