Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Using PDF reDirect
 EXP Systems Forum : PDF reDirect : Using PDF reDirect
Topic: PDF Redirect 2.5.2 free ver Post Reply Post New Topic
Author Message
rand
Newbie
Newbie
Avatar

Joined: 29 Feb 12
Location: Canada
Posts: 4
Quote rand Replybullet Topic: PDF Redirect 2.5.2 free ver
    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.
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet 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
IP IP Logged
rand
Newbie
Newbie
Avatar

Joined: 29 Feb 12
Location: Canada
Posts: 4
Quote rand Replybullet 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.
IP IP Logged
rand
Newbie
Newbie
Avatar

Joined: 29 Feb 12
Location: Canada
Posts: 4
Quote rand Replybullet 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
IP IP Logged
rand
Newbie
Newbie
Avatar

Joined: 29 Feb 12
Location: Canada
Posts: 4
Quote rand Replybullet 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
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 01 Mar 12 at 11:24PM
Nicely done! Smile
Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum