Jump to content
Changes to the Jaspersoft community edition download ×

Time chat/value converting problem


atanupanda

Recommended Posts

Hi

 

I am very new in iReport. i have learnt a lot from this forum.

Now I am trying to draw time series chart.

In my data base I have last_computed_time (String) ex=12:30 am Jan 2nd, 07, and time_interval as String and five values like t1(double),t2(double),t3(double),t4(double),t5(double).

here aome other cols like actual value ,UCL and LCL these are double.

Now I have to draw a time series chart where

 

value time

----- --------

t1 last_computed_time + time _interval

t2 last_computed_time + time _interval+ time _interval

 

t3 last_computed_time + time _interval+ time _interval+ time _interval

 

in this up to t5.

my problem is that I can't convert the string value of last_computed_time and time _interval INTO TIME STAMP /DATE/TIME in this format.

 

and also addition of both of them.

 

Actually in java I can convert it using SimpleDateFormat and parsing method. but in ireport I am getting problem .

I need some thing like this

 

here the purpale line shows UCL(upper controll line) and blue line shows LCL(lower controll line).

here is some checking if value of t1/t2/t3/t4/t5 is sreater or smaller than UCL or LCL then the color of t1/t2/t3/t4/t5 will different. That I can do using customizer class.

I need to draw this two line associated with UCL and LCL along x-directionthis is very impotant. And other value measurement will be on y direction.

 

 

If you don't under stand my query please reply.

Please help me.

Any help would be greatly appreciated.

Thanks in advance.

size=150C:/Documents and Settings/Atanu/My Documents/graph.GIF[/img]

 

size=150C:/Documents and Settings/Atanu/My Documents/graph.jpg[/img]

 

Post edited by: atanupanda, at: 2007/02/15 12:01

Post edited by: atanupanda, at: 2007/02/15 12:03

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

atanupanda wrote:

Hi

I am very new in iReport. i have learnt a lot from this forum.
Now I am trying to draw time series chart.
In my data base I have last_computed_time (String) ex=12:30 am Jan 2nd, 07, and time_interval as String and five values like t1(double),t2(double),t3(double),t4(double),t5(double).
here aome other cols like actual value ,UCL and LCL these are double.
Now I have to draw a time series chart where

value time
----- --------
t1 last_computed_time + time _interval
t2 last_computed_time + time _interval+ time _interval

t3 last_computed_time + time _interval+ time _interval+ time _interval

in this up to t5.
my problem is that I can't convert the string value of last_computed_time and time _interval INTO TIME STAMP /DATE/TIME in this format.

and also addition of both of them.

Actually in java I can convert it using SimpleDateFormat and parsing method. but in ireport I am getting problem .
I need some thing like this

here the purpale line shows UCL(upper controll line) and blue line shows LCL(lower controll line).
here is some checking if value of t1/t2/t3/t4/t5 is sreater or smaller than UCL or LCL then the color of t1/t2/t3/t4/t5 will different. That I can do using customizer class.
I need to draw this two line associated with UCL and LCL along x-directionthis is very impotant. And other value measurement will be on y direction.


If you don't under stand my query please reply.
Please help me.
Any help would be greatly appreciated.
Thanks in advance.
size=150]C:/Documents and Settings/Atanu/My Documents/graph.GIF

size=150]C:/Documents and Settings/Atanu/My Documents/graph.jpg

Post edited by: atanupanda, at: 2007/02/15 12:01<br><br>Post edited by: atanupanda, at: 2007/02/15 12:03
[file name=test-f1fa25b59c277dca043a0a2c26776988.doc size=39424]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/test-f1fa25b59c277dca043a0a2c26776988.doc[/file] size=159]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/graph-ef6d08953afcf37e24588e29e03f6285.JPG

Post edited by: atanupanda, at: 2007/02/15 12:08

Link to comment
Share on other sites

Thank you very much for your reply.

I am using java.

But i have not got your point.

Can you please make it clear to me.

Also

now I can convert the string value of

last_computed_time and time _interval INTO Calender/DATE/TIME in this format.

But i have to add time of time_interval with

last_computed_time (i.e. it may add some day or some week or some hours etc).

Actually in java I can do it useing add() and set() method of calender class. but in ireport I am getting problem .

I need some thing like this

Any help would be greatly appreciated.

Thanks in advance.

(fig-bellow)

Post edited by: atanupanda, at: 2007/02/17 12:04

Link to comment
Share on other sites

Hi

 

I have a problem with adding some date values. Here below what i have tried.

 

I have created a variable 'parse' with class type java.text.SimpleDateFormat and variable expression new SimpleDateFormat("HH:mm a MMM dd, yy") .

 

Then i created a variable 'dat' with class type java.util.Date and varible expression $V{parse}.parse($F{LAST_COMPUTED}) where $F{LAST_COMPUTED} is a field value (it's a string as example '12:30 am Jan 2nd, 07').

Now i can get this string as a date type varible in $V{dat}.

 

Now i want to add/subtruct some day/month/year/week or hour/minute/second with this $V{dat} varible and want to store in another varible .

That i can't do.Please help me on that. Actually in java, using calender class(using add() and set() method) i can do it. But i want to calculate it in iReport(i am using Ver. 1.3.0).

 

Also in iReport I created another variavle 'calender'with class type java.util.Calendar and value expression Calendar.getInstance(). I know that it shows the current datetime value.. Actually i thought that using calender i can do it . But i am in vein.

If any one can't under stand my requirement please reply.

Please help me to short out this problem.

 

Thanks in advance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...