|
|
Re: Displaying group header on left side of detail instead of over it [message #760223 is a reply to message #760035] |
Thu, 01 December 2011 16:06 |
Francis Chabot Messages: 3 Registered: November 2011 |
Junior Member |
|
|
Hi karvesh,
Thanks for your reply.
The code you wrote effectively allow the name and informations of the company to appear one time only. But it doesn't merge the cells of the first colum together.
I probably over simplified the problem. Sorry about that. The name of the company will appear but informations like phone number, fax number and street address will appear too. Those informations might be set or be null in the database so the first column might span over multiple lines or simply one line.
|----------------------------------------------------------------------------|
| Nom de l'établissement | Division | Substances produites | Région | Taille |
|----------------------------------------------------------------------------|
| [NM_COMPA] ........... | [NM_DIV] | [NM_SUB] ........... | [REG]. | [TAIL] |
| [PHONE_BN]............ |---------------------------------------------------|
| [STR_ADDR]............ | [NM_DIV] | [NM_SUB] ........... | [REG]. | [TAIL] |
|----------------------------------------------------------------------------|
With your code the result not formated will give this :
Nom de l'établissement Division ....... Substances produites Région Taille
2537-1253 Québec inc.. ................ Sable et gravier ... 09 ... A
418-999-0000 ......... ................ .................... ...... .
1444 rue Maine ....... ................ .................... ...... .
---------------------------- line separator -------------------------
2551-9786 Québec inc.. test madeleine . .................... 03 ... B
555-666-7777 ......... ................ .................... ...... .
1523 ave Andrews ..... ................ .................... ...... .
...................... test divisionm . Argent, Amiante .... 01 ... A
The last line "...................... test divisionm . Argent, Amiante .... 01 ... A" will appear under the company informations. I can't find any property in Birt that would let me dynamically set a rowspan for this first column. Let's say in your code i add a variable varNbDivision to count the number of divisions a company has :
<VALUE-OF>
if(vars["varEtablissement"] != row["NM_COMPA"])
{
vars["varEtablissement"] = row["NM_COMPA"];
vars["varNbDivision"] = 1;
row["NM_COMPA"];
}
else
{
vars["varNbDivision"] = vars["varNbDivision"] + 1;
"";
}
</VALUE-OF>
How could i use this variable varNbDivision to dynamically set a rowspan for the first column ?
[Updated on: Thu, 01 December 2011 16:13] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03169 seconds