Skip to main content



      Home
Home » Archived » BIRT » how to manipulate DataSet results
how to manipulate DataSet results [message #162614] Thu, 18 May 2006 14:45 Go to next message
Eclipse UserFriend
Originally posted by: khelenek.hotmail.com

Lets assume that using SQL the best DataSet I can come up with looks like
this (trust me):

Date | Hours | Agent Id
========================
05/13/2006 | 2.5 hours | 1
05/13/2006 | 3.5 hours | 2
05/13/2006 | 2.5 hours | 3
05/14/2006 | 5.5 hours | 1
05/14/2006 | 7.5 hours | 3


I want to chart in a line graph:
X axis: each *unique* day,
Y axis: the total hours worked by all agents.

Basically my results needs to end up like:

Date | Total Hours
=================
05/13/2006 | 8.5 hours |
05/14/2006 | 13 hours |


So do I need to somehow use a scripted dataset with custom java code to
create the proper DataSet from the getgo?
Or can I put script somewhere after I get the first results the transform it
and then render it with a chart?
Or can you define dataset bindings that get the data I want?

I hope that made sense... This has been driving me crazy for a few days now.
How do i manipulate my DataSet to use in a chart, to avoid creating a
monstrosity of a SQL statement?

Thank you very much,
Kris
Re: how to manipulate DataSet results [message #162825 is a reply to message #162614] Fri, 19 May 2006 05:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi Kris,

Did you try grouping on the X Axis by Date (Chart builder -> Format
Chart->Category Series->Grouping->Enabled/DateTime/Unit=day/interval=0)?
What happens then?

Thanks,

David

"Kris Helenek" <khelenek@hotmail.com> wrote in message
news:e4ifcp$q8l$1@utils.eclipse.org...
> Lets assume that using SQL the best DataSet I can come up with looks like
> this (trust me):
>
> Date | Hours | Agent Id
> ========================
> 05/13/2006 | 2.5 hours | 1
> 05/13/2006 | 3.5 hours | 2
> 05/13/2006 | 2.5 hours | 3
> 05/14/2006 | 5.5 hours | 1
> 05/14/2006 | 7.5 hours | 3
>
>
> I want to chart in a line graph:
> X axis: each *unique* day,
> Y axis: the total hours worked by all agents.
>
> Basically my results needs to end up like:
>
> Date | Total Hours
> =================
> 05/13/2006 | 8.5 hours |
> 05/14/2006 | 13 hours |
>
>
> So do I need to somehow use a scripted dataset with custom java code to
> create the proper DataSet from the getgo?
> Or can I put script somewhere after I get the first results the transform
> it
> and then render it with a chart?
> Or can you define dataset bindings that get the data I want?
>
> I hope that made sense... This has been driving me crazy for a few days
> now.
> How do i manipulate my DataSet to use in a chart, to avoid creating a
> monstrosity of a SQL statement?
>
> Thank you very much,
> Kris
>
>
Re: how to manipulate DataSet results [message #162982 is a reply to message #162825] Fri, 19 May 2006 11:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: khelenek.hotmail.com

Thanks for responding,

I did try the grouping, but enabling that appears to do absolutely nothing.
The chart still displays each duplicate day on the x axis, and the
corresponding hours on the y axis. What would be my X/Y axis expression
anyway? I tried X=row["date"] and Y=row["hours"], as well as trying to use
the Total functions, but to no avail. Is there any documentation anywhere
describing this stuff? I'd be more than happy to read it.

Thanks very much,
kris

"David Michonneau" <dmichonneau@actuate.com> wrote in message
news:e4k2r9$9q6$1@utils.eclipse.org...
> Hi Kris,
>
> Did you try grouping on the X Axis by Date (Chart builder -> Format
> Chart->Category Series->Grouping->Enabled/DateTime/Unit=day/interval=0)?
> What happens then?
>
> Thanks,
>
> David
>
> "Kris Helenek" <khelenek@hotmail.com> wrote in message
> news:e4ifcp$q8l$1@utils.eclipse.org...
> > Lets assume that using SQL the best DataSet I can come up with looks
like
> > this (trust me):
> >
> > Date | Hours | Agent Id
> > ========================
> > 05/13/2006 | 2.5 hours | 1
> > 05/13/2006 | 3.5 hours | 2
> > 05/13/2006 | 2.5 hours | 3
> > 05/14/2006 | 5.5 hours | 1
> > 05/14/2006 | 7.5 hours | 3
> >
> >
> > I want to chart in a line graph:
> > X axis: each *unique* day,
> > Y axis: the total hours worked by all agents.
> >
> > Basically my results needs to end up like:
> >
> > Date | Total Hours
> > =================
> > 05/13/2006 | 8.5 hours |
> > 05/14/2006 | 13 hours |
> >
> >
> > So do I need to somehow use a scripted dataset with custom java code to
> > create the proper DataSet from the getgo?
> > Or can I put script somewhere after I get the first results the
transform
> > it
> > and then render it with a chart?
> > Or can you define dataset bindings that get the data I want?
> >
> > I hope that made sense... This has been driving me crazy for a few days
> > now.
> > How do i manipulate my DataSet to use in a chart, to avoid creating a
> > monstrosity of a SQL statement?
> >
> > Thank you very much,
> > Kris
> >
> >
>
>
Re: how to manipulate DataSet results [message #163045 is a reply to message #162982] Fri, 19 May 2006 13:12 Go to previous messageGo to next message
Eclipse UserFriend
Did you set the type of the X Axis as "Date"?

Thanks,

David

"Kris Helenek" <khelenek@hotmail.com> wrote in message
news:e4kpvu$tk$1@utils.eclipse.org...
> Thanks for responding,
>
> I did try the grouping, but enabling that appears to do absolutely
> nothing.
> The chart still displays each duplicate day on the x axis, and the
> corresponding hours on the y axis. What would be my X/Y axis expression
> anyway? I tried X=row["date"] and Y=row["hours"], as well as trying to
> use
> the Total functions, but to no avail. Is there any documentation anywhere
> describing this stuff? I'd be more than happy to read it.
>
> Thanks very much,
> kris
>
> "David Michonneau" <dmichonneau@actuate.com> wrote in message
> news:e4k2r9$9q6$1@utils.eclipse.org...
>> Hi Kris,
>>
>> Did you try grouping on the X Axis by Date (Chart builder -> Format
>> Chart->Category Series->Grouping->Enabled/DateTime/Unit=day/interval=0)?
>> What happens then?
>>
>> Thanks,
>>
>> David
>>
>> "Kris Helenek" <khelenek@hotmail.com> wrote in message
>> news:e4ifcp$q8l$1@utils.eclipse.org...
>> > Lets assume that using SQL the best DataSet I can come up with looks
> like
>> > this (trust me):
>> >
>> > Date | Hours | Agent Id
>> > ========================
>> > 05/13/2006 | 2.5 hours | 1
>> > 05/13/2006 | 3.5 hours | 2
>> > 05/13/2006 | 2.5 hours | 3
>> > 05/14/2006 | 5.5 hours | 1
>> > 05/14/2006 | 7.5 hours | 3
>> >
>> >
>> > I want to chart in a line graph:
>> > X axis: each *unique* day,
>> > Y axis: the total hours worked by all agents.
>> >
>> > Basically my results needs to end up like:
>> >
>> > Date | Total Hours
>> > =================
>> > 05/13/2006 | 8.5 hours |
>> > 05/14/2006 | 13 hours |
>> >
>> >
>> > So do I need to somehow use a scripted dataset with custom java code to
>> > create the proper DataSet from the getgo?
>> > Or can I put script somewhere after I get the first results the
> transform
>> > it
>> > and then render it with a chart?
>> > Or can you define dataset bindings that get the data I want?
>> >
>> > I hope that made sense... This has been driving me crazy for a few days
>> > now.
>> > How do i manipulate my DataSet to use in a chart, to avoid creating a
>> > monstrosity of a SQL statement?
>> >
>> > Thank you very much,
>> > Kris
>> >
>> >
>>
>>
>
>
Re: how to manipulate DataSet results [message #163084 is a reply to message #163045] Fri, 19 May 2006 14:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: khelenek.hotmail.com

Hey, so I figured it out. Your first suggestion actually works great,
except I had to change the interval to be 1, not 0. I figured this out by
trying to group on agent ID (a number) instead and when I changed the
interval i realized that it is sort of a leniency parameter. Zero seems to
negate the grouping all together; so I'm not sure when setting interval to 0
is ever relevant.

But in any case, thanks for pointing me at the grouping, that solves my
problem fine.

thanks,
-kris


"David Michonneau" <dmichonneau@actuate.com> wrote in message
news:e4ku9p$v2n$1@utils.eclipse.org...
> Did you set the type of the X Axis as "Date"?
>
> Thanks,
>
> David
>
> "Kris Helenek" <khelenek@hotmail.com> wrote in message
> news:e4kpvu$tk$1@utils.eclipse.org...
> > Thanks for responding,
> >
> > I did try the grouping, but enabling that appears to do absolutely
> > nothing.
> > The chart still displays each duplicate day on the x axis, and the
> > corresponding hours on the y axis. What would be my X/Y axis expression
> > anyway? I tried X=row["date"] and Y=row["hours"], as well as trying to
> > use
> > the Total functions, but to no avail. Is there any documentation
anywhere
> > describing this stuff? I'd be more than happy to read it.
> >
> > Thanks very much,
> > kris
> >
> > "David Michonneau" <dmichonneau@actuate.com> wrote in message
> > news:e4k2r9$9q6$1@utils.eclipse.org...
> >> Hi Kris,
> >>
> >> Did you try grouping on the X Axis by Date (Chart builder -> Format
> >> Chart->Category
Series->Grouping->Enabled/DateTime/Unit=day/interval=0)?
> >> What happens then?
> >>
> >> Thanks,
> >>
> >> David
> >>
> >> "Kris Helenek" <khelenek@hotmail.com> wrote in message
> >> news:e4ifcp$q8l$1@utils.eclipse.org...
> >> > Lets assume that using SQL the best DataSet I can come up with looks
> > like
> >> > this (trust me):
> >> >
> >> > Date | Hours | Agent Id
> >> > ========================
> >> > 05/13/2006 | 2.5 hours | 1
> >> > 05/13/2006 | 3.5 hours | 2
> >> > 05/13/2006 | 2.5 hours | 3
> >> > 05/14/2006 | 5.5 hours | 1
> >> > 05/14/2006 | 7.5 hours | 3
> >> >
> >> >
> >> > I want to chart in a line graph:
> >> > X axis: each *unique* day,
> >> > Y axis: the total hours worked by all agents.
> >> >
> >> > Basically my results needs to end up like:
> >> >
> >> > Date | Total Hours
> >> > =================
> >> > 05/13/2006 | 8.5 hours |
> >> > 05/14/2006 | 13 hours |
> >> >
> >> >
> >> > So do I need to somehow use a scripted dataset with custom java code
to
> >> > create the proper DataSet from the getgo?
> >> > Or can I put script somewhere after I get the first results the
> > transform
> >> > it
> >> > and then render it with a chart?
> >> > Or can you define dataset bindings that get the data I want?
> >> >
> >> > I hope that made sense... This has been driving me crazy for a few
days
> >> > now.
> >> > How do i manipulate my DataSet to use in a chart, to avoid creating a
> >> > monstrosity of a SQL statement?
> >> >
> >> > Thank you very much,
> >> > Kris
> >> >
> >> >
> >>
> >>
> >
> >
>
>
Re: how to manipulate DataSet results [message #163116 is a reply to message #163084] Fri, 19 May 2006 15:39 Go to previous message
Eclipse UserFriend
Sorry Kris, you're probably right about the interval, I think we should
disable 0 for the date, it's only useful for text grouping (where actually
any other value isn't useful). Glad you had it working finally.

Thanks,

David

"Kris Helenek" <khelenek@hotmail.com> wrote in message
news:e4l2e3$t70$1@utils.eclipse.org...
> Hey, so I figured it out. Your first suggestion actually works great,
> except I had to change the interval to be 1, not 0. I figured this out by
> trying to group on agent ID (a number) instead and when I changed the
> interval i realized that it is sort of a leniency parameter. Zero seems
> to
> negate the grouping all together; so I'm not sure when setting interval to
> 0
> is ever relevant.
>
> But in any case, thanks for pointing me at the grouping, that solves my
> problem fine.
>
> thanks,
> -kris
>
>
> "David Michonneau" <dmichonneau@actuate.com> wrote in message
> news:e4ku9p$v2n$1@utils.eclipse.org...
>> Did you set the type of the X Axis as "Date"?
>>
>> Thanks,
>>
>> David
>>
>> "Kris Helenek" <khelenek@hotmail.com> wrote in message
>> news:e4kpvu$tk$1@utils.eclipse.org...
>> > Thanks for responding,
>> >
>> > I did try the grouping, but enabling that appears to do absolutely
>> > nothing.
>> > The chart still displays each duplicate day on the x axis, and the
>> > corresponding hours on the y axis. What would be my X/Y axis
>> > expression
>> > anyway? I tried X=row["date"] and Y=row["hours"], as well as trying to
>> > use
>> > the Total functions, but to no avail. Is there any documentation
> anywhere
>> > describing this stuff? I'd be more than happy to read it.
>> >
>> > Thanks very much,
>> > kris
>> >
>> > "David Michonneau" <dmichonneau@actuate.com> wrote in message
>> > news:e4k2r9$9q6$1@utils.eclipse.org...
>> >> Hi Kris,
>> >>
>> >> Did you try grouping on the X Axis by Date (Chart builder -> Format
>> >> Chart->Category
> Series->Grouping->Enabled/DateTime/Unit=day/interval=0)?
>> >> What happens then?
>> >>
>> >> Thanks,
>> >>
>> >> David
>> >>
>> >> "Kris Helenek" <khelenek@hotmail.com> wrote in message
>> >> news:e4ifcp$q8l$1@utils.eclipse.org...
>> >> > Lets assume that using SQL the best DataSet I can come up with looks
>> > like
>> >> > this (trust me):
>> >> >
>> >> > Date | Hours | Agent Id
>> >> > ========================
>> >> > 05/13/2006 | 2.5 hours | 1
>> >> > 05/13/2006 | 3.5 hours | 2
>> >> > 05/13/2006 | 2.5 hours | 3
>> >> > 05/14/2006 | 5.5 hours | 1
>> >> > 05/14/2006 | 7.5 hours | 3
>> >> >
>> >> >
>> >> > I want to chart in a line graph:
>> >> > X axis: each *unique* day,
>> >> > Y axis: the total hours worked by all agents.
>> >> >
>> >> > Basically my results needs to end up like:
>> >> >
>> >> > Date | Total Hours
>> >> > =================
>> >> > 05/13/2006 | 8.5 hours |
>> >> > 05/14/2006 | 13 hours |
>> >> >
>> >> >
>> >> > So do I need to somehow use a scripted dataset with custom java code
> to
>> >> > create the proper DataSet from the getgo?
>> >> > Or can I put script somewhere after I get the first results the
>> > transform
>> >> > it
>> >> > and then render it with a chart?
>> >> > Or can you define dataset bindings that get the data I want?
>> >> >
>> >> > I hope that made sense... This has been driving me crazy for a few
> days
>> >> > now.
>> >> > How do i manipulate my DataSet to use in a chart, to avoid creating
>> >> > a
>> >> > monstrosity of a SQL statement?
>> >> >
>> >> > Thank you very much,
>> >> > Kris
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>
Previous Topic:More Advanced Sorting
Next Topic:call java
Goto Forum:
  


Current Time: Tue Sep 16 19:46:44 EDT 2025

Powered by FUDForum. Page generated in 0.04960 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top