aspose file tools*
The moose likes Other Open Source Projects and the fly likes Mysql dynamic query,java and japer report Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Mysql dynamic query,java and japer report" Watch "Mysql dynamic query,java and japer report" New topic
Author

Mysql dynamic query,java and japer report

Rajubhai Kotwal
Ranch Hand

Joined: Nov 03, 2009
Posts: 47
Actually I have been working on Jasper report. I am using ireport. I have a database in mysql. I am connecting the database to the report in java. Working principle is as follows.

database connectivity-->java file-->export to .pdf file as front end japer report.

Earlier I used to design a static structure of the report. (coulmn names,title etc)Now, I wish to do the same within java itself dynamically. I have been thinking that one can't create columns dynamically without designing on ireport. Now, I want to know, whether there is any mechanism to create new columns and corresponding values as parameters(as arguments) while running the java file. This is what I am trying to implement. Let's take an example.

I have many tables like profile,describtion,schema etc from the database sample. I am selecting name,address, accountNo from these 3 tables respectively. I might be having more tables and correspondning values in the columns. I might select 2 tables and 3 columns or 3 tables 4 columns or many other valid combinations. I want to know, is it possible to achieve such mechanim of dynamic mysql query within jasper report if I have not designed these columns in the .jrxml file. I have many tables. I can not design each and every table on .jrxml file. I believe I am explaning the problem apporpriatly. Pleae do let me know if you know any possible solution.

e.g.

select
name,address,accountNo

from
profile,describtion,schema,

where
....
....
;

Thank you in advance. I would welcome your suggestions.
I will edit this post tomorrow and upload whatever I have been trying ASAP.
 
jQuery in Action, 2nd edition
 
subject: Mysql dynamic query,java and japer report
 
Similar Threads
Jasper Compile issue rergarding crosstab
integrating iReport with my JSP Project
Dynamic columns in jasper reports
Which jrxml file can be called from Java
Jasper report - ireport but in java class - dynamic report using jasper report api