Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to write an expression which uses items from multiple data sets?
How to write an expression which uses items from multiple data sets? [message #889891] Wed, 20 June 2012 07:39 Go to next message
Paul Ramsden is currently offline Paul RamsdenFriend
Messages: 84
Registered: February 2011
Location: BW, Germany
Member
I have a report which displays staff roles at an exhibition over a number of days. The main dataset (DS1) contains roles on day1, day2, ..., day10 for each staff member. From a second dataset (DS2), I added the actual dates to the column headers. This dataset contains the start/end of the whole period (including preparation/tidy-up), the start/end of the actual exhibition and the actual date of day1 - dayN. It has just one row.

The result looks like this:

Name       19  20  21  22  23  24
----------------------------------
Adam               S   S
Brian              V   S   V
Charlie    .    .  S   S   S   .


In the example above, 19, 20 and 24 are preparation/tidy-up days and 21-23 are the actual exhibition days. I now want to add a highlight which adds a left/right border to indicate the start / end of the exhibition.

It seems to me that the highlight expression needed on each cell should be something like:

if(cell_date == exhib_start) style = 'left_border';

So how do I write an expression in the context of DS1 (i.e. in the Details row of the table) which fetches data from DS2?

Hope someone understands what I'm trying to say Wink

Paul
Re: How to write an expression which uses items from multiple data sets? [message #890062 is a reply to message #889891] Wed, 20 June 2012 21:33 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Paul,

I am not 100% on the example but generally expressions can only access
one dataset, but they can access global variables. So you could put ds2
values in a global array variable and then reference this from the
highlight.

Jason

On 6/20/2012 3:39 AM, Paul Ramsden wrote:
> I have a report which displays staff roles at an exhibition over a
> number of days. The main dataset (DS1) contains roles on day1, day2,
> ..., day10 for each staff member. From a second dataset (DS2), I added
> the actual dates to the column headers. This dataset contains the
> start/end of the whole period (including preparation/tidy-up), the
> start/end of the actual exhibition and the actual date of day1 - dayN.
> It has just one row.
>
> The result looks like this:
>
>
> Name 19 20 21 22 23 24
> ----------------------------------
> Adam S S
> Brian V S V
> Charlie . . S S S .
>
>
> In the example above, 19, 20 and 24 are preparation/tidy-up days and
> 21-23 are the actual exhibition days. I now want to add a highlight
> which adds a left/right border to indicate the start / end of the
> exhibition.
>
> It seems to me that the highlight expression needed on each cell should
> be something like:
>
> if(cell_date == exhib_start) style = 'left_border';
>
> So how do I write an expression in the context of DS1 (i.e. in the
> Details row of the table) which fetches data from DS2?
>
> Hope someone understands what I'm trying to say ;)
>
> Paul
Previous Topic:Some Questions
Next Topic:How to hide the table header when there is no content in the table ?
Goto Forum:
  


Current Time: Thu Apr 25 12:03:12 GMT 2024

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

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

Back to the top