Skip to main content



      Home
Home » Archived » BIRT » comparing a row from a subreport to a row in the master report, is it possible?
comparing a row from a subreport to a row in the master report, is it possible? [message #146060] Mon, 20 March 2006 13:12 Go to next message
Eclipse UserFriend
Anyone managed to do this?

I want to highlight a row if the date in a subreport is greater than the
date in the master report.

So I have a list. In the list is a GRID with the columns of the "master"
report, which include row["editedat"]. The last cell of the grid is a list
with a single "detail" which is a different data set and a single column
row["offtime"].

Now in the highlighter dialogue for the offtime sub report cell, if i open
the expression builder under available dataasets It shows the master and
subreport rows. But If I use a master row, I get:

detail : org.eclipse.birt.data.engine.core.DataException: Invalid field
name: editedat
at
org.eclipse.birt.data.engine.executor.ResultObject.getFieldV alue(ResultObject.java:138)

Doh!.

Anyone know how to do this? I could use the onCreate script, in the sub
report data cell, but how do I access the containing reports elements?

this.getParent() might give me the list,
this.getParent().getParent() might give me the grid, but how to I access the
data elements in a grid?

Thanks,

Birt.
Re: comparing a row from a subreport to a row in the master report, is it possible? [message #146077 is a reply to message #146060] Mon, 20 March 2006 13:49 Go to previous messageGo to next message
Eclipse UserFriend
It's a known bug that BIRT designer generates the wrong expression when you
choose to use an outer table's data set column within an inner table. To fix
this modify the inner table's expression to use the "rows" variable instead
of "row". In your case, change the row["editdat"] reference in the inner
table's highlight expression to rows[0]["editdata"]. The "rows" array gives
you access to parent tables' data sets' rows. "rows[0]" is the top-level
table's "row" variable, "row[1]" is the next level, etc.

--
Gary Xue
Actuate Corporation - Product Development
BIRT Committer
"birt" <birt@ohds.co.uk> wrote in message
news:dvmra8$h1s$1@utils.eclipse.org...
> Anyone managed to do this?
>
> I want to highlight a row if the date in a subreport is greater than the
> date in the master report.
>
> So I have a list. In the list is a GRID with the columns of the "master"
> report, which include row["editedat"]. The last cell of the grid is a
list
> with a single "detail" which is a different data set and a single column
> row["offtime"].
>
> Now in the highlighter dialogue for the offtime sub report cell, if i open
> the expression builder under available dataasets It shows the master and
> subreport rows. But If I use a master row, I get:
>
> detail : org.eclipse.birt.data.engine.core.DataException: Invalid field
> name: editedat
> at
>
org.eclipse.birt.data.engine.executor.ResultObject.getFieldV alue(ResultObjec
t.java:138)
>
> Doh!.
>
> Anyone know how to do this? I could use the onCreate script, in the sub
> report data cell, but how do I access the containing reports elements?
>
> this.getParent() might give me the list,
> this.getParent().getParent() might give me the grid, but how to I access
the
> data elements in a grid?
>
> Thanks,
>
> Birt.
>
>
Re: comparing a row from a subreport to a row in the master report, is it possible? [message #146645 is a reply to message #146077] Tue, 21 March 2006 15:36 Go to previous message
Eclipse UserFriend
You are a GOD, this works!!!!

Ive been looking for weeks for a solution. Where did you find it?

Cheers,

Birt.


"Gary Xue" <gxue@actuate.com> wrote in message
news:dvmtcf$vad$1@utils.eclipse.org...
> It's a known bug that BIRT designer generates the wrong expression when
> you
> choose to use an outer table's data set column within an inner table. To
> fix
> this modify the inner table's expression to use the "rows" variable
> instead
> of "row". In your case, change the row["editdat"] reference in the inner
> table's highlight expression to rows[0]["editdata"]. The "rows" array
> gives
> you access to parent tables' data sets' rows. "rows[0]" is the top-level
> table's "row" variable, "row[1]" is the next level, etc.
>
> --
> Gary Xue
> Actuate Corporation - Product Development
> BIRT Committer
> "birt" <birt@ohds.co.uk> wrote in message
> news:dvmra8$h1s$1@utils.eclipse.org...
>> Anyone managed to do this?
>>
>> I want to highlight a row if the date in a subreport is greater than the
>> date in the master report.
>>
>> So I have a list. In the list is a GRID with the columns of the "master"
>> report, which include row["editedat"]. The last cell of the grid is a
> list
>> with a single "detail" which is a different data set and a single column
>> row["offtime"].
>>
>> Now in the highlighter dialogue for the offtime sub report cell, if i
>> open
>> the expression builder under available dataasets It shows the master and
>> subreport rows. But If I use a master row, I get:
>>
>> detail : org.eclipse.birt.data.engine.core.DataException: Invalid field
>> name: editedat
>> at
>>
> org.eclipse.birt.data.engine.executor.ResultObject.getFieldV alue(ResultObjec
> t.java:138)
>>
>> Doh!.
>>
>> Anyone know how to do this? I could use the onCreate script, in the sub
>> report data cell, but how do I access the containing reports elements?
>>
>> this.getParent() might give me the list,
>> this.getParent().getParent() might give me the grid, but how to I access
> the
>> data elements in a grid?
>>
>> Thanks,
>>
>> Birt.
>>
>>
>
>
Previous Topic:PGN and GIF image issues in PDFs
Next Topic:BIRT 1 - Is it possible to use localized values in a script expression?
Goto Forum:
  


Current Time: Thu May 08 22:14:02 EDT 2025

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

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

Back to the top