` 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 November 21, 2024, 7:14 am
This article has been viewed/printed 35213 times.