how to integrate crystal report 9 with java

Discussion in 'Software' started by arputharaj, Nov 10, 2006.

  1. arputharaj

    arputharaj

    Joined:
    Nov 8, 2006
    Messages:
    3
    hi friends,
    I have installed the crystal report and J-Integra also.
    but I am not able to find the crystl32.ocx in my c:\windows\system32 folder .
    So I downloaded it separately and use the J-Integra's com2java convertor to generate crystal package.
    Then as per manual I compiled that package and created crystal.jar file.
    And while try this setting with a sample code.

    package javaapplication10;



    public class CrystalClient {
    private static final String CONNECT_STRING = "DSN=test";
    private static final String REPORT_FILE_NAME = "d:\\arp\\cryrpt1.rpt";
    private static final String SQL_QUERY = "select * from tab1";
    private static final String PRINT_FILE = "d:\\arp\\YourNewReport.doc";


    public static void main(String args[]) throws Exception{
    try {
    crystal.CrystalReport report = new crystal.CrystalReport();

    report.aboutBox(); // Lets see if it was loaded properly

    report.setConnect(CONNECT_STRING);

    report.setReportFileName(REPORT_FILE_NAME);

    report.setSQLQuery(SQL_QUERY);

    report.setPrinterCopies((short) 1);
    report.setPrinterCollation(crystal.PrinterCollationConstants.crptDefault);

    report.setDestination(crystal.DestinationConstants.crptToFile);
    report.setPrintFileName(PRINT_FILE);
    report.setPrintFileType(crystal.PrintFileTypeConstants.crptWinWord); // Change output type if necessary

    report.printReport();

    } finally {
    com.linar.jintegra.Cleaner.releaseAll();
    }
    }
    }



    During compilation no error found.
    But during runtime it says that

    init:
    deps-jar:
    compile-single:
    run-single:


    J-Integra 2.6 Copyright (c) Intrinsyc Software International, Inc. http://j-integra.intrinsyc.com/

    ***************************************************
    Thank you for choosing J-Integra.
    You have been evaluating this product for 2 days.
    Please visit http://j-integra.intrinsyc.com/ for
    documentation, support, and purchasing information.
    ***************************************************


    Exception in thread "main" AutomationException: 0x80040154 - Class not registered
    at com.linar.jintegra.bt.b(Unknown Source)
    at com.linar.jintegra.Rpc.a(Unknown Source)
    at com.linar.jintegra.bm.a(Unknown Source)
    at com.linar.jintegra.Dispatch.createDispatch(Unknown Source)
    at com.linar.jintegra.Dispatch.<init>(Unknown Source)
    at crystal.CrystalCtrlProxy.<init>(CrystalCtrlProxy.java:40)
    at crystal.CrystalReport.<init>(CrystalReport.java:117)
    at crystal.CrystalReport.<init>(CrystalReport.java:107)
    at javaapplication10.CrystalClient.main(CrystalClient.java:23)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 2 seconds)

    eventhough it is not the mistake of javacode.
    if anyone able to clarify my dobut kindly help me.


    Thanks in advance.
    Raj
    arputharaj, Nov 10, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RnJhbms=?=

    crystal report certification

    =?Utf-8?B?RnJhbms=?=, Jan 13, 2004, in forum: Microsoft Certification
    Replies:
    1
    Views:
    482
    LiverpoolScum
    Jan 14, 2004
  2. Satya Priya

    Visual Basic, Crystal Report

    Satya Priya, Apr 22, 2004, in forum: MCSD
    Replies:
    1
    Views:
    635
  3. =?Utf-8?B?QW5pbA==?=

    Crystal Report

    =?Utf-8?B?QW5pbA==?=, Apr 16, 2005, in forum: MCSD
    Replies:
    3
    Views:
    630
    Simon Au
    Apr 20, 2005
  4. guptamkomal

    slow crystal report

    guptamkomal, May 23, 2007, in forum: Software
    Replies:
    0
    Views:
    1,006
    guptamkomal
    May 23, 2007
  5. Gajesh Tripathi

    Crystal Report with Java

    Gajesh Tripathi, Jul 30, 2007, in forum: Software
    Replies:
    4
    Views:
    10,659
    frose
    Apr 26, 2012
Loading...

Share This Page