` Printed Icetips Article

Icetips Article



Par2: Reusing QBE filter in a report
2000-01-22 -- Russ Eggen
 
1) Define a global variable as a CSTRING(255).
2) Use PrintBrowse control template.  In the embeds for event accepted for
the button, insert a CallABCMethod code template.  Select QBEx (or if you
have rename the object choose that).  The method to call is
GetFilter(),STRING.  No parameters, return value GLO:Filter.
3) On the browse object kill method, ensure you clean up: GLO:Filter = ''
4) In the report procedure, ThisReport.Open (before parent call) use this
code:
IF GLO:Filter
  ThisReport.SetFilter(GLO:Filter)
ELSE
  ThisReport.SetFilter('')
END

Make and run your app and you will discover that it prints based on the QBE
results or if you clear the QBE, then it prints everything.  This is in
addition to any range limits or sorts you may have in the report.



Printed April 29, 2024, 1:16 pm
This article has been viewed/printed 35112 times.