For this example, we created a custom report that takes in the Account Id as a parameter and displays the report.
- To add report in report manager, go to report manager URL and upload the report file .*rdl.
- After that, to find the report URL, go to report server and right click on report's properties to copy the URL.
- Add a IFrame in Account entity and URL of the IFrame, enter ‘about:blank’.
- We will now add logic in the form OnLoad event that will create the report URL and append the Account Id for the report to use to display the report.
- Add the following codes in OnLoad.
var guid = crmForm.ObjectId; var url = 'http://tbe/ReportServer?%2fTesting_AddReportIntoIFrame&rs:Command=Render&rs:Format=HTML4.0&rc:Toolbar=false&rc:Parameters=false&rc:Parameters=false&AccountId=' + guid; document.getElementById('IFRAME_Testing').src = url;
- Now save and close the form and publish the entity.
- Navigate to an account and you should see the new tab and report render in the IFrame.
- Since we want the report in an IFrame, we do not want the report viewer toolbar and parameters to show. Hence the ‘rc:Toolbar=false&rc:Parameters=false”. Since we want the report to render in HTML 4.0, we can specify the format to render the report in by specifying ‘rs:Format=HTML4.0’.
This comment has been removed by the author.
ReplyDeletethis 1 custom diy punya ler..
ReplyDelete