UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V  1 2 >  (Go to first unread post)
   Reply to this topicStart new topic
> Export To .pdf - Split Pdf, Any Version    
 
   
bakersburg9
post Aug 14 2019, 12:24 PM
Post#1



Posts: 5,573
Joined: 2-November 04
From: Downey, CA


I did a search in UA, and found nothing on "pdf" - not much success on the 'net - so I'm exporting an Access report to pdf - but I want to split it at each section - anyone know how that can be done ? What I found says:
QUOTE
First, open the PDF file that you want to break into different parts....
Fine. Easy enough......... THEN, it says:
QUOTE
Click on the tools pane
*buzz* I'm done - WHAT 'Tools' pane ?
Go to the top of the page
 
theDBguy
post Aug 14 2019, 12:33 PM
Post#2


Access Wiki and Forums Moderator
Posts: 76,425
Joined: 19-June 07
From: SunnySandyEggo


Hi. What do you mean by "section?"

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
bakersburg9
post Aug 14 2019, 12:44 PM
Post#3



Posts: 5,573
Joined: 2-November 04
From: Downey, CA


Section - like this

Yeah, I found one site where it looked like a great site, but you had to "Start Free Trial" - yeah, and give them my credit card #, etc.
This post has been edited by bakersburg9: Aug 14 2019, 12:51 PM
Attached File(s)
Attached File  PDFpageBreakSection.png ( 112.34K )Number of downloads: 1
 
Go to the top of the page
 
theDBguy
post Aug 14 2019, 01:00 PM
Post#4


Access Wiki and Forums Moderator
Posts: 76,425
Joined: 19-June 07
From: SunnySandyEggo


Sounds like section = group, correct? If so, one possible solution is to loop through the groups and filter the report to output each one as a PDF.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
bakersburg9
post Aug 14 2019, 01:02 PM
Post#5



Posts: 5,573
Joined: 2-November 04
From: Downey, CA


QUOTE
possible solution is to loop through the groups
loop through the groups ?
Go to the top of the page
 
theDBguy
post Aug 14 2019, 01:05 PM
Post#6


Access Wiki and Forums Moderator
Posts: 76,425
Joined: 19-June 07
From: SunnySandyEggo


You were using Grouping in your report, correct? If so, yes, that's what I was saying. For example, let's say you're grouping by [DeptID], then you should be able to create a query to get a unique list all DeptID. You then loop through this list and output a filtered report based on the value of DeptID in the loop.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
bakersburg9
post Aug 14 2019, 01:30 PM
Post#7



Posts: 5,573
Joined: 2-November 04
From: Downey, CA


I'm sorry, I still don't understand what you mean by 'loop through' - a sample db with just one report is attached - I'm grouping by the Project Director in this case, or fieldname: PDatInception




Attached File(s)
Attached File  CostNoBillingUA207p.zip ( 88.63K )Number of downloads: 2
 
Go to the top of the page
 
tina t
post Aug 14 2019, 01:39 PM
Post#8



Posts: 6,125
Joined: 11-November 10
From: SoCal, USA


QUOTE
What I found says:
QUOTE
First, open the PDF file that you want to break into different parts....
Fine. Easy enough......... THEN, it says:
QUOTE
Click on the tools pane
*buzz* I'm done - WHAT 'Tools' pane ?

fyi, the above, if i'm not mistaken, is talking about splitting a PDF file that already exists - which is a different subject than printing "sections" of a report to separate PDF files. and not something you can do from within Access, AFAIK, unless you're using code that manipulates external software to accomplish the task.

hth
tina
This post has been edited by tina t: Aug 14 2019, 01:40 PM

--------------------
"the wheel never stops turning"
Go to the top of the page
 
bakersburg9
post Aug 14 2019, 01:43 PM
Post#9



Posts: 5,573
Joined: 2-November 04
From: Downey, CA


QUOTE
talking about splitting a PDF file that already exists

Tina,
That IS what I'm talking about... although I would like to do some "splitting" at an intermediate step grin.gif
Go to the top of the page
 
theDBguy
post Aug 14 2019, 01:54 PM
Post#10


Access Wiki and Forums Moderator
Posts: 76,425
Joined: 19-June 07
From: SunnySandyEggo


Hi Steve. Not sure if this is what you mean anymore but check out the attached file. Go to the Immediate Window and enter the following:
CODE
?Report2PDF


Attached File(s)
Attached File  CostNoBillingUA.zip ( 84.52K )Number of downloads: 6
 

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
bakersburg9
post Aug 14 2019, 03:32 PM
Post#11



Posts: 5,573
Joined: 2-November 04
From: Downey, CA


DbGuy,
In the words of Todd Chrisley (Chrisley Knows Best) - ARE YOU KIDDING ME RIGHT NOW??? (Although I mean it in a good way, unlike Todd's intended meaning usually...

That was absolutely AWESOME!!!!

Thank you, thank you, THANK YOU!!!! OMG, this is so great !!! cool.gif

I figured we'd go back and forth, and maybe something would be accomplished.... wow, wow, wow !!
- how do you KNOW this stuff ? uarulez2.gif

Steve
This post has been edited by bakersburg9: Aug 14 2019, 03:33 PM
Attached File(s)
Attached File  CodeForSeparatePDFsByGroupUA_DbGuy.png ( 58.69K )Number of downloads: 1
 
Go to the top of the page
 
theDBguy
post Aug 14 2019, 03:34 PM
Post#12


Access Wiki and Forums Moderator
Posts: 76,425
Joined: 19-June 07
From: SunnySandyEggo


Hi Steve. Glad we could assist. Continued success with your project.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
bakersburg9
post Aug 14 2019, 04:03 PM
Post#13



Posts: 5,573
Joined: 2-November 04
From: Downey, CA


DB,

I haven't gone over it with a fine-toothed comb yet... more like: "once I was blind, and now I see" - like I won the Lottery, and I'm like: "Are you SURE mine is the winning ticket ?

But was that Project manager file with the names CREATED, or did you have to set it up ? Just wondering - even if I do, it will be super easy

One thing I did at my current job is combine reports into one PDF - could that be done as well if I have to, do you think ?

Thanks again !!!! cool.gif

Steve
This post has been edited by bakersburg9: Aug 14 2019, 04:03 PM
Go to the top of the page
 
theDBguy
post Aug 14 2019, 04:10 PM
Post#14


Access Wiki and Forums Moderator
Posts: 76,425
Joined: 19-June 07
From: SunnySandyEggo


Hi Steve. The file names for the PDF files are coming from the report group's values. To combine multiple PDF files into one, you could ask Tina. She has a thread here where she was able to get some help from Albert for doing something like that.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
bakersburg9
post Aug 14 2019, 04:17 PM
Post#15



Posts: 5,573
Joined: 2-November 04
From: Downey, CA


About Tina - this is weird - she VERY recently chimed in on one of my posts - now her profile pic is the greyed out generic thing, and I couldn't PM her
steve
Go to the top of the page
 
theDBguy
post Aug 14 2019, 04:32 PM
Post#16


Access Wiki and Forums Moderator
Posts: 76,425
Joined: 19-June 07
From: SunnySandyEggo


Hi. Don't quote me but maybe grayed out means she's offline.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
tina t
post Aug 14 2019, 07:12 PM
Post#17



Posts: 6,125
Joined: 11-November 10
From: SoCal, USA


hi Steve, re DBguy's remark, see Albert Kallal's solution in this post. it has one drawback: it doesn't work with pdf files created in Adobe Acrobat 6.0 and newer. pdf files from other sources i've had no problem with, so far - including Access reports printed to pdf using DoCmd.PrintOut with the acFormatPDF argument (in A2016, i don't know about older versions).

in fact, i wrote a small table+form+code in A2016 to handle merging multiple files at one time. it's nothing special, anyone could do it, but since i already did the work you're welcome to a copy if you want it.

hth
tina

--------------------
"the wheel never stops turning"
Go to the top of the page
 
bakersburg9
post Aug 15 2019, 11:00 AM
Post#18



Posts: 5,573
Joined: 2-November 04
From: Downey, CA


DBGuy,
Help !

I tried writing a new function, and it's erring - says the report name does not exist, but it does - I think this may be where Access is being 'quirky' - truth be told, some of this code I did find/replace, and it left a period (.) when I was done - I thought just deleting the period would do it, but maybe not


CODE
Public Function ReportToPDFByDivision1() As Long

'********************************************** Make sure to have correct field "PDatIncception," "Office," whatever

Dim db As DAO.Database
Dim rs As DAO.Recordset

Set db = CurrentDb()
                        
Set rs = db.OpenRecordset("qCostZeroNoInvByOrigOfficeDiv1")

With rs
    Do While Not .EOF
    
        DoCmd.OpenReport "    rCostZeroNoInvByOrigOfficeDiv1", acViewPreview, , "OrigOffice='" & !OrigOffice & "'", acHidden
        DoCmd.OutputTo acOutputReport, "    rCostZeroNoInvByOrigOfficeDiv1", acFormatPDF, CurrentProject.Path & "\" & Replace(!OrigOffice, ";", "_") & ".pdf"
                                      
        DoCmd.Close acReport, "    rCostZeroNoInvByOrigOfficeDiv1"
        .MoveNext
     Loop
    .Close
End With

Set rs = Nothing
Set db = Nothing

  ReportToPDFByDivision1 = Err.Number

End Function


Edit: Can I just set up "new" dimensions with the same names in a different function / module ?

like

Dim db As DAO.Database
Dim rs As DAO.Recordset

Set db = CurrentDb()
Set rs = db.OpenRecordset("Query1")

can I use these again?

This post has been edited by bakersburg9: Aug 15 2019, 11:03 AM
Attached File(s)
Attached File  error_213_Report_DoesNot_Exist.png ( 6.25K )Number of downloads: 0
 
Go to the top of the page
 
theDBguy
post Aug 15 2019, 11:16 AM
Post#19


Access Wiki and Forums Moderator
Posts: 76,425
Joined: 19-June 07
From: SunnySandyEggo


Hi Steve. It looks like you are trying to open a report with a bunch of spaces in front of its name, which cannot exist in real life.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
bakersburg9
post Aug 15 2019, 11:27 AM
Post#20



Posts: 5,573
Joined: 2-November 04
From: Downey, CA


DBguy from sunny Sandy Eggo - Oh, Gawd, HOW did I not notice that ? Believe me, I didn't just make a panicky post on UA - I was focusing on the spelling - thanks for catching the obvious error - I'M the quirky one . . .
Go to the top of the page
 
2 Pages V  1 2 >


Custom Search


RSSSearch   Top   Lo-Fi    23rd October 2019 - 05:14 AM