evwool wrote:Villeroy posted a workaround for this but I can't find his example - sorry Villeroy:(
The workaround for the bug which prevents the old style reports adjusting to an edited query is mentioned in
http://www.openoffice.org/issues/show_bug.cgi?id=98163.
It forces the program to re-read a
slightly modified query before it dumps the query result into the report's Writer table.
"Slightly modified" means that the structure of the query result and the field names still need to match the structure of the Writer table. Refer to the example in the bug description based on the "Bibliography" data source. For a query with new field names, modified order of fields, field count or types of fields you have to build a new report anyway.
The filtering by criteria stored in a table can do the job as well as stated by evwool. This technique has been documented together with all the other filter techniques by Arineckaig:
http://user.services.openoffice.org/en/ ... ng#p164898 [example database included]
Parameter queries offer another option when different filter criteria for the same fields are needed
(SELECT...WHERE "Field X"= :Something_Else)
My
BerlinStreets.odb filters a huge list of street names by a given string of first letters (show all street names starting with "Elisa")
"Query_Filter" should better be named "Param_Query" or something since it uses a parameter query. Open the query, fill out the query prompt ("StartsWith") and get the row set filtered by the criterion you provided. From this query I created a report which is also named "Query_Filter". Running this report will also prompt for the criterion and dump the query result into the Writer table contained in that report.
"Query_Report" should better be named "Query_FilterForm" or something since it uses the parameter you entered into the form "FilterForm". Anyway, play with the form, run the report and see how the report shows the same data as the form every time you run it.