I need to toggle some presentation in my SSRS Report based on the print medium the report will be generated on.
I have to do this for a bunch of reports (SalesInvoice, SalesConfirm, SalesQuotation).
The problem is I can't find an access point where I have access to both things:
- In the SalesInvoiceJournalPost class I have access to the printmedium but not the SalesInvoiceContract
- In the SalesInvoiceController class I have access to the SalesInvoiceContract but the printsettings are giving me false values
In SalesInvoiceJournalPost.init
I try:
printSettings = SysOperationHelper::base64Decode(chainFormletterContract.parmPrintersettingsFormletter());
printDestinationSettings = new SRSPrintDestinationSettings(printSettings);
if (printDestinationSettings.printMediumType() == SRSPrintMediumType::Email)
{
// Can't access Report Parameter from here
}
In SalesInvoiceController.main
I try:
printDestination = formLetterController.parmReportContract().parmPrintSettings();
salesInvoiceContract = formLetterController.parmReportContract().parmRdpContract() as SalesInvoiceContract;
salesInvoiceContract.paramMyValue(
// this is always false because printMedium is always Screen
printDestination.printMediumType() == SRSPrintMediumType::Email
);