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

parameters sticking

edited October 2006 in General
Hi

I use prameters in my report for displaying in a label / variable. they are
keeping the original value and not getting reset.

In the onGetText event I specify someting like:
text := report.parameters('MyVar');

In delphi I do the following

ppReportOutput.Parameters.InsertMode := True;
ppReportOutput.Parameters.items['MyVar'].Value := textValue;

the first time I ran the report and edited it - it specified the correct
values. Ever since then, the report retains the orginal parameters and does
not take the subsequent values. i.e. the report parameters seem to get
saved with the report after editing and cannot be changed..... what do I
need to do to fix this...

Comments

  • edited October 2006
    Hi Paul,

    I'm a bit unclear about how your application is working. Where are you
    assigning the parameter values in Delphi? Are you certian they are actually
    being changed?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2006
    In Delphi, prior to running the report I set the report parameters. I can
    see straight away in debug mode that they have changed. however when the
    report comes up, when the Gettext event of a lable executes to set the text
    of label from the parameter, it gets the original value of the paramter from
    the very first run.

    The report gets editied at runtime, adjusted and saved. So at that point
    the variables do have values as the user runs the report first (hence
    parameters are set) and then goes into design edit to change it before
    saving. So in a sense it appears that the parameter values are being saved
    along with the report and won't change or get reset after.

  • edited October 2006
    Hi Paul,

    I apologize, but I'm still not understanding when exactly you are changing
    the parameters. In a quick test I set a parameter just before the report
    prints, then I close the report and change the parameter (all at runtime)
    and print the report again. The parameter is successfully changed. This
    parameter is also being saved correctly if I save the report template.
    Perhaps give me the exact steps I can take to recreate this behavior.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2006
    Sorry to have wasted your time. what was happening was that I was setting
    the parameters correctly but code following that reloaded the report and the
    parameters were subsequently reset.

This discussion has been closed.