How to send and view data in seperate tables of a swing application, to a japser reporting(two)
I have 2 tables in one swing user interface. I want to view and get printed them in a jasper report. In the jasper report, the tables should be viewed seperately.
I have done this when there is one table. I want to know do for two tables.
(here I am sending two parameters as well. and this has been coded for a button action performed)
try{
JRTableModelDataSource datasource=new JRTableModelDataSource(jTable1.getModel());
String reportSource="C:/Program Files/AccsBook/Tools/DiscountInvoice.jrxml"; //"C:/Program Files/AccsBook/Tools" // the jrxml file
Map<String,Object>params=new HashMap<String,Object>();
params.put("NoItm", jTextField1.getText());
params.put("Am", jTextField2.getText());
JasperReport jasperReport=JasperCompileManager.compileReport(reportSource);
JasperPrint jasperPrint=JasperFillManager.fillReport(jasperReport, params,datasource);
JasperViewer.viewReport(jasperPrint,false);
JRViewer j=new JRViewer(jasperPrint);
//jTabbedPane1.add("Customer Details",j);
}catch(JRException jRException){
}
Is there any one knows please answer........
View Answers
Related Tutorials/Questions & Answers:
Advertisements
sql query to get data from two tablessql query to get
data from
two tables
how can i get the
data from
two different
tables?
Hi Friend,
Please visit the following link:ADS_TO_REPLACE_1
JOIN Query
Simple Query
ThanksADS_TO_REPLACE_2
how to connect two swing frameshow to connect
two swing frames
how to connect
two swing frames
Hi Friend,
Try this:
1)LoginDemo.java:
import java.sql.*;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
class LoginDemo extends
how to do two database tables in one page?how to do
two database
tables in one page? dear all:
i want to show these
two database
tables in one page. one table on the left (dbtable.jsp) and the other on the right (table2.jsp).
how can i do that with HTML? this is my
Join the two tables in sqlJoin the
two tables in sql
How to join the
two tables in SQL ..and return the value from common column in SQL Database
Retrieve data from database in swing applicationRetrieve
data from database in
swing application I want to retrive
data(doctor name,specilization,date) from my sql database... in another jframe.please
send the code to me????
import java.awt.
How to save data - Swing AWTHow to save data Hi,
I have a problem about
how to save
data ,but
first before
data save to dababase,
data must
view in jLisit or Jtable
then in jList or or Jtable many
data viewer in one button,then another button must
how to text send from list to textbox - Swing AWThow to text
send from list to textbox dear sir/madam
I whant to
send text from list to textbox. plz give me solution for this problem. Hi friend,
Plz explain the problem in details to solve it and specify
Swing applicationSwing application Hello, I want to develop a
Swing application... the
application not through web browsers, instead through a
Swing desktop
application GUIs. Please help me to develop such an
application Swing ApplicationSwing Application hello,
i am making
swing application in java i am unable to run prog......when my rite clikcing on my project name and clicking thn run it is not showing output .....and when i am cliking on individual java
SQL Server row comparison using two tablesSQL Server row comparison using
two tables insertion process are completed in table1.string comparison using table2 to table1 if any changes in these
tables and then upadated
How to select Data Between Two dates in Java, MySQLHow to select
Data Between
Two dates in Java, MySQL
How to select
Data Between
Two dates in Java, MySQL?
Thanks in advance.
http://www.v7n.com/forums/coding-forum/294668-how-select-
data-between-
two-dates-php
How to Generate XML files from the data in DB tables?How to Generate XML files from the
data in DB
tables? HI Experts,
I have a doubt.
I have a table say Pest.
My task is to generate XML file with all the fields in table and store it to database.Please help me.I am new to XML
How to run java swing application from jar files .How to run java
swing application from jar files . Hello Sir,
I developed a java
swing application .Now i want to execute it as .exe setup file .As per my knowledge i have to run .jar file from dist folder
Iphone Table View ApplicationIphone Table
View Application Hi,
How to use Table
View Application in Iphone? What parameters i have to follow to develop the Table
view Apps with iphone? Please guide me or suggest any online example for reference.
Thanks
catching tomcat object to swing applicationcatching tomcat object to
swing application Hi, I have 2 java projects, one is running on tomcat server and another is at client pc ie
swing application. So I need to catch a server side object from
swing application.
How can I
Swing Application help;Here is a
swing application that will insert the form
data into database...
Swing Application help Hi am developing an
application. I have set... form in the same window. This form
data will contain the information entered
Data fetch from multiple SQL tables - Hibernate my first hibernate
application. I have a sql query that fetches
data from multiple
tables using left and right outer joins. I need to convert this JDBC
data... that would use table classes to retrieve
data from 8 or 9
tables.
Any
Combobox application - Swing AWTCombobox application hi, i am facing a problem in updation of the comboboxes i m using in an
application...for the first time the selectec item does... function...please suggest... Is it
Swing ?
If not using