Integrating Crystal Report with JSP

Could any one send me a sample code how to integrate crystal Report
with JSP. If so it will be a grade help for my project work.
Thanks Rasika

The best place to pick up sample code is straight from the horses mouth. [url http://www.businessobjects.com/products/dev_zone/java/default.asp?ref=devzone_main] Crystal java zone

Similar Messages

  • Getting Error while integrating Crystal reports with Java

    Hi All,
    I am getting below error while integrating crystal report with java
    [java] os.arch = x86
    [java] java.lang.NoSuchMethodError: com.crystaldecisions.Utilities.d.<init>
    (Ljava/awt/Image;I)V
    [java] at com.crystaldecisions.Utilities.af.try(Unknown Source)
    [java] at com.crystaldecisions.Utilities.af.a(Unknown Source)
    [java] at com.crystaldecisions.Utilities.af.<init>(Unknown Source)
    [java] at com.businessobjects.crystalreports.viewer.applet.g.a(Unknown
    Source)
    [java] at com.crystaldecisions.ReportViewer.ReportViewer.start(Unknown
    Source)
    [java] at ReportViewerFrame.<init>(ReportViewerFrame.java:51)
    [java] at JRCViewReport.launchApplication(JRCViewReport.java:29)
    [java] at JRCViewReport$1.run(JRCViewReport.java:50)
    [java] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:
    178)
    [java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:443)
    [java] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDi
    spatchThread.java:190)
    [java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDisp
    atchThread.java:144)
    [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.j
    ava:138)
    [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.j
    ava:130)
    [java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
    Any help can be appreciated
    Kalyan

    Hi All,
    For got to mention i am using crystal reports XI release 2 with JDK1.4.
    Kalyan

  • Integrating crystal report with java

    Hi
    Any one can send me sample program for integrating Crystal report with java.I dont know how to integrate java with cryatal report.if any one helps me out from this problem an advance thanks to them
    Thanks
    Dilip

    Hi All,
    For got to mention i am using crystal reports XI release 2 with JDK1.4.
    Kalyan

  • Integrating crystal report with swing application

    Hi,
    Any body knows how to integrate crystal reports with swings?
    I'm posting this after a painful search in the net/forum.Any idea
    will be greatly apprecited.
    thanx.
    regards,
    jmos

    The best place to pick up sample code is straight from the horses mouth. [url http://www.businessobjects.com/products/dev_zone/java/default.asp?ref=devzone_main] Crystal java zone

  • Crystal Report with jsp

    Please help .............................
    <html>
    <head><title>Table Linking Sample</title></head>
    <body>
    <%@ page import= "java.net.*" %>
    <%@ page import= "java.util.Locale" %>
    <%@ page import= "com.crystaldecisions.sdk.occa.report.application.ReportClientDocument " %>
    <%@ page import= "com.crystaldecisions.sdk.occa.report.lib.PropertyBag" %>
    <%@ page import= "com.crystaldecisions.sdk.occa.report.lib.Strings" %>
    <%@ page import= " com.crystaldecisions.sdk.occa.report.lib.PropertyBagHelper" %>
    <%@ page import= "com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
    <%@ page import= "com.crystaldecisions.sdk.occa.report.data.* " %>
    <%@ page import= "com.crystaldecisions.report.web.viewer.CrystalReportViewer" %>
    <%
    //Create a report document object
    ReportClientDocument rptDoc = new ReportClientDocument();
    //assume RAS service is running on the same machine as RAS SDK -
    //and attach this report to the local machine
    InetAddress ip = InetAddress.getLocalHost();
    rptDoc.setReportAppServer(ip.getHostName ());
    //instead of opening an existing .rpt, create a new empty report
    rptDoc.newDocument();
    //Create two table objects
    Table tblA = new Table();
    Table tblB = new Table();
    //Create a connection info object and property bag for the connection
    ConnectionInfo ci = new ConnectionInfo();
    PropertyBag pb = new PropertyBag();
    //place all of the database connection information into the property bag
    pb.put(PropertyBagHelper.CONNINFO_DATABASE_DLL, "crdb_odbc.dll");
    pb.put(PropertyBagHelper.CONNINFO_DATABASE_NAME , "jstud.mdb");
    pb.put(PropertyBagHelper.CONNINFO_SERVER_NAME, "localhost");
    pb.put(PropertyBagHelper.CONNINFO_SERVER_TYPE, "ODBC (RDO)");
    //attach the property bag to the connection info object
    ci.setAttributes(pb);
    ci.setUserName("");
    ci.setPassword("");
    ci.setKind(ConnectionInfoKind.SQL);
    //set the names of the tables to be added
    tblA.setName("Customer");
    tblB.setName("Orders");
    //attach the tables to the connection info object
    tblA.setConnectionInfo(ci);
    tblB.setConnectionInfo(ci);
    //Use the Database Controller to add the two tables to the report
    rptDoc.getDatabaseController().addTable(tblA, null);
    rptDoc.getDatabaseController().addTable(tblB, null);
    //retrieve the two tables back from the report document
    IDatabase db = rptDoc.getDatabase();
    Tables tables = db.getTables();
    int tableAindex = tables.findByAlias("Customer");
    int tableBindex = tables.findByAlias("Orders");
    ITable tableAobj = tables.getTable(tableAindex);
    ITable tableBobj = tables.getTable(tableBindex);
    //retrieve the fields from each table,
    //these fields will be needed for linking
    Fields fieldsA = tableAobj.getDataFields();
    Fields fieldsB = tableBobj.getDataFields();
    //Create a new table link object and two strings (arrays of string)
    TableLink tblLink = new TableLink();
    Strings sourceFields = new Strings();
    Strings targetFields = new Strings();
    //Create a single link between tableA and tableB:
    //which linked the customer ID field from Customer Table...
    sourceFields.add("Customer ID");
    //... to the Customer ID field of the Orders Table.
    targetFields.add("Customer ID");
    tblLink.setJoinType(TableJoinType.leftOuterJoin);
    tblLink.setSourceTableAlias("Customer");
    tblLink.setSourceFieldNames(sourceFields);
    tblLink.setTargetTableAlias("Orders");
    tblLink.setTargetFieldNames(targetFields);
    rptDoc.getDatabaseController().addTableLink(tblLink);
    //Find and add the Customer Name field from the customer table to the report's details section
    int fieldIndex = fieldsA.find("Customer Name", FieldDisplayNameType.fieldName, Locale.CANADA );
    IField fieldobjA = fieldsA.getField(fieldIndex);
    //Find and add the Order ID field from the Orders table
    fieldIndex = fieldsB.find("Order ID", FieldDisplayNameType.fieldName, Locale.CANADA);
    IField fieldobjB = fieldsB.getField (fieldIndex);
    rptDoc.getDataDefController().getResultFieldController().add(-1, fieldobjA);
    rptDoc.getDataDefController().getResultFieldController().add(-1, fieldobjB);
    Good coding practice would place the following code in its own page.
    The above code would re-direct to that page, first storing
    the reportSource in a session variable
    //Create a viewer to preview the report with
    CrystalReportViewer tc1 = new CrystalReportViewer();
    tc1.setName("m_Crystal_Report_Viewer");
    tc1.setOwnPage(true);
    tc1.setEnableDrillDown (true);
    //Pass the report to the viewer, and view the report
    IReportSource reportSource = rptDoc.getReportSource();
    tc1.setReportSource(reportSource);
    tc1.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    %>
    </body>
    </html>
    while i am executing i am getting a exception like.............
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Only a type can be imported. com.crystaldecisions.sdk.occa.report.application.ReportClientDocument resolves to a package
    An error occurred at line: 16 in the jsp file: /Crystal.jsp
    Generated servlet error:
    ReportClientDocument cannot be resolved or is not a type
    An error occurred at line: 16 in the jsp file: /Crystal.jsp
    Generated servlet error:
    ReportClientDocument cannot be resolved or is not a type
    please help...............

    Kindly assist me where i can find the these <%@ page import= "com.crystaldecisions.sdk.occa.report.application.ReportClientDocument " %>
    <%@ page import= "com.crystaldecisions.sdk.occa.report.lib.PropertyBag" %>
    <%@ page import= "com.crystaldecisions.sdk.occa.report.lib.Strings" %>
    <%@ page import= " com.crystaldecisions.sdk.occa.report.lib.PropertyBagHelper" %>
    <%@ page import= "com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
    <%@ page import= "com.crystaldecisions.sdk.occa.report.data.* " %>
    <%@ page import= "com.crystaldecisions.report.web.viewer.CrystalReportViewer" %>
    packages?

  • Integrating Crystal reports with xcelsius

    We are trying to generate few reports using Crystal reports application. There are 7 different requirements in total and we want to show a summary of all the requirements in a single report. Since the qualifications for each of the requirement are different, we are unable to proceed with reports.
    Trying to give the summary for all requirements using Crystal Xcelsius dashboard charts and tables, and embed this into a report to provide hyper links to individual subreports, but found few issues while integrating these two applications:
    1. If the swf file is bound to crystal reports data, after exporting the rpt file into pdf, the swf charts are not getting displayed.
    2. If a range of data for a chart in xcelsius is selected, the same range of data need to be passed from crystal reports for the chart to be generated. If data is more, sum rows are truncated.
    How do we solve the issues? Is there an alternative way of achieving the results?
    Can someone please share your thoughts on this?
    Thanks

    Post your question to the Xcelsius forum

  • Integrating Crystal reports with Java Portal (test=pluto,Prod=Vignette

    Hi,
    Crystal reports is new to me...so please don't mind if i sound outright silly, and would love a shove in the correct direction.
    This question might have been asked here (I tried searching for this.)
    Problem: We have some old CR9 reports with us which we want to migrate to our Portal installation Vignette Portal.
    I have seen some Portal integration kits but after having a look at them it seems it is ir-relevant to us...as it requires some server running...we don't have that.

    Update:
    After more investigation, it looks as if the BO Server "CrystalReports2013ReportApplicationServer"
    from time to time has an issue - not only when promoting, but also when viewing publications that contain Crystal Report documents or when executing them, the java class error or similar issue is thrown.
    Did sb face similar behaviour and knows what is the root cause for "CrystalReports2013ReportApplicationServer" not working probably and throwing the java-class error? - it was running fine for several months, now, the class error showed up twice in one month.
    We need to find out what is causing the issue (aleady checked tomcat and BO-logfiles...).
    Best Regards
    Florian

  • Integration crystal report with ecc

    hi experts
    i am not similar to crystal report,i wanna know if we can develop the crystal report in ECC directly,i find some forums all about bi,crystal report just can integrate with BI?
    also i need some detail documents ,please help me,thanx all
    best regards
    zlf

    Do not cross post.
    Read the "Rules of Engagement"
    Regards
    Juan

  • Crystal Reports with JSP

    I am very new to JSP. Currently, I am required to build some graphical reports using Crystal Reports 9, and then display them using JSP.
    I downloaded code samples from some previous posts, but I always get this error:
    An error occurred at line: 1 in the jsp file: /CR-Test/SimpleReport.jsp
    Generated servlet error:
    CrystalEnterprise cannot be resolved or is not a type
    An error occurred at line: 1 in the jsp file: /CR-Test/SimpleReport.jsp
    Generated servlet error:
    IInfoStore cannot be resolved or is not a type
    An error occurred at line: 1 in the jsp file: /CR-Test/SimpleReport.jsp
    Generated servlet error:
    IInfoObjects cannot be resolved or is not a type
    An error occurred at line: 1 in the jsp file: /CR-Test/SimpleReport.jsp
    Generated servlet error:
    ReportClientDocument cannot be resolved or is not a type
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I don't know what is the reason of the error? Do I need to install something more on my machine. Currently, I have Crystal Reports 9, and Apache Tomcat 5.5.9 installed. Do I need to install some more components from Crystal Reports or from Java

    Read the Crystal Reports docs

  • Integrating Crystal Reports with Ruby on Rails

    Hello:
    I am looking to integrate Crystal Reports into my ROR application. I have been following this weblog for guidance - http://kkarthik.wordpress.com/ - but cannot seem to find any more resources for this on the web. Does this seem like the best method for doing so, and if not, what would be? Also, I am unable to locate all of the required JAR files for this process. Are these included in the download of either Crystal Reports 2008 or Crystal Reports Server 2008? I have these downloaded and still cannot locate the files. Thank you in advance for the support!

    The jar files etc. are available as part of Crystal Reports For Eclipse (CR4E). Don't think they're included as part of Crystal Reports 2008.
    The approach in the blog you linked to is fairly straightforward. As long as you're using JRuby you should allow you to make calls to the Java reporting API. The example in the blog looks fairly limited, it just produces a pdf from a report file, XML schema and data file.
    Making use of the viewer functionality that's part of CR4E will be a bit trickier as it looks like this needs to make calls to a servlet.
    Good luck!
    Tom.

  • Integrating Crystal Reports with ECC 6.0 - Tuning Guide

    Hello,
    Do you know if there is a document out there that describes what we can do to pinpoint performance issues with CR integrated with SAP ECC?   
    There is a WebI Performance Tuning document from WebI to SAP BW.  It explains how to capture very detailed end-to-end analysis times of a single query.  We are looking for something similar for CR to ECC.
    Any help would be greatly appreciated.
    Thank you very much,
    Scott

    I am not aare of such a document. But I ould recommend the usage of InfoSets.
    Regards,
    Stratos

  • Integrating Crystal Report 2008 Developer with Visual Studio 2008 Standard

    I have Crystal Reports 2008 Developer version 12.0.0.683 on my computer. I also have Visual Studio 2008 Standard. I know the standard edition of VS 2008 does not have the bundled crystal reports, but since I bought the full version of CR 2008 separately, I figure I should be able to use CR within VS 2008. The problem I am facing is integrating Crystal Reports with Visual Studio, so I can create reports from within visual studio.
    Crystal Reports was installed first and then Visual Studio. As per suggestions on this and other forums, I repaired my installation of Crystal Reports, but that did not help. I then ran Visual Studio integration manager, but when I run it, it only detects Visual Studio as the currently installed IDE, but does not detect CR 2008. I downloaded service pack 2 for CR, but have not installed it yet. I do not want to install it if it is not going to help. I would also like to avoid uninstalling my copy of CR if at all possible.
    I am a newbie at development in visual studio. Any help will be highly appreciated.
    Thanks,
    Rajib

    Don't want to go against what Jason said as it may be correct - if we go strictly by the documentation provided (sorry Jason, Dan says...). However, here is something to try;
    Uninstall CR. Look for any left overs; c:\program files\business objects\... and delete all of that.
    Look in the registry for HKLM\software\business objects and remove the business objects entry.
    Download CR 2008 from here:
    http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
    That is a trial version and I believe it is already at SP 1. Use your keycode to install. Once this is done, you should have the ability to use CR in .NET. I'd recommend you do apply sp 2 now also.
    Ludek
    Follow us on Twitter
    http://twitter.com/SAPCRNetSup

  • Can anyone let me know how to integrate crystal reports with bi 7?

    HI all,
    Can anyone pls let me know the steps involved in integrating crystal reports with bi 7?
    thanks
    Pooja

    1.install BO client tools
    2. install crystal reports
    3.install sap integration kit
    once you install in above sequence you will be able to pull data from BW system.

  • Safari Browser issue on Mac with crystal report viewer JSP

    Safari Browser issue with crystal report viewer JSP
    This is my configuration:
    Operating System : Mac X
    Browser : Safari Browser 3.1.4
    Crystal Report : XII Release 2
    Application Server : Jboss 4.2.0
    I am using the following code to view the crystal report in jsp.
    <%@ page import="com.crystaldecisions.report.web.viewer.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.ReportClientDocument" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
    CrystalReportViewer theViewer = null;
    ReportClientDocument document = null;
    IReportSource reportSource = null;
    theViewer = new CrystalReportViewer();
    reportSource = document.getReportSource();
    reportSource.refresh();
    theViewer.setReportSource(reportSource);
    theViewer.setOwnPage(true);
    theViewer.setHasExportButton(true);
    theViewer.setHasPrintButton(true);
    theViewer.setHasRefreshButton(true);
    theViewer.setHasLogo(false);
    theViewer.setEnableParameterPrompt(true);
    theViewer.refresh();
    theViewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
    theViewer.dispose();This code is working fine when the browser is IE or Firefox on Mac X.
    But it is giving me error message when the browser is Safari on Mac X.
    If there is no parameter in the report then the error message is:
    Null Totaller
    If there is parameter in the report then the error message is:
    Parameter prompting is not supported
    Please Help.
    Thanks
    Edited by: VINCEJOHNSON on Jul 30, 2008 7:11 AM

    I am having this exact same issue, only on an ASP.NET page. I can print the report, but it does not display at all.

  • Crystal report from JSP using the JRC

    Hi, I am trying to call crystal report from JSP using the JRC.
    But i am getting the Error as 'Logon Failed'. my web.xml entry is
    <env-entry>
    <env-entry-name>jdbc/Test</env-entry-name>
    <env-entry-value>!oracle.jdbc.driver.OracleDriver!jdbc:oracle:thin:{userid}/{password}@//10.0.0.1:1521/TestDB</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    i am setting the userid and password in the code. Please see the below code for your reference. Please help me to solve the issue.
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer"%>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
    <%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
    <%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSource" %>
    <html>
    <head>
    <title>Crystal Report with Database Logon information</title> </head>
    <body bgcolor="#ffffff">
    <%
    try
    String report = "/TEMPLATE.rpt";
    IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
    JPEReportSource reportSource = (JPEReportSource) rptSrcFactory.createReportSource(report, request.getLocale());
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setReportSource(reportSource);
    viewer.setHasRefreshButton(true);
    IConnectionInfo newConnInfo = new ConnectionInfo();
    newConnInfo.setUserName("TEST");
    newConnInfo.setPassword("TEST");
    ConnectionInfos newConnInfos = new ConnectionInfos();
    newConnInfos.add(newConnInfo);
    viewer.setDatabaseLogonInfos(newConnInfos);
    viewer.setEnableLogonPrompt(false);
    viewer.setOwnPage(true);
    viewer.setOwnForm(true);
    out.println("Connection Information: "+viewer.getDatabaseLogonInfos().getConnectionInfo(0).getAttributes().toString());
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(),null);
    viewer.dispose();
    catch(Exception e)
    throw new JspException( e);
    %>
    </body>
    </html>

    I never really had much luck with this approach.
    Mind you I was using Crystal Reports 10, and as far as I recall it didn't allow setting/changing of database at this level.
    Things to check
    - can you create a database connection on your page with this URL/username/password?
    - what server are you using? Tomcat? WebLogic?
    I found this in your other post:
    Connection Information: {Server Name=ee6rpt, Connection String=DSN=s(ee6rpt);User ID=s(ee62test);Password=;UseDSNProperties=b(false), Database Name=, Database DLL=crdb_odbc.dll}That would indicate it is using odbc to connect to the database (crdb_odbc.dll). ODBC is a bad idea with java.
    The way I have got it to work for me (after much trial and error) was to in Crystal Reports to connect using the Oracle Driver, and specifying a tnsname - eg define REPORT_DS in tnsnames.ora.
    When running through the JRC, it looked for a JNDI datasource under that same name "REPORT_DS".
    Don't know if that will help you or not.
    Good luck,
    evnafets

Maybe you are looking for

  • SE93 - There are no variants for screen 1000

    Hello experts, We cannot set variant for report transactions from se93.In our case, system prompts a warning as "There are no variants for screen 1000" But standard system variants (which are starting with CUS& or SAP&) are working fine. However, we

  • Anyone try 8.5.6-074 on an IronPort C160 (is it possible, does it run ok?)

    We have the C160 (also have an S160 but I will just discuss the C160 in this thread).  Since its no longer sold, I was wondering if it still has the power to run the new 8.5.6-074 that went GA.  I do not see it as an available upgrade, however I am o

  • IOS 4.1 / iPod Touch 4th generation and Wiindows 7 Ad Hoc Networking issue

    I have an iPod Touch 1st Gen that I have been successfully using with my Win2k, Win XP, and Windows 7 laptops to transfer files via Windows' Ad Hoc Networking for a couple of years. I just received my new iPod Touch 4th Gen iOS4.1 a few days ago and

  • ActiveSync Client Calendar

    Hi, I am writing an activesync client calendar for a university project. I need help in decoding the timezone information. An example of encoded timezone is given below <A:Timezone>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAA

  • Integrate with Fixed Assets Module

    Hi I am new on the oracle e-business suite , and one of may task now is to find the way at which we can integrate with these application (especially Fixed Assets Module ) . I think one way to do that either oracle may be providing interface tables /