How to Invoke a report from java?

Hi,
I am a java / web developer with no reports experience.
We wish do the following from a java based web application:
On a web page we have two buttons
1) Print
2) Create file.
We want these two buttons to perform the following tasks:
1) The print button should run a predefined report with a set of parameters and send the output to a printer.
2) The Create File button should run a predefined report with a set of parameters and send the output to a rtf file on a temp area, which the java app can pick up for further processing.
Both actions should be triggered from the web app without the need for users
to have any knowledge of reports at all.
We are running ias 9.0.2.3.
Is the use of the plsql SRW package the best way to achieve this kind of functionality
or are there other JAVA APIs or any other ways to solve this scenario?
Any comments appreciated!
Regards
Per A Jorgensen

Hi Per,
In your submit button's ACTION, the URL that you submit should be like this:
For printing button:
http://machine:port/reports/rwservlet?report=...+server=...+userid=...+destype=printer+desformat=...+desname=<printer_name>
For create file button:
http://machine:port/reports/rwservlet?report=...+server=...+userid=...+destype=file+desformat=...+desname=<file_name>
Find the report request methods as syntax in the Publishing Reports Manual (Section 13.2)
http://otn.oracle.com/documentation/reports.html
Navneet.

Similar Messages

  • How to invoke crystal reports from Oracle forms 11g R2 along with passing p

    How to invoke crystal reports from Oracle forms 11g R2 along with passing parameter to it.
    how to pass parameters to crystal report, please help.

    how to pass parameters to crystal report, please help.This would entirely depend on crystal reports and you might find informations on crystal reports related communities more likely...I for one have seen crystal reports the last time about 12 years ago. And even back then I simply acknowledged it's existence instead of working with it.
    Maybe crystal reports can be invoked via a URL call which would make it simple as you'd need simply build an URL and show the report using web.show_document. But that's pure speculation. Also you might not be the first with this requirement, so the solution to your problem might be right under your nose and just a little google search away ;)
    cheers

  • How to invoke BPEL process from JAVA API

    Hi Guys
    Any idea if you can tell me how to invoke BPEL process from JAVA API ?
    What to do in BPEL process manager to achieve that?
    Regards
    Deepak

    See http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/invoke.htm#sthref1373 and the JavaDocs http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/toc.htm.

  • How to invoke dos shell from java program

    Hi,
    I'm not able to invoke dos shell from java.
    Can any one help me in this issue.
    I'm providing the source code below:
    try{
    Runtime.getRuntime().exec("cmd.exe")
    catch(IOException e) {
    System.out.println(e.getStackTrace());
    Thanks

    Does it throw a different exception?
    Or does it just do nothing at all?
    It does nothing at all[/b
    Is this a standalone Java app?
    Or a Java Applet running via a webbrowser? [b]It's a standalone application

  • How to invoke Bpel process  from java using 'bpel process WSDL'

    I want to call bpel process from java using bpel wsdl.
    could any one point me to any url/sample.
    Thanks
    Nagajyothy

    Hi Seshagiri,
    Thanks for providing links and initial steps to create web service proxy(using Jdeveloper 11g).
    I created a web service proxy.
    provided the needed inputs.
    when I ran the client app, bpel process(has a human task) got invoked but faulted with exception as below
    Operation 'initiateTask' failed with exception 'EJB Exception: : java.lang.ExceptionInInitializerError[[
         at oracle.tip.pc.services.common.ServiceFactory.getAuthorizationServiceInstance(ServiceFactory.java:147)
         at oracle.bpel.services.workflow.task.impl.TaskService.initiateTask(TaskService.java:1159)
         at oracle.bpel.services.workflow.task.impl.TaskService.initiateTask(TaskService.java:502)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
    please help me in solving the above problem.
    Thanks
    Nagajyothy

  • How to invoke Oracle Reports from JSP ?

    Hi,
    I need to invoke Oracle Reports ( paper format ) from my JSP in different formats /PDF, RTF, HTML/ using rwservlet and then send the content to user browser.
    Please, someone to give me working example.
    Thanks in advance.
    Best regards.
    Peter.

    Peter,
    you can call it from a URL if you need:
    /reports/rwservlet?report=...&detype=cache&desformat=pdf...
    You can define a file called cgicmd.dat on teh server that takes key-value pairs of the most common parameters under an named entry.
    e.g.
    ReportsCommon: destype=cache server=myServer ... %*
    This way your URL is reduced to a minimum length because you don't have to list all parameters in teh URL.
    Second solution:
    Run a Reports from a browser URL and specify paramform=yes. This create a HTML based parameter form before executing teh Reports. Have a look at the HTML form code and see to what extend your Reports share same functionality so that you could create this HTML form in your JSP page. You could have a poplist with the name of "desformat" and list HTML, HTMLCSS,PDF,RTF,XML as valid entries so that the user can select the output format.
    The Reports documentation shipped with Oracle9iAS (also available online otn.oracle.com/products/reports) has all teh information you need.
    Frank

  • How to invoke a JAR from Java Swing application?

    Hi,
    I am trying to start a jar file from the swings application.
    I am trying the following code,
    String cmd[] = new String[]{"cmd", "java -jar TestJFreeChart.jar"};
    try
           Process run = Runtime.getRuntime().exec(cmd);
    catch(Exception e)
    {}Is anything wrong in the usage?

    First try:
    "cmd /c java -jar app.jar" or cmd start, because it can't jsut run java.exe, it needs to be
    passed to the cmd interpretor witch further calls java.exe, etc
    Also read what stevejluke suggested. Its important to know if .waitFor or not.
    You wont understand these until you read the tutorial.

  • Call Crystal Report from java

    <p>Hi,<br /><br />Can anyone pl send me an e.g of how to call crystal reports from java ? Preferably crsytal version 10. how to instantiate a crystal report viewer? how to pass parameters? how to set the connection string?</p><p>my email is <a href="mailto:[email protected]">[email protected]</a><br /><br />Regards,</p><p>Hui Bee<br /></p>

    <p>Hi Hui Bee, </p><p>   There are a number of version 10 samples available contained in the following package:</p><p><a href="http://support.businessobjects.com/communityCS/FilesAndUpdates/cr10_jrc_samples.exe" title="JRC 10 samples">http://support.businessobjects.com/communityCS/FilesAndUpdates/cr10_jrc_samples.exe</a></p><p>However, I would strongly suggest that you take a look at using the latest version of the Java component that ships with our Crystal Reports for Eclipse product. You can download it from here:</p><p><a href="/node/450">http://diamond.businessobjects.com/node/450</a></p><p>and best of all, it&#39;s free! </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) <br /><br /> <a href="http://www.eclipseplugincentral.com/Web_Links-index-req-ratelink-lid-639.html">Rate this plugin @ Eclipse Plugin Central</a>          </p>

  • Invoke beanshell methods from java

    Hello
    I'm learning beanshell and using it to write scripts that are ran in JDK 6.
    My question is how to invok beanshell methods from java source codes.
    My codes is:
    import javax.script.*;
    public class InvokeFunctions {
    public static void main (String[] args)throws ScriptException, NoSuchMethodException
    ScriptEngineManager sem = new ScriptEngineManager();
    ScriptEngine bshEngine = sem.getEngineByName("beanshell");
    String script = "public void sayHello()"+"{print (\"sayHello() is a method in bsh script\");}";
    bshEngine.eval(script);
    Invocable inbshEngine = (Invocable)bshEngine;
    inbshEngine.invokeFunction("sayHello");
    I defined a method "sayHello()" using beanshell, but i just can't invoke it in Java.
    I got an error msg said:
    Exception in thread "main" java.lang.IllegalAccessError: tried to access method bsh.NameSpace.getThis(Lbsh/Interpreter;)Lbsh/This; from class bsh.engine.BshScriptEngine
    Any one has any idea about it?
    Thanks

    Look at the Javadoc documentation of IllegalAccessError. It says:
    Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
    Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
    Maybe recompiling all your sources (make sure you delete all existing *.class files) will help?

  • How to run ODI scenario from java?

    I am new to java, need to do some testing on how to invoke ODI scenarios from java.
    Can somebody drop me some simple code?
    Thanks a lot,
    Lei

    Hi there
    1. Start your agent (double click agent.bat)
    2. generate scenario for ur package(right click ur package , select generate scenario)
    3. Add the odi-sdk-invocation.jar file to your java project
    ODIcmdScenario=new OdiCommandScenario();
    ODIConnection=new OdiRepositoryConnection();
    ODIConnection.setOdiUser("ur-username");
    ODIConnection.setOdiPassword("ur-password");
    ODIConnection.setJdbcDriver("Driverdetail");
    ODIConnection.setJdbcUrl("url-details");
    ODIConnection.setJdbcUser("dbusername");
    ODIConnection.setJdbcPassword("dbpass");
    ODIcmdScenario.setScenName("scenarioname");
    ODIcmdScenario.setScenVersion("scenarioversion");
    ODIcmdScenario.setLogLevel(5);
    ODIcmdScenario.setContext("context");
    ODIConnection.setWorkRepositoryCode("repository");
    ODIInvocation = new OdiInvocation("hostname", 20910); //20910 default port
    OdiInvocationResult result=ODIInvocation.invokeCommand(ODIcmdScenario,ODIConnection);
    Hope this helps!
    Cheers

  • How to call a report from a web application

    Hi,
    I have a web server in wich is installed Reports 6i. My question is how can I call reports 6i to generate a pdf using a .rep file from my web application (built with java)?

    Hi,
    The below link will be very useful for one who need idea on calling Oracle Report from Java Application,
    http://www.oracle.com/technology/products/reports/htdocs/getstart/examples/reportswebservice/index.html
    Thanks & Rgds,
    M T

  • How to cancel a report from web?

    i want to cancel some reports i have made from web.
    i have made two kinds of reports,one from web using /cgi-
    bin/rwcgi60.exe?runrep... and another from DOS command line
    using rwcli60.exe.Then i use /cgi-bin/rwcgi60.exe/showjobs?
    server=myreportserver and the web shows all the report jobs.
    i can kill report jobs from the web while clicking on the
    coloum 'job status',but i can't cancel all the jobs.that is to
    say i can cancel the jobs made from rwcgi60.exe?runrep... and
    cant cancel the jobs made from Dos because i have no privileges
    and the two kinds of reports belong to different owners.
    i can cancel them all from report queue manager using
    ADMINISTRATOR,but i must made the two kinds of report from web
    and dos and must cancel them all from web.
    anybody can help me how to solve the problem?
    another question:can i assign the report's owner to a special
    personal while using rwcgi.exe and rwcli60.exe?
    thanks in advance!

    Hi,
    The below link will be very useful for one who need idea on calling Oracle Report from Java Application,
    http://www.oracle.com/technology/products/reports/htdocs/getstart/examples/reportswebservice/index.html
    Thanks & Rgds,
    M T

  • Excel report from java

    I'm generating the Excel report from java .In that i create a row,but i don't know how to increase the size of the cell.if any one have idea.kindly suggest it

    I had a similar porblem and finally i guess somebody can help me with this issue
    I got some help from...http://www.javaworld.com/javaworld/jw-10-2006/jw-1019-xmlexcel.html?page=1...
    This is my code in servlet...
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet spreadSheet = wb.createSheet("Users");
    spreadSheet.setColumnWidth((short) 0, (short) (256 * 25));
    spreadSheet.setColumnWidth((short) 1, (short) (256 * 25));
    // Creating Rows
    HSSFRow row = spreadSheet.createRow(0);
    HSSFCell cell = row.createCell((short) 1);
    cell.setCellValue("Year 2005");
    cell = row.createCell((short) 2);
    cell.setCellValue("Year 2004");
    HSSFRow row1 = spreadSheet.createRow(1);
    HSSFCellStyle cellStyle = wb.createCellStyle();
    cellStyle.setBorderRight(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderLeft(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderBottom(HSSFCellStyle.BORDER_MEDIUM);
    cell = row1.createCell((short) 0);
    cell.setCellValue("Revenue ($)");
    cell = row1.createCell((short) 1);
    cell.setCellValue("25656");
    cell = row1.createCell((short) 2);
    cell.setCellValue("15457");
    FileOutputStream output = new FileOutputStream(new File("/tmp/Users.xls"));
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition", "attachment;filename=Users.xls");
    ServletOutputStream out = response.getOutputStream();
    wb.write(output);
    output.flush();
    output.close();
    forward = null;
    In firefox i get the download dialog box but not able to open in from there,i need to save it and then open. In IE i dont get the dialog box instead the excell open inside the browser......Please help me to open a excel sheet onclick on a link "Export to excel" in jsp......Bottom line is onclick of a link in jsp it should open up a ezcell report....
    Please please please help me....
    Thanks in advance...

  • Generating Excel report from java

    I'm generating Excel report from java .I want align a text in top ie)align top.i searched for that ,but i didn't get that.Is it possible to perform align top,if so how?

    the Progrma I' m executing is as follows :
    import java.io.*;
    import java.util.*;
    import jxl.*;
    import jxl.write.*;
    import jxl.write.Number;
    public class excel
    private String filename;
    private WritableWorkbook workbook;
    public excel(String fn)
    filename=fn;
    public void write() throws IOException, WriteException
    WorkbookSettings ws = new WorkbookSettings();
    ws.setLocale(new Locale("en", "EN"));
    workbook=Workbook.createWorkbook(new File(filename),ws);
    WritableSheet sheet=workbook.createSheet("First Sheet",0);
    Label label=new Label(0,2,"A label record");
    sheet.addCell(label);
    Number number=new Number(3,4,3.142);
    sheet.addCell(number);
    workbook.write();
    workbook.close();
    public static void main(String args[]){
         try{
                   excel ecl = new excel("D:\\TestXSL.xls");
                   ecl.write();
              }catch(Exception e){
              e.printStackTrace();
    }

  • Accessing XML Publisher Reports from Java application

    How to accesss the XDO Reports from Java application?
    I am wondering that we need to get the URL for accessing the report and call the URL with in Java program?
    Is that right? Is there any other option? Any help is greatly appreciated.

    You need to write some class based on the BI Publisher APIs taking data, template, output format, etc.
    Pehaps the following Blog of Tim Dexter shines some light on your question
    http://blogs.oracle.com/xmlpublisher/2007/02/27#a166
    Marcos

Maybe you are looking for