Skip to main content



      Home
Home » Archived » BIRT » Hiding duplicate records in detail row
Hiding duplicate records in detail row [message #63151] Mon, 01 August 2005 03:41 Go to next message
Eclipse UserFriend
Hi,

I have one column that displays duplicate records and I just want to
display it again only if the value is different with the previous one..how
can i possibly do it...

Thanks,
Wins
Re: Hiding duplicate records in detail row [message #63327 is a reply to message #63151] Mon, 01 August 2005 08:47 Go to previous messageGo to next message
Eclipse UserFriend
Try typing in an expression like this for the duplicate column Y (assuming
that you want to display its value only if it's different from another
column X):
row["Y"] == row["X"] ? "" : row["Y"]

Does this give what you wanted?

Gary

"wins" <winstonguadiz@yahoo.com> wrote in message
news:6058a245704472d39cd5123db4aa5245$1@www.eclipse.org...
> Hi,
>
> I have one column that displays duplicate records and I just want to
> display it again only if the value is different with the previous one..how
> can i possibly do it...
>
> Thanks,
> Wins
>
>
>
>
>
>
>
>
>
Re: Hiding duplicate records in detail row [message #63551 is a reply to message #63327] Mon, 01 August 2005 22:46 Go to previous messageGo to next message
Eclipse UserFriend
Hi Gary,

Thank a lot for your support..duplicate records can now be hidden...btw,
the ROM Scrpting specs did not mention anything on how to hide duplicate
records..how did you come up on that expression..i mean where can i find
help topics like that?..and find out how does it work?..

Thanks again
Wins

Gary Xue wrote:

> Try typing in an expression like this for the duplicate column Y (assuming
> that you want to display its value only if it's different from another
> column X):
> row["Y"] == row["X"] ? "" : row["Y"]

> Does this give what you wanted?

> Gary
Re: Hiding duplicate records in detail row [message #63596 is a reply to message #63551] Tue, 02 August 2005 02:29 Go to previous messageGo to next message
Eclipse UserFriend
Hi Gary,
I thought I have already resolved my problem in hiding the duplicate
records with the script expression you've given me but it didn't solve my
problem yet. What happened is that i typed some scripts in visibility hide
element check box earlier to hide it and forgot to remove it and thought
it's your script that hid it....but my script is not good enough to solve
my problem...

Here is the expression that I typed in hide element check box that made me
think your script works.

false;
if (row[0] > 0) {
true;
}
I apologized for this..still waiting for your help....

Here is an example of what I want to accomplish...


Region Country
Asia<display Malaysia
Asia<-hide Japan
Asia<-hide Philippines
Asia <-hide Singapore
Europe<-display Italy
Europe<-hide France
Europe<-hide Germany

Thanks,
Wins
Re: Hiding duplicate records in detail row [message #63667 is a reply to message #63596] Tue, 02 August 2005 12:22 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------090807030306080201020501
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

It looks like adding a group and using the "drop" property on your
Region column would accomplish this. See the attached example, notice
the cell for the "Territory" row has the "Drop" property set to "Detail".

Michael

wins wrote:
> Here is an example of what I want to accomplish...
>
>
> Region Country
> Asia<display Malaysia
> Asia<-hide Japan
> Asia<-hide Philippines
> Asia <-hide Singapore
> Europe<-display Italy
> Europe<-hide France Europe<-hide Germany
>
> Thanks,
> Wins


--------------090807030306080201020501
Content-Type: text/xml;
name="group_wins.rptdesign"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="group_wins.rptdesign"

<?xml version="1.0" encoding="UTF-8"?>
<!-- Written by Eclipse BIRT 1.0 -->
<report xmlns=" http://www.eclipse.org/birt/2005/design" version="1">
<property name="createdBy">Eclipse BIRT Designer Version 1.0.0 Build &lt;20050601-0809></property>
<property name="units">in</property>
<data-sources>
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.sampledb" name="Data Source"/>
</data-sources>
<data-sets>
<oda-data-set extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " name="Data Set">
<property name="dataSource">Data Source</property>
<property name="queryText">select *
from CLASSICMODELS.OFFICES</property>
</oda-data-set>
</data-sets>
<page-setup>
<simple-master-page name="Simple MasterPage">
<page-footer>
<text>
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<table name="table1">
<property name="width">100%</property>
<property name="dataSet">Data Set</property>
<column>
<property name="width">33.3%</property>
</column>
<column>
<property name="width">33.3%</property>
</column>
<column>
<property name="width">33.4%</property>
</column>
<header>
<row>
<cell>
<label>
<text-property name="text">TERRITORY</text-property>
</label>
</cell>
<cell>
<label>
<text-property name="text">COUNTRY</text-property>
</label>
</cell>
<cell>
<label>
<text-property name="text">CITY</text-property>
</label>
</cell>
</row>
</header>
<group>
<property name="groupName">Territory</property>
<property name="interval">none</property>
<property name="sortDirection">asc</property>
<expression name="keyExpr">row["TERRITORY"]</expression>
<header>
<row>
<cell>
<property name="drop">detail</property>
<data>
<expression name="valueExpr">row["TERRITORY"]</expression>
</data>
</cell>
<cell/>
<cell/>
</row>
</header>
<footer>
<row>
<cell/>
<cell/>
<cell/>
</row>
</footer>
</group>
<detail>
<row>
<cell>
<property name="drop">none</property>
</cell>
<cell>
<data>
<expression name="valueExpr">row["COUNTRY"]</expression>
</data>
</cell>
<cell>
<data>
<expression name="valueExpr">row["CITY"]</expression>
</data>
</cell>
</row>
</detail>
<footer>
<row>
<cell/>
<cell/>
<cell/>
</row>
</footer>
</table>
</body>
</report>

--------------090807030306080201020501--
Re: Hiding duplicate records in detail row [message #63825 is a reply to message #63667] Tue, 02 August 2005 23:35 Go to previous messageGo to next message
Eclipse UserFriend
Michael,

Thanks a lot! I finally resolved it with your help...I'm not really aware
that this DROP property can use to hide duplicate records..I suggest BIRT
to provide examples on their documentation for the sake of the report
writers specially for a beginner like me..

Thanks again..

Wins
Re: Hiding duplicate records in detail row [message #63870 is a reply to message #63825] Wed, 03 August 2005 02:19 Go to previous message
Eclipse UserFriend
When setting the DROP property = "detail" of group header I found out that
when choosing PDF format my report will print a blank page first before it
prints the report content.....any solution for this?

thanks,
wins



wins wrote:

> Michael,

> Thanks a lot! I finally resolved it with your help...I'm not really aware
> that this DROP property can use to hide duplicate records..I suggest BIRT
> to provide examples on their documentation for the sake of the report
> writers specially for a beginner like me..

> Thanks again..

> Wins

When choosing PDF format
Previous Topic:Re: How do I manipulate two metrics from two data sources in a report ?
Next Topic:How to create a report programmatically
Goto Forum:
  


Current Time: Tue Jul 22 01:57:51 EDT 2025

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

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

Back to the top