Hi ,
Is it possible to stop report generation if the underlying record set is empty? If I recall correctly in some old Access 97 one could pop up a messagebox saying something like There is nothing to print.
[Solved] Kill report if there is no record
[Solved] Kill report if there is no record
- Attachments
-
- parameter.odb
- (22.3 KiB) Downloaded 517 times
Last edited by gkick on Thu Jan 02, 2020 1:18 am, edited 2 times in total.
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
Don't open report if there is no record
Hello,
if you open your report by code, first check if the resultset is empty or not, find an example attached, using RowCount of currently displayed rows.
I wont work with parameter-query, better is to use a one-row-filtertable.
For that, i changed query1 and added a structural form, "Filter": to the formular document.
Enter e.g. "white" into the topleft filterfield, then click "save filtervalue" then click "Filtered Report"
Try it using "dark" also.
R
if you open your report by code, first check if the resultset is empty or not, find an example attached, using RowCount of currently displayed rows.
I wont work with parameter-query, better is to use a one-row-filtertable.
For that, i changed query1 and added a structural form, "Filter": to the formular document.
Enter e.g. "white" into the topleft filterfield, then click "save filtervalue" then click "Filtered Report"
Try it using "dark" also.
R
- Attachments
-
- parameter.odb
- (20.91 KiB) Downloaded 520 times
- MMove 1.0.6
- Extension for easy, exact positioning of shapes, pictures, controls, frames ...
- my current system
- Windows 10 AOO, LOLinux Mint AOO, LO
Re: Kill report if there is no record
Thanks for that, will have a look shortly, Happy New Year!
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
Re: Kill report if there is no record
Very nice, thanks!
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend