atharindhi
-
Posts
21 -
Joined
-
Last visited
Content Type
Profiles
Forum
Events
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Downloads
Posts posted by atharindhi
-
-
Hi all
Im using ireport 3.7.4 , mysql-connector-java-5.0.3-bin Jar files
I have a report that shows total hours that a employee work with in a time period..
But the total hours of work is more than 24 the report wont print and give the following errorsnet.sf.jasperreports.engine.JRException: Unable to get value for field 'sumduration' of class 'java.sql.Time'
Caused by: java.sql.SQLException: java.sql.SQLException: Illegal hour value '40' for java.sql.Time type in value '40:25:00.
Attaching the JRXML also
Following is the query [but this works fine if the Total time work less than 24 hours]
Plz help me..
Code: select d.dev_id,d.dev_name,ti.date,ti.s_time,ti.e_time,ti.type,ti.sys_code,ti.cus_code,ti.duration,(SELECT SEC_TO_TIME( SUM( TIME_TO_SEC( `duration` ) ) ) AS total_time FROM time_sheet where dev_id = $P{dev_id} and date between $P{date} and $P{date1})sumduration,ti.func_code,ti.prob_no,CURRENT_DATE(),CURRENT_TIME()from time_sheet ti,developer dwhere d.dev_id = $P{dev_id} and ti.date between $P{date} and $P{date1}and d.dev_id = ti.dev_idgroup by d.dev_id,d.dev_name,ti.date,ti.s_time,ti.e_time,ti.type,ti.sys_code,ti.cus_code,ti.duration,ti.func_code,ti.prob_noorder by ti.date
-
Thanx for the help...
Nw i have a octal color code saved in my database (code like [255,102,0])so i wnat to change the text field Back Color according to the code
I means i have diffetent color code (code like [255,102,0] , [255,51,204],[255,255,51) saved in database. when code change the back color also should change..
Can i do this..
If so how..
-
Hi All,
I want to change the Field's Back color and Fore Color when the code changes..
How can i do this.Can i pass the Hexadecimal color code as a parameter
I cant use the Print When expression bacause the user can add new colors to the codes..
So Expression won't help here.The Hexadecimal code is the only way to pass the tow colors (Im using Fore Color because when comes to dark colors the default black color fonts won't display properly )
Any help would be a appreciated
-
Thanx 4 ur kind attention Teodor
This is what i need to be done
The SUBTIME u are asking is a key word in MYSQL to take the time difference between 2 times.
this is my queryselect distinct d.dev_id,d.dev_name,ti.cus_code abc,ti.date,
(select SUBTIME(ti.e_time,ti.s_time))duration,ti.type,ti.sys_code,ti.cus_code,ti.func_code,ti.prob_no,t.short_type,s.short_system
from time_sheet ti,customer c,developer d,system s,type t
where
$P!{cus_code}
and d.dev_id = ti.dev_id
and c.cust_id = ti.cus_code
and s.sys_id = ti.sys_code
and t.type_id = ti.type-------------------------------------------------\
So basically (select SUBTIME(ti.e_time,ti.s_time) will give the difference between time person works (start_time & end_time)
so i want to take the sum of that duration list in the summery band..
So by default i-report will allocate java.sql.time class for this field (because its define as TIME in MYSQL)
So my question is how to take the sum of TIME..
Because im getting a error of cannot cast java.sql.time to java.lang.stringNote - i've change this sum variable's class to java.lang.number/int etc...
Hope u get this problem..
-
Hi
I have a problem in taking the sum of time duration in jasper reportsMy query shown below..
Im passing parameters for cus_code,sys_code,Type,udi,date
using $P!{cus_code}I need to take the total of time duration in the summery band
But im getting a error
cannot cast object with java.sql.time to java.lang.Number
I cange class to string,number,integer,sql.timeBut i wont get the correct answer..
Im using i-Report 3.7.4 and MYSQL server..
Plz help me..
Code: select distinct d.dev_id,d.dev_name,ti.cus_code abc,ti.date,(select SUBTIME(ti.e_time,ti.s_time))duration,ti.type,ti.sys_code,ti.cus_code,ti.func_code,ti.prob_nofrom time_sheet ti,customer c,developer d,system s,type twhere $P!{cus_code}and d.dev_id = ti.dev_idand c.cust_id = ti.cus_codeand s.sys_id = ti.sys_codeand t.type_id = ti.type
-
Hi
Is it possiable to provide a link in report...??
Im displaying a report consist of movies and the description of it and i want to provide a link to amazon page where the movie can buy online..
Hw can i do this..
Iz it possiable to use this link no matter this report in PDF and other mostly use formats...?Thanx..
-
I need ti import a blob image from Oracle to ireport..
hw can i do this...
I've done following changes in XML code..
But im getting errors..
<imageExpression class="java.awt.Image"><![CDATA[JRImageLoader.loadImage((byte[])$F{IMAGE})]]></imageExpression><field name="IMAGE" class="java.lang.Object"/>
<import value="net.sf.jasperreports.engine.util.JRImageLoader" />
Im getting this error
Code: Error filling print... Error evaluating expression :     Source text : $F{IMAGE} net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression :     Source text : $F{IMAGE}     at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:195)     at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:589)     at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:557)     at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:929)Â
Post Edited by atharindhi at 09/23/2010 13:29 -
Hi
Im using i-report to generate reports to a web based system.
In the reports a field like name or address the Character size limited to 170
So i use Streach with Overflow property togather with Streach relative to band height to streach the filelds when user enter longer details to the form.
so far its working in i-reports and localhost running using Jboss-4.2.0But when i put this to linux server (RHL enterprise 5.2) this doesn't work..
What could be the reason for this issue..Any clue..??
Thanx in advance.
-
Hi all
im using i-report to develop my forms to web based system..
So a field like name field or address field the character limit is 170 bytes in Oracle DB..
So i want to adjust the field size when user enter a larger name into form automatically...
Untill yesterday i adjust the height of the field when QA people send me a bug saying not enough space to enter name..
But i try streach with overflow property with Streach Type - Relative to band height so far its working in i-report as well as my localhost..
But when i put this into my companies main server its not working...
Im using JBOSS server and JSP, servlets for the web based system to generate reports..I try to streach whole form, again only one field, every option..
But its not working..
Plz help me...Im attaching my JRXML
Help me
Post Edited by atharindhi at 09/14/2010 10:05 -
U are missing a another jar file..
Might be 2 or 3 jars..
Did u include clover.jar file
Include dat jar and try again..
If u get an error againTry to find jar files in www.findjar.com
U have all the jars u need there and u can donload as well..Following link will explain u more about user password..I also finding more about this issue more..
Im finding a way to restric user to print the PDF for specific number fo time. If u have an idea let me know...
Following code will help u to comlete your task..
Plz give me KARMA points if this helpfull.http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/export/JRPdfExporterParameter.html#IS_ENCRYPTED
import net.sf.jasperreports.engine.export.JRPdfExporter;
import net.sf.jasperreports.engine.export.JRPdfExporterParameter;
import com.lowagie.text.pdf.PdfWriter;
....
....JRPdfExporter exp = new JRPdfExporter();
exp.setParameter(JRPdfExporterParameter.IS_128_BIT_KEY, Boolean.TRUE);
exp.setParameter(JRPdfExporterParameter.IS_ENCRYPTED, Boolean.TRUE);
exp.setParameter(JRPdfExporterParameter.USER_PASSWORD, "user_pwd");
exp.setParameter(JRPdfExporterParameter.OWNER_PASSWORD, "owner_pwd");
Post Edited by atharindhi at 09/03/2010 12:19 -
http://ireport-tutorial.blogspot.com/2008/10/configure-odbc-data-source.html
Try this..
Give me Karma points as well.. -
Hi again..
Thanx for the wonderful help u gave..
But using that code i only can set a pass word to the PDF..
Still text can copy (Im using Adobe Reader 6.0 and Foxit Reader to open PDF) using my PDF softwares..
How can i prevent this...
Im attaching my code below..
Help me... -
Thanx for the help..
But i know dat option and i want to to this using a code..
I mean in a servlet..
So i want a code segment which will explain this or a tutorial...
Thanx in advance -
I want not to allow users to copy or print the Generated PDF using i-report.
How can i pass parameters for that..
Help me witha tutorial or a coding..
Thanx.. -
Hi all
I want to generate a Excel report using i-Report tool.
But this generated report should be read-only file..(User can't change anythis but view it)
Can anyone help me with the coding..
I want to do this badly...
Post Edited by atharindhi at 08/25/2010 10:41 -
Hi
Im facing to same kind of problem.
but itz not with i-report but eclipse
If u'll interested plz help me.Using eclipse im designing a web base application. for this im using derby server to do the DB part.
But i cant add Derby Nature to my project. when i click Add Apache Derby Nature (http://db.apache.org/derby/integrate/plugin_help/nature.html#Adding+the+Derby+nature+to+a+Java+project)
it says "the choose operation is not currently available"
Whats the issue here..?
I add eclipse derby plug ins (derby_core_plugin_10.6.1.zip and derby_ui_doc_plugin_1.1.2.zip) to my eclipse plug ins.
i Set the class paths in environment variable derby.jar , derbytools.jar and all the required .jar mention in Apache site.Im using eclipse Version: 3.3.2
What is this problem
Plz help
Post Edited by atharindhi at 08/06/2010 10:54 -
thanx a millon...
It works... -
I want to export my report to a PDF,HTML,ODT,RTF
Using java code..
Im using CMD to compile my programs..
Not net beans or eclips.
Help meFollowing is my code and the jrxml file
Code: package net.ensode.jasperbook;import java.io.IOException;import java.io.InputStream;import java.io.PrintWriter;import java.io.StringWriter;import java.util.HashMap;import javax.servlet.ServletException;import javax.servlet.ServletOutputStream;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import net.sf.jasperreports.engine.JREmptyDataSource;import net.sf.jasperreports.engine.JRException;import net.sf.jasperreports.engine.JasperRunManager;public class asign 3SendToBrowserServlet extends HttpServlet{ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ServletOutputStream servletOutputStream = response. getOutputStream(); InputStream reportStream =getServletConfig().getServletContext() .getResourceAsStream("E:\Work\My Work\i-Report\13-07-2010\asign 3.jrxml/"); try { JasperRunManager.runReportToPdfStream(reportStream, servletOutputStream, new HashMap(), new JREmptyDataSource()); response.setContentType("application/pdf"); servletOutputStream.flush(); servletOutputStream.close(); } catch (JRException e) { // display stack trace in the browser StringWriter stringWriter = new StringWriter(); PrintWriter printWriter = new PrintWriter(stringWriter); e.printStackTrace(printWriter); response.setContentType("text/plain"); response.getOutputStream().print(stringWriter.toString()); } }}
-
Thanx for it..
It gives the output i want..
But how can i make a metrix report using i-reports..
Do u have links for good tutorials ...??Thanx in advance...
-
i want remove the column which is 0 from the report..(Plz refer the attachment)
i gave the following expression using Print When Expression Property
new Boolean ($V{TOTAL_SALESMeasure}!='0')
Here is the output i want
I have 3 tables in Oracle DB Employee , Sales , Items
I want to take data to a cross tab with ENO ,Location,Total_Sales
But i want to remove location coloums which containing 0 sales or simply locations where no sales occur....
My idea is to remove colums that has 0 or null values..
How can i do it..Im new to i-report
Plz help me
Code:
Jasper Reports With JBOSS
in Products
Posted
Hi all
Im struggling with following issue for past month or so..
Jasper Reports – I-Report 3.0.0
Java Freamwork - Seam Freamwork
Application Server - JBOSS 4.2.0 GA
Eclipse - Europa 3.3.2
Java Version - 1.6
DB - IBM DB2
So Far with above configurations reports works fine. But now my company wants to move to JasperReports 3.7.6. But the issue was I could not find the relevant jar files for Jasper 3.7.6
I have used my same Jar files that I have used for Version 3.0.0 in new versions
As Example – jasperreports-3.7.6 instead of old jar that I used [Only the version differs ]
I wont get any errors. But reports is not view..
Any help will be appreciated