CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 JasperReports&iReports&CCS

Print topic Send  topic

Author Message
jormah

Posts: 10
Posted: 09/01/2004, 9:46 AM

Have anybody ever try to use JasperReports and iReports with CCS (2.2.3.60) ?
I can do reports and preview them with iReports but which/where do I put all jar files and reports files in Tomcat4?
And, how I can call them in CCS?
I think, it is possible to create some JSP pages and use them to view reports, but how.
Some samples are welcome.

R- jormah
_________________
Jorma Hytonen
Mipro Oy, Finland
View profile  Send private message
matheus

Posts: 386
Posted: 09/02/2004, 5:21 AM

I use JasperReport e iReport with CCS.

I make a common servlet of JasperReport and them CCS send the parameters, the servlet has a own package and just need to configure on the context of the application.

To call them in CCS are normal, it's a servlet, so change a action in a form.


_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message
jorma_o
Posted: 09/02/2004, 4:59 PM

How do you send parameters to jasper? Can you chare code?

R- jormah
Anton Hinxman
Posted: 09/03/2004, 12:47 AM

After my customer review, I take a different slant on this. Customers did not want to have 'Open Reports' as an additional application and wanted the criteria, of what they searched for, to be displayed.

Personally, I really like the 'Open Reports' application because it leaves reporting as a seperate modual for users to create their own additional reports. Users do not want to learn new things so bang goes that idea!!!!

See:

http://www.tvfilmlibrary.com/libmgr/PrintDialogPopup.js...recordingsfound

My use of Jasper Reports is embeded directly into my application and will:

1. Use the caller URL parameters
.. Lookup description of parameter against database table rules
... Uses dabase held SQL statement to find FK descriptions
2. Passes the URL parameters directly into Jasper Reports
.. What it finds in the URL is what it sends in, subject to the parameter being allocated in the report parameter table allocated against the report
3. Displays the parameter order according to SQL against database of known paramers
4. Adds initial URL parameters into the reports list of parameters in case you forget and for ease of initial entry
5. Compiles the report 'on the fly' if the .jasper report file is out of date

Basically, I can ignore excess URL parameters (e.g. ...&cust_id=1234&dont_need_this=5678) and translates the ones I do want (cust_id=1234) via SQL stored in my report parameter tables. So the end result for the report is the customer name text.

The report name, passed as a url parameter, is also translated into a description in the same way.

The only functionality I am missing is control of the sort order of the report to match the sort order selected in the CCS table list used to fire off the report. This is easy to do but difficult to make 100% error free and robust. This is because you can not be 100% certain that the 'order by' clause will be accepted by your database when you actually submit the SQL.

Contact me via email in report dialog - if you want, or call me via skype as 'javacertified', see http://www.skype.com.

Anton
matheus

Posts: 386
Posted: 09/03/2004, 4:23 AM

My parameter to JasperReport was the jasper file (test.jasper) and all the parameter I need, and type of all parameter.

In form I change the action to the servlet that creates the Report.

I just cannot made that a parameter be optional. All the parameter is required.

CCS doesn't make so much in this case, it's a simple servlet call.


_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message
jorma_o
Posted: 09/07/2004, 11:06 PM

Now JasperReport runs with Tomcat4 ok.
But still don’t know how to use parameters in JasperReports? From CCS I send URL parameters http://<server>/jasper/EVENTS_report.do?EVENT_ID=123@CUST_ID=456.. and so on. How Jasper receives those parameters and use them to produce report?

R- Jorma_o
matheus

Posts: 386
Posted: 09/08/2004, 4:26 AM

All the parameter that you need, put in a Hashmap, in his own type, if is float must be in Hashmap in float.

JasperPrint impress = JasperManager.fillReport(report, map, con);

get a jasperprint with a fillReport that have parameters:
report = JasperReport with the name of the jasper file.
map = Hashmap with the parameter. (name, value).
con = connection with the database.

Then export to the kind of report needed.
_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message
jormah

Posts: 10
Posted: 09/13/2004, 4:44 AM

Hello matheus.
Can you share the code in Jasper side and CCS side?

Regards, jormah
_________________
Jorma Hytonen
Mipro Oy, Finland
View profile  Send private message
Jorma
Posted: 09/16/2004, 1:23 AM

Quote matheus:
All the parameter that you need, put in a Hashmap, in his own type, if is float must be in Hashmap in float.

JasperPrint impress = JasperManager.fillReport(report, map, con);

get a jasperprint with a fillReport that have parameters:
report = JasperReport with the name of the jasper file.
map = Hashmap with the parameter. (name, value).
con = connection with the database.

Then export to the kind of report needed.

Can you share CCS and Jasper code to send and receive parameters between two servlets?

R- JormaH
Luis
Posted: 09/22/2004, 10:52 AM

Do you know how to make a preview with jasperReport?????
I need make the preview with a applet , there is a example in the demo directory but working only with the demo file.
When I change this file for my file not working.
Why ??? I don't know!

Somebody can to help me ??? please!!!
matheus

Posts: 386
Posted: 09/23/2004, 4:41 AM

To send parameter just call in the form the servlet that manage the JasperReport.

In CCS i just change the action of the form to the servlet, and then the servlet makes everything.
_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.