Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Birthday -> Age + Query on CSV data
Birthday -> Age + Query on CSV data [message #686120] Mon, 20 June 2011 09:50 Go to next message
Sascha Vogt is currently offline Sascha VogtFriend
Messages: 18
Registered: March 2011
Junior Member
Hi all,

I'm doing my first report design and trying to figure out how to work
with BIRT. I watched a few of screencasts and read through the help, but
I'm now somewhat stuck and I wanted to ask if I'm doing something wrong
in general or if it is simply not that easy what I want to accomplish ;)

I'm trying to analyse the member-data of a club I'm in (regarding
average age, etc. pp). Therefore I exported the data from the software
we use as CSV. Sadly the capabilities of that tool are rather limited.

So now I have the CSV with name and birthday (in the form of dd.mm.yy).
First what I found "strange" is that I could not find any questions in
the forum nor in the help regarding birthday -> age conversion. I
thought that this is something people would need to do a lot.

I managed to write a Javascript function for that, but I really think
this could be one of the Birt core JS-functions. I'm happy to share my
code, if this should be wanted, though I'm sure there is somewhere out
there writing much better JS than me ;)

Now I wanted to have something like that:
Group the members according to there age and count the number of members
in the groups. I'm not sure how to do that. I obviously cannot "query" a
CSV datasource. And the "plain" datasource is not what the chart engine
wants it (read having a row per age-group with the count in it).

Any input on this? Or would I be better of importing the CSV into a
temporary database, which I then could query?

Greetings
-Sascha-
Re: Birthday -> Age + Query on CSV data [message #686123 is a reply to message #686120] Mon, 20 June 2011 14:48 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Sascha,

Either create a computed column using your age function and then add the
table to the report, then right click on the detail row and insert a
group using you new computed column or use your new function in the
group editor. If you can email me a sample of the data I can show you
how to do this. Also you can can extend the list of BIRT functions by
implementing an extension point. It may be a good idea to open a
bugzilla entry with your function so it can be added to the designer.

Jason

On 6/20/2011 5:50 AM, Sascha Vogt wrote:
> Hi all,
>
> I'm doing my first report design and trying to figure out how to work
> with BIRT. I watched a few of screencasts and read through the help, but
> I'm now somewhat stuck and I wanted to ask if I'm doing something wrong
> in general or if it is simply not that easy what I want to accomplish ;)
>
> I'm trying to analyse the member-data of a club I'm in (regarding
> average age, etc. pp). Therefore I exported the data from the software
> we use as CSV. Sadly the capabilities of that tool are rather limited.
>
> So now I have the CSV with name and birthday (in the form of dd.mm.yy).
> First what I found "strange" is that I could not find any questions in
> the forum nor in the help regarding birthday -> age conversion. I
> thought that this is something people would need to do a lot.
>
> I managed to write a Javascript function for that, but I really think
> this could be one of the Birt core JS-functions. I'm happy to share my
> code, if this should be wanted, though I'm sure there is somewhere out
> there writing much better JS than me ;)
>
> Now I wanted to have something like that:
> Group the members according to there age and count the number of members
> in the groups. I'm not sure how to do that. I obviously cannot "query" a
> CSV datasource. And the "plain" datasource is not what the chart engine
> wants it (read having a row per age-group with the count in it).
>
> Any input on this? Or would I be better of importing the CSV into a
> temporary database, which I then could query?
>
> Greetings
> -Sascha-
>
>
Re: Birthday -> Age + Query on CSV data [message #689714 is a reply to message #686123] Tue, 28 June 2011 08:23 Go to previous messageGo to next message
Sascha Vogt is currently offline Sascha VogtFriend
Messages: 18
Registered: March 2011
Junior Member
Hi Jason,

sorry for the late reply, I was quite busy with other stuff.
I got it working by a second computed column. The first computed column
calculated the age with my Javascript and the second one calculated an
age-group (basically if( age >10 && age <=20 ) return "10-20" and so
on). Then I used that column as the x-axis and used a count on the
member-id as y-axis. That produced the chart I wanted. (I should have
noted in the original post that I want to create a chart, not a table)

I also played with the "grouping" settings in the chart, but failed to
understand what this was for.

Do you think an age calculator would fit into BIRT's JS functions? If so
I'm happy to provide my little snippet.

Greetings
-Sascha-

Am 20.06.2011 16:48, schrieb Jason Weathersby:
> Sascha,
>
> Either create a computed column using your age function and then add the
> table to the report, then right click on the detail row and insert a
> group using you new computed column or use your new function in the
> group editor. If you can email me a sample of the data I can show you
> how to do this. Also you can can extend the list of BIRT functions by
> implementing an extension point. It may be a good idea to open a
> bugzilla entry with your function so it can be added to the designer.
>
> Jason
>
> On 6/20/2011 5:50 AM, Sascha Vogt wrote:
>> Hi all,
>>
>> I'm doing my first report design and trying to figure out how to work
>> with BIRT. I watched a few of screencasts and read through the help, but
>> I'm now somewhat stuck and I wanted to ask if I'm doing something wrong
>> in general or if it is simply not that easy what I want to accomplish ;)
>>
>> I'm trying to analyse the member-data of a club I'm in (regarding
>> average age, etc. pp). Therefore I exported the data from the software
>> we use as CSV. Sadly the capabilities of that tool are rather limited.
>>
>> So now I have the CSV with name and birthday (in the form of dd.mm.yy).
>> First what I found "strange" is that I could not find any questions in
>> the forum nor in the help regarding birthday -> age conversion. I
>> thought that this is something people would need to do a lot.
>>
>> I managed to write a Javascript function for that, but I really think
>> this could be one of the Birt core JS-functions. I'm happy to share my
>> code, if this should be wanted, though I'm sure there is somewhere out
>> there writing much better JS than me ;)
>>
>> Now I wanted to have something like that:
>> Group the members according to there age and count the number of members
>> in the groups. I'm not sure how to do that. I obviously cannot "query" a
>> CSV datasource. And the "plain" datasource is not what the chart engine
>> wants it (read having a row per age-group with the count in it).
>>
>> Any input on this? Or would I be better of importing the CSV into a
>> temporary database, which I then could query?
>>
>> Greetings
>> -Sascha-
>>
>>
>
Re: Birthday -&gt; Age + Query on CSV data [message #689897 is a reply to message #689714] Tue, 28 June 2011 14:58 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Sascha,

I think it would be good to open a bugzilla entry and supply the code
you used.

Jason

On 6/28/2011 4:23 AM, Sascha Vogt wrote:
> Hi Jason,
>
> sorry for the late reply, I was quite busy with other stuff.
> I got it working by a second computed column. The first computed column
> calculated the age with my Javascript and the second one calculated an
> age-group (basically if( age>10&& age<=20 ) return "10-20" and so
> on). Then I used that column as the x-axis and used a count on the
> member-id as y-axis. That produced the chart I wanted. (I should have
> noted in the original post that I want to create a chart, not a table)
>
> I also played with the "grouping" settings in the chart, but failed to
> understand what this was for.
>
> Do you think an age calculator would fit into BIRT's JS functions? If so
> I'm happy to provide my little snippet.
>
> Greetings
> -Sascha-
>
> Am 20.06.2011 16:48, schrieb Jason Weathersby:
>> Sascha,
>>
>> Either create a computed column using your age function and then add the
>> table to the report, then right click on the detail row and insert a
>> group using you new computed column or use your new function in the
>> group editor. If you can email me a sample of the data I can show you
>> how to do this. Also you can can extend the list of BIRT functions by
>> implementing an extension point. It may be a good idea to open a
>> bugzilla entry with your function so it can be added to the designer.
>>
>> Jason
>>
>> On 6/20/2011 5:50 AM, Sascha Vogt wrote:
>>> Hi all,
>>>
>>> I'm doing my first report design and trying to figure out how to work
>>> with BIRT. I watched a few of screencasts and read through the help, but
>>> I'm now somewhat stuck and I wanted to ask if I'm doing something wrong
>>> in general or if it is simply not that easy what I want to accomplish ;)
>>>
>>> I'm trying to analyse the member-data of a club I'm in (regarding
>>> average age, etc. pp). Therefore I exported the data from the software
>>> we use as CSV. Sadly the capabilities of that tool are rather limited.
>>>
>>> So now I have the CSV with name and birthday (in the form of dd.mm.yy).
>>> First what I found "strange" is that I could not find any questions in
>>> the forum nor in the help regarding birthday -> age conversion. I
>>> thought that this is something people would need to do a lot.
>>>
>>> I managed to write a Javascript function for that, but I really think
>>> this could be one of the Birt core JS-functions. I'm happy to share my
>>> code, if this should be wanted, though I'm sure there is somewhere out
>>> there writing much better JS than me ;)
>>>
>>> Now I wanted to have something like that:
>>> Group the members according to there age and count the number of members
>>> in the groups. I'm not sure how to do that. I obviously cannot "query" a
>>> CSV datasource. And the "plain" datasource is not what the chart engine
>>> wants it (read having a row per age-group with the count in it).
>>>
>>> Any input on this? Or would I be better of importing the CSV into a
>>> temporary database, which I then could query?
>>>
>>> Greetings
>>> -Sascha-
>>>
>>>
>>
>
>
Re: Birthday -&gt; Age + Query on CSV data [message #689926 is a reply to message #689897] Tue, 28 June 2011 15:29 Go to previous messageGo to next message
Sascha Vogt is currently offline Sascha VogtFriend
Messages: 18
Registered: March 2011
Junior Member
Hi Jason,

https://bugs.eclipse.org/bugs/show_bug.cgi?id=350598 with code used.
Probably I got the Component wrong, please move to the right place

Greetings
-Sascha-


Am 28.06.2011 16:58, schrieb Jason Weathersby:
> Sascha,
>
> I think it would be good to open a bugzilla entry and supply the code
> you used.
>
> Jason
>
> On 6/28/2011 4:23 AM, Sascha Vogt wrote:
>> Hi Jason,
>>
>> sorry for the late reply, I was quite busy with other stuff.
>> I got it working by a second computed column. The first computed column
>> calculated the age with my Javascript and the second one calculated an
>> age-group (basically if( age>10&& age<=20 ) return "10-20" and so
>> on). Then I used that column as the x-axis and used a count on the
>> member-id as y-axis. That produced the chart I wanted. (I should have
>> noted in the original post that I want to create a chart, not a table)
>>
>> I also played with the "grouping" settings in the chart, but failed to
>> understand what this was for.
>>
>> Do you think an age calculator would fit into BIRT's JS functions? If so
>> I'm happy to provide my little snippet.
>>
>> Greetings
>> -Sascha-
>>
>> Am 20.06.2011 16:48, schrieb Jason Weathersby:
>>> Sascha,
>>>
>>> Either create a computed column using your age function and then add the
>>> table to the report, then right click on the detail row and insert a
>>> group using you new computed column or use your new function in the
>>> group editor. If you can email me a sample of the data I can show you
>>> how to do this. Also you can can extend the list of BIRT functions by
>>> implementing an extension point. It may be a good idea to open a
>>> bugzilla entry with your function so it can be added to the designer.
>>>
>>> Jason
>>>
>>> On 6/20/2011 5:50 AM, Sascha Vogt wrote:
>>>> Hi all,
>>>>
>>>> I'm doing my first report design and trying to figure out how to work
>>>> with BIRT. I watched a few of screencasts and read through the help,
>>>> but
>>>> I'm now somewhat stuck and I wanted to ask if I'm doing something wrong
>>>> in general or if it is simply not that easy what I want to
>>>> accomplish ;)
>>>>
>>>> I'm trying to analyse the member-data of a club I'm in (regarding
>>>> average age, etc. pp). Therefore I exported the data from the software
>>>> we use as CSV. Sadly the capabilities of that tool are rather limited.
>>>>
>>>> So now I have the CSV with name and birthday (in the form of dd.mm.yy).
>>>> First what I found "strange" is that I could not find any questions in
>>>> the forum nor in the help regarding birthday -> age conversion. I
>>>> thought that this is something people would need to do a lot.
>>>>
>>>> I managed to write a Javascript function for that, but I really think
>>>> this could be one of the Birt core JS-functions. I'm happy to share my
>>>> code, if this should be wanted, though I'm sure there is somewhere out
>>>> there writing much better JS than me ;)
>>>>
>>>> Now I wanted to have something like that:
>>>> Group the members according to there age and count the number of
>>>> members
>>>> in the groups. I'm not sure how to do that. I obviously cannot
>>>> "query" a
>>>> CSV datasource. And the "plain" datasource is not what the chart engine
>>>> wants it (read having a row per age-group with the count in it).
>>>>
>>>> Any input on this? Or would I be better of importing the CSV into a
>>>> temporary database, which I then could query?
>>>>
>>>> Greetings
>>>> -Sascha-
>>>>
>>>>
>>>
>>
>>
>
Re: Birthday -&gt; Age + Query on CSV data [message #689929 is a reply to message #689926] Tue, 28 June 2011 15:33 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Thanks Sascha

On 6/28/2011 11:29 AM, Sascha Vogt wrote:
> Hi Jason,
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=350598 with code used.
> Probably I got the Component wrong, please move to the right place
>
> Greetings
> -Sascha-
>
>
> Am 28.06.2011 16:58, schrieb Jason Weathersby:
>> Sascha,
>>
>> I think it would be good to open a bugzilla entry and supply the code
>> you used.
>>
>> Jason
>>
>> On 6/28/2011 4:23 AM, Sascha Vogt wrote:
>>> Hi Jason,
>>>
>>> sorry for the late reply, I was quite busy with other stuff.
>>> I got it working by a second computed column. The first computed column
>>> calculated the age with my Javascript and the second one calculated an
>>> age-group (basically if( age>10&& age<=20 ) return "10-20" and so
>>> on). Then I used that column as the x-axis and used a count on the
>>> member-id as y-axis. That produced the chart I wanted. (I should have
>>> noted in the original post that I want to create a chart, not a table)
>>>
>>> I also played with the "grouping" settings in the chart, but failed to
>>> understand what this was for.
>>>
>>> Do you think an age calculator would fit into BIRT's JS functions? If so
>>> I'm happy to provide my little snippet.
>>>
>>> Greetings
>>> -Sascha-
>>>
>>> Am 20.06.2011 16:48, schrieb Jason Weathersby:
>>>> Sascha,
>>>>
>>>> Either create a computed column using your age function and then add the
>>>> table to the report, then right click on the detail row and insert a
>>>> group using you new computed column or use your new function in the
>>>> group editor. If you can email me a sample of the data I can show you
>>>> how to do this. Also you can can extend the list of BIRT functions by
>>>> implementing an extension point. It may be a good idea to open a
>>>> bugzilla entry with your function so it can be added to the designer.
>>>>
>>>> Jason
>>>>
>>>> On 6/20/2011 5:50 AM, Sascha Vogt wrote:
>>>>> Hi all,
>>>>>
>>>>> I'm doing my first report design and trying to figure out how to work
>>>>> with BIRT. I watched a few of screencasts and read through the help,
>>>>> but
>>>>> I'm now somewhat stuck and I wanted to ask if I'm doing something wrong
>>>>> in general or if it is simply not that easy what I want to
>>>>> accomplish ;)
>>>>>
>>>>> I'm trying to analyse the member-data of a club I'm in (regarding
>>>>> average age, etc. pp). Therefore I exported the data from the software
>>>>> we use as CSV. Sadly the capabilities of that tool are rather limited.
>>>>>
>>>>> So now I have the CSV with name and birthday (in the form of dd.mm.yy).
>>>>> First what I found "strange" is that I could not find any questions in
>>>>> the forum nor in the help regarding birthday -> age conversion. I
>>>>> thought that this is something people would need to do a lot.
>>>>>
>>>>> I managed to write a Javascript function for that, but I really think
>>>>> this could be one of the Birt core JS-functions. I'm happy to share my
>>>>> code, if this should be wanted, though I'm sure there is somewhere out
>>>>> there writing much better JS than me ;)
>>>>>
>>>>> Now I wanted to have something like that:
>>>>> Group the members according to there age and count the number of
>>>>> members
>>>>> in the groups. I'm not sure how to do that. I obviously cannot
>>>>> "query" a
>>>>> CSV datasource. And the "plain" datasource is not what the chart engine
>>>>> wants it (read having a row per age-group with the count in it).
>>>>>
>>>>> Any input on this? Or would I be better of importing the CSV into a
>>>>> temporary database, which I then could query?
>>>>>
>>>>> Greetings
>>>>> -Sascha-
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
>
Previous Topic:beforeFactory, findElement("XXX").drop()
Next Topic:Blending last control into footer
Goto Forum:
  


Current Time: Fri Apr 26 17:29:43 GMT 2024

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

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

Back to the top