Import the Interactive Report Template into Other Apps
It is possible to import the data set of any Interactive Report Template into any other Web 2.0 application. Let’s assume, for this example that we are working in the MRCREPORTS data dictionary. I would like to import Report 50 (Interactive Report Template) into Inquiry 10. Here are the steps you need to take:
- Within Inquiry 10, open m-Painter and click the “Insert Import” button.
- Select “Report” from the “Import Application Type” option. Select Report 50 from the “Import Application” option.
- Within the URL text area, add the following code:
?basic=1&run=6&R001=${row.CUSNO}
Please replace ${row.CUSNO} with any value you wish to pass to the Report. Click OK.
Note: run=6 indicates to the report that we only want the data to be imported, not the left side “Record Selection options”. - Copy the following code into the <head> section of Inquiry 10:
<link rel="stylesheet" type="text/css" href="/mrcjava/mrcclasses/mrcmain.css" />
<link rel="stylesheet" type="text/css" href="/mrcjava/mrcclasses/MRCREPORTS/jquery.custom.css" />
<script type="text/javascript" src="/mrcjava/mrcclasses/mrcjsajax.js"></script>
<script type="text/javascript" src="/mrcjava/mrcclasses/jquery.asmselect.js"></script>
<script type="text/javascript" src="/mrcjava/mrcclasses/mrcreport.js"></script>
<script type="text/javascript" src="/mrcjava/mrcclasses/mrcjquery.js"></script>
<script type="text/javascript">
jQuery(document).ready(function() {
var options = {
formId: 'FORM_R00050',
appUrl: 'MRCREPORTS.R00050s',
extraParms: '', // '&p1=v1&p2=v2...'
datapaneId: 'data_pane',
greyoutOn: ${page.refreshSelections},
appkeys : { "SALESYR":"R001", "SALESQTR":"R002", "SALESMTH":"R003", "INVLINE":"R004"}
keyrls : {}
};
onePage(options);
initsetup("FORM_R00830"); //for LS/NS inputs setup
});
</script>
Note: You may also feel free to copy all of the above lines of code directly from your Interactive Report’s HTML source, and disregard the notes below.
Note: Be sure to change all references of MRCREPORTS & R00050 (which have been underlined above) to your correct data dictionary and application number.
Note: Be sure to change the appkeys line to reference your application keys. This line particularly may be easier to simply copy over directly from your Interactive Report. - The above step ensures that the additional logic needed to run your Interactive Report will exist within the importing application.