8 Replies Latest reply on Jul 24, 2013 3:13 AM by 948442

    How to invoke a report by name instead of ID?


      We have developed several shared reports which are invoked from other applications. In Active Studio we select the Report and use "Copy Shortcut" option in left menu to get a web link such this:


      We have two environments: a development and production. We are exporting reports in development and importing in production (using icommand), but ids change everytime, so the parameter above (ReportDef) is not the same as before and we have to re-custom all apps again. The problem is we have several (200+) reports and takes a long time to update all reports, tests and so on.

      Any idea if is possible calling a report by name instead of ID?

      Thank you too much,

        • 2. Re: How to invoke a report by name instead of ID?
          Hi Rogerio

          You can use the command import with the MODE=OVERWRITE.

          It keeps the Report ID.

          icommand cmd=import MODE=overwrite file=filename.xml


          Message was edited by:
          • 3. Re: How to invoke a report by name instead of ID?

            Thank you for your reply. We have some html customizations with explicit links to reports and would be great perserving original id of reports when moving objects from development to production environment.

            Best regards,
            • 4. Re: How to invoke a report by name instead of ID?

              You can use command only, it is your help.


              • 5. Re: How to invoke a report by name instead of ID?
                I used both




                But none of them worked as expected. MODE=OVERWRITE assigned a new ID each time we import a report and MODE=PRESERVEID doesn't work for reports, only data objects.

                Any idea if is there a path to preserve id in reports when exporting/importing?

                • 6. Re: How to invoke a report by name instead of ID?

                  Hi Rogerio,


                     Have you found any solution to invoke report by name instead of ID. Have similar requirement.

                  Please Help.



                  • 7. Re: How to invoke a report by name instead of ID?
                    Ravi Jegga

                    Hi All


                    1. In ORABAM Schema, all the Report details are stored in Tables like SysIterReport, SysIterDataset, SysIterParameter, SysIterParameterValue.



                    2. Most important Table is SysIterReport. It has "SysIterName" which is Report full name with full path like "/public/Report/MyXyzApp/MyXyzReport1" and "SysIterID". This SysIterID is the Report ID.



                    3. So simple Query above table to get all the SysIterIDs for the matching  SysIterName. From returned rows, simple extract last part of the name which is like unique Report name. Now you have a mapping of Report Name versus the Report Id from that OraBAM Schema in that Environment like Qc, UAT or production.


                    Select SysIterID, SysIterName from SysIterReport where SysIterName like '%MyXyzApp%'.



                    4. I would recommend to create like separate folders for separate bpm projects deployed on same domain. And put that application specific data objects and reports in that folder itself.


                    From Java side very simple. On BPM Domain with Oracle BAM configuration, you already have a DataSource that connects to ORABAM Schema by name "BAMDataSource-jdbc.xml" under config/jdbc folder. This XML File has all orabam schema details and also JNDI Name like "jdbc/oracle/bam/adc". Write a simple Java Program. Do JNDI lookup using this datasource name. And from that get connection object. Run above query and get rows back. Build a simple WebPage, and build a dynamic URL as shown below. BamServer host and BamServer Port can be put in a properties file to make it more dynamic. And each environment will have .properties file with those details. Or simple put the below URL as it is which is different for each environment.





                    In the Java code, simple get above url and append the ReportId. And on UI for each URL, show the Report Name. Simple speaking, once you get Rows from SysIterReport table, on java side create a HashMap with ReportName and ReportLink (generated as shown above). And on UI, loop through this Map and show name and link.



                    One final thing. If the Java code is deployed to SOA_Server, make sure that the BAMDatasource is deployed to SOA Server also. By default BAMDataSource is targetted only to BAM Server. But java code or ui code is on Soa server. So simple target bam data source to soa source also from Weblogic Console.



                    This will WORK and I have already done this. Users will see more user friendly Links on my Task Details page. And clicking on them takes them to the BAM Reports.





                    Ravi Jegga

                    • 8. Re: How to invoke a report by name instead of ID?

                      Thanks Ravi, Info is very much helpful.