ReportViewer.jar



I need ReportViewer.jar file which is required to call Crystal Reports
within Java. All other required .jar files, I have got.

Please provide me this file at <gajeshtripathi@xxxxxxxxxxxxxxx>
imediatly, if you have. I will be very thankfull to you.

HERE IS CODE:-

*/

import java.awt.*;
import javax.swing.*;
import com.crystaldecisions.ReportViewer.*;

// Use these to talk to RAS
import com.crystaldecisions.sdk.occa.report.application.*;
import com.crystaldecisions.sdk.occa.report.reportsource.*;


public class HelloWorldSwing
{
private static void createAndShowGUI()
{
try
{
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(false);

//Create and set up the window.
JFrame frame = new JFrame("HelloWorldSwing");
frame.setTitle( "Testing 1, 2, 3");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

ReportViewerBean viewer = new ReportViewerBean();
viewer.init( new String[0], null, null, null);

ReportClientDocument rpt = new ReportClientDocument();

// FLui: set the RAS server if you are using RAS
rpt.setReportAppServer( "localhost" );
rpt.open( "ras://C:\\Reports\\MyReport.rpt", 0 );

IReportSource rptSource = rpt.getReportSource();
viewer.setReportSource( rptSource );

frame.getContentPane().add( viewer, BorderLayout.CENTER );
frame.setSize( 700, 500 );
frame.setVisible(true);

viewer.start();
}
catch ( Exception exception )
{
System.out.println( exception.toString() );
}
}

public static void main(String[] args)
{
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
//
com.crystaldecisions.ReportViewer.ReportViewerFrame.main( args );
javax.swing.SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
createAndShowGUI();
}
});
}
}

.



Relevant Pages