eclipse - In Birt - group items in a table according to substring -
A novice question which I could not find the answer.
I have a table in which there is a table holding many items which have the "time" column. I want to group items together over time so that all items of the same month are grouped together to be done.
To do this I need to remove the month / year of the "time" string (format is "17:22 19/07/09") and use for that group. I know how to do all this in Java and I think BITT has suggested many ways to do this, but I have not been able to find an easy way to do this.
If there is a good tutorial on this, I would love to check it out.
Thank you!
We did this in this way. In our SQL query for the data set, both of us (for example) "char (my_date, iso)" and
"left (char (date, iso), 7)"
(for 2009-01-05
and 2009-01
respectively), something like this:
select left (char (my_date) , IoO), 7) IOEIMM, IV (iiO) as the IRDAT, other field according to value from TAB to my_date
Then, when you create your table in the report , Column 1 should be in the table in that column for isoyyyymm half Committee be grouped column is empty:
- Title,
- group data line; And
- Details Data Line
So you end up in the designer:
+ ----- --------------- ------------ + ----------- + ---------- ------- + | & Lt; Header row & gt; | Date | Price | + -------------------------------- + ----------- + ---- ------------- + | & Lt; Group Headline Line (isoyyyymm) & gt; | | | + -------------------------------- + ----------- + ---- ------------- + | & Lt; Line of expansion & gt; | [Isodet] | [Value] | + -------------------------------- + ----------- + ---- ------------- + | & Lt; Group footer line (isoyyyymm) & gt; | | Total Oum (| | [["value"] | | | | | Faucet | | | "Group 1") | + -------------------------------- + ----------- + ---- ------------- +
The report table will still be a group on the month, but the expansion rows displayed will be the full date:
< Code> Date Price --------------- 2009-01-01 7 2009-01-08 2 2009-01-15 1 2009-01-22 4 --- - 14 2009- 02-05 2 2009-02-12 0 2009-02-19 0 200-26 1 ----- 5
You can at intervals Group if you want to do this, but we have opted for the simplest approach for those situations where we use simple strings Can. Obviously, if your interval is not suitable for a week (or some other simple string analysis), then you have to make use of the interval group in BIRT.
The best tutorial for this is (in my opinion), page 187 (in chapter 12). This is necessary for any serious BITT user, and
This first thing is absolutely critical for any report designer, secondly, more advanced topics like embedded Java and Javascript, report object model and built-in architecture of BIRT. If your report really should be brilliant, it is necessary.
Comments
Post a Comment