How to run the SSRS report through Code in Axapta 2012

Hi Friends,

I need one help .

I have developed one report using dataprovider class and Data contract class . Let me explain clearly.

for example : i am able to run the report using dialog parameters i.e from date and To Date. up to that level fine.

Now My Question is i want to run same report through code . i.e how to pass parameter values and how to

run the report.



Hi Ramesh,

You have to use the controller class, contract class to run the report.You need to pass the table buffer that has your current record data to be printed in the report.For example if you are using purchPurchaseOrder report. You need to initialize purchPurchaseOrderController and PurchPurchaseOrderContract with the data of vendPurchOrderJour.You might also need to initialize SrsPrintMgmtExecutionInfo and SrsReportRunImpl as in the class SrsPrintMgmtController.runReport().

Look at the code of purchPurchaseOrderController.main() and PurchRFQSendController.runPrintMgmt(),purchRFQSendController.runReport() ,etc. Analyze the code of few controller classes and try to replicate the way AX is running the report.