Stephen, I have tried your ConvertReport2PDF and loved the simplicity,
however, is there a way to filter the report prior to passing it to
C2PDF? I tried but the C2PDF didn't allow the filter. It has been a
while since I tinkered with it, so you may have made changes....or maybe
I wasn't bright enough to figure out how.
Thanks
Jim
Coincidentally, I just implemented this very thing in an application. About
an hour ago!
It's a little bit of work but it's worth it.
You will need to have a form that you choose reports to print or convert. In
this form, create a property or properties that will hold the data you would
normally pass to the report, say in an OpenArgs method. For each property,
you should also have a private module variable associated with the form.
You will have to create Property Get/Let statements for each property. And
within the Report form, whenever you change controls or enter text/data, you
will need to set (Let) the property associated with that control/data.
Now, for every report you have, you'll need to write code in the Report_Open
event. You can use all the properties you created in the Report form and Get
their values to use to construct any filter you want.
When you have the filter constructed, assign it like this:
(within the Report_Open event procedure)
Me.Filter = <the string that contains your filter>
Me.FilterOn = True
I was using the OpenArgs method to pass data to reports, but this is far more
scalable. I could conceivably pass dozens of pieces of data to construct very
sophisticated filters for reports.