[Gambas-user] How to clear or recreate a report preview

Dave echo8hink at yahoo.com
Tue Oct 31 16:03:24 CET 2017


I have a question about using the report2 component.

I have a button on the main form that calls report.Preview to show the 
report. I am using a record ID number to control the result set used for 
the report. The first time the preview is called, it shows the correct 
data in the report. When I close the report preview, switch to view a 
different record and click the button to show the preview of the same 
report for the current record, I get the same preview for the previously 
produced report.

I have put some debug "print" statements in the report class file and 
they are only executed the first time the preview is called. I can't 
find a way to get the preview to use the "new" data beyond the first 
time it is called.

I call the report with button_click, report.preview and the code in 
report.class is under sub _new()

What am I missing here?

-Dave



More information about the User mailing list