11 Replies Latest reply: Feb 1, 2013 1:38 AM by 970365 RSS

    PDF,HTML and Excel

    970365
      Hi
      I am using 11g linux box.I have to schedule report after schedule i have to move report into local folder.
      All formates like HTML,PDF and Excel.
      Could you please send me java script and where can i define storage folder and where to run this script?

      Thanks
      Gram

      Edited by: Raj on Jan 30, 2013 3:39 PM
        • 1. Re: PDF,HTML and Excel
          sayak
          Hi ,

          You can try with this one (save the script in your hard disk as .js and browse it from agent - > Action tab- > Invoke Server Script ):

          package bieesoap;

          import java.io.FileInputStream;
          import java.io.FileNotFoundException;
          import java.text.Format;
          import java.text.SimpleDateFormat;
          import java.util.Date;
          import oracle.apps.xdo.delivery.DeliveryException;
          import oracle.apps.xdo.delivery.DeliveryManager;
          import oracle.apps.xdo.delivery.DeliveryPropertyDefinitions;
          import oracle.apps.xdo.delivery.DeliveryRequest;
          import com.siebel.analytics.scheduler.javahostrpccalls.SchedulerJavaExtension;
          import com.siebel.analytics.scheduler.javahostrpccalls.SchedulerJobException;
          import com.siebel.analytics.scheduler.javahostrpccalls.SchedulerJobInfo;

          import java.io.File;

          import oracle.apps.xdo.delivery.local.LocalPropertyDefinitions;

          public class ServerTest_Report_XLS implements SchedulerJavaExtension{
          public ServerTest_Report_XLS() {
          }

          public void run(SchedulerJobInfo jobInfo) throws SchedulerJobException {
          try
          {
          SimpleDateFormat formatter = new SimpleDateFormat("ddMMMyy");
          String todayDate = formatter.format(new Date());
          FileInputStream fileInputStr = new FileInputStream(jobInfo.getResultSetFile());
          DeliveryManager delMan = new DeliveryManager();
          DeliveryRequest delReq = delMan.createRequest(DeliveryManager.TYPE_LOCAL);
          delReq.addProperty(LocalPropertyDefinitions.LOCAL_DESTINATION, "/u01/app/oas/product/10.1.4b/Report_Download/"+jobInfo.parameter(0)+"-"+todayDate+".xls");
          delReq.setDocument(fileInputStr);
          delReq.submit();
          delReq.close();
          }
          catch(Exception ex)
          {
          throw new SchedulerJobException(1, 1, ex.getMessage());
          }

          }

          public void cancel() {
          }

          }


          ...................
          FYI ,

          delReq.addProperty(LocalPropertyDefinitions.LOCAL_DESTINATION, "/u01/app/oas/product/10.1.4b/Report_Download/"+jobInfo.parameter(0)+"-"+todayDate+".xls");

          line local folder destination can be changed and output file format (ex: ".xls" ) .
          jobInfo.parameter(0) - this will dynamically display the report name .
          • 2. Re: PDF,HTML and Excel
            user248025
            Hi,

            Auto Saving exported o/p files into local BI Server drive can be done refer the below steps.we too implemented same method its working fine.

            Refer
            http://obiee1000.blogspot.com/2012/01/actions-in-agents-part-1.html

            Note: this o/p excel,ppt,pdf..etc will saved under BIserver local drive (after that via n/w or CD user can access it)

            Thanks
            Deva

            Edited by: Devarasu R on Jan 30, 2013 3:49 PM
            • 3. Re: PDF,HTML and Excel
              970365
              Under below directory /cerstransin/analyticsRes/
              i created test.js and in this js file paste

              Your script.
              I poited out path /cerstransin/analyticsRes/


              I set Invoke server script
              Lang-->Java script
              Path-->/cerstransin/analyticsRes/test.js (Linux box)

              Define parameter
              ? ? ?????????????????

              i set
              Name =0 and parameter=0 and Value i set delevery content in PDF formate.

              After run i got "No script engine supported for 'JScript'.
              "
              Where is the problem.How can i do this
              Thanks
              • 4. Re: PDF,HTML and Excel
                user248025
                HI,

                Define Parameter :
                refer configureation screen
                http://imgur.com/MZ3Q4fr

                D:\Oracle\instances\instance1\bifoundation\OracleBISchedulerComponent\coreapplication_obisch1\scripts\common\AB.js

                Thanks
                Deva
                • 5. Re: PDF,HTML and Excel
                  970365
                  Still i got same error.I have report this report i have to after schedule have to store local folder with PDF,Excel and Html formate.
                  Could you pls send me what is written your script in AB.js

                  Edited by: Raj on Jan 30, 2013 6:28 PM
                  • 6. Re: PDF,HTML and Excel
                    user248025
                    Hi,

                    I just shared my screen short with steps,
                    https://sites.google.com/a/obieetechnologies.com/actions-in-agents/

                    Thanks
                    Deva
                    • 7. Re: PDF,HTML and Excel
                      970365
                      could you pls let me know how can i login.I dont have obieetechnology id.i am trying to login it says insufficient privileges.
                      Still

                      No script engine supported for 'JScript'.Error

                      Edited by: Raj on Jan 30, 2013 9:37 PM
                      • 8. Re: PDF,HTML and Excel
                        Srini VEERAVALLI
                        You have to with java code as in this link or you may use as suggested earlier
                        http://oraclebizint.wordpress.com/2007/12/17/oracle-bi-ee-101332-calling-java-scripts-and-java-classes-from-ibots/

                        you have to call something like as in this link
                        Check this link
                        http://total-bi.com/2011/08/obiee-export-reports/

                        Try it out and update us

                        Edited by: Srini VEERAVALLI on Jan 30, 2013 8:05 AM
                        • 9. Re: PDF,HTML and Excel
                          970365
                          I tried second link VBScript.

                          1.Donwload vb script and paste into /cerstransin/analyticsRes/export_report.vbs

                          2.
                          Laun:VBscript
                          Path: /cerstransin/analyticsRes/export_report.vbs

                          Name-->Prompt--->Value
                          0-->0--->Delevery content as PDF
                          1-->1-->Country.PDF
                          2-->2-->/cerstransin/analyticsRes/

                          3.Run Agent
                          4.
                          Error Like "[nQSError: 66023] No script engine supported for 'VBScript'."

                          First link you given that is 10g not in 11g.Above thread java script i tried but same error like No script engine supported for 'JScript'."

                          Could you please let me know How can i fix.

                          Note:Some documents says this script only for Windows not for Linux.Could you pls clarify this?

                          My requirment is
                          i have 1 report and 10 folders based on country wise.Each folder one country.Now when i schedule a report,this report should be stored into 3 formates (HTML,PDF and Excel) all folders.Each country folder 3 formate in single report.Same like all folders but based on coutry wise report.

                          Thanks
                          Gram
                          • 10. Re: PDF,HTML and Excel
                            Srini VEERAVALLI
                            Yeah since there no script engine on Linux to support your javascript or vb script.

                            As per this doc you the java code might work if you configure it on 10g as in (http://oraclebizint.wordpress.com/2007/12/17/oracle-bi-ee-101332-calling-java-scripts-and-java-classes-from-ibots/)
                            http://docs.oracle.com/cd/E17904_01/bi.1111/e10541/schedjavajob.htm#

                            Once you able to create file for ibot using 10g, upgrade webcat to 11g and again do the changes for config.xml for 11g

                            Try it out.
                            If helps mark :)

                            Edited by: Srini VEERAVALLI on Jan 31, 2013 3:03 PM
                            • 11. Re: PDF,HTML and Excel
                              970365
                              Still not able to fix