473,480 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Lebans ReportToPDF with criteria

Hi,

I'm using Stephen Lebans ReportTpPDF (thank you Stephen) and it's
great.

I've not changed the code at all, I invoke it using:

Call ConvertReportToPDF(Me.rptName, vbNullString, CurrentDBDir &
Me.rptTitle & ".pdf", False, False, 0, "", "", 0, 0)

Because of only wanting to print the report relevent to the current
record I've had to set the criteria [e.g. WHERE
(((tblJobs.JobID)=[Forms]![frmJobs]![JobID]))] in the report record
source, but I'd actually like to set the criteria in the
CallConvertReportToPDF(.........)

Can anyone advise on where to place the criteria in the call please? is
it possible?

Thanks

Jon

Sep 27 '06 #1
2 1787
Just open the report *first* with the restrictions...and *then* send to
pdf...

eg:

DoCmd.OpenReport strReportName, acViewPreview, , strWhere
Reports(strReportName).Visible = False

Call ConvertReportToPDF(strReportName, , strDocPDFName, False, False)

DoCmd.Close acReport, strReportName

*very* important to CLOSE the reprot after the above.....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
Sep 28 '06 #2

Albert D. Kallal wrote:
Just open the report *first* with the restrictions...and *then* send to
pdf...

eg:

DoCmd.OpenReport strReportName, acViewPreview, , strWhere
Reports(strReportName).Visible = False

Call ConvertReportToPDF(strReportName, , strDocPDFName, False, False)

DoCmd.Close acReport, strReportName

*very* important to CLOSE the reprot after the above.....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
Perfect (and annoyingly simple!!!) thank you Albert

Jon

Sep 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
3035
by: DFS | last post by:
If you're listening, I want the middle of the calendar (showing 1 month) to open below the cursor position. It currently opens just to the right and below the cursor position. I hunted through...
5
4428
by: Tom | last post by:
Hi: I'm using the Leban's ReportToPDF solution and have encountered a small problem. I'm calling the code using the following: Call ConvertReportToPDF(strReportName, , , True, True) Where...
1
1721
by: Dennis Hartmann | last post by:
Thank you Stephen Lebans! This solution implements easily... and it works well. I figured performance would suffer a little because the report is first saved as a snapshot then converted but,...
6
1748
by: MLH | last post by:
Method "ouput to" of object "IDoCmd" failed displayed as an Access 40204 error. I dropped a JPEG object into an unbound report - just a small jpg image in the middle of the page and tried to...
0
1335
by: sramsey | last post by:
I have been using Lebans ReportToPDF code for a couple months without problems. We recently changed the format of the invoice and now the first line of the detail section of my report is missing 2...
6
2299
by: ldn95887 | last post by:
I have been using Lebans ReportToPDF code for a couple months without problems. We recently changed the format of the invoice and now the first line of the detail section of my report is missing 2...
2
2089
by: Scott McDaniel | last post by:
Stephen Lebans A2000SnapshotToPDFVer751 sample makes use of the dynapdf.dll file ... can I legally deploy this file along with my application, or do I need to purchase something from DynaForms? I...
2
1884
by: akeatley | last post by:
I have the ReportToPDF code working fine with Access 2003 (No Service Patch) and acrobat 8, but as soon as i try the same code on Access 2003 SP2 with acrobat 7 it doesn't work. <<<<<<<<<<< ...
7
3469
by: rquintal | last post by:
I could not find a good method to pass a where clause or openargs to a report named in a call to stephen Lebans' fine reportToPDF utility.l. Do you have a good method to pass a PK to the report...
0
6912
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7052
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7092
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6744
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6981
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3000
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2989
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
565
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.