Crystal servlet to .rpt file connection

Posted on 2006-04-18
Last Modified: 2008-02-26
Dear experts

I am brand new to Crystal reports.
I have a jsp page with two date fields, "fromdate" and "todate" and a button called "show report". when the user clicks on the show report button i am going to the Action class from action class i am forwarding the control to a servlet .

Now i want this servlet to pass the parametres such as

          String databasename = ReportConstants.DATA_BASE;
          String databasepwd = ReportConstants.DATA_BASE_PWD;
           String crystalip = ReportConstants.CRYSTAL_IP;
           String crystalfolder = ReportConstants.CRYSTAL_FOLDER;
           String crystalprotocol = ReportConstants.CRYSTAL_PROTOCOL;

and using the above parametres ,i want to "connect to the .rpt file" to display the report. But i am stuck with what needs to be done in the servlet TO CONNECT TO THE .rpt file.
Any ideas on how i can connect the above parametres in the servlet to the rpt file.
Anyhelp greatly appreciated

Question by:jaggernat
    LVL 4

    Assisted Solution

    I believe there is a great example of passing database connection information with Java at This is version dependent so browse around those sites. Great examples for programming with Java.
    LVL 42

    Accepted Solution

    You can probably find some stuff at the link above but a simple example to get you started can be found here:

    Also, what version and edition of Crystal are you using because they don't all support java integration.  Typically you need to have either the Advanced or Developer edition.  A feature comparison can be found here:


    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now