Print Page | Close Window

PDF Redirect 2.5.2 free ver

Printed From: www.exp-systems.com
Category: PDF reDirect
Forum Name: Using PDF reDirect
Forum Discription: Questions and Comments on using PDF reDirect Freeware and Pro
URL: http://www.exp-systems.com/Forum_exp/forum_posts.asp?TID=870
Printed Date: 22 Nov 24 at 6:06PM


Topic: PDF Redirect 2.5.2 free ver
Posted By: rand
Subject: PDF Redirect 2.5.2 free ver
Date Posted: 29 Feb 12 at 1:34PM
Access 2010 -printing multiple reports with code in the onformat section of the detail. The code does not get executed justs print completely blank page
or partial data. Which means its not getting enough time to calculate.
if i print it as 1 page its fine. I changed the print spooling to print after last page is spooled let them load and perhaps have time to calculate but it still does not work.
The code being used DoCmd.RunCommand acCmdQuickPrint after a List box of 25- 40 reports of each selected.
If i perform this to print to a printer it works no problem.
Is there a time feature or something to slow down the generation of each report to allow the detail section to be formatted.

I love the Idea of this and will definitely Purchase the Pro version if this works as it does in deed work with my Acrobat Extended Pro 9.0 when i use the code . But my clients do not have Acrobat PRo.
anyways Any help would be most appreciated.



Replies:
Posted By: Michel_K17
Date Posted: 29 Feb 12 at 10:24PM
Hi,

   Have you tried printing using the technique shown in my sample code?

---------------------------------------------
    
     '-------------------------------------------------------------
     ' Create the PDF by sending the Print Job to the Batch Printer
     '-------------------------------------------------------------
     ' Note: I received a report from someone who was having a problem
     ' printing his Access report. The first few records were being
     ' repeated/duplicated on the second page. Although I did not figure
     ' out why this problem occured, I was able to fix the problem by
     ' generating a "Preview" first before printing. (see below)

    
     DoCmd.OpenReport MyDocumentName, acViewPreview  ' Generate a Preview First
     DoCmd.OpenReport MyDocumentName, acViewNormal   ' Print the Report
   
     ' Done. Recover memory
     DoCmd.Close acReport, MyDocumentName

---------------------------------------------

   That seems to work for me.

   Cheers!



-------------
Michel Korwin-Szymanowski
EXP Systems LLC


Posted By: rand
Date Posted: 01 Mar 12 at 8:21AM
no with those 2 commands nothing happens, i would have to right click on each of the 46 reports open and print them. i am looping through a list box of reports. the ac cms wuickprint has to be there according to microsoft in order for it to work. seem ths complex reports dont get enough time to generate.
but if i open a complex report by it self bam i can right clik to print correctly

I have tried changing the spool settings etc and still it wont happen.
If i remove the print and just have the loop open all the reports the complex ones are generated no problem. its when they get sent to the printer that it gets lost.


Posted By: rand
Date Posted: 01 Mar 12 at 8:30AM
heres the code pretty easy.
Dim j As Integer
For j = 0 To Me.List10.ListCount - 1
   'Access easch item with
   DoCmd.OpenReport List10.ItemData(j), acViewPreview, , , acWindowNormal
             DoCmd.RunCommand acCmdQuickPrint   ' Print the Report
   DoCmd.Close acReport, List10.ItemData(j), acSaveNo
Next j


Posted By: rand
Date Posted: 01 Mar 12 at 10:29AM
i fixed it using the code above i removed ac cmd quikprint in the loop
and put it in the event on close of each report.
then i loop through all open reports and close them.
they all get printed properly.
Dim dbs As Database, ctr As Container, doc As Document

'Set dbs = CurrentDb ' Return reference to current database.
'Set ctr = dbs.Containers!Reports 'Return reference to Reports container

' Enumerate through Documents collection of Reports container.
For Each doc In ctr.Documents
DoCmd.Close acReport, doc.Name
Next doc

Set dbs = Nothing
Set ctr = Nothing

nice now i want to buy it so i can use the activex feature.
awesome and tnx for allowing me to figure this outSmile


Posted By: Michel_K17
Date Posted: 01 Mar 12 at 11:24PM
Nicely done! Smile

-------------
Michel Korwin-Szymanowski
EXP Systems LLC



Print Page | Close Window