CrystalReportViewer Printing

Hi,
I have an application in VB.Net 2008 that uses CrystalReportViewer to print reports.  The app works fine and prints out the correct reports.  However, when I issue the .PrintReport method, a standard dialog comes up requiring the user to select a printer.  My VB app launches 3 reports in a row, and each report requires the user to select a printer.  To further complicate matters, I am using multiple montitors and the dialog box always shows up on Monitor 1, whereas my app is displaying on monitor 2.  I would like to be able to suppress the printer dialog box and simply send the report to the default printer.  Is there anyway that I can do this?
Thanks

Hi, Al;
Instead of using the PrintReport method, use the PrintToPrinter method of the ReportDocument object.
You can specify the printer if you need to as well.
ie:
crReportDocument.PrintOptions.PrinterName = "printer1"
crReportDocument.PrintToPrinter(1, True, 1, 1)
Regards,
Jonathan

Similar Messages

  • Crystalreportviewer print button event postback issue

    Post Author: krishna.moorthi
    CA Forum: Crystal Reports
    I have the VS2003.Net and crystalreports10 for developing reports in our appliction.
    When the print button clicked in the crystalreportsviewer,based on the entered no of pages in printerdialog the page_load is happening multiply with the no of pages .
    Example: I have entered Pages =2 then the page_load will execute the 4 time (CRViewer having the 7 pages)
    why this is happening ...in behind any reason for this ..help would be highly appreciated.
    thanks in advance.

    Look for the search box in the top right corner of this web page. Enter the following string: 'Communication error crystal net'. You should get a number of results. See if any of those help.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Export and Print icons missing from report viewer

    I'm currently embedding crystal within a wicket application in which I'm making use of the getHtmlContent() method to retrieve the report's HTML.  For whatever reason, I'm not able to get either the export or print icons (on the top left side of the viewer).  Is this because I'm using the getHtmlContent() method or do I have something misconfigured somewhere?  Setting the setHasExportButton(true) and setHasPrintButton(true) on the report viewer object has no effect. 
    If I run the same report using the generated JSP outside of my application (within tomcat), I see the export/print buttons.  I notice the JSP makes use of the processHttpRequest() method.  Any help will be greatly appreciated.
    Thanks!
    Louis

    Hi Louis
    - The getHtmlContent() method handles the user's request to generate the HTML for the report and returns the HTML as a String.
    Note: Either the getHtmlContent method or the processHttpRequest method can be used to handle the user's request to generate the HTML for the report, depending on how you write your JSP. If the viewer's content is displayed more than once, then the getHtmlContent method is more efficient, because the request is processed once and the resulting HTML string can be used multiple times. In this case, you must set the content type of the HTML, as recommended in the table. Additionally, using getHtmlContent sets setOwnPage to false and disables exporting and printing.
    - The setOwnPage(true) and  processHttpRequest() method should be used if you want the export and print button to appear in the report viewed through Crystal Report Viewer.
    Following is the snippet of code which shows you how to use these 2 methods.
    //Get the IReportSource object from sesion and pass it to the viewer
         IReportSource reportSource = (IReportSource)session.getAttribute("reportSource");
    Create the viewer and render the report -
         //create the CrystalReportViewer object
         CrystalReportViewer oCrystalReportViewer = new CrystalReportViewer();
         //set the reportsource property of the viewer
         oCrystalReportViewer.setReportSource(reportSource);
         //set viewer attributes
         oCrystalReportViewer.setOwnPage(true);
         oCrystalReportViewer.setOwnForm(true);
         //set the CrystalReportViewer print mode
         //oCrystalReportViewer.setPrintMode(CrPrintMode.ACTIVEX);
         oCrystalReportViewer.setPrintMode(CrPrintMode.PDF);
         //process the report
         oCrystalReportViewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
    Hope this helps you .
    Thanks
    Soni

  • Crystal Reports XI and Sun One 6.1 web server SP 5 Error finding JNDI name

    I am trying to create a Crystal Reports XI report in a JSP using Sun One 6.1 Web server sp 5.
    At this point I am getting the error �Error finding JNDI name� on Sun One
    The application will run on Netbeans/Tomcat
    I have done the following:
    I edited CRConfig.xml
    <?xml version="1.0" encoding="utf-8"?>
    <CrystalReportEngine-configuration>

    <DataDriverCommon>
         <JavaDir>C:\Program Files\Java\j2re1.4.2_10\bin</JavaDir>
    <Classpath>C:\oracle\product\10.2.0\client_1\jdbc\lib\ojdbc14.jar;�</Classpath>

    <JDBC>
         <CacheRowSetSize>100</CacheRowSetSize>
         <JDBCURL>jdbc:oracle:thin:@10.10.10.10:1521:dev</JDBCURL>
         <JDBCClassName>oracle.jdbc.driver.OracleDriver</JDBCClassName>
         <JDBCUserName>lab_ro</JDBCUserName>
         <JNDIURL></JNDIURL>

    </JDBC>
    I created a report using JDBC (JNDI) connection and have the JNDI Connection set to the name of DATA.
    The report works just fine in Crystal Reports.
    Then in Netbeans I created an application and it runs in the Tomcat part of Netbeans
    In context.xml I have:
    <Context path="/BOEnterpriseTest3">
    <Resource name="jdbc/dev" auth="Container" type="javax.sql.DataSource"
    driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@10.10.10.10:1521:dev"
    username="theuserid" password="thepassword" maxActive="20" maxIdle="10" maxWait="-1"/>
    </Context>
    In web.xml I have
    <web-app>
    <context-param>
    <param-name>crystal_image_uri</param-name>
    <param-value>crystalreportviewers11</param-value>
    </context-param>

    <taglib>
    <taglib-uri>/crystal-tags-reportviewer.tld</taglib-uri>
    <taglib-location>/WEB-INF/crystal-tags-reportviewer.tld</taglib-location>
    </taglib>
    <resource-ref>
    <description>jdbc:oracle:thin:@10.10.10.10:1521:dev</description>
    <res-ref-name>jdbc/dev10g</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Application</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    <resource-ref>
    <description>jdbc:oracle:thin:@10.10.10.10:1521:dev</description>
    <res-ref-name>Data</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Application</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    </web-app>
    in web-inf\sun-web.xml I have
    <sun-web-app>
    <resource-ref>
    <res-ref-name>jdbc/dev10g</res-ref-name>
    <jndi-name>Data</jndi-name>
    </resource-ref>
    </sun-web-app>
    I have copied all of Common Files\Business Objects\3.0\java\lib and Common Files\Business Objects\3.0\java\lib\external to the lib folder
    I have copied crystalreportviewers11 to the root of my web application
    I have tried to load the JNDI information and display the report
    <%@page pageEncoding="UTF-8"
    import="com.crystaldecisions.reports.reportengineinterface.*,
    com.crystaldecisions.report.web.viewer.*,
    javax.naming.*,
    javax.sql.*,
    java.sql.*"%>
    <%
    InitialContext initContext = new InitialContext();
    DataSource source = (DataSource) initContext.lookup("java:comp/env/jdbc/dev10g");
    Context initCtx = new InitialContext();
    Context envCtx = (Context) initCtx.lookup("java:comp/env");
    try{
         // Look up our data source
    DataSource ds = (DataSource)initCtx.lookup("Data");
    out.println("found ds under jdbc/Data");
    catch ( NamingException e ){
    // Look up our data source
    DataSource ds = (DataSource) initContext.lookup("java:comp/env/jdbc/dev10g");
    initCtx.bind("Data", ds);     
    out.println("found ds under java:com/env:jdbc/Data - bound into root initial context for Crystal to find");
    %>
    <%
    //Use the relative path to the report; the physical or full qualified URL cannot be used.
    String reportName = "useridincluded.rpt";
    //Database username and password
    String userName = "theuserid";
    String password = "thepassword";
    //check to see if the Report Source Session Variable already exist
    Object reportSource = session.getAttribute("Report1");
    // Create a new ConnectionInfos and ConnectionInfo object
    com.crystaldecisions.sdk.occa.report.data.ConnectionInfos connectionInfos = new com.crystaldecisions.sdk.occa.report.data.ConnectionInfos();
    com.crystaldecisions.sdk.occa.report.data.ConnectionInfo connectionInfo = new com.crystaldecisions.sdk.occa.report.data.ConnectionInfo();
    //Set username and password for the report's database
    connectionInfo.setUserName(userName);
    connectionInfo.setPassword(password);
    //Add object to collection
    connectionInfos.add(connectionInfo);
    //---------- Create a ReportClientDocument -------------
    com.crystaldecisions.reports.sdk.ReportClientDocument reportClientDocument = new com.crystaldecisions.reports.sdk.ReportClientDocument();
    //---------- Set the path to the location of the report soruce -------------
    //Open report.
    reportClientDocument.open(reportName, 0);
    //Get the report source
    reportSource = reportClientDocument.getReportSource();
    //---------- Create the viewer and render the report -------------
    //create the CrystalReportViewer object
    com.crystaldecisions.report.web.viewer.CrystalReportViewer crystalReportViewer = new com.crystaldecisions.report.web.viewer.CrystalReportViewer();
    //set the reportsource property of the viewer
    crystalReportViewer.setReportSource(reportSource);
    //set the DB logon into the viewer
    crystalReportViewer.setDatabaseLogonInfos(connectionInfos);
    //set viewer attributes
    crystalReportViewer.setOwnPage(true);
    crystalReportViewer.setOwnForm(true);
    crystalReportViewer.refresh();
    //set the CrystalReportViewer print mode
    //crystalReportViewer.setPrintMode(com.crystaldecisions.report.web.viewer.CrPrintMode.ACTIVEX);
    crystalReportViewer.setPrintMode(com.crystaldecisions.report.web.viewer.CrPrintMode.PDF);
    //process the report
    crystalReportViewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
    %>
    On the Sun One Web server
    On the Java Tab
    JDBC Connection Pools
    Pool Name = dev10g
    Class name = oracle.jdbc.pool.OracleDataSource
    User id = theuserid
    url = 10.10.10.10
    password=thepassword
    JDBC Resources
    JNDI Name=dev10g
    Pool = dev10g
    I get the error finding JNDI name � how do I tell Sun One where the JNDI is to make Crystal Reports work?

    I tried the following to test the JNDI
    I am trying to do JNDI in Sun One Web server 6.1 sp 5 but I seem to be missing an important part. I get two different errors based on the JSP code, �Cannot retrieve data source: javax.naming.NamingException: Cannot create resource instance� or �Cannot retrieve data source: javax.naming.NamingException: Cannot create resource instance�.
    Context.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/BOTest">
      <Resource name="jdbc/dev10g" auth="Container" type="javax.sql.DataSource"
    driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@10.10.10.10:1521:dev10g"
    username="userid" password="password" maxActive="20" maxIdle="10" maxWait="-1"/>
      <Resource name="Data" auth="Container" type="javax.sql.DataSource"
    driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@10.10.10.10:1521:dev10g"
    username="userid" password="password" maxActive="20" maxIdle="10" maxWait="-1"/>
    </Context>Sun-one.xml:
    <sun-web-app>
    <context-root>BOTest</context-root>
    <resource-ref>
    <res-ref-name>jdbc/dev10g</res-ref-name>
    <jndi-name>jdbc/dev10g</jndi-name>
    </resource-ref>
    </sun-web-app>web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
         <welcome-file>
                index.jsp
            </welcome-file>
        </welcome-file-list>
        <resource-ref>
            <description>jdbc:oracle:thin:@10.10.10.10:1521:dev10g</description>
            <res-ref-name>jdbc/dev10g</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Application</res-auth>
            <res-sharing-scope>Shareable</res-sharing-scope>
        </resource-ref>
        <resource-ref>
            <description>jdbc:oracle:thin:@10.10.10.10:1521:dev10g</description>
            <res-ref-name>Data</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Application</res-auth>
            <res-sharing-scope>Shareable</res-sharing-scope>
        </resource-ref>
    </web-app>server.xml has:
    <RESOURCES>
    - <JDBCCONNECTIONPOOL name="dev10g" datasourceclassname="oracle.jdbc.pool.OracleDataSource" steadypoolsize="8" maxpoolsize="32" poolresizequantity="2" idletimeout="300" maxwaittime="60000" connectionvalidationrequired="off" connectionvalidationmethod="auto-commit" validationtablename="" failallconnections="off" transactionisolationlevel="read-uncommitted" isolationlevelguaranteed="off">
      <PROPERTY name="URL" value="jdbc:oracle:thin:@10.45.3.197:1521:dev10g" />
      <PROPERTY name="User" value="lab_ro" />
      <PROPERTY name="Password" value="0asphalt1" />
      </JDBCCONNECTIONPOOL>
      <JDBCRESOURCE jndiname="jdbc/dev10g" poolname="dev10g" enabled="on" />
      <JDBCRESOURCE jndiname="Data" poolname="dev10g" enabled="on" />
    - <JDBCCONNECTIONPOOL name="Data" datasourceclassname="oracle.jdbc.pool.OracleDataSource" steadypoolsize="8" maxpoolsize="32" poolresizequantity="2" idletimeout="300" maxwaittime="60000" connectionvalidationrequired="off" connectionvalidationmethod="auto-commit" validationtablename="" failallconnections="off" transactionisolationlevel="read-uncommitted" isolationlevelguaranteed="off">
      <PROPERTY name="User" value="lab_ro" />
      <PROPERTY name="URL" value="jdbc:oracle:thin:@10.45.3.197:1521:dev10g" />
      <PROPERTY name="Password" value="0asphalt1" />
      </JDBCCONNECTIONPOOL>
      <JDBCRESOURCE jndiname="jdbc/Data" poolname="Data" enabled="on" />
      <JDBCRESOURCE jndiname="dev10g" poolname="dev10g" enabled="on" />
      </RESOURCES>I am getting the following error: �Cannot retrieve data source: javax.naming.NamingException: Cannot create resource instance�
    With the following code:
    <%@page
       import="java.io.*,
               javax.sql.*,
               javax.naming.*,
               java.sql.*,
               java.util.*"%>
    <%
    Context init;
    Context ctx;
    DataSource datasource;
    Connection con;
    try
    init = new InitialContext();
    Context envCtx = (Context) init.lookup("java:comp/env");
    datasource = (DataSource)  envCtx.lookup("jdbc/dev10g");
    catch(NamingException ex)
        out.print("Cannot retrieve data source: " + ex.toString(true));
        return;
    try
        con = datasource.getConnection();
    catch (Exception e)
      out.print("Cannot retrieve connection: " + e.toString());
      return;
    try
        PreparedStatement pstmt = con.prepareStatement("SELECT PROJNO FROM MATERIALSLAB.VW_ASPHALTHEADERINFO");
        ResultSet results = pstmt.executeQuery();
        while (results.next())
        out.println(results.getString(1));
    catch(Exception ex)
    out.print("Got connection, can't execute query: " + ex.toString());
    return;
    %>I get the following error: Cannot retrieve data source: javax.naming.NamingException: Cannot create resource instance
    With the following code:
    <%@page
       import="java.io.*,
               javax.sql.*,
               javax.naming.*,
               java.sql.*,
               java.util.*"%>
    <%
    Context init;
    Context ctx;
    DataSource datasource;
    Connection con;
    try
        init = new InitialContext();
        ctx = (Context) init.lookup("java:comp/env");
        datasource = (DataSource) ctx.lookup("jdbc/dev10g");
    catch(NamingException ex)
        out.print("Cannot retrieve data source: " + ex.toString(true));
        return;
    try
        con = datasource.getConnection();
    catch (Exception e)
      out.print("Cannot retrieve connection: " + e.toString());
      return;
    try
        PreparedStatement pstmt = con.prepareStatement("SELECT PROJNO FROM MATERIALSLAB.VW_ASPHALTHEADERINFO");
        ResultSet results = pstmt.executeQuery();
        while (results.next())
        out.println(results.getString(1));
    catch(Exception ex)
    out.print("Got connection, can't execute query: " + ex.toString());
    return;
    %>

  • Dynamic loading of an image - Works in designer, not in webapp

    Hi there,
    I have looked through the forums for an answer to my question and thought that I had found an answer to my question until it came time to publish the report to my web application.
    My report uses a dynamic image formula using the Format Graphic > Picture > Graphic > X-2 buttons.  Unlike other suggestions on the forum, the image isn't stored anywhere i.e. on a network, C drive.  Instead my web application (a special design program) generates images itself using parameters from a http request.
    In the Crystal Reports 2008 designer this works fine and the image changes with changes in the parameters I give in the http request in the formula.
    Example request;
    "http://localhost:8080/demoMYSQL/servlet/em.cabbench.CabBenchSrv?requestType=getStaticDrawing&imageType=2D&scale=1.6&solid=1&design=MV-120-XLPE-001"
    However, when I deploy the report to my web application, it appears as though the formula isn't getting validated as the above request is not logged in my server logs and the default image shows up.
    The report is displayed using JSP. I can show this is needed.
    Any ideas
    Much appreciated
    Nick Hirst

    OK Here goes,
    Formula:
    "http://localhost:8080/demoMYSQL/servlet/em.cabbench.CabBenchSrv?requestType=getStaticDrawing&imageType=2D&scale=6&layerscale3d=0.03&extrusionlength3d=0.4&corelabellevel=1&solid=1&userid=admin&password=admin&design=" + {designHeader/header/headerAtt.design}
    I dont think the connection is a problem. The problem was found using the application on a server, however I am now using my test environment which is a local Apache tomcat service and the problem still occurs.
    I am publishing to the web using the JRC component in JSP files.  Its a bit technical so they are explained here.  Bold are my comments posted here.
    DesignReportParser.jsp - some bits removed
    This jsp changes the data source of the report before passing it to CrystalReportViewer.jsp, allowing for dynamic data sources
    <%
      try {
           String design = request.getParameter("design");
           String version = request.getParameter("version");
           String reportName = request.getParameter("report");
           String schema = request.getParameter("schema");
           //Get the new dynamic XML data
           String url="http://localhost:8080/demoMYSQL/servlet/em.cabbench.CabBenchSrv?requestType="+schema+"&design="+design+"&version="+version+"&userid=admin&password=admin";
           String responseStr = getCabBuildXML(url);
        byte[] XMLByteSource = responseStr.getBytes();
        //Get the XSD schema
        url = "http://localhost:8080/demoMYSQL/servlet/em.cabbench.CabBenchSrv?requestType=getSchemaDesign&schema="+schema+"&userid=admin&password=admin";
        String schemaLocStr = getCabBuildXML(url);
        schemaLocStr = schemaLocStr + "\\" + schema + ".xsd";
        //open the report with original XML
        ReportClientDocument reportClientDoc = new ReportClientDocument();
        reportClientDoc.open(reportName, 0);
        System.out.println("is report open =="+reportClientDoc.isOpen());
        //create a new datasource based on the above set up
        //IXMLDataSet xmlDS = new XMLDataSet(new ByteArray(XMLByteSource), new ByteArray(XSDByteSource));
        IXMLDataSet xmlDS = new XMLDataSet(new ByteArray(XMLByteSource), new ByteArray(bytesFromFile(schemaLocStr)));
        // Change the XML datasource to the new XML datasource
        reportClientDoc.getDatabaseController().setDataSource(xmlDS, "", "");
        session.setAttribute("reportSource", reportClientDoc.getReportSource());
           //Redirect to the viewer page to render the report
           response.sendRedirect("CrystalReportViewer.jsp");
      }catch(ReportSDKException sdkEx) {
           System.out.println(sdkEx);
    %>
    CrystalReportViewer.jsp - pretty standard
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="com.crystaldecisions.report.web.viewer.*"%>
    <%@page import="com.crystaldecisions.reports.sdk.*" %>
    <%@page import="com.crystaldecisions.sdk.occa.report.reportsource.*" %>
    <%
    %>
    <%
         //Get the IReportSource object from sesion and pass it to the viewer
         IReportSource reportSource = (IReportSource)session.getAttribute("reportSource");
         //---------- Create the viewer and render the report -------------
         //create the CrystalReportViewer object
         CrystalReportViewer oCrystalReportViewer = new CrystalReportViewer();
         //set the reportsource property of the viewer
         oCrystalReportViewer.setReportSource(reportSource);
         //set viewer attributes
         oCrystalReportViewer.setOwnPage(true);
         oCrystalReportViewer.setOwnForm(true);
         oCrystalReportViewer.setHasLogo(false);
         oCrystalReportViewer.setDisplayGroupTree(false);
         oCrystalReportViewer.setHasToggleGroupTreeButton(false);
         //set the CrystalReportViewer print mode
         //oCrystalReportViewer.setPrintMode(CrPrintMode.ACTIVEX);
         oCrystalReportViewer.setPrintMode(CrPrintMode.PDF);
         //process the report
         oCrystalReportViewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
    %>
    Now, the images;
    Designer - Design mode, with static image for when images dont load:
    [http://farm4.static.flickr.com/3100/3178811939_d116c1e37a.jpg?v=0]
    Designer - Preview mode, showing formula working, displaying correct image
    [http://farm4.static.flickr.com/3503/3179649422_ebd760fa61.jpg?v=0]
    Web application - not working, showing default image:
    [http://farm4.static.flickr.com/3126/3179649516_5df47fa7fd.jpg?v=0]
    Let me know what you think!
    Thanks again
    Nick

  • Some parameters are missing values

    I am trying to invoke a crystal report using JRC API. I am using Business Objects XI.
    When I try to invoke the report after setting all parameters I am getting an error message "Some parameters are missing values ". Here is how my JSP code looks like
    ReportClientDocument oReportClientDocument = new ReportClientDocument();
    oReportClientDocument.open(reportName, 0);
    CrystalReportViewer oCrystalReportViewer = new CrystalReportViewer();
    //set the reportsource property of the viewer
    oCrystalReportViewer.setReportSource(reportSource);
    //set viewer attributes
    oCrystalReportViewer.setOwnPage(true);
    oCrystalReportViewer.setOwnForm(true);
    //set the CrystalReportViewer print mode
    oCrystalReportViewer.setPrintMode(CrPrintMode.ACTIVEX);
    //refresh the CrystalReportViewer if necessary (only required once)
    if (session.getAttribute("refreshed") == null)
    oCrystalReportViewer.refresh();
    session.setAttribute("refreshed", "true");
    String userid="emagia";
    String password="emagia";
    String rptuserid="tjordan";
    String fromdate="07/01/2008";
    String todate="07/12/2008";
    ConnectionInfo ci = new ConnectionInfo();
    ci.setUserName(userid);
    ci.setPassword(password);
    ConnectionInfos connections = new ConnectionInfos();
    connections.add(ci);
    oCrystalReportViewer.setEnableLogonPrompt(false);
    oCrystalReportViewer.setDatabaseLogonInfos(connections);
    ParameterFieldDiscreteValue val1 = new ParameterFieldDiscreteValue();
    val1.setValue(rptuserid);
    Values vals1 = new Values();
    vals1.add(val1);
    ParameterField param1 = new ParameterField();
    param1.setName("User Id");
    param1.setReportName("");
    param1.setCurrentValues(vals1);
    Fields fields = new Fields();
    fields.add(param1);
    ParameterFieldDiscreteValue val2 = new ParameterFieldDiscreteValue();
    val2.setValue(fromdate);
    Values vals2 = new Values();
    vals2.add(val2);
    ParameterField param2 = new ParameterField();
    param2.setName("Date Range from");
    param2.setReportName("");
    param2.setCurrentValues(vals2);
    fields.add(param2);
    ParameterFieldDiscreteValue val3 = new ParameterFieldDiscreteValue();
    val3.setValue(todate);
    Values vals3 = new Values();
    vals3.add(val3);
    ParameterField param3 = new ParameterField();
    param3.setName("Date Range To");
    param3.setReportName("");
    param3.setCurrentValues(vals3);
    fields.add(param3);
    oCrystalReportViewer.setEnableParameterPrompt(false);
    oCrystalReportViewer.setParameterFields(fields);
    oCrystalReportViewer.processHttpRequest(request, response,getServletConfig().getServletContext(), null);
    oCrystalReportViewer.dispose();
    In the Tomcat log this is what I get
    - JRCAgent3 received request: refreshData
    - JRCAgent3 attempting to acquire license
    - JRCAgent3 successfully acquired license
    - JRCAgent3 releasing license
    - JRCAgent3 received request: getPromptConnInfos
    - JRCAgent3 received request: compoundRequest
    - JRCAgent3 received request: setSQLLogonInfoRequest
    - JRCAgent3 received request: setSQLLogonInfoRequest
    - JRCAgent3 received request: fetchReportPageRequest
    - JRCAgent3 attempting to acquire license
    - JRCAgent3 successfully acquired license
    - Logon: Connecting to database using local JNDI server ...
    - Connection Opened null
    - Connection opened (Connection:  databaseType=JDBC  serverName=reports_dsn.dsn  state=open  databaseDriverName=crdb_odbc.dll).
    - Report parameters is not valid
    - Report parameters is changed
    - Handling report parameters changes
    - Validating report parameters
    - com.crystaldecisions.reports.dataengine.l: Some parameters are missing values
    - The report requires parameter values that need to be supplied by the client before further processing
    com.crystaldecisions.reports.dataengine.l: Some parameters are missing values
         at com.crystaldecisions.reports.dataengine.j.a(Unknown Source)
         at com.crystaldecisions.reports.dataengine.a9.a(Unknown Source)
    Can anybody tell me why I am getting this error??
    Any help will be appreciated.

    The problem may be that you are setting your report date parameters as a string when you pass the value to the report.   If the JRC does not recognize the parameter value as the correct type, it will throw the error you see when trying to pass them to the report.
    If they are a date type or a date time type in the report, they must be set as such using the Java Calendar object.
    Below is an example of how one would pass a date parameter to a report:
    //DATE VALUE PARAMETER.
         Calendar calendar = Calendar.getInstance();
         calendar.clear();
         calendar.set(2004, 1, 17);
         Date dateParamVal = calendar.getTime();     
         pfieldDate.setName("dateParam");
         pfieldDVDate.setValue(dateParamVal);
         //Add the parameter field values to the Values collection object.
         vals5.add(pfieldDVDate);
         //Set the current Values collection for each parameter field.
         pfieldDate.setCurrentValues(vals5);
         //Add each parameter field to the Fields collection.
         //The Fields object is now ready to be used with the viewer.
         parameterFields.add(pfieldDate);
         //DATE-TIME VALUE PARAMETER.
         Calendar calendar2 = Calendar.getInstance();
         calendar2.clear();
         calendar2.set(2002, 5, 12, 8, 23, 15);
         Date dateTimeParamVal = calendar2.getTime();
         pfieldDateTime.setName("dateTimeParam");
         pfieldDVDateTime.setValue(dateTimeParamVal);
         //Add the parameter field values to the Values collection object.
         vals6.add(pfieldDVDateTime);
         //Set the current Values collection for each parameter field.
         pfieldDateTime.setCurrentValues(vals6);
         //Add each parameter field to the Fields collection.
         //The Fields object is now ready to be used with the viewer.
         parameterFields.add(pfieldDateTime);
         //TIME VALUE PARAMETER.
         Calendar calendar3 = Calendar.getInstance();
         calendar3.clear();
         calendar3.set(2002, 5, 12, 13, 44, 59);
         Date timeParamVal = calendar3.getTime();     
         pfieldTime.setName("timeParam");
         pfieldDVTime.setValue(timeParamVal);
         //Add the parameter field values to the Values collection object.
         vals7.add(pfieldDVTime);
         //Set the current Values collection for each parameter field.
         pfieldTime.setCurrentValues(vals7);
         //Add each parameter field to the Fields collection.
         //The Fields object is now ready to be used with the viewer.
         parameterFields.add(pfieldTime);
    Edited by: Merry Enns on Aug 5, 2008 8:11 PM

  • Printing to PDF from CrystalReportViewing returns blank page

    Hi All,
       I have a web report that I run. When the report generates in the CrystalReportViewer I see my results. However, if I click the button to Print to PDF, it results in a PDF with no data. If I click on the Next button as well to go to the next page in my report, it returns blank results.
    This apparently started happening when I used date parameters being passed to my stored procedure:
            parameterField = report.ParameterFields("@callstdate")
            parameterField2 = report.ParameterFields("@callendate")
    I'm using VS 2008 and CR2008.
    Any ideas why this is happening?
    Thank you in advance,

    1)Any export type I use returns no data on the exported report
    2)Changed PDF to ActiveX and it printed the report with no data
    3)Remove parameters from my webapp and let the Viewer prompt for them. Now PDF works and everything else.
    Here's my code:
        Protected Sub display_report()
            parameterField.CurrentValues.Clear()
            parameterField2.CurrentValues.Clear()
            parameterField3.CurrentValues.Clear()
            CrystalReportViewer2.ParameterFieldInfo.Clear()
            parameterField = report.ParameterFields("@callstdate")
            parameterField2 = report.ParameterFields("@callendate")
            parameterField3 = report.ParameterFields("Group")
            For Each li As ListItem In Me.ListBox1.Items
                If li.Selected = True Then
                    ' Add all parameters value here
                    parameterField3.CurrentValues.AddValue(li.Value)
                End If
            Next
            report.SetParameterValue("@callstdate", CDate(st_date.Text))
            report.SetParameterValue("@callendate", CDate(st_date.Text))
            CrystalReportViewer2.ReportSource = report
        End Sub

  • Print Button in CrystalReportViewer 64-bit x64 VS2005 does not respond

    Hello,
    I'm using the CrystalReportViewer-Control comes with VS2005 CR.
    When I deploy the application to a W2008 R2-System the print button shows no response.
    I'm still installed the CR-Runtime for x64 Systems on the Target-Server: CRRedist2005_X64.msi
    For testpurposes I installed a VS2005 on a W2008 R2 Server. On this platform I installed the CR-SP1-Patch for the environment: crvs05sp1.exe. After that the print button responds on the test-system.
    Then I created a setup project on this test-system with mergemodules: CrystalReportsRedist2005_x64.msm and deployed it to the target-server. But with no success. The button does not respond. It is not important for me, wether I deploy the CR-Runtime on the target-servers with the CRRedist2005_X64.msi or with a own setup-project. Because there are only six servers must be deployed.
    Any ideas? Thank you in advance
    Rolf

    The CRRedist2005_x64.msi with Date 10/24/2007 is good. So we need to look for other issues. Are you using the ActiveX print control? If you are then the control must be downloaded from teh SAP website. There should be a directive for that in the web.config (assuming this is a web app). What you may need to do is documented at the below link:
    http://msdn.microsoft.com/en-us/library/ms225384(VS.80).aspx
    The print control cab file is here:
    http://support.businessobjects.com/CRforVS2005/PrintControl.cab
    Also, see if kbse #[1356727|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] will help here.
    2) Popup blocker in play?
    3) Is this a new app or an upgrade?
    Ludek

  • CrystalReportViewer export/print report without CSS styles

    Hello,
    I've faced with one issue in CrystalReportViewer control and couldn't solve it by my own efforts. Before I wanted post it exactly to this forum I've found that some people already faced with that problem too...but nobody didn't receive any answer, so I have a big hope that I'll receive it here.
    My problem is related to CrystalReportViewer control and especially to its styles. I have a test application which has just one aspx page which displays very simple test report (just 3 TextObjects, for test purposes) and each TextObject has its own style which stores in css file in my web site. So, CrystalReportViewer control displays report correct, but when I export/print this report to PDF or any other document all styles are lost.
    Could someone help me with this issue or maybe just point me what thing I missed or just tuned incorrect.
    Thanks in advance.
    Best regards,
    Sasha

    It's a pity that this control hasn't possibility to export/print report with its styles, because I think it is a very useful thing.
    Thank you very much Adam, for your short and clear answer.

  • Printing from CrystalReportViewer causes program to be unresponsive.

    We are running Crystal Reports 2008 with our VB.net programs. Users are reporting that the programs become unresponsive(5-10 seconds) once the print button is clicked from the Crystal report viewer.  They reported that the dialog that shows the pages counting  was causing the problem.
    We created our own print button and hid the counting dialog but the form was still unresponsive for the same amount of time.  We then moved the print process to a separate thread to get around this.   We have a solution for this problem but would like to know if there is already a fix for this issue?

    As long as this is on 1st print of a report and subsequent reports print within an acceptable time frame, then this is an expected behavior. See [this|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8029cc96-6ff3-2b10-47a2-b30ea790ea5b] for more details.
    Ludek

  • Print a report in crystal Report using SDK

    Hi Dear;
    any body can publish a sample code how can i print a report built in crystal report using SDK?
    regards;

    Hi Dany,
    Hope the following code will help u .
    before calling the function make a XML by using dataset.writexml, in which you have to pass the name of your stored procedure.
    for this you have to decalre commantype as stored procedure.
    first parameter of this is rpt name . asecon paramer is ur xml name which you got from DAtaset.writexml.
    Sub ShowReport(ByVal rptName As String, ByVal SourceXML As String)
            Try
                Dim oSubReport As CrystalDecisions.CrystalReports.Engine.SubreportObject
                Dim rptSubReportDoc As CrystalDecisions.CrystalReports.Engine.ReportDocument
                Dim rptView As New CrystalDecisions.Windows.Forms.CrystalReportViewer
                Dim rptPath As String = System.Windows.Forms.Application.StartupPath & "\" & rptName
                Dim rptDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument
                rptDoc.Load(rptPath)
                For Each oMainReportTable As CrystalDecisions.CrystalReports.Engine.Table In rptDoc.Database.Tables
                    oMainReportTable.Location = System.Windows.Forms.Application.StartupPath & "\" & SourceXML
                Next
                For Each rptSection As CrystalDecisions.CrystalReports.Engine.Section In rptDoc.ReportDefinition.Sections
                    For Each rptObject As CrystalDecisions.CrystalReports.Engine.ReportObject In rptSection.ReportObjects
                        If rptObject.Kind = CrystalDecisions.Shared.ReportObjectKind.SubreportObject Then
                            oSubReport = rptObject
                            rptSubReportDoc = oSubReport.OpenSubreport(oSubReport.SubreportName)
                            For Each oSubTable As CrystalDecisions.CrystalReports.Engine.Table In rptSubReportDoc.Database.Tables
                                oSubTable.Location = System.Windows.Forms.Application.StartupPath & "\" & SourceXML
                            Next
                        End If
                    Next
                Next
                rptView.ReportSource = rptDoc
                rptView.Show()
                Dim oFrm As New System.Windows.Forms.Form
                rptView.DisplayGroupTree = False
                rptView.Dock = System.Windows.Forms.DockStyle.Fill
                rptView.Location = New System.Drawing.Point(0, 0)
                oFrm.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
                oFrm.Controls.Add(rptView)
                oFrm.Name = "rptForm"
                oFrm.Text = "rptForm"
                oFrm.ResumeLayout(False)
                oFrm.WindowState = System.Windows.Forms.FormWindowState.Maximized
                oFrm.TopMost = True
                oFrm.ShowDialog()
            Catch ex As Exception
                oApplication.MessageBox(ex.Message)
            End Try
        End Sub

  • Print Crystal Report directly from C# without using Report Viewer

    Hello All,
    I need to print a crystal report directly to the printer without using ReportViewer in C#. I've a CrystalReport2(belowCode) which requires a query (Select * from JobHeader where JobNumber='J012345') to display all the data. I'm stuck with database connection
    and putting all the data to DataAdapter in C# (Below Code). I also have 8 subreports in my CrystalReport2. Can somebody please give me hand on this? I'm struggling with it. Thanks.
    Regards
    using CrystalDecisions.CrystalReports.Engine;
    using System;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Data;
    using System.Data.SqlClient;
    namespace csharp_win_printtoprinter
    /// <summary>
    /// Summary description for Form1
    /// </summary>
    public class Form1 : System.Windows.Forms.Form
    //CR Variables
    ReportDocument crReportDocument;
    private System.Windows.Forms.Button button1;
    private System.Windows.Forms.PrintDialog printDialog1;
    private System.Windows.Forms.Button button2;
    private System.Drawing.Printing.PrintDocument printDocument1;
    private CrystalDecisions.Windows.Forms.CrystalReportViewer crystalReportViewer1;
    private CrystalReport1 CrystalReport11;
    private Chart Chart1;
    /// <summary>
    /// Required designer variable
    /// </summary>
    private System.ComponentModel.Container components = null;
    public Form1()
    // Required for Windows Form Designer support
    InitializeComponent();
    // TODO: Add any constructor code after InitializeComponent call
    /// <summary>
    /// Clean up any resources being used
    /// </summary>
    protected override void Dispose( bool disposing )
    if( disposing )
    if (components != null)
    components.Dispose();
    base.Dispose( disposing );
    #region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor
    /// </summary>
    private void InitializeComponent()
    this.button1 = new System.Windows.Forms.Button();
    this.printDialog1 = new System.Windows.Forms.PrintDialog();
    this.button2 = new System.Windows.Forms.Button();
    this.printDocument1 = new System.Drawing.Printing.PrintDocument();
    this.crystalReportViewer1 = new CrystalDecisions.Windows.Forms.CrystalReportViewer();
    this.Chart1 = new csharp_win_printtoprinter.Chart();
    this.CrystalReport11 = new csharp_win_printtoprinter.CrystalReport1();
    this.SuspendLayout();
    // button1
    this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    this.button1.Location = new System.Drawing.Point(32, 56);
    this.button1.Name = "button1";
    this.button1.Size = new System.Drawing.Size(160, 104);
    this.button1.TabIndex = 0;
    this.button1.Text = "Print Report No Choose Printer";
    this.button1.Click += new System.EventHandler(this.button1_Click);
    // button2
    this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
    this.button2.Location = new System.Drawing.Point(272, 56);
    this.button2.Name = "button2";
    this.button2.Size = new System.Drawing.Size(160, 104);
    this.button2.TabIndex = 1;
    this.button2.Text = "Choose Printer";
    this.button2.Click += new System.EventHandler(this.button2_Click);
    // crystalReportViewer1
    this.crystalReportViewer1.ActiveViewIndex = 0;
    this.crystalReportViewer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
    this.crystalReportViewer1.Cursor = System.Windows.Forms.Cursors.Default;
    this.crystalReportViewer1.Location = new System.Drawing.Point(47, 188);
    this.crystalReportViewer1.Name = "crystalReportViewer1";
    this.crystalReportViewer1.ReportSource = this.CrystalReport11;
    this.crystalReportViewer1.Size = new System.Drawing.Size(903, 296);
    this.crystalReportViewer1.TabIndex = 2;
    // Form1
    this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    this.ClientSize = new System.Drawing.Size(1164, 505);
    this.Controls.Add(this.crystalReportViewer1);
    this.Controls.Add(this.button2);
    this.Controls.Add(this.button1);
    this.Name = "Form1";
    this.Text = "Form1";
    this.Load += new System.EventHandler(this.Form1_Load);
    this.ResumeLayout(false);
    #endregion
    /// <summary>
    /// The main entry point for the application
    /// </summary>
    [STAThread]
    static void Main()
    Application.Run(new Form1());
    private void button1_Click(object sender, System.EventArgs e)
    crReportDocument = new ReportDocument();
    //Create an instance of a report
    crReportDocument = new CrystalReport2();
    //Use error handling in case an error occurs
    try
    //Set the printer name to print the report to. By default the sample
    //report does not have a defult printer specified. This will tell the
    //engine to use the specified printer to print the report. Print out
    //a test page (from Printer properties) to get the correct value.
    System.Drawing.Printing.PrintDocument printDocument = new System.Drawing.Printing.PrintDocument();
    crReportDocument.PrintOptions.PrinterName = printDocument.PrinterSettings.PrinterName;
    //Start the printing process. Provide details of the print job
    //using the arguments.
    crReportDocument.PrintToPrinter(0 ,true , 1, 1);
    //Let the user know that the print job is completed
    MessageBox.Show("Report finished printing!");
    catch(Exception err)
    MessageBox.Show(err.ToString(), "Unexpected exception");
    private void Form1_Load(object sender, System.EventArgs e)
    private void button2_Click(object sender, System.EventArgs e)
    //Open the PrintDialog
    this.printDialog1.Document = this.printDocument1;
    DialogResult dr = this.printDialog1.ShowDialog();
    if(dr == DialogResult.OK)
    //Get the Copy times
    int nCopy = this.printDocument1.PrinterSettings.Copies;
    //Get the number of Start Page
    int sPage = this.printDocument1.PrinterSettings.FromPage;
    //Get the number of End Page
    int ePage = this.printDocument1.PrinterSettings.ToPage;
    string PrinterName = this.printDocument1.PrinterSettings.PrinterName;
    crReportDocument = new ReportDocument();
    //Create an instance of a report
    crReportDocument = new Chart();
    try
    //Set the printer name to print the report to. By default the sample
    //report does not have a defult printer specified. This will tell the
    //engine to use the specified printer to print the report. Print out
    //a test page (from Printer properties) to get the correct value.
    crReportDocument.PrintOptions.PrinterName = PrinterName;
    //Start the printing process. Provide details of the print job
    //using the arguments.
    crReportDocument.PrintToPrinter(nCopy, false, sPage, ePage);
    //Let the user know that the print job is completed
    MessageBox.Show("Report finished printing!");
    catch(Exception err)
    MessageBox.Show(err.ToString());

    1. This is a VB.Net forum not a Visual C# forum. For Visual C# questions try this forum.
    Visual C#
    2. Crystal Reports are not supported by Microsoft. Therefore, unless somebody responding in the Visual C# forum has experience with whichever version of Crystal Reports you are using, you will probably not receive an answer in the Visual C# forum. SAP has
    their own assistance for Crystal Reports using Visual Studio. You can try to find an appropriate forum to ask questions in at SAP in the below link.
    SAP Community Network
    La vida loca

  • "Missing parameter values."  --  Export and Print only...

    I have a web application and I am using CrystalReportViewer.  I am passing several parameters to Crystal using: 
    report.SetParameterValue(field.Name, Session[field.Name]);
    I have session variables which will hold parameters needed to pass into the report.  The session variables are populated from controls on my webpage after an onclick event.  This even not only populates session, but also passes parameters to the report with the following code: 
    ReportDocument report = new ReportDocument();
    Session["MapPathName"] = "./Reporting/CaseStudy.rpt";
    report.FileName = Server.MapPath(Session["MapPathName"].ToString());
    ParameterFields fields = new CrystalDecisions.Shared.ParameterFields();
    fields = report.ParameterFields;
    foreach (ParameterField field in fields)
          report.SetParameterValue(field.Name, Session[field.Name]);
    CrystalReportViewer1.ReportSource = report;
    This works great for reporting and is very extensible.  However, when clicking on the "Print" or "Export" buttons on the toolbar I get "Missing parameter values."  I attempted to export manually in code using the .ExportToStream function but I still get the error, "Missing parameter values." 
    I received this error also in Refresh, Search, and Navigate functions.  This was corrected by calling a function that supplies the above code block to these functions.  However, I do not see any events for controlling the Print nor the Export events. 
    QUESTION: How can I print or export a report when passing parameters using CrystalReportViewer?  Thanks in advance!
    P.S. - Crystal Reports XI Release 2
    Edited by: KyleSavant on Jun 18, 2009 5:42 PM

    There are no Export or Print events accessible for the viewer
    Since it sounds like you are creating the reportdocument object in your click event, the settings on this object become out of scope on successive postbacks executed by other events.
    to get around this without major changes, you can place your "report" object in session in this event and retrieve it from session on successive postbacks.  This should solve your problems around navigation, printing and exporting.  What you will need to do is check if the session object exists (usually in page_load or page_initialze) and if so, retrieve it from session and bind it to the viewer's reportsource.  If the session object does not exist, then do nothing (ie you have not clicked your button yet that retrieves the parameter values from session and loads the report).  Also, in your click event you can check if the report session object exists and if so, remove it so that it can be re-created with your new parameter values (ie i'm assuming the only time you want to set parameter values is in this event).
    Dan

  • Printing report that has a parameter with multiple values crashes jvm

    I am using BOE XI 4.0 as an unmanaged RAS.
    I am able to preview a report that has a string discrete parameter that can have multiple values.  If I give it a single value.  It previews fine.  If I give it an empty string it prints all values which is fine.  If I give it two discrete values, it displays just those two.
    However, if I try printing the report to a printer:
    1 parameter value - prints fine.
    2 parameter values - crashes jvm
    empty string parameter value - crashes jvm
    I would appreciate some direction on how to do this.  It works in crystal reports for eclipse.
    The test jsp I am using is based off of the samples.  The print test jsp is the same as the preview test with the exception of the following code differences.:
    preview report.jsp code
    // Create a Viewer object
    CrystalReportViewer viewer = new CrystalReportViewer();
    // Set the report source for the  viewer to the ReportClientDocument's report source
    viewer.setReportSource(clientDoc.getReportSource());
    // Process the http request to view the report
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    // Dispose of the viewer object
    viewer.dispose();
    print report jsp code
      PrintReportOptions printOptions = new PrintReportOptions();
      printOptions.setPrinterName("DELL");
      try {
          clientDoc.getPrintOutputController().printReport(printOptions);
      } catch (ReportSDKException ex1) {
          System.out.println("Message - " + ex1.getLocalizedMessage());
      } catch (Exception ex2) {
          System.out.println("Message - " + ex2.getLocalizedMessage());
      clientDoc.close();

    I am using BOE XI 4.0 as an unmanaged RAS.
    I am able to preview a report that has a string discrete parameter that can have multiple values.  If I give it a single value.  It previews fine.  If I give it an empty string it prints all values which is fine.  If I give it two discrete values, it displays just those two.
    However, if I try printing the report to a printer:
    1 parameter value - prints fine.
    2 parameter values - crashes jvm
    empty string parameter value - crashes jvm
    I would appreciate some direction on how to do this.  It works in crystal reports for eclipse.
    The test jsp I am using is based off of the samples.  The print test jsp is the same as the preview test with the exception of the following code differences.:
    preview report.jsp code
    // Create a Viewer object
    CrystalReportViewer viewer = new CrystalReportViewer();
    // Set the report source for the  viewer to the ReportClientDocument's report source
    viewer.setReportSource(clientDoc.getReportSource());
    // Process the http request to view the report
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    // Dispose of the viewer object
    viewer.dispose();
    print report jsp code
      PrintReportOptions printOptions = new PrintReportOptions();
      printOptions.setPrinterName("DELL");
      try {
          clientDoc.getPrintOutputController().printReport(printOptions);
      } catch (ReportSDKException ex1) {
          System.out.println("Message - " + ex1.getLocalizedMessage());
      } catch (Exception ex2) {
          System.out.println("Message - " + ex2.getLocalizedMessage());
      clientDoc.close();

  • Dynamic graph can't be displayed when it is printed

    <font size="2"><font face="Arial">I've used crystal report xi for half an year. In recent days , I got two problems.</font></font> <font size="1"><span style="font-size: 9pt; font-family: Arial"> One is  that I directly insert a image into the rpt file as OLE object,  then I find that the image can be displayed on the report   but can be printed with ie's printing function. If I set the PrintMode with ACTIVEX mode of  the crystalreportviewer and print with activex component , the image is also visible. The system environment is that crystal report xi and RAS are installed  in the local machine, and web server is on the other machine.</span></font><font face="Arial" size="1"><span style="font-size: 9pt; font-family: Arial"> The report is invoked and displayed using crystalreportviewer component through jsp.  The other is that I want to use new feature of dynamic graphic locations, and show different images in the report with the paths which are stored in the database. I've seen the threads in the crystal report forum, and known how to set the paths of images under the unmanagered RAS. But  my situation is that I have to publish every rpt files to the BO CRS,  so I don&#39;t know where I should place the images and how to set the paths. I try publishing the image into the same folder with rpt file in the CRS, but it can't work.</span></font><font face="Arial" size="1"><span style="font-size: 9pt; font-family: Arial"> </span></font><font face="Arial" size="1"><span style="font-size: 9pt; font-family: Arial">  Thanks in advance for any help.</span></font>

    Please re-post if this is still an issue to the Java Development - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly

Maybe you are looking for

  • Smooth scrolling on a horizontal page - how did Benjamin Moore do it?

    Hi, I'm trying to work out how Benjamin Moore did this (in their COLOURSTORIES Canadian Version). We're looking to do something similar (Different content on the horizontal and vertical formats), but can't work out how Benjamin Moore managed to get a

  • F-30 authorisation with transfer posting with clearing only

    Dear Gurus, In transaction F-30(posting with clearing), I want to give a user authorisation only for transfer posting with clearing. that is, i do not want him to use outgoing payment, incoming payment and credit memo options but use the option posti

  • Withholding tax for bank interests

    Hi, Experts, I'm facing the problem that the bank doesn't pay the total interests, they will deduct the withholding tax amount. I've review the documents for SAP extended withholding tax function, found that it is only available for vendors and custo

  • Aperture Web Pages

    I would like to add a couple of customizations to the stock web pages. They are: 1. Arrow key navigation. Go to the next or previous photo using the right and left arrow keys instead of clicking. 2. Slideshow or automatic transition to the next photo

  • Double-clicking - OS 9 apps launch, but documents don't open

    On my G4 dual 450MHz PowerMac with OS 10.4.3 and Classic...when I double-click on a Microsoft Word 2001 document or a Quark 5 document (an document created by a classic app) the program that created the file starts up - like Word or Quark, but the wi