AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 30.10.2019, 13:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
a33ik: SSRS renderingCompleted delegate
Источник: http://daxonline.org/1664-ssrs-rende...-delegate.html
==============

Comment from: \Classes\SrsReportRunController\renderingCompleted
/// Write event handlers and hook into this to handle the rendering complete event.
/// IMPORTANT NOTE: Please ensure you register your event handler in preRunModifyContract method.
/// This will ensure that event is called in both batch and interactive scenario.
/// For interactive cases controller main method is called. For batch case controller run method is called.
/// Both batch and interactive call preRunModifyContract prior to running report.
/// If using SrsPrintMgmtController you can also register this event in runPrintMgmt method.


Subscription: \Classes\CustInterestNoteFormLetterController\main
SrsReportRunController reportRunController = new CustInterestNoteFormLetterController(); reportRunController.parmReportName(PrintMgmtDocType::construct(PrintMgmtDocumentType::CustInterestNote).getDefaultReportFormat()); reportRunController.parmArgs(_args); reportRunController.renderingCompleted += eventhandler(CustInterestNoteFormLetterController::renderingComplete); reportRunController.startOperation();

Standard example: \Classes\CustInterestNoteFormLetterController\renderingComplete
public static void renderingComplete(SrsReportRunController _sender, SrsRenderingCompletedEventArgs _eventArgs){ CustInterestJour custInterestJour; InterestNote interestNote; Query query; QueryRun queryRun; FormRun formRun; SRSReportExecutionInfo executionInfo = _eventArgs.parmReportExecutionInfo(); if(executionInfo && executionInfo.parmIsSuccessful()) { // Get the report's query query = _sender.parmReportContract().parmQueryContracts().lookup(_sender.getFirstQueryContractKey()); // Mark all interest notes "Printed" queryRun = new QueryRun(query); ttsbegin; while(queryRun.next()) { interestNote = queryRun.get(tableNum(CustInterestJour)).(fieldNum(CustInterestJour, InterestNote)); update_recordset custInterestJour setting Printed = NoYes::Yes where custInterestJour.InterestNote == interestNote && !custInterestJour.Printed; } ttscommit; // Refresh the grid formRun = _sender.parmArgs().caller() // as FormRun // ; if(FormRun) { formRun.dataSource(1).research(true); } }}



Источник: http://daxonline.org/1664-ssrs-rende...-delegate.html
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
a33ik: SSRS display static row as header at each page Blog bot DAX Blogs 0 26.07.2019 18:12
a33ik: SSRS display in header value from dataset/tablix Blog bot DAX Blogs 0 26.07.2019 18:12
kamalblogs: SSRS Tip: Using invisible parameters in contracts – Dynamics AX 2012 Blog bot DAX Blogs 2 30.09.2013 17:50
kamalblogs: SSRS Tip: Printing Row headers in every page – Dynamics Ax 2012 Blog bot DAX Blogs 0 23.09.2013 16:12
gatesasbait: Dynamics AX 2009 SSRS and SSAS Integration Tips Blog bot DAX Blogs 3 09.07.2009 13:07
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 00:20.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.