Dear all,
I have a Report, that uses a logo.. everything works fine, but now I have the request to hide the Logo when the Report is printed, but show it when the Repost is saved as pdf using the Option "Save as pdf" from the Request Page.
How can I do this ? Any Possibility to set a Variable at Request Page, depending which Option is chosen (or Button is pressed) ?
Thank you
0
Answers
Rehan Satti
Microsoft Dynamics NAV Technical Consultant
Please verify the answer if it satisfy your question. This will help other members of community.
I suggest following solution which will, perhaps, be acceptable by your clients.
You can add a boolean field to RequestPage, put logo inside rectangle and set rectangle visibility to be HIDDEN if that boolean field is being checked.
For example, that boolean field could be called: Hide company logo.
I hope somebody can help me..
Archerpoint India Pvt. Ltd,Chennai.
Rehan Satti
Microsoft Dynamics NAV Technical Consultant
Please verify the answer if it satisfy your question. This will help other members of community.
It's marked as Processing Only and then has an output option on the request page, where you select the output you want.
Then when the report is run it calls itself again, but this time using the Report.SAVEAS, specifying the output according to what was selected on the the request page or using Report.PRINT.
You might however need to modify the way reports are run when doing e.g. Batch Post.
xStepa
I happened to have exactly the same requirement. Solution is to have a field in the root table of the report (like Sales Invoice Header), and set a filter on it in appropriate places (codeunit 452, EmailDocument() among them, but (for NAV2016) not the only one). In the report, on OnPreDataItem, check for the filter, take action (show logo or not), and remove the filter on this field. The report has no other way to know it's printing in SAVEASPDF mode.
Now my issue with SAVEASPDF is this: The logo image gets distorted, in fact really botched up when the report prints via SAVEASPDF. It doesn't when you use a printer driver, or to Word/Excel the logo image stays as it should. Anybody seen this? And how do you avoid it?
with best regards
Jens
Well, this seems to be an issue with jpegs as an embedded image in the RDLC report. Use a png file, and it works.
Merry christmas everybody.
I guess there will be something similar using VBA for Word layout.