Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Split the results in to Financial Quarters(Split the results in to Financial Quarters)
Split the results in to Financial Quarters [message #876480] Thu, 24 May 2012 13:32 Go to next message
A R is currently offline A R
Messages: 104
Registered: April 2012
Senior Member
Hi,

I am working on a report which need to show the count based on year. Besides if the year is current year I need to split the results in to Financial quarters.

Sample date with the count is as follows:

ASSET_COUNT TARGET-DEPLOYMENT-DATE
5 5/31/12 12:00 AM
2 6/9/12 12:00 AM
2 5/17/12 12:00 AM
1 6/6/12 12:00 AM
1 5/25/12 12:00 AM

Please let me if nay details required further.


Thanks in advance
AR
Re: Split the results in to Financial Quarters [message #876563 is a reply to message #876480] Thu, 24 May 2012 16:46 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

You could use a cube and crosstab to do this. Look at the attached
example. Be sure to update the datasource path.
You may also want to look at relative time period report item that is
described in this post.

http://birtworld.blogspot.com/2012/03/birt-372-new-features.html

Jason

On 5/24/2012 1:32 PM, A R wrote:
> Hi,
>
> I am working on a report which need to show the count based on year.
> Besides if the year is current year I need to split the results in to
> Financial quarters.
>
> Sample date with the count is as follows:
>
> ASSET_COUNT TARGET-DEPLOYMENT-DATE
> 5 5/31/12 12:00 AM
> 2 6/9/12 12:00 AM
> 2 5/17/12 12:00 AM
> 1 6/6/12 12:00 AM
> 1 5/25/12 12:00 AM
>
> Please let me if nay details required further.
>
>
> Thanks in advance
> AR
  • Attachment: xtabqtr.zip
    (Size: 3.08KB, Downloaded 60 times)
Re: Split the results in to Financial Quarters [message #877089 is a reply to message #876563] Fri, 25 May 2012 17:18 Go to previous messageGo to next message
A R is currently offline A R
Messages: 104
Registered: April 2012
Senior Member
Hi Jason,

Thanks a ton. It was really helpful. Jason, can u please help me improve the logic further. Here if I have year is current year I need to show count in quarters and if YEAR IS prev year I need to show count for complete year.

If I want to show the values in chart, is there any alternative other than using script? Attached the sample screen shot, from excel report.

Thanks
AR

[Updated on: Fri, 25 May 2012 19:34]

Report message to a moderator

Re: Split the results in to Financial Quarters [message #878409 is a reply to message #877089] Tue, 29 May 2012 04:49 Go to previous message
Tomas Greif is currently offline Tomas Greif
Messages: 53
Registered: September 2010
Member
Hi,
you can add computed column to your dataset, something like:

if (   BirtDateTime.year(row["ORDERDATE"]) >= BirtDateTime.year(Now()))
	BirtDateTime.year(row["ORDERDATE"]) + "Q" + BirtDateTime.quarter(row["ORDERDATE"])
else
	BirtDateTime.year(row["ORDERDATE"])


Then you can use such column in chart on X axis with enabled grouping, sorted by date field. Depending on your data source you should consider adding such column directly to you data (e.g. using SQL), before import to birt.

Tomas

Previous Topic:rap using the birt3.7.1, IReportEngineFactory is null
Next Topic:How to display multiple COUNT results in bar chart?
Goto Forum:
  


Current Time: Thu Aug 21 08:13:19 EDT 2014

Powered by FUDForum. Page generated in 0.04300 seconds