This record is otherwise automatically set through _args.record() of an SSRS controller instance. Using the same method and the DocReportRunContext class we can also change the Report Execution Context record. _reportRunContext.parmTemplateId(docTemplate.TemplateId) _reportRunContext.parmTemplateCompanyId(docTemplate.CompanyId) _reportRunContext.parmTemplateLanguageId(docTemplate.LanguageID) Where docTemplate.Report = docReport.RecId &ĭocTemplate.Title = 'May month template' _reportRunContext.parmSuppressSuccessMsg(true) ĭocReport = DocReportTable::findReportId(_reportRunContext.reportId()) _reportRunContext.parmPrintDestination(DocPrintDestination::File) _reportRunContext.filePrintDestSettings().parmOpenGeneratedDoc(true) _reportRunContext.filePrintDestSettings().parmOutputFileFormat(DocOutputFileFormat::DOCX) _reportRunContext.filePrintDestSettings().parmSaveToAttachments(false) _reportRunContext.filePrintDestSettings().parmUseNextFilename(false) _reportRunContext.filePrintDestSettings().parmGeneratedDocFilename(tempClientFilename) TempClientFilename = DocFileMngHelper::replaceFileExtension(tempClientFilename, 'docx') TempClientFilename = DocFileMngHelper::getTempFileNameOnClient() _reportRunContext.filePrintDestSettings().parmIsCalculatedFilename(false) If (_reportRunContext.parmPrintDestination() = DocPrintDestination::Screen) the Title set to 'May month template'. Also we are going to replace the currently selected template with the one which has after the report executes and suppress the message about successful report execution. destination to File, set the output format to Word document, open the report output file and the selected print destination is Screen, we are going to change the selected print Task only for demo purposes: In case that the FromDate report parameter belong to May PlaceHolderMng = super(_reportRunContext, _replaceStandardPlaceholders) TransDate parameterFromDate = hcmBirthdayDc.parmFromDate() HcmBirthda圜ontract hcmBirthdayDc = this.getSrsRdpContract()
Public DocPlaceholderManager overrideReportRunSettings(ĭocReportRunContext _reportRunContext, boolean _replaceStandardPlaceholders = true) Take a look at the sample implementation of the overrideReportRunSettings() method: Email, File or Printer print destination settings.Since we get an instance of the DocReportRunContext class as an input parameter of the overrideReportRunSettings() method, we can affect all executing report settings which are exposed through this class. In case you want to dynamically change the execution report settings, replace Print Destination Custom Placeholders or to add additional data to the report data source, you will need to create a custom DSP class using the wizard. Note that in general we don’t have to create a custom DSP class for an SSRS report because in many cases using the base DSP class is sufficient. To dynamically change selected print destination settings we need to inject custom business logic at the 4th step in the pipeline by extending the overrideReportRunSettings() method of the report DSP (Data Source Provider) class. Generate the report in the requested format and send it to the selected print destination.and replace Print Destination Placeholders, if any.
How to change screenshot destination archive#
Override the report execution settings such as Selected Template, Selected Print Destination, Report Caption, Save to Archive Flag, etc.Get the run-time report data source, i.e.Validate the report parameters and other report settings likewise the selected print destination settings.
How to change screenshot destination code#
Open the report dialog form (if not running a report from code or in batch or in case of an SSRS Print Management report).The report execution pipeline consists of the following steps: Report Caption, the Save to Archive flag, Selected Print Destination, Selected Template, etc.) we need to inject custom business logic at the specific point in the report execution pipeline. To dynamically change report execution settings (e.g. They can also be changed dynamically, i.e. Print destination settings of an executing Docentric SSRS or Basic report are usually selected by using the report dialog form.