Parameters Carried forward to new report
Hi
Just installed RB 14.05
This is also a 'feature of RB12' (and I presume RB13) which a customer has
just complained about.
If you have open a report with Parameters set, close the report and then
File > New Report, the old parameters are carried forward to the new report!
Yet another video....
http://www.pcdata.co.uk/images/RBParameters.wmv
It took quite a time before the engineer creating the report worked out what
was going wrong with his new report.
Regards
Philip L Jackson
Just installed RB 14.05
This is also a 'feature of RB12' (and I presume RB13) which a customer has
just complained about.
If you have open a report with Parameters set, close the report and then
File > New Report, the old parameters are carried forward to the new report!
Yet another video....
http://www.pcdata.co.uk/images/RBParameters.wmv
It took quite a time before the engineer creating the report worked out what
was going wrong with his new report.
Regards
Philip L Jackson
This discussion has been closed.
Comments
report layout is cleared. This does not clear out any data access that
may be present. Since parameters are generally tied to data, it is
necessary for them to remain.
If you would like to clear out the parameters when a new report is
created, you can implement the OnCreateReport event of the designer and
call Report.Parameters.Clear.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
The customer who originally reported the problem is running an RB12.x which
was compiled on an older Dell machine, all be it still Delphi 2007.
I tried the same procedure using Delphi XE2 (32bit) and the End User
Database\advantage\1.Native example
I added a the following to ppDesigner1.........
procedure TmyEndUserSolution.ppDesigner1CreateReport(Sender: TObject;
const aDataName: string; var aReport: TObject);
begin
ppReport1.Parameters.Clear
end;
Same results were as per the Delphi 2007 example sent yesterday
http://www.pcdata.co.uk/images/RBParameters002.wmv
I note your comment about only the report layout is cleared when a new
report is created but I am using the process File > Close....File > New
Report and the old data selection has been removed, the old report layout
removed but the old parameters are still there.
Any more ideas?
Regards
Philip L Jackson
My mistake, you will want to use the Template.New event if you are
calling File | New Report or File | New... Report from the designer.
For the method you are using in the video, the parameters should be
cleared when creating a new report from the report explorer.
I created a patch for the Report Explorer that clears the parameters
when a new report is created. Send an email to
support@digital-metaphors.com requesting the patch and we'll send it to
you as soon as possible.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com