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

Changing DataFields at Run-Time

edited February 2002 in General
After changing a text datafield (TppDBText) at run-time, report builder
is returning a blank field. Do I need to do something to initialize the
report so it will recognize the changed field?

Comments

  • edited February 2002
    Hi,

    did you use the beforeprint event of the tppdbtext or did you change the
    text within the database. If the change is within the database you need
    to reload the report (update all caching information).

    enjoy,
    Ron.

  • edited February 2002
    I'm changing the datafield property of the TppDBText control before the report
    is printed (property changed from Vendor to Merchandise Type). I tried both
    before the report is run at all, and in the beforeprint event.

  • edited February 2002
    Hi,

    pse see below.

  • edited February 2002
    The report is compiled into the program, not loaded from an rtm or a database.

  • edited February 2002
    Hi,

    Did you try to set it after creating the report and before calling print?

  • edited February 2002
    I just put set the datafields on the line of code just before calling print with no
    luck.

  • edited February 2002
    Here is a sample of the code I'm using to set the fields.

    GroupHeader1.Visible := true;
    GroupFooter1.Visible := true;
    lMerchTypeVendor.Caption := 'Vendor'; //TppLabel - Header Item seems to be
    working
    hMerchTypeVendor.DataField := 'MerchName'; //TppDBText - Header title for
    Group
    dMerchTypeVendor.DataField := 'VendorName'; //TppDBText - Detail item
    fMerchTypeVendor.DataField := 'MerchName'; //TppDBText - Footer title for
    Group
    ppGroup1.BreakName := 'MerchType'; //This seems to be working


  • edited February 2002
    Sorry, My Bad. I wasn't populating the field with any value. Thanks allot for your
    help.

This discussion has been closed.