Showing posts with label SSRS. Show all posts
Showing posts with label SSRS. Show all posts

Tuesday, 10 December 2019

Add link/hyerlink through drillthrough on SSRS report in D365 F&O

Today I will discussing about one of the requirement which I came through while working on sales order confirmation report. 
The requirement was this that i need to add a hyperlink on Itemid field within existing sales order confirmation report. So here are couple of steps which any one can follow on in order to add a hyper link for itemid field within SSRS report.

Step 1) Open the design of your report. Right click on text box properties.
 






















Step 2) Go to action tab and click the URL radio button and add a expression then Click on ok button.


















Explanation of expression :
=Microsoft.Dynamics.Framework.Reports.BuiltInMethods.GenerateDrillThroughLink(
Parameters!AX_ReportContext.Value,
Parameters!AX_UserContext.Value,
"Menuitem name to be called",                    
"The type of the meun item which is to be called for instance : "Display"",
"Table name associated with Menu item or referred by it",
"Field name within the restricted table ",
"The value of field within dataset")

Output : 
When you will click on Item id field in SSRS report then it will navigate  you to release products form.


Friday, 25 January 2019

Customize design and business logic of standard SSRS report in D365 F&O

Today, I will be discussing about how to customize or perform changes without over layering in the standard SSRS report of D365 F&O.

Let's take an the example of SalesInvoice Report in AX.  For example our client has a requirement of performing few changes within Sales invoice report just like he want additional field so we can follow below mentioned steps in order to achieve this target.

Step 1) Create a new project.

Step 2) Assume that I want to add AdditionalQty field on body of report so I am going to create a extension of SalesInvoiceTmp table and add required fields within it.






Step 3) Build and Synchronize the table.

Step 4) Create a new helper class in my case I have created SalesInvoiceHelper class and copy onInserting event handler of SalesInvoice tmp table. Add logic within the copied event handler.












Note : For the demo purpose I have added logic for this  field. Whereas as  you can add logic as per your requirements.












Step 4) Duplicate the report  and give it a new name. Make changes in design accordingly.


















Step 5)  Go to PrintMgmtDocType class and copy event handler of getDefaultReportFormatDelegate and subscribe to its event handler. Add logic in the method to call this new report in helper class.























Step 6) Duplicate Sales invoice controller class  by creating new controller and change its logic in order to call your new report.

For instance in my class I have replaced SalesInvoicecontroller instance with salesInvoiceControllerDemo and called my report SalesinvoiceDemo with design Report.

















Step 7)  Extend sales invoice report menu item and change its controller property to your new controller.


Before creating new extension of menu item.










After creating new extension.











Build the complete project and execute your report.

Here comes the error.









Oops. Probably I missed something and that is deploying my report. Right click on your project and select deploy reports.

One more thing go to Account receivable ->Setup -> Form setup -> Select print management
Go to customer invoice node and select your design and report there too.












Final output with our custom column.

Thursday, 13 December 2018

SSRS reports - Repeat header on new page

Today, I will be discussing about one of the common issue which we might face and that is related to repeating header on new page.

As we all know that in SSRS reports there is already checkbox on tablix  properties which is used for repeating row header. However, it might not work some time.























So here is work around for it.

Step 1) Go to your tablix first and column group. Now right click on its corner. Then select advance mode.




Step 2) Go to row group and select on static above details group.
Step 3) Go to properties of row (static) and this is tablix member. Now set true to repeat on new page property. Keep with group property to after.
























Your header will be repeated on each page :D


Monday, 29 October 2018

SSRS report through drill through action URL

Today I will be discussing about how to drill through action URL to a field in an SSRS report. Basically a drill through report is a report that a user opens by clicking a linked item in another report. It allows the users to drill through additional data.

Lets say we want to create a hyper link for invoice id field in Payment journal report in AX.

Step 1) Open visual studio and go to view menu and select application explorer.

Step 2) Expand AOT and navigate to Visual studio project -> C sharp projects -> SRSDrillThroughCommon project and edit it.













Step 3) Open DrillThroughCommonHelper class and search pre build method for vendor invoice journal form.








Step 4) Open your report from AOT. In my case its ledger journal and add data method into it. It will add business logic class to your project where you will write code for calling drill through method.
























Step 5) Add a reference of SRSDrillThroughCommon project in business logic project.






Step 6) Open LedgerJournal.cs class and implement DrillInvoiceNumber method.





Step 7) Now open report in designer and right click on properties of invoice id text box. Go to action tab and select go to URL radio button and add expression in it.



























Step 8) Change font color of text box to blue.
Step 9) Change access properties of SRSDrillThroughCommon and LedgerJournalReport.BusinessLogic where you need to set Deploy to client to yes.
Step 10) Build and deploy.
Step 11) Go to Account payable -> Journals -> Payment -> Payment Journals -> Select journal -> Lines -> Print -> Journals. Click on invoice id and it will navigate to invoice journal form and highlight the row of clicked invoice number.














Custom Business events Part 3 - (Activate custom business event) in D365 F&O

 In this blog we will discuss about the steps to activate a custom business in D365 F&O. As we know that business event catalog does not...