Report calls report and output to PDF

Roelof
Member Posts: 377
I created a report (A) that calls another report (B). A report has an option to print to PDF so that it shows on screen as a PDF format. But when I run report A with the PDF option, report B is not taking that in consideration and prints straight to the printer. Is there a way to transfer the PDF output option to Report B?
PS: I'm not thinking about the SAVEASPDF option.
Thanks.
PS: I'm not thinking about the SAVEASPDF option.
Thanks.
Roelof de Jonghttp://www.wye.com
0
Answers
-
Hello Roelof,
how do you call the Report (B)?
You could define a function, where the option for the PDF get's set and run the report afterwards.
Example:Variable: Name DataType Subtype Length ReportTest Report Report (B) Code: ReportTest.PrintAsPdf(True) ReportTest.RUN;
PrintAsPdf is a function in Report(B) where you set the variable for the pdf print.0 -
Hi Aluan,
I understand your approach but I don't see an option in a report to set to print as PDF.
Only 'SAVEASPDF'. Unless I miss something? Which variable for the pdf print would that be?
Roelof de Jonghttp://www.wye.com0 -
-
REPORTFORMAT is to be used with REPORT.SAVEAS. But that is very similar to using SAVEASPDF. Why can't you use SAVEASPDF?0
-
-
-
Hi Vaprog,
The reviewing using PDF option is working fine if you run just report B but what I have is calling report B from report A. If I use the PDF option in report A, it doesn't view but it prints straight to the printer. So I'm looking at functionality that I can set in report A for report B, before report B is printing.Roelof de Jonghttp://www.wye.com0 -
Ah okay,
i thought you have already a function for the pdf print. Sorry for the late response.
How do you call Report B from Report A right now?
I think the easiest solution would either you show for the second Report the Requestpage, so that the user can select the PDF print, as shown from vaprog, or you use the SAVEASPDF function and afterwards the DOWNLOAD function.ToFile -> Text Variable. YourReport.SAVEASPDF('YourFileName'); ToFile := 'ExampleFile.pdf'; DOWNLOAD('YourfileName','','','',ToFile)
If i use the above function, the file get's downloaded to my computer and get's directly openend in my pdf viewer.
0 -
Hi Reolof,If I use the PDF option in report A, it doesn't view but it prints straight to the printer. So I'm looking at functionality that I can set in report A for report B, before report B is printing.
- Read the rendering target from report A
- Set the rendering target in Report B
I don't know, how to access this information from within NAV.
So, I guess, your only options are those listed by @Aluan, unless someone else knows, how to set it. Possibly you can manipulate the RDL property I mentioned above, but I don't know.
0 -
Yeah, 'SAVEASPDF' is not an option I'm looking for.
So, long story short: it's not possible what I had in mind. Bummer.Roelof de Jonghttp://www.wye.com0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions