Report on button click

Hi experts,
i hope you all are doing fine.I need your help ....i generated a report in rtf format using iText and stored in a file name like 'xyz.rtf'.Now i want to open this file on button click in jsp.
Pls. suggest me something....
Thanks a lot...appreciate any kind of help.
Sonika

Thanks bsampieri,
Thanks a lot for your reply......but it says that the requested resource is not available...
here i am sending you the code:
try{
Document document = new Document();
// step 2:
// we create a writer that listens to the document
// and directs a RTF-stream to a file
RtfWriter rtf = RtfWriter.getInstance(document, new FileOutputStream("/try4.rtf"));
     rtf.setHasTitlePage(true);
     RtfHeaderFooters header = new RtfHeaderFooters();
     header.set(RtfHeaderFooters.FIRST_PAGE, new HeaderFooter(new Phrase("UNSODA DATABASE"), true));
document.open();
document.setHeader(header);
document.add(new Paragraph(" UNSODA DATABASE", new Font(Font.HELVETICA, 20, Font.BOLD)));
document.close();
} catch(Exception e){
out.print("erwerweror"+e.toString());}
%>
//and then in button or for calling report
<tr><td bgcolor="#CCCCFF">
<input type='button' name="Report" onClick= "<%= theFileURL%>" value="Add New Record"></td></tr>
but it gave me this error:
The requested resource (/try4.rtf) is not available.
Thank you....so much
sonika

Similar Messages

  • Open a report from button click/javascript

    Hi,
    Does anyone know if there is a way to call a report from a button click? Or through javascript? I set the report to Display Results > Link - within the dashboard and then did a view source on it and found the function that calls the report from the hyperlink.
    This is the code:
    return DashboardReportLink('saw.dll?PortalGo&amp;_scid=v-x8QJloqTY&amp;PortalPath=/shared/Plan\x2520Setup\x2520Audit\x2520Tool\x2520/_portal/Plan\x2520Setup\x2520Audit&amp;Page=Historical&amp;NavFromViewID=d\x253adashboard\x257ep\x253acp4tq3p9brn77o6o\x257er\x253a8a2g9nltmkrtra9n&amp;Path=/shared/Plan\x2520Setup\x2520Audit\x2520Tool\x2520/Archive\x2520Reporting/Run\x2520Historical\x2520Report&amp;Action=PromptStart&amp;Options=frdc', 'd:dashboard~p:cp4tq3p9brn77o6o~r:8a2g9nltmkrtra9n','Dashboard&amp;PortalPath=/shared/Plan\x2520Setup\x2520Audit\x2520Tool\x2520/_portal/Plan\x2520Setup\x2520Audit&amp;Page=Historical', false)
    I added this function to the end of my javascript but when i click the button it just opens a blank page with
    http://la820119:9704/analytics/saw.dll?PortalGo
    as the url.
    Any help would be appreciated

    Hi,
    So i have been trying out a few things and the following url works to open the default view of the request:
    window.location='saw.dll?Go&Path=/shared/Plan Setup Audit Tool /Archive Reporting/Run Historical Report&Options=dfr';
    I just replaced 'Dashboard' in the code provided with the 'Go' and it started to work :)
    What i need to do though is have this work for the session variables set up on the dashboard. I have 7 prompts which a user can use to filter a request. Each is assigned to a session variable that is used to call a stored procedure. Originally i thought that by setting the variables and then calling the report from the url that the session variable values i set would be used in the request. What seems to be happening is that the variables get set and then, on calling the url, they are reset to the defaults and the report is run.
    Any help in solving this would be very much appreciated
    Una

  • How to run report on Button Click in Forms 9i

    Hi ,
    I want to run a report , when I press button on form
    it is RDF file . I have complied it and create a REP File .
    I has also set the report path in registry / HKEY_LOCAL_MACHINE/ SOFTWARE /ORACLE/ HOME1
    And then i has written these command line on Button click
    Declare
         pl_id           ParamList;
         al_id Alert;
         al_button     Number;
         M_RepFile     Varchar2(80);
    Begin
         pl_id := Get_Parameter_List('tmpdata');
         IF NOT Id_Null(pl_id) THEN
              Destroy_Parameter_List( pl_id );
         END IF;
         pl_id := Create_Parameter_List('tmpdata');
    Run_Product(REPORTS,'sitereport', SYNCHRONOUS,RUNTIME,FILESYSTEM,pl_id,NULL);
    Show_Window('MAIN');
    End;
    Message('Now Closing');Message('Now Closing');
    But only message at last is showing . No report being open .

    Look at this one
    Re: Run Report10g  Through form 10g

  • How to move a row to top in a report on button click

    Hi,
    I have a report and have 2 buttons(Top and Bottom). When I click on top button selected row should be moved to top in the list, when I click on bottom that select row should be moved to bottom. I checked Denes reorder rows example it has only up and down functionality.
    Could some one help me in doing that.
    Thanks in advance,
    Sri

    Hello, maybe I don´t get your problem, but I would just use: single table, form subform for row with positioned (manually like 2 rows) or flowed (with two "internal" subforms to help achieve 2-like-row-design of the row) content and that´s all. Otto
    p.s.: if your problem is not that simple then I don´t get it, please clarify

  • Visual Studio 2008 Crashes when I click on the [Main Report Preview] button

    I started with Crystal Reports Basic that is bundled with Visual Studio, and then downloaded and installed the free trial of Crystal Reports Developer 2008, and the Visual Studio Integration Manager, the issue has not been affected.
    After adding a crystal report to the project and using the wizard to set it up, and adding a Crystal Reports Viewer to a form I encountered these two (perhaps related) problems.
    1)      When I click on the [Main Report Preview] button at the bottom of the report editor for Visual Studio crashes without any error message and needs to be restarted.
    2)      When I set the viewer  Report Source property to the report via the drop down the following error occurs:
    a.       u201CUnable to find the report in the manifest resources.  Please build the project and try again.u201D
    b.      Building the project has no affect and the same error reoccurs repeatedly.

    The original version of CR 2008 did not work with .NET 2008. If your version is 12.0.0.549, you need to apply SP0:
    https://smpdl.sap-ag.de/~sapidp/012002523100007528552008E/cr2008_sp0.zip
    then I'd highly recommend SP 3:
    https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe
    If your version is higher than 12.0.0.549, apply SP3 and try again.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Very Urgent! Print Report output to local printer on button click in form

    In Sales Order Form there is a print receipt button. In current situation On Clicking the 'Print Receipt Button' it submits a XML Publisher report(PDF output) to the concurrent manager. Currently to print that report i need to go view--> requests--> view output and then print. According to my new Requirement i need to print that report directly to local printer on one simple Print receipt button click in form.
    I am trying to call the printers on server using custom.pll. The report is running successfully but it is not printing output to the local printer. I need to print the report to the local printers based on responsibility. Local printers are available on apps server. Can anyone help me on this issue ASAP.
    Is it possible to print the document using custom.pll? Is there any other alternative to print the report on simple button click in form.
    Environment: Apps 11.5.10.2, Forms 6i
    Here is the code that i am using in my custom.pll.
    if (v_form_name = 'OEXOETEL' --and v_block_name = 'LINES_SUMMARY'
         and name_in('parameter.ACTIONS') = 'PAYMENT_RECEIPT' )THEN
    l_organization_id := Name_In('PARAMETER.OE_ORGANIZATION_ID');
    l_order_header_id := Name_In('ORDER.header_id');
    select to_number(oe_sys_parameters.value ('SET_OF_BOOKS_ID')) into l_sob_id from dual;
    xml_layout := FND_REQUEST.ADD_LAYOUT('XXAFP','XXAFPOEXPMTRCRTF','en','US','PDF');
    select a.profile_option_value
    into v_printer_name     
    from fnd_profile_option_values a
    , fnd_profile_options b
    , fnd_profile_options_tl c
    , fnd_user fu
    where a.profile_option_id = b.profile_option_id
    and c.profile_option_name = b.profile_option_name
    and fu.user_id (+) = a.level_value
    and c.language = 'US'
    and c.user_profile_option_name='Printer'
    and a.level_id = 10003 ;
    if (FND_SUBMIT.SET_PRINT_OPTIONS(v_printer_name, 'Portrait', 2, TRUE, 'N'))
         then
    l_new_request_id := FND_REQUEST.SUBMIT_REQUEST('XXAFP','XXAFPOEXPMTRC',
    null,null,FALSE,l_sob_id,l_organization_id,NULL,NULL,l_order_header_id,
    chr(0), '', '', '', '', '', '', '', '', '', '',
    end if;
    fnd_message.set_string('Request Submitted for Custom Payment Receipt. Request ID is '||l_new_request_id);
    fnd_message.show;
    copy('NULL','parameter.ACTIONS');
    IF (l_new_request_id = 0) THEN
    FND_MESSAGE.RETRIEVE;
    FND_MESSAGE.ERROR;
    else
    l_commit_result := APP_FORM.QuietCommit;
    END IF;
    I need to complete this requirement immediately. Can anyone suggest me better ways in doing this.
    Thanks,
    Srinivas

    I solved this problem myself using shell script through custom.pll. I wrote shellscript and called that shellscript through FND_REQUEST.SUBMIT_REQUEST.It printed 2 copies to local printer.

  • How to open multiple report windows on button click without losing session?

    Hi,
    JDev : 11.1.1.2.0
    I am trying to open multiple discoverer plus report windows using my ADF application.
    My requirement is that user has to select multiple reports from the screen and by clicking on submit button all the reports should be opened in different windows.
    1) Below link provided me the the first solution but I can't go with it because my page is jsff and in jsff it doesn't support form tag.
    http://andrejusb.blogspot.com/2007/07/opening-report-window-in-adf-faces.html
    2) RichGoButton also provide targetFrame property but there is not action property in it so I can't call backing bean method with RichGoButton
    3) I have tried to open report windows using javascript window.open with ExtendedRenderKitService but on discoverer side it giving error message that Discoverer Plus cannot attach same session to multiple request.
    4) I have created one jsp page in the same folder where my jsff is kept in my ADF application and on submit button click I have launch this jsp page using afConetxt.launchDialog and in jsp scriplet I have written response.sendRedirect to report url but here all report are getting open properly to seperate windwos but my ADF application session is getting timeout so after clicking on submit button it will automatically goes to login page it cann't stay with the current page.
    Hoe you have understnad my problem and please provide me if you know any other solution aprart from above mentioned 4 solutions
    Regards,
    DevD

    sURL is query parameter value that I want to pass on jsp page. It is used to set some value on jsp page.
    If this is not a right approach then let me know how to pass the parameter in jsp page.

  • Invoke user Reports in a click of a button

    Hi All,
    i have created SQL queries for reporting purposes in the Query Manager and have designed a report layout for the same. How will i be able to invoke the report from the click of a button in an user form?
    Pls help me out...
    Thanks,
    Vishnu Kumar

    Hi Vishnu,
    Once you have added a report to the query manager you can find its "Menu UID" in the application menu Tools --> Queries --> User Queries
    Then use code to click that menu item:
    Application.Menus.Item("Menu UID").Activate()

  • Creating a pop up window on button click?

    Hi
    How would I create a pop up modal window when a user clicks on a print button within an interactive report. This window would then display a message with a confirm or cancel button. If they click on confirm the page prints out and if they click cancel it takes the user back to the report
    Is this possible? if so how is this achieved?
    Many Thanks

    The confirm dialog is a native dialog in the browser. It will display a message and it has an ok and cancel button. Running it in javascript will prompt the user with the dialog, and the return value will be true or false depending on the button clicked.
    You don't need any extra page whatsoever.
    var r=confirm("Press a button");
    if (r==true)
    x="You pressed OK!";
    else
    x="You pressed Cancel!";
    }This would prompt you with a small dialog, asking "Press a button.". Clicking Ok or Cancel will return true or false to variable r, which in this code is then tested.
    You could shorten it up to
    if(confirm("Do you want to print?")){
       //execute print code
    };Alternatively, if you are on version 4.0 or higher you can use a dynamic action for this. Set the action to fire on the click of a button, and as a true action you can choose the confirm action, which then lets you display a text.

  • Reporting Services Button not working

    Hi,
    I am having issues loading data from reporting services (using the reporting services button).When I click on the "refresh on load" box, is not pulling the data automatically. The data gets pulled only if I press the button. Also, the trigger cell feature is not working either. This all started happening when I installed sp1. In the first version of excelsius 2008 engage I had no problem. Also I am pulling data based on date range, the data only pulls automatically if I type the numbers in the cells, if I calculated the date range it no longer works and i have to press the reporting services button for it to pull the data.
    is there any setting or a hot fix or some known issues about this?
    Note: I am using report parameters
    Also, I also opened a model that I had created with first version of excelsius 2008 using sp1. The model did not automatically loaded the data. The flash file of that module works fine (since it was created with the earilier version).
    I am sure there is a bug on the reporting services button.

    Hi,
       I just upgraded to the new SP fix. I tested, based on an old file that automatically pulls the data from reporting services, but it didnt work. I still have to test it building from scratch using this new version. I dont think they have corrected the reporting services button issue.
    Thanks
    Ricardo

  • Reporting services button not auto loading the data

    Hi,
    I am having issues loading data from reporting services (using the reporting services button).When I click on the "refresh on load" box, is not pulling the data automatically. The data gets pulled only if I press the button. Also, the trigger cell feature is not working either. This all started happening when I installed sp1. In the first version of excelsius 2008 engage I had no problem. Also I am pulling data based on date range, the data only pulls automatically if I type the numbers in the cells, if I calculated the date range it no longer works and i have to press the reporting services button for it to pull the data.
    is there any setting  or a hot fix or some known issues about this?
    Also, I also opened a model that I had created with first version of excelsius 2008 using sp1. The model did not automatically loaded the data.  The flash file of that module works fine (since it was created with the earilier version).
    I am sure there is a bug on the reporting services button.
    Edited by: Ricardo Rivera on Oct 23, 2008 12:06 AM

    Hi,
       I just upgraded to the new SP fix. I tested, based on an old file that automatically pulls the data from reporting services, but it didnt work. I still have to test it building from scratch using this new version. I dont think they have corrected the reporting services button issue.
    Thanks
    Ricardo

  • To launch Internet Explorer on button click.

    Hello friends
    I want to open Internet Explorer with a html file on button click. The html file will contain some report data in html format which I want to show to the user on button click.
    Please help me in doing this.

    Maybe you're looking for a faster solution than Joni's thread. I just made this for an Info Screen, maybe it helps:
    // lunch the Browser and view the HTML file
    public void openBrowserWith (String aHtmlLocation) {
         try {
              Runtime.getRuntime().exec(getExplorerPath() + " " + aHtmlLocation);
         catch (Exception e) {}
    // this method should return the program path of your own browser; it needn't be as hard-coded as I did:
    public String getExplorerPath() {
         return "c:\\program files\\plus!\\Microsoft Internet\\iexplore.exe"
    // I think you know how to add a JButton and a ActionListener to your application; thus, we only need to implement the actionPerformed method:
    public void actionPerformed(ActionEvent e) {
         String command = e.getActionCommand();
         if ("OK".equals(command))
              openBrowserWith(getHtmlLocation());
    public String getHtmlLocation {
         return "http://" or "file://" and "the path where your HTML file is";
    }

  • Crystal report export button not working

    Hi i have a problem with a crystal report.......that in a crystal report when i click the export button the page refreshes and my report is dissapears but nothing happens i am unable to export the report in any format what shoould i do....if u wan to see the code than i would also provide it on demand....
    It gives an error of Failed to export using the options you specified. Please check your options and try again.

    Sounds like you are using one of our SDK's and wrote an application.
    Need a lot more info.
    Don

  • How to call web service on a button click in Web UI

    Hi Experts,
    I have a requirement to call/consume external web service on a button click in CRM web UI. Can someone help me with the code sample for invoking web service from crm web ui?
    Thanks in advance.
    Cheers,
    Sumit Mittal

    Consuming external web service directly without xi system in between.
    u2022     SE80
    u2022     Create Enterprise Service-> Choose object type as u201CService Consumeru201D
    u2022     Select URL HTTP destination in the next step
    u2022     Give the WSDL url in the url point
    u2022     Give any package name or store it in the local object.
    u2022     Corresponding proxies and data types will be generated inside the enterprise service tag
    Code sample for invoking the service via report.
    u2022     Create an object of the client proxy type here itu2019s io_clientproxy.
    u2022     Declare input and output parameters as per the structure of the service input/output parameters.
    u2022     Fill in input parameters what your service expect and call the object methods for relevant task.
    REPORT  ZWEBSERVICE_CREATNUPDATE.
    DATA: io_clientproxy TYPE REF TO zzco_user_data_service .
    DATA: output_crnup TYPE zzcreate_or_update_user_data1,
          input_crnup TYPE zzcreate_or_update_user_data_1.
    DATA :
           ls_param_crnup_in TYPE zzcreate_or_update_user_data, " CU input
           ls_param_crnup TYPE zzcreate_or_update_user_data_r, "CU Response
           ls_return_crnup  TYPE zzcrm_user, " CU Response
           ls_arg0 TYPE zzcrm_user.
    ls_arg0-first_name = 'shashank'.
    ls_arg0-last_name = 'testw/ouserid'.
    ls_arg0-org_name = 'Test_Org'.
    "ls_arg0-USER_ID = '369713'.
    ls_param_crnup_in-arg0 = ls_arg0.
    input_crnup-parameters = ls_param_crnup_in.
    TRY.
        CREATE OBJECT io_clientproxy
          EXPORTING
            logical_port_name = 'LP4'.
      CATCH cx_ai_system_fault .
    ENDTRY.
    TRY.
        CALL METHOD io_clientproxy->create_or_update_user_data
          EXPORTING
            input  = input_crnup
          IMPORTING
            output = output_crnup.
      CATCH cx_ai_system_fault .
      CATCH cx_ai_application_fault .
    ENDTRY.
    ls_param_crnup = output_crnup-parameters.
    ls_return_crnup = ls_param_crnup-return.
    IF ls_return_crnup IS INITIAL.
      WRITE : 'User creation failed'.
    ELSE.
      WRITE :  'Process Status : ',ls_return_crnup-process_status,
               /'User Id : ',ls_return_crnup-user_id,
                       /'First Name :',ls_return_crnup-first_name,
               /'Last Name :',ls_return_crnup-last_name,
               /'Org Name : ',ls_return_crnup-org_name.
    ENDIF.

  • Launch Internet Explorer using button click

    Hello friends
    I want that on click of a button Internet Explorer opens with an html file. Actually the file which opens is a report which I want to show to the user.
    Please help me in doing this.

    you could try doing something like this in your button click handler
    String command = "c:\\program files\\Internet Explorer\\iexplore.exe c:\yourfile.html"
    Runtime rt = Runtime.getRunTime();
    rt.exec(command);

Maybe you are looking for

  • Domain sites on idisk

    I consider myself an apple addict.  Love Apple.  For the last year I have known that apple was moving from the .mac to icloud.  I thought our data/mail would be moved from idisk to icloud.  I know, silly me.  Now, I can't access my files, photos and

  • Significance of pricing date and  delivery date.

    Hello guys,     Can any one explain the significance of  pricing date field in              1) Sales order              2)Details screen of Condition type .in v/06 screen              3) Copy controls. Regards, k.Vivek

  • Jam tracks how can i get these added to my garageband software. what i want are jazz and blues shuffles rhythm drum loops

    Hi Folks I am new to garageband and will use it mainly to repalce my portastudion etc. I currrently use an alesis sr16 drum machine and wanted some bluse and jazz  swing and shuffle style loops to use for working out stuff for live arrangements. I ha

  • How to import images edited in Capture NX-2 to Lightroom 3?

    I've just started using Lightroom 3 and I'm thrilled with what it allows me to do. However, I have many thousands of images that were edited in Nikon Capture NX-2. Now I want to import them into Photoshop Lightroom 3 and use Lightroom as my workflow

  • TDS in 8.8

    Dear All, In 8.8 when we define the certificate series, the location is not mandatory for series i.e as per manual if location is null then it means that certificate series applies for all locations. But when we define the withholding tax setup the l