Clearing the report from cache....

Hello all,,,
In my project iam using crystsal report for eclipse to generate reports.
Iam using a .jsp page to call my report.(which i got it from the examples of CRE).
The name of my jsp page is poi.jsp
The name of my Crystal report is CrystalReport2.rpt
My problem is this....
when i run the report first time i can see my poi.jsp page and user can submit
the parameter and based on the users parameter the report is generated..(ITs working absoultely fine)but when the user runs the report again, its not showing the parameter page (i.e user cannot see poi.jsp) rather its showing the old generated report.
When i tried using session.invalidate and session.removeAttribute it was showing me the poi.jsp page but the problem is when the user clicks on the print icon or any icon on the report its just showing the poi.jsp page...
When the user closes the report or when the clicks on the button to generate the report it should show the parameter page (poi.jsp).how can i solve this problem???
the code what iam using is as follows..( got it from the examples of CRE - database login )
          response.setHeader("Cache-Control","no-cache");
          response.setHeader("Pragma","no-cache");
          response.setDateHeader("Expires",-1);
          response.setHeader("Cache-Control","no-store");
          Object reportSource = session.getAttribute("reportSource");
        if (reportSource == null )
            String report = "CrystalReport2.rpt";
            ReportClientDocument reportClientDoc = new ReportClientDocument();
            reportClientDoc.open(report, 0);
            reportSource = reportClientDoc.getReportSource();
            session.setAttribute("reportSource", reportSource);
        ConnectionInfos connInfos = new ConnectionInfos();
        IConnectionInfo connInfo1 = new ConnectionInfo();         
        connInfo1.setUserName("CS22USER");
        connInfo1.setPassword("CS22USER");
        connInfos.add(connInfo1);
        CrystalReportViewer viewer = new CrystalReportViewer();
        viewer.setReportSource(reportSource);          
          viewer.setEnableLogonPrompt(false);
        viewer.setDatabaseLogonInfos(connInfos);
        if (session.getAttribute("refreshed") == null)                  
             viewer.refresh();               
             session.setAttribute("refreshed", "true");           
             //response.sendRedirect("Test.jsp");
              //session.removeAttribute("refreshed");    
              //session.invalidate();
              //session.removeAttribute("refreshed");       
        viewer.setOwnPage(true);
        viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);                     
        //session.invalidate();

CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setReportSource(reportSource);
     viewer.setReportSource(reportSource);
     viewer.setHasRefreshButton(true);
     viewer.setOwnPage(true);
     viewer.setOwnForm(true);
     viewer.setHasExportButton(true);
     viewer.setZoomFactor(100);
     viewer.setPrintMode(CrPrintMode.ACTIVEX);
    viewer.setParameterFields(fields);
viewer.setEnableParameterPrompt(true); --this line will prompt

Similar Messages

  • Help neede very very urgently ... to clear the report from Cache.....

    Hello all,,,
    In my project iam using crystsal report for eclipse to generate reports.
    Iam using a .jsp page to call my report.(which i got it from the examples of CRE).
    The name of my jsp page is poi.jsp
    The name of my Crystal report is CrystalReport2.rpt
    My problem is this....
    when i run the report first time i can see my poi.jsp page and user can submit
    the parameter and based on the users parameter the report is generated..(ITs working absoultely fine)
    but when the user runs the report again, its not showing the parameter page (i.e user cannot see poi.jsp)
    rather its showing the old generated report.
    When i tried using session.invalidate and session.removeAttribute it was showing me the poi.jsp page
    but the problem is when the user clicks on the print icon or any icon on the report its just
    showing the poi.jsp page...
    When the user closes the report or when the clicks on the button to generate the report it should
    show the parameter page (poi.jsp).how can i solve this problem???
    the code what iam using is as follows..( got it from the examples of CRE - database login )
    Object reportSource = session.getAttribute("reportSource");
    if (reportSource == null)
    String report = "CrystalReport2.rpt";
    ReportClientDocument reportClientDoc = new ReportClientDocument();
    reportClientDoc.open(report, 0);
    reportSource = reportClientDoc.getReportSource();
    session.setAttribute("reportSource", reportSource);
    ConnectionInfos connInfos = new ConnectionInfos();
    IConnectionInfo connInfo1 = new ConnectionInfo();
    connInfo1.setUserName("USER");
    connInfo1.setPassword("USER");
    connInfos.add(connInfo1);
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setReportSource(reportSource);
    viewer.setEnableLogonPrompt(false);
    viewer.setDatabaseLogonInfos(connInfos);
    if (session.getAttribute("refreshed") == null)
    viewer.refresh();
    session.setAttribute("refreshed", "true");
    viewer.setOwnPage(true);
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
    //session.removeAttribute("refreshed");
    //session.invalidate();
    thanks in advance
    regards
    jack

    As far as parameter refresh is concerned add in your code
    viewer.setHasRefreshButton(true)
    refresh button is appeared on crystal report toolbar and you can use this button instead of explorer refrsh button and every time you can add new parameters values.
    Also, if you want to update reportsource in session object. means if user wants to view more than one different reports and want to invalidate reportsource form session.
    add in jsp.
    session.removeAttribute("reportSource");
    Happy programming
    Uzma

  • How to clear the report from Cache.

    Hello all,,,
    In my project iam using crystsal report for eclipse to generate reports.
    Iam using a .jsp page to call my report.(which i got it from the examples of CRE).
    The name of my jsp page is poi.jsp
    The name of my Crystal report is Department.rpt
    My problem is this....
    when i run the report first time i can see my poi.jsp page and user can submit
    the parameter and based on the users parameter the report is generated..(ITs working absoultely fine)
    but when the user runs the report again, its not showing the parameter page (i.e user cannot see poi.jsp)
    rather its showing the old generated report.
    When i tried using session.invalidate and session.removeAttribute it was showing me the poi.jsp page
    but the problem is when the user clicks on the print icon or any icon on the report its just
    showing the poi.jsp page...
    When the user closes the report or when the clicks on the button to generate the report it should
    show the parameter page (poi.jsp).how can i solve this problem???
    the code what i am using is as follows
    try {
              String reportName = "C:/workspace/Reports/WebContent/Department.rpt";
              ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
              if (clientDoc == null) {
                   // Report can be opened from the relative location specified in the CRConfig.xml, or the report location
                   // tag can be removed to open the reports as Java resources or using an absolute path
                   // (absolute path not recommended for Web applications).
                   clientDoc = new ReportClientDocument();
                   clientDoc.setReportAppServer(ReportClientDocument.inprocConnectionString);
                   // Open report
                   clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
                   // ****** BEGIN SET RUNTIME DATABASE CREDENTIALS **************** 
                        String connectString = "jdbc:oracle:thin:@192.168.1.4:1521:orcl";
                        String driverName = "oracle.jdbc.driver.OracleDriver";
                        String JNDIName = "orcl";
                        String userName = "act_db";               // TODO: Fill in database user
                        String password = "act_db";          // TODO: Fill in password
                        // Switch all tables on the main report and sub reports
                        CRJavaHelper.changeDataSource(clientDoc, userName, password, connectString, driverName, JNDIName);
                        // logon to database
                        CRJavaHelper.logonDataSource(clientDoc, userName, password);
                   // ****** END SET RUNTIME DATABASE CREDENTIALS ****************           
                   // ****** BEGIN CONNECT PARAMETERS SNIPPET ****************          
                        // STRING VALUE PARAMETER. 
                        String stringValue = request.getParameter("DeptId");;     // TODO: Fill in value
                        CRJavaHelper.addDiscreteParameterValue(clientDoc, "", "DeptId", stringValue);
                   // ****** END CONNECT PARAMETERS SNIPPET ****************     
                   // Store the report document in session
                   session.setAttribute(reportName, clientDoc);
              // ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET **************** 
                   // Create the CrystalReportViewer object
                   CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
                   String reportSourceSessionKey = reportName+"ReportSource";
                   session.removeAttribute("reportSource");
                   Object reportSource = session.getAttribute(reportSourceSessionKey);
                   if (reportSource == null)
                        reportSource = clientDoc.getReportSource();
                        session.setAttribute(reportSourceSessionKey, reportSource);
                   //     set the reportsource property of the viewer
                   crystalReportPageViewer.setReportSource(reportSource);
                   crystalReportPageViewer.setDisplayGroupTree(false);
                 session.removeValue("reportSource");
                   crystalReportPageViewer.setHasRefreshButton(true);
                   // Apply the viewer preference attributes
                   // Process the report
                   crystalReportPageViewer.processHttpRequest(request, response, application, null);
              // ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************          
         } catch (ReportSDKExceptionBase e) {
             out.println(e);
    Thanks In advance
    Regards,
    Amol Patil

    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setReportSource(reportSource);
         viewer.setReportSource(reportSource);
         viewer.setHasRefreshButton(true);
         viewer.setOwnPage(true);
         viewer.setOwnForm(true);
         viewer.setHasExportButton(true);
         viewer.setZoomFactor(100);
         viewer.setPrintMode(CrPrintMode.ACTIVEX);
        viewer.setParameterFields(fields);
    viewer.setEnableParameterPrompt(true); --this line will prompt

  • Clear the applet from cache

    Hello,
    I use the following html code to open my signed java applet.
    <APPLET CODE="Applet.class" ARCHIVE="applet.jar" WIDTH=100 HEIGHT=100>However if I make some changes into the applet code and open the HTML file in the browser, I see that the applet is being picked up from the applet cache. Thus if users have caching enabled on their systems they will not be able to retrieve the new version that I have made.
    Is there a way to trigger the browser to download not to use the applet from the cache whenever an updated copy is available on the server.
    I need this fix for IE, Mozilla, Netscape..
    Thanks in advance.

    Hello,
    the easiest solution (for me, at least, it was): when you want to reload an applet type x in the java console (it openes when you load the applet; if it doesn't open you may find it in the icons bar at the bottom of your screen) and then reload the applet
    Hope it helps, good luck!

  • How Can I print directly the report from the printer without showing it ?

    I know how to run the report from Form as it illustrate on this site:
    http://www.lv2000.com/articles/runreport.htm
    but the question here how could i to generate the report directly to the printer without showing it on the screen???
    I search on the net and I find that I should change this line :-
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE, cache);
    to this
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE, printer);
    but it is not working with me :-(
    is there any suggest ?!

    Check if any of these helps
    Re: Direct Printing in Forms10g
    Web.Show_Document() print report directly
    Direct Printing from client PC

  • Retrieving Reports from Cache

    10gAS 9.0.4.1
    Reports 9.0.2.0.3
    First Issue:
    I am trying to reuse reports from cache. I have caching turned on in my rep_<server>.conf file, and the following entry in my cgicmd.dat file:
    rep17: report=<report name>.jsp <parameter>=%1 desformat=pdf destype=cache server=<report server> paramform=no ssoconn=<rad> tolerance=30
    Each time I run the report, a new copy is generated in the cache directory. The report returned to me is the new copy. Should the report server not retrieve an earlier copy of the report as long as it was generated within the last 30 minutes?
    Second Issue:
    When I run the report URL in Internet Explorer (version 6.0.2800.1106CO), 2 copies of the report output are created in cache. When using Netscape (version 7.2), only 1 copy of the report output is generated in cache. What are the issues with IE that cause two copies of the report output to be generated?

    Hi Birol,
    Can you please tell me is the content you have used in that "BAPI_DOCUMENT_CHECKOUTVIEWX programme"????
    Regards
    Harshavardhan.G

  • Error running the report from Form

    Hi,
    I am try to run the report from the form by using these code of line
    DECLARE
         RPT_OBJECT      REPORT_OBJECT;
         RPT_RUN          VARCHAR2(100);
    BEGIN
    RPT_OBJECT := FIND_REPORT_OBJECT('REPORT7');
    SET_REPORT_OBJECT_PROPERTY(RPT_OBJECT, REPORT_COMM_MODE, SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(RPT_OBJECT, REPORT_DESTYPE, CACHE);
    SET_REPORT_OBJECT_PROPERTY(RPT_OBJECT, REPORT_OTHER,'P_CITYCODE'||:CITYCODE||'PARAMFORM = YES');
    RPT_RUN := RUN_REPORT_OBJECT(RPT_OBJECT);
    END;
    but i m not using any Form server and Report Server i m completly using Oracle9iDS
    It gives the error rep-0110 file not found and
    rep-1070 error while opening and saving the file
    please give me the solution
    Shehzad

    Shehzad,
    this means that Reports Server cannot access the Reports module. You can test this assumption by copying your Reports module into <Oracle Home>\reports\samples\demo. The demo directory is out of the box accessible fro Reports.
    If this allows you to run the Report, then all you need to do is to specify the Reports_Path to include the reports modules.
    btw.: An other reason can be that your Reports contains uncompiled PLSQL, so you may want to check this too.
    Frank

  • Stop the report from firing until the user clicks the Go button?

    Hi All,
    Is there a way to stop the report from firing until the user clicks the Go button? At the moment it is populating when I open the dashboard page. I found something online that said i could use the Page Options>Save Current Settings> For Others.. but even though i am signed in as an administrator i only see a For Me.. option. Also, even after setting this option i would like to be able to hit the 'Go' button to run the report and have it uncollapse the section. Is this possible?
    Thanks

    Thanks for the replies,
    In my report i am trying to constrain the report to todays data only. However the only prompt i have is for another column. If i place a filter on the date column with Year=0000 it will not change with the prompt selection and so will never return any results. Is there any other way?
    It seems wasteful to fire a request to the database onload of the page. Is there an option to only fire a request what the prompts are entered? I will be using a stored proc which needs parameters to run the request so it would be good to be able to set the report to not run until it has parameters entered
    Thanks

  • I want to fill the rows of the report from the loop

    I want to fill the rows of the report from the loop
    For example, in forms
    cursor bdl is select code,decode(:global.user_lang,1,name,2,latin_name) name
    from GL_ANALYSISHDR
    begin
         go_block('bdls');
         clear_block;
         first_record;
         for rec in bdl loop
         :bdls.code:=rec.code;
         :bdls.name:=rec.name;
         next_record;
         end loop;
         go_block('bdls');
         first_record;
    end;
    I tried to use the REF CURSOR
    But it return the values in one time and does not allow me to conduct and control of

    Why do you need to do it by a curesor loop? Can't you put the query in the datamodel of the report and simply pass the parameter to restrict the query?

  • In My iphone 5s,i have disabled automatic download from whatsapp app.So whichever images,video i feel is good i download them and then save them to my camera roll section.So i want to know how can i remove the images from cache of my phone.

    In My iphone 5s,i have disabled automatic download from whatsapp app.So whichever images,video i feel is good i download them and then save them to my camera roll section.So i want to know how can i remove the images from cache of my phone which are downloaded and not saved,but they remain in cache.
    Even in some apps i have data which i want to remove,but cant find a way to remove them and they are in my cache eating up my memory.

    Try assigning Queen as the Album Artist on the compilations in iTunes on your computer.

  • Getting the error while calling the report from oaf page

    Dear all
    when i am calling the report from oaf page
    if (pageContext.getParameter("PrintPDF") != null)
    DataObject sessionDictionary =
    (DataObject)pageContext.getNamedDataObject("_SessionParameters");
    HttpServletResponse response =
    (HttpServletResponse)sessionDictionary.selectValue("HttpServletResponse");
    try
    ServletOutputStream os = response.getOutputStream();
    // Set the Output Report File Name and Content Type
    String contentDisposition = "attachment;filename=EmpReport.pdf";
    response.setHeader("Content-Disposition", contentDisposition);
    response.setContentType("application/pdf");
    // Get the Data XML File as the XMLNode
    XMLNode xmlNode = (XMLNode)am.invokeMethod("getEmpDataXML");
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    xmlNode.print(outputStream);
    ByteArrayInputStream inputStream =
    new ByteArrayInputStream(outputStream.toByteArray());
    ByteArrayOutputStream pdfFile = new ByteArrayOutputStream();
    //Generate the PDF Report.
    TemplateHelper.processTemplate(((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getAppsContext(),
    "XXCRM", "XXCRM_EMP",
    ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage(),
    ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getCountry(),
    inputStream,
    TemplateHelper.OUTPUT_TYPE_PDF, null,
    pdfFile);
    // Write the PDF Report to the HttpServletResponse object and flush.
    byte[] b = pdfFile.toByteArray();
    response.setContentLength(b.length);
    os.write(b, 0, b.length);
    os.flush();
    os.close();
    } catch (Exception e)
    response.setContentType("text/html");
    throw new OAException(e.getMessage(), OAException.ERROR);
    pageContext.setDocumentRendered(false);
    i am getting the error java.classcastexception at this line
    DataObject sessionDictionary =
    (DataObject)pageContext.getNamedDataObject("_SessionParameters");
    regards
    Sreekanth

    check if you have import oracle.cabo.ui.data.DataObject; in your import statement.
    --Prasanna                                                                                                                                                                                               

  • Error while Opening the report  from template builder

    hi all,
    After log in in the BI publisher template builder, tried to Open the report from the report Template . Then the message is displayed as Error occurred: ‘Please check the settings and try again’.
    I am using the OBIEE 10.1.3.3 version and Ms-Office 2000......
    Please give me the solution very urgent............
    Regards

    Hi,
    I am having the same issue. I am not able to import Crystal Report.
    the error is "No matching records found  'Queries' (OUQR) (ODBC -2028)  [Message 131-183]"
    I have previewed the report using Preview external crystal report option and is running perfect.
    please guide ASAP.
    Regards
    Sonil

  • How to stop the Browser from caching my web pages

    Hi There
    Can anyone tell how to stop the browser from caching my jsp pages
    I am using
    <%response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);
    %>
    but this does not work anduser is able to go back to the previous page
    which i dont want and i want the browser to display the message the page has expired
    Help appreciated
    Thanks
    Mumtaz

    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");
    response.setDateHeader("max-age", 0);
    response.setDateHeader("Expires", 0);
    I have cut paste the code from my jsp which is working. There is one additional line. I do not know if that is the cause but there is no harm in trying that out.
    Srinivasan Ranganathan

  • How to Download the report from the workitem?

    Hi,
    I have one typical requirement that is to download the report from the Workitem by the manager?
    Would any body please give the solution and procedure?
    If you have any sample code for that give it tome?
    Early reply is appriciable.
    Regards,
    Chow.

    If it is an ALV report you don't have to do any coding. You don't say which report it is.
    If it is a report that uses write statements you can also export to a spreadsheet, but of course the cell matching is not quite as for ALV reports since the report creator decides the alignment. Use the menu item "System" => "List" => "Save" (the menu item names may be a little different since I have translated them from Norwegian).

  • How to clear the picture from custom container

    Hi All
    I am uploading the employee image into custom container . for that i have used the below fn modules
    CALL FUNCTION 'HR_IMAGE_EXISTS'
    EXPORTING
    p_pernr = pernr
    * P_TCLAS = 'A'
    * P_BEGDA = '18000101'
    * P_ENDDA = '99991231'
    IMPORTING
    * P_EXISTS =
    p_connect_info = g_connect_info
    EXCEPTIONS
    error_connectiontable = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    else.
    CALL FUNCTION 'SCMS_DOC_URL_READ'
    EXPORTING
    * MANDT = SY-MANDT
    stor_cat = space
    crep_id = g_connect_info-archiv_id
    doc_id = g_connect_info-arc_doc_id
    * PHIO_ID =
    comp_id = 'DATA'
    * SIGNATURE = 'X'
    * SECURITY = ' '
    * USE_LOCATION = 'A'
    * LOCATION = ' '
    * HTTP_URL_ONLY = ' '
    dp_url_only = 'X'
    * LIFETIME = ' '
    * NO_CACHE = ' '
    * EXPIRATION =
    * PDF_MODE = ' '
    * URL_EXTENTION = ' '
    * FORCE_GET = ' '
    IMPORTING
    url = g_url
    EXCEPTIONS
    error_config = 1
    error_parameter = 2
    error_signature = 3
    http_not_supported = 4
    docget_not_supported = 5
    not_accessable = 6
    data_provider_error = 7
    tree_not_supported = 8
    not_supported = 9
    OTHERS = 10
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    after getting the url for uploading the picture
    I used load_picture_from_url
    the image is uploaded, but when i try to clear the image from control using picture->clear_picture
    it is not clearing the image
    Please help me how to clear the image.
    Thanks
    Rama

    Hi,
    " Request an URL from the data provider by exporting the pic_data.
    CLEAR url.
    PERFORM load_pic_from_db CHANGING url.
    " load picture
    CALL METHOD cl_gui_picture_1->load_picture_from_url
      EXPORTING
        url = url.
    CLEAR url.
    url = 'file://C:\sap-logo.gif'.
    CALL METHOD cl_gui_picture_2->load_picture_from_url
      EXPORTING
        url = url.
    CLEAR url.
    url = 'http://www.sap-press.com/images/logo_books_online_162_50.gif'.
    CALL METHOD cl_gui_picture_3->load_picture_from_url
      EXPORTING
        url = url.
    init = 'X'.
    CALL METHOD cl_gui_cfw=>flush
      EXCEPTIONS
        cntl_system_error = 1
        cntl_error = 2.
    ENDIF.
    Its helpful.
    Regards,
    Raj.

Maybe you are looking for

  • Strange Problem - All of my preloaded .swf files play at once

    Hey guys,   I've been getting a strange problem that I haven't been able to debug.  I recently developed an interactive audio and video treatment program that users click through in which a master swf file (DTM-Start.swf) uses ActionScript upon first

  • C6 - touch panel not working

    recently i purchased a c6-00 phone from uae. now the touch panel is not working. what can i do

  • Data guard performance problem (rac to single instance)

    i have a table it has GPS data, and gps table has too many data, 5 millions, iam using RAC (2 nodes 11gr2). standby database is single instance data guard, single instance database (standby)'s hardware cpu is lower than RAC machines. rac nodes have (

  • IP Address reversed?

    First thing - this is *not* a question about Reverse DNS. I've recently replaced our router at home and since then our DNS is resolving one of our company's domain names incorrectly - specifically the IP address is being returned in reverse order. So

  • Time of reading encoder position

    Hello, I want to ask you people where can i learn function execution times of NI 7358 board? I'm developing driver for this card on QNX 6.5. When i send read encoder position package to 7358, the first data comes to RDB register after around 10 ms fo