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

autosearch criteria selected in Preview is saved with the report

edited July 2007 in General
I'm using RB 10.06 for Delphi 7. We just updated.

Now I find that when I add search criteria on the "Preview" tab in the
Report Designer (i.e. for testing), the criteria is saved with the report.

As well, components i was adding dynamically during OnGetSearchCriteria are
also being saved with the report.

I am certain this was not the case in 10.05 and prior. Can you tell me what
was changed that may have caused this?

Leah

Comments

  • edited July 2007
    Hi Leah,

    Were you by chance using RAP code in other reports that did not save the
    search criteria when changed?

    When using RAP, the report definition is saved before the preview tab is
    shown in case something is changed during the report generation in RAP.
    This definition is then re-loaded when you tab back to the designer tab.
    So, if you have some RAP code for a report and click the preview tab, change
    the search criteria, tab back to the designer and then tab back to the
    preview again, the search criteria you entered will not be saved.

    If there is no Code Module (RAP code) present, the initial report definition
    is not saved and the search criteria you entered from the last visit to the
    preview tab will remain.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2007
    None of this was RAP code.


  • edited July 2007
    In my testing with RB 10.06, RB 10.05 and prior, the autosearch criteria
    stays consistent when switching from the designer to the preview and back
    when no RAP code is present.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2007
    That was not my problem. When I add values to the search criteria options
    using the dialog accessed on the preview tab, it is saved when I save
    changes to the report (and close the designer). Previously, this was only
    saved when I added the criteria values to the Data Piplines on the Data tab.


  • edited July 2007
    What was changed between 10.05 and 10.06 that might cause this?


  • edited July 2007
    Hi Leah,

    Sorry for the delay.

    Unfortunately I'm not able to recreate this behavior on my machine either
    with RB 10.05. Below are the steps I'm taking. Let me know how I can alter
    them to see the same behavior you are getting.

    With RB 10.05...

    1. Create a simple app with a TppReport, TppDesigner, and TButton. Connect
    the report and designer and add code to load the designer in the OnClick.
    2. Add a query dataview to DADE including an AutoSearch criteria. Add
    DBTexts to the detail band of the report.
    3. Run the app, tab to the preview window, change the search criteria, tab
    back to the preview window, save the report to disk.
    4. Close the entire application and re-run it. Load the saved template
    from disk and click on the Preview tab... The search criteria that was saved
    is still present.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.