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 so you can print
a single record to an individual pdf?.
I've got 2500 records to make into .pdfs, (project manager says it's
what customer wants)
and I've put the report2pdf call inside a loop. It works, but ignores
any filter clause I try to pass (using a one field, on record table,
or a public variable or a query criteria to a form, etc...
Thanks
Bob Q 7 3474
"rq******@sympa tico.ca" <bo*********@gm ail.comwrote in message
news:ae******** *************** ***********@m44 g2000hsc.google groups.com...
>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 so you can print
a single record to an individual pdf?.
Yes, just open the report BEFORE you call the pdf routines.
eg:
strReportName = "rptInvoice "
DoCmd.OpenRepor t strReportName, acViewPreview, , strWhere
Reports(strRepo rtName).Visible = False
Call ConvertReportTo PDF(strReportNa me, , strDocName, False, False)
DoCmd.Close acReport, strReportName
Note how the "strwhere" could be for the current reocrd
strWhere = "id = " & me!id
And, don't forget to "close" the report as above after you are done...
So, open the report with all of your filter options etc BEFORE you call the
pdf routines.....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada pl************* ****@msn.com
>
rq******@sympat ico.ca wrote:
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 so you can print
a single record to an individual pdf?.
I've got 2500 records to make into .pdfs, (project manager says it's
what customer wants)
and I've put the report2pdf call inside a loop. It works, but ignores
any filter clause I try to pass (using a one field, on record table,
or a public variable or a query criteria to a form, etc...
Thanks
Bob Q
I coded something for his program just today. I have a report that can
be called from several forms. There's only 1 form that will be calling
the routine to create the PDF file. So in my OnOpen event of the report
I did something like
If IsLoaded("formn ame") then 'google for example of isloaded()
If not isnull(Forms!Fo rmName!ReportFi lter) then
Me.Filter = Forms!FormName! ReportFilter
Me.FilterOn = True
Endif
Endif
Then in my routine to call Stephen Lebans code it's something like this
Dim blnOK As Boolean
Forms!MainForm! ReportFilter = "CustomerID = 1"
blnOK = ConvertReportTo PDF...
Forms!MainForm! ReportFilter = Null
Stephen's code works like a charm.
Salad <oi*@vinegar.co mwrote:
>So in my OnOpen event of the report I did something like If IsLoaded("formn ame") then 'google for example of isloaded() If not isnull(Forms!Fo rmName!ReportFi lter) then Me.Filter = Forms!FormName! ReportFilter Me.FilterOn = True Endif Endif
Then in my routine to call Stephen Lebans code it's something like this Dim blnOK As Boolean Forms!MainForm! ReportFilter = "CustomerID = 1" blnOK = ConvertReportTo PDF... Forms!MainForm! ReportFilter = Null
Stephen's code works like a charm.
I use something very similar. Except that I use a Global Options Hidden form bound
to a global options table on which I throw a tab control. And I put miscellanious
fields such as the one Salad uses as well.
This form also takes care of the performance problem issue.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
On Sep 23, 6:58*pm, "Tony Toews [MVP]" <tto...@teluspl anet.netwrote:
Salad <o...@vinegar.c omwrote:
So in my OnOpen event of the report
I did something like
* *If IsLoaded("formn ame") then *'google for example of isloaded()
* * * * * *If not isnull(Forms!Fo rmName!ReportFi lter) then
* * * * * * * * * *Me.Filter = Forms!FormName! ReportFilter
* * * * * * * * * *Me.FilterOn = True
* * * * * *Endif
* *Endif
Then in my routine to call Stephen Lebans code it's something like this
* *Dim blnOK As Boolean
* *Forms!MainForm !ReportFilter = "CustomerID = 1"
* *blnOK = ConvertReportTo PDF...
* *Forms!MainForm !ReportFilter = Null
Stephen's code works like a charm.
I use something very similar. *Except that I use a Global Options Hidden form bound
to a global options table on which I throw a tab control. * And I put miscellanious
fields such as the one Salad uses as well.
This form also takes care of the performance problem issue.
Tony
--
Tony Toews, Microsoft Access MVP
* *Please respond only in the newsgroups so that others can
read the entire thread of messages.
* *Microsoft Access Links, Hints, Tips & Accounting Systems athttp://www.granite.ab. ca/accsmstr.htm
* *Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/- Hide quoted text -
- Show quoted text -
Thanks to all 3 of you for your responses. Albert's method worked
beautifully, although I'm surprised at the fact that opening an open
form respects the filter on the first form, instead of the form
defaults.
However, I do intend to update the code to use Salad's and your method
mecause I find the flickering of the report being opened, closed and
reopened 2022 times a little annoying.
As to performance, it took about 20 minutes to create the 2000+ .PDFs,
2 to 5 pages each.
Q
"rq******@sympa tico.ca" <bo*********@gm ail.comwrote:
>As to performance, it took about 20 minutes to create the 2000+ .PDFs, 2 to 5 pages each.
So a hundred a minute isn't bad at all. Gotta love Stephen's solution. I sure do!
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
On Sep 24, 6:37*pm, "Tony Toews [MVP]" <tto...@teluspl anet.netwrote:
"rquin...@sympa tico.ca" <bob.quin...@gm ail.comwrote:
As to performance, it took about 20 minutes to create the 2000+ .PDFs,
2 to 5 pages each.
So a hundred a minute isn't bad at all. * Gotta love Stephen's solution.. *I sure do!
Tony
He's da man!
Thanks Stephen, for all your fine work.
"rq******@sympa tico.ca" <bo*********@gm ail.comwrote in message
news:2e******** *************** ***********@m36 g2000hse.google groups.com...
On Sep 24, 6:37 pm, "Tony Toews [MVP]" <tto...@teluspl anet.netwrote:
"rquin...@sympa tico.ca" <bob.quin...@gm ail.comwrote:
As to performance, it took about 20 minutes to create the 2000+ .PDFs,
2 to 5 pages each.
So a hundred a minute isn't bad at all. Gotta love Stephen's solution. I sure do!
Tony
>He's da man!
>Thanks Stephen, for all your fine work.
Yes, I have to throw in a big thanks to that Stephen guy.....it is a fab pdf
maker.....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada pl************* ****@msn.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 the code, but can't determine what to alter.
Very nice piece of work, by the way.
Thanks
|
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 strReportname is the name of the report being printed.
I would like the Dialog box to be shown to allow the user to select a
|
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, initial testing (standalone PC) shows about 20 per cent speed
improvment and 70 per cent smaller file size on 1,900 page report. Added
bonus: no...
|
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 generate a PDF.
The error, of course, halted the process.
Anyone know of a way to circumvent this?
|
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 of the 9
fields. The rest of the report is fine.
In looking at his website there is a version note on 2/21/06 indicating
he fixed the "missing...
| |
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 of the 9
fields. The rest of the report is fine.
In looking at his website there is a version note on 2/21/06 indicating
he fixed the...
|
by: J-P-W |
last post by:
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)
|
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 looked on the site, and in the zip file
but could find no info about this.
Thanks,
Scott
|
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.
<<<<<<<<<<<
' Save the Snapshot file as a PDF document.
Dim blRet As Boolean
Dim sPDF As String
Dim sName As String
sName = "Exception_Report"...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |