FieldAliases Syntax

edited 4:40AM 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 4:40AM
    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 4:40AM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.