Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Build Field List at Runtime

edited December 2004 in General
How can I build or refresh the field list of TppDBPipeline at runtime.
That is necessarily after I changed my SQL statement and make an update on
TQueury.Fielddefs.
Otherwise I can't see some Fields in the Reportdesigner.

Thanks Christian

Comments

  • edited December 2004
    Hi Christian,

    When are you changing the data in your query? If you are doing this during
    report generation, there is no way to refresh the datapipeline, because it
    is being traversed at that time. Perhaps a little more information on what
    you are trying to accomplish would help me find a solution for you.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2004
    Hi Nico,

    No, I change my Query before report generation.

    For example:
    I have 2 databases adress and contacts.
    The user can make his own query with the program.
    First simple query: 'Select * from adress where zipcode=11111'
    Another simple query:
    'Select adress.*, contacts.* from adress LEFT OUTER JOIN contacts ON
    adress.adressid = contacts.adressid
    WHERE zipcode=1111'
    In both cases i have different fields.
    The user can now choose a pre defined report or build a new one.
    My problem is to rebuild now the fieldlist of my TppDBPipeline before the
    user choose or print the report.


    I use Delphi 5, ADS 7, RB7.04

    Any idea?



  • edited December 2004
    Hi Christian,

    If you have AutoCreateFields set to True, you should only need to close,
    then open the DBPipeline in order for it to refresh its field list. In my
    testing, this worked fine except the DataTree, which you need to right click
    and hit "refresh" for it to reflect the changed field list.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2004
    Hi Nico,

    Thank you for your answers.
    I solve my problem now. I have create Fielddefs for my Query at design time
    with the Fieldeditor. In this case the TppDBPipeline can't build an other
    Fieldlist.
    If I delete the FieldDef for my Query at designtime and update it at
    runtime, it works fine.

    Christian

This discussion has been closed.