How to link crystal report with swing
I am developing applications in swing. I have done a report using crystal report.
Now i don't know how to link it with swing. can anyone help me to solve this with some examles.
thanx in advanz
Hope these links are useful:
http://www.must.de/default.html?Jareport.htm
http://www.utdallas.edu/~pxm034000/files/integrating.html
Similar Messages
-
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,
jmosThe 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
-
How to link Crystal report to SBO layout print, like AR invoice?
Hi,
I am trying Crystal Report to work with SBO now; However, I dont know how to link Crystal Report to print AR invoice, sales order etc.; Is it possible to link Crystal with SBO document print layout?
Thank you!
Regards,
Jerry HuangHi jerry ,
It's nice that u found the answer, and thanks a lot for sharing the solution .
Please mark ur question as answered.
Rgds,
Premraj -
How to use crystal report with php
Hello every body
can any body know how to use crystal report with php any helping material, code or tutorial for my problem ill be very thankful for helping me
farooqHello sir
i am sudeep and i need to deploy crstal reports in php
i want to integrate it in sugar crm (open source project(
can u plz tell me how to do it
i have written this code
<?php
//echo phpinfo();exit;
$ObjectFactory= New COM("CrystalReports11.ObjectFactory.1");
$crapp = $ObjectFactory->CreateObject("CrystalDesignRunTime.Application");
//$crapp = new COM("CrystalRuntime.Application.10");
$reportToRun="C:\Report4.rpt";
$creport = $crapp->OpenReport($reportToRun, 1);
//reportToRun=full path to *.rpt file
$creport->Database->Tables->
Item(1)->ConnectionProperties['User ID'] = $user;
$creport->Database->Tables->
Item(1)->ConnectionProperties['Password'] = $pass;
//fomatType = integer 22=xls, 31=pdf etc
$creport->ExportOptions->FormatType = $formatType;
//type 1 is to output to a file I think 2 is email
$creport->ExportOptions->DestinationType = 1;
//location = full path to report output file
$creport->ExportOptions->DiskFileName = $location;
$creport->DiscardSavedData();
$creport->Export(False);
?>
thanks in advance -
How to integrate Crystal Report with oracle JDeveloper 11g
Hi,
How to integrate Crystal Report with oracle JDeveloper 11g
Regards ,
AmolI dont think that you can integrate Crystal Reports with JDevelpoer but you can use runtime libraries to your project to get crystal report functionality
To know more please go through supported platforms
[Supported Platforms|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/504d0204-681e-2b10-2381-853d88974cfc]
Regards,
Tej -
How to Call Crystal Reports from Swing Application
Hi All,
I have a requirement for calling Crystal Report from Swing Application. Please let me know how can I do that, and also provide the Source code for calling the crystal report.
Thanks in advance.
Chandrahi
this is the code that i am using in my application which is similar to urs. but i am working with CR XI so make all the neccessary changes.
import java.awt.*;
import javax.swing.*;
import com.crystaldecisions.ReportViewer.*;
import com.crystaldecisions.reports.sdk.*;
import com.crystaldecisions.sdk.occa.report.reportsource.*;
public class HelloSwing
public static void createAndShowGUI()
try
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame("HelloWorldSwing");
frame.setTitle( "Testing Reports");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ReportViewerBean viewer = new ReportViewerBean();
viewer.init( new String[0], null, null, null);
ReportClientDocument rpt = new ReportClientDocument();
rpt.open( "report path", 1 );
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)
javax.swing.SwingUtilities.invokeLater(new Runnable()
public void run()
createAndShowGUI();
there are 23 jar files that u need to import into ur package. but remember that ReportViewerBean should be the first jar file in the list & it should be followed by jrcerom.jar
specify the key in the CRConfig.xml file (which also has to be imported in the package)
u can find these jar files in the common objects folder in your program files.
hope it helps. best of luck -
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
Pooja1.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. -
How to use Crystal Report with Java - need help
Dear everyone,
i am completely new to Crystal report , please can anyone help me to creat a very simple Report using the Crystal report,
the report will show some records from oracle DB.
How can i make it by a simple example and with code please?
do i need any JAR or Bean for Crystal report?
thanks for your help and please don't hesitate to contact me in case of any inquiries.
my email: [email protected]
Thanks in advanceI what to use Crystal report to generate report.My programe in java swing .Iam retrive table from database in Jtable .But when giving print
command its print half screen .so that why I wantto usecrystal report
package file2;
import file2.choice;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.util.*;
import java.awt.print.*;
import javax.swing.table.*;
import com.sun.java.swing.*;
import javax.swing.JTable;
public class cour extends JFrame implements Printable
//Menu fileMenu;
public static void main(String[] a)
cour n = new cour();
n.setVisible(true);
public cour()
super("Course Report");
report();
protected void report()
JPanel panel = new JPanel();
JButton printButton = new JButton("Print");
panel.add(printButton);
JButton exitButton = new JButton("Exit");
panel.add(exitButton);
DefaultTableModel defaulttablemodel = new DefaultTableModel();
JTable jtable = new JTable(defaulttablemodel);
panel.add(new JScrollPane(jtable));
String tempname="";
int tempcnt;
String driver="sun.jdbc.odbc.JdbcOdbcDriver";
String url="jdbc:odbc:regs";
Object[] data = new Object[4];
try
Class.forName(driver);
Connection connection=DriverManager.getConnection(url,"sa","");
Statement statement = connection.createStatement();
String query = "SELECT courseid as CourseID,coursen as CourseName,cfee as Fee,coursed as Duration FROM course";
ResultSet rs = statement.executeQuery(query);
ResultSetMetaData rmeta = rs.getMetaData();
int numColumns=rmeta.getColumnCount();
for(int i=1;i<=numColumns;i++)
if(i<=numColumns)
defaulttablemodel.addColumn(rmeta.getColumnName(i));
while(rs.next())
for(int i=1;i<=numColumns;++i)
if( i<=numColumns)
tempname = rs.getString(i);
tempcnt=i-1;
data[tempcnt] = tempname;
defaulttablemodel.addRow(data);
catch(Exception ex)
printButton.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
/*if(ae.getActionCommand().equals("Print"))
PrinterJob pj = PrinterJob.getPrinterJob();
pj.setPrintable(cour.this);
if (pj.printDialog())
try
pj.print();
catch (PrinterException pe)
System.out.println(pe);
exitButton.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
choice ch=new choice();
setVisible(false);
ch.setVisible(true);
setContentPane(panel);
setSize(1040,780);
/*Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = getSize();
int x = (screenSize.width - frameSize.width) / 2;
int y = (screenSize.height - frameSize.height) / 2;
setLocation(x, y);*/
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
dispose();
System.exit(0);
public int print(Graphics g, PageFormat pf, int pageIndex)
if (pageIndex != 0) return NO_SUCH_PAGE;
Graphics2D g2 = (Graphics2D)g;
g2.translate(pf.getImageableX(), pf.getImageableY());
getContentPane().paint(g2);
return PAGE_EXISTS;
} -
How to design crystal report with web service data source?
I want to design and run a Crystal Report 2008 against my ADO.NET DataSet from web service method.
I choose New Report, for Data I choose XML, then "Use Web Data Source" hit next, then choose "HTTP WSDL URL" I enter http://localhost/RDWS/Service.asmx?wsdl, hit Next, I leave HTTP username and HTTP password blank. Then I see the Services, Ports and Methods screen. Services: Service, Ports: ServiceSoap, Methods: CustomerOrdersDataSet
When I click Finish, I get Logon Failed, Details, Schema file is invalid. error:Element Schema@htttp://www.w3.or/2001XMLSchemal not found.
How can I get this to work?The native XML driver is incompatible with ADO.NET DataSet XML. The specific issue is that the driver cannot handle the recursive definition on "Schema" that the .NET DataSet XML uses.
The workaround is to create a .NET class that Web References, invoke the Web Service method for the DataSet, then returns it.
Use the ADO.NET (XML) driver in Crystal Report to consume the .NET data source.
Note - when you deploy your report, ensure you deploy the DLL for the .NET class you've created.
Sincerely,
Ted Ueda -
How to use Crystal report with Java
Dear everyone,
i am completely new to Crystal report , please can anyone help me to creat a very simple Report using the Crystal report,
the report will show some records from oracle DB.
How can i make it by a simple example and with code please?
do i need any JAR or Bean for Crystal report?
thanks for your help and please don't hesitate to contact me in case of any inquiries.
my email: [email protected]
Thanks in advance1. Don't ask people to reply by private email. Most Forum regulars believe solving problems should be a public, transparent process during which a first try at an answer can and should be corrected if someone more knowledgeable notices that it is incomplete or incorrect. Also, they get some of their reward for being respondents from being seen to be competent and knowledgeable by their peers.
2. Don't flag your question as urgent, even if it is for you. Claiming urgency is very likely to be counter-productive: most forum regulars will simply ignore such messages as rude and selfish attempts to elicit immediate and special attention.
Besides, unless a legion of ninja lemmings is about to chase you over the edge of a cliff, your problem probably isn't as urgent as you think.
3. Please make the extra effort to write out words such as "please". The extra keystrokes won't cost much in the way of time, and the enhanced clarity will be appreciated by those communicating on a forum with international readership.
4. STFW. -
How to schedule Crystal reports with crystal server
Hi,
We are using just crystalreportsxir2 installed on the desktop, no business objects and we r not using any server
My question is how to schedule reports with out server and I donu2019t want to use windows scheduler. Is there any way to schedule reports like this?
If it is not possible scheduling reports in above mentioned way
We want to buy a crystal xir2 server, in such case is it possible to schedule reports with the server we donu2019t have any portal and we dou2019t want to use any third party tools
Pls help me in resolving this issue
Thanks,
SriHi Sreedhar,
Did you find any option Scheduling for the report with in crystal designer.
We need Crystal Enterprise or Server to schedule the reports at regular intervals.
We can schedule the report for our required destination, we can view the reports with default viewers with in the Enterprise.
There is no need of using any third party tools.
Regards,
Naveen. -
How to connect crystal report with oracle
how this we do .
A.Rfirst make connect throug "microsoft odbc connectivity"
and open crystal report
go
file......
.....logon and logoff server
......................database explorer.
........................find odbc connectivity and logon to database.
hope this helps -
How to Connect crystal report with multiple databases?
I Think my question is really clear
I ask this because i think i already used every way logic in my head
ConnectionInfo
IConnectionInfo
PropertyBag
DataDefModel
Etc
i found Ludek's post about "Ras Connection Info Code" i think this will solve my case but still no luck
Dear Ludek i try your suggestion from here Until the "Ras Connection Info Code" give an Error
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at CodeBuilder_RasConnectionInfo.frmRasConnectionInfo.VBConnectionCode(ReportDocument boReportDocument) in C:\Reza\Development\CodeBuilder-RasConnectionInfo\Form1.vb:line 183
at CodeBuilder_RasConnectionInfo.frmRasConnectionInfo.btnLoadReport_Click(Object sender, EventArgs e) in C:\Reza\Development\CodeBuilder-RasConnectionInfo\Form1.vb:line 16
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
CodeBuilder-RasConnectionInfo
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Reza/Development/CodeBuilder-RasConnectionInfo/bin/Debug/CodeBuilder-RasConnectionInfo.exe
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
CrystalDecisions.CrystalReports.Engine
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.CrystalReports.Engine/13.0.2000.0__692fbea5521e1304/CrystalDecisions.CrystalReports.Engine.dll
CrystalDecisions.Shared
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.Shared/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Shared.dll
CrystalDecisions.ReportAppServer.CommLayer
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CommLayer/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CommLayer.dll
CrystalDecisions.ReportAppServer.ClientDoc
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ClientDoc/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ClientDoc.dll
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
CrystalDecisions.ReportAppServer.Controllers
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.Controllers/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.Controllers.dll
CrystalDecisions.ReportAppServer.DataDefModel
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataDefModel.dll
CrystalDecisions.ReportAppServer.DataSetConversion
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataSetConversion/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataSetConversion.dll
CrystalDecisions.ReportAppServer.CubeDefModel
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CubeDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CubeDefModel.dll
CrystalDecisions.ReportAppServer.ReportDefModel
Assembly Version: 13.0.2000.0
Win32 Version: 13.0.0.99
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ReportDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ReportDefModel.dll
log4net
Assembly Version: 1.2.10.0
Win32 Version: 1.2.10.0
CodeBase: file:///C:/Windows/assembly/GAC_32/log4net/1.2.10.0__692fbea5521e1304/log4net.dll
System.Web
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
CustomMarshalers
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
i don't know what happen
is there any way to solve my case??
actually i only need 3 databases connected in my report
in each databases i insert about 3 - 8 command
i'm using VS2010 Ultimate
CR Version=13.0.2000.0 (ASP.Net)
SQL Server Standard Edition 10.50.2500.0
and
SQL Server Standard Edition 10.50.1600.1 to test move the datasources
can someone give me an enlightment about my case
every suggestion would be great
Thanks
ZealJust as an FYI. there is a utility that will actually write the code out for you. See KBA 1553921 - Is there a utility that would help in writing database logon code?
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
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 RasikaThe 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
-
Connect jasper report with swing
hai
can any one tell me how to connect jasper report with swing plz.
Thanks in advance.Thanks for your reply
i tried the code you gave. but i get following error during runtime
java.lang.NoClassDefFoundError: org/apache/commons/javaflow/bytecode/Continuable
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
at Report.runReport(Report.java:35)
at Report.main(Report.java:47)
Exception in thread "main" & this is the code i used
import java.sql.*;
import net.sf.jasperreports.view.JasperViewer;
import net.sf.jasperreports.engine.xml.JRXmlLoader;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.JasperReport;
import java.io.File;
import java.io.OutputStream;
public class Report {
public static Connection connectDB() {
Connection jdbcConnection = null;
try {
Class.forName("com.mysql.jdbc.Driver");
jdbcConnection = DriverManager
.getConnection("jdbc:mysql://localhost/example?user=root&password=yspl");
} catch (Exception ex) {
String connectMsg = "Could not connect to the database: "
+ ex.getMessage() + " " + ex.getLocalizedMessage();
System.out.println(connectMsg);
return jdbcConnection;
public static void runReport() {
try {
JasperDesign jasperDesign = JRXmlLoader
.load(new File("F:\\Reports\\testReport.jrxml"));
JasperReport jasperReport = JasperCompileManager
.compileReport(jasperDesign);
Connection jdbcConnection = connectDB();
JasperPrint jasperPrint = JasperFillManager.fillReport(
jasperReport, null, jdbcConnection);
JasperViewer.viewReport(jasperPrint);
} catch (Exception ex) {
String connectMsg = "Could not create the report "
+ ex.getMessage() + " " + ex.getLocalizedMessage();
System.out.println(connectMsg);
public static void main(String[] args) {
runReport();
}why i occurs please tell me
anticipating for your reply
Thanks once again
Maybe you are looking for
-
Benefits of Purchase Organization
Hi, One of our clients want to understand the short term and long term benefits of having single or separate purchase organization for its two companies (Company Codes). What happens if they have two Pur Orgs and decide to merge into one at a later d
-
Lightroom 5 unexpected error opening catalogue
Have looked at forums and I see advice to remove a locked associated file. I don't have a locked file. I also see an unanswered question from another user who also does not have a locked associated file. IMPOSSIBLE TO SPEAK TO AN ADOBE REP. ANYONE HA
-
Transaction Scenario . Help Rqrd..
Snenario ======= A transaction is unit of work containing activities that need to be completed together. For instance, for an online travel site, you might have a session bean method bookTravel that takes a credit card, ensures its valid, charges the
-
sur mon ibookPro (sous 10.7.5) la dernière mise à jour iPhoto provoque quelques dégâts. impossible d'exporter des photos depuis la mise en place de cette mise à jour ! la logiciel quitte, répare ma bibliothèque et tout recommence : nouvelle tentative
-
Keyboard Problem - cursor jumps midword
I've been having a problem typing recently where my cursor will change position while I'm in the middle of typing a word, so it will jump to a different part in the text and start typing there or it will highlight the word or the sentence and then wh