Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Computed Column on Linked Table?
Computed Column on Linked Table? [message #54542] Wed, 06 July 2005 20:44 Go to next message
Eclipse UserFriend
Originally posted by: none.none.none

I have a report similar to the example in the documentation titled "Building
a report with parallel subreports". I need to create a 'computed field' in
the subreport that utilizes values from its parent report/table (they are
linked by a parameter). How do I do this? The documenation says that
computed fields are for computing values withing the same data set.
However, since I essentially have the two datasets linked, there must be a
way to get a handle on the other dataset's values to perform a calculation
with values from both datasets.
Please help.

Thanks!
Re: Computed Column on Linked Table? [message #54564 is a reply to message #54542] Wed, 06 July 2005 22:02 Go to previous message
Eclipse UserFriend
Originally posted by: none.none.none

Ok, I've figured out a solution (or is it a workaround?). For those who are
interested....

a) I added some code in the "onrow" event of my List element (the one that
contains both datasets), assigning the value of interest to a variable.
var master_report_value = row["a_master_report_column"];

b) Added a Data element to my subreport and created an expression using
that variable.
"Cost Per Unit: " + (row["cost"] / master_report_value);

This seems to work, but if someone knows a better way, please let us know.

"chris" <none@none.none> wrote in message
news:dahfri$hi3$1@news.eclipse.org...
>I have a report similar to the example in the documentation titled
>"Building a report with parallel subreports". I need to create a 'computed
>field' in the subreport that utilizes values from its parent report/table
>(they are linked by a parameter). How do I do this? The documenation says
>that computed fields are for computing values withing the same data set.
>However, since I essentially have the two datasets linked, there must be a
>way to get a handle on the other dataset's values to perform a calculation
>with values from both datasets.
> Please help.
>
> Thanks!
>
Previous Topic:How to transform/merge Data Sets with script?
Next Topic:How to include browser javascript in my report?
Goto Forum:
  


Current Time: Mon Dec 30 15:58:17 GMT 2024

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

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

Back to the top