I know there is no function at the moment to print reports to PDF. This is how I got round the problem.
Create your reports and schedule them i.e on a monthly basis.
Install PDF Creator, set the PDFCreator printer to be your default printer.
Open the PDFCreator options and check the box AutoSave, Select the path you wish to save too. Make sure the <title> token is in the Filename field.
Click on Actions, save the following code as Report_Rename.vbs and select it on the actions page. The output should be "<OutputFilename>" including the ""
Dim FSO, createnewfolder
Set argobj = Wscript.Arguments
Set FSO = CreateObject("Scripting.FileSystemObject")
Function pd(n, totalDigits)
if totalDigits > len(n) then
pd = String(totalDigits-len(n),"0") & n
else
pd = n
end if
End Function
today = YEAR(Date()) & "-" & Pd(Month(date()),2)
newfolder = today & " - Performance Reports"
if not FSO.FolderExists(newfolder) then
createnewfolder = fso.CreateFolder(newfolder)
end if
PdfInputName = argobj(0)
currentFolder = FSO.GetAbsolutePathName(".")
select case PdfInputName
case currentFolder & "\<Report 1>.pdf"
FSO.MoveFile PdfInputName, newfolder & "\" & today & " - <Report 1>.pdf"
case currentFolder & "\<Report 2>.pdf"
FSO.MoveFile PdfInputName, newfolder & "\" & today & " - <Report 2>.pdf"
case currentFolder & "\<Report 3>.pdf"
FSO.MoveFile PdfInputName, newfolder & "\" & today & " - <Report 3>.pdf"
case currentFolder & "\<Report 4>.pdf"
FSO.MoveFile PdfInputName, newfolder & "\" & today & " - <Report 4>.pdf"
case currentFolder & "\h<Report 5>.pdf"
FSO.MoveFile PdfInputName, newfolder & "\" & today & " - <Report 5>.pdf"
case currentFolder & "\<Report 6>.pdf"
FSO.MoveFile PdfInputName, newfolder & "\" & today & " - <Report 6>.pdf"
end select
You will need to print out the files first without running the VBS Script so that you get the unmodified file names. Here copy the file name into the first <Report 1> and dont forget to include the \ at the begining. The 2nd instance of <Report 1> is for the new file name. The files will be put in a folder "2008-10 - Performance Reports" and then be named 2008-10 - your name.pdf
Finally edit your Report Scheduler to make sure that it prints to the PDFCreator printer and give it a shot.
I hope this helps for anyone that is trying to print reports to PDF.
Peter