Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Crosstab inside of a table
Crosstab inside of a table [message #653465] Wed, 09 February 2011 20:41 Go to next message
Eclipse UserFriend
Originally posted by: remkus.wideopenwest.com

My application constrains me to using BIRT 2.2.1.

I'd like to have a table of data with groups defined.

In the detail row, I'd like to have a crosstab which is filtered on data
from the table.

I've tried setting a filter on the crosstab .. no luck.

<property name="level">PerformanceView/DEVICE_NAME</property>
<property name="filter">
<filter-condition-element>
<expression
name="expr">dimension["PerformanceView"]["DEVICE_NAME"] </expression>
<property name="operator">eq</property>
<simple-property-list name="value1">
<value>data._outer["DEVICE_NAME"]</value>
</simple-property-list>
</filter-condition-element>
</property>


When I run the report, I get a message
"org.mozilla.javascript.EcmaError: TypeError: Cannot read property
"DEVICE_NAME" from null"

Any suggestions?

Thanks
Re: Crosstab inside of a table [message #653711 is a reply to message #653465] Thu, 10 February 2011 18:43 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Dave,

Not sure this will work but can you add an oncreate script to the row
containing the xtab. In that script get the column value device name
and use reportContext.setGlobalVariable("dn", yourvalue);

Then in the filter put

reportConxtext.getGlobalVariable("dn");
instead of
data._outer["DEVICE_NAME"]

Jason



On 2/9/2011 3:41 PM, Dave Remkus wrote:
> My application constrains me to using BIRT 2.2.1.
>
> I'd like to have a table of data with groups defined.
>
> In the detail row, I'd like to have a crosstab which is filtered on data
> from the table.
>
> I've tried setting a filter on the crosstab .. no luck.
>
> <property name="level">PerformanceView/DEVICE_NAME</property>
> <property name="filter">
> <filter-condition-element>
> <expression
> name="expr">dimension["PerformanceView"]["DEVICE_NAME"] </expression>
> <property name="operator">eq</property>
> <simple-property-list name="value1">
> <value>data._outer["DEVICE_NAME"]</value>
> </simple-property-list>
> </filter-condition-element>
> </property>
>
>
> When I run the report, I get a message
> "org.mozilla.javascript.EcmaError: TypeError: Cannot read property
> "DEVICE_NAME" from null"
>
> Any suggestions?
>
> Thanks
>
>
Re: Crosstab inside of a table [message #653729 is a reply to message #653711] Thu, 10 February 2011 20:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: remkus.wideopenwest.com

Jason,

I had been thinking along the lines of setting a variable in the row's
onCreate, but it didn't dawn on me that I could just access the variable
from the reportContext when building the filter expression!

It works ... I'm not sure if you just made a typo or if there's a
concept I don't understand between get/setGlobalVarable and
get/setPersistentGlobalVariable, but I had to use persistent variables
to make my report work

Thanks a ton!

On 02/10/11 13:43, Jason Weathersby wrote:
> Dave,
>
> Not sure this will work but can you add an oncreate script to the row
> containing the xtab. In that script get the column value device name
> and use reportContext.setGlobalVariable("dn", yourvalue);
>
> Then in the filter put
>
> reportConxtext.getGlobalVariable("dn");
> instead of
> data._outer["DEVICE_NAME"]
>
> Jason
>
>
>
> On 2/9/2011 3:41 PM, Dave Remkus wrote:
>> My application constrains me to using BIRT 2.2.1.
>>
>> I'd like to have a table of data with groups defined.
>>
>> In the detail row, I'd like to have a crosstab which is filtered on data
>> from the table.
>>
>> I've tried setting a filter on the crosstab .. no luck.
>>
>> <property name="level">PerformanceView/DEVICE_NAME</property>
>> <property name="filter">
>> <filter-condition-element>
>> <expression
>> name="expr">dimension["PerformanceView"]["DEVICE_NAME"] </expression>
>> <property name="operator">eq</property>
>> <simple-property-list name="value1">
>> <value>data._outer["DEVICE_NAME"]</value>
>> </simple-property-list>
>> </filter-condition-element>
>> </property>
>>
>>
>> When I run the report, I get a message
>> "org.mozilla.javascript.EcmaError: TypeError: Cannot read property
>> "DEVICE_NAME" from null"
>>
>> Any suggestions?
>>
>> Thanks
>>
>>
>
Re: Crosstab inside of a table [message #653732 is a reply to message #653729] Thu, 10 February 2011 20:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Dave,

It was not a typo. Persistent variables are written to the rptdocument
allowing the separation of run and render task in two java processes.
It should be fine to use persistent. I am a bit curious why the
standard global did not work.

Jason


On 2/10/2011 3:38 PM, Dave Remkus wrote:
> Jason,
>
> I had been thinking along the lines of setting a variable in the row's
> onCreate, but it didn't dawn on me that I could just access the variable
> from the reportContext when building the filter expression!
>
> It works ... I'm not sure if you just made a typo or if there's a
> concept I don't understand between get/setGlobalVarable and
> get/setPersistentGlobalVariable, but I had to use persistent variables
> to make my report work
>
> Thanks a ton!
>
> On 02/10/11 13:43, Jason Weathersby wrote:
>> Dave,
>>
>> Not sure this will work but can you add an oncreate script to the row
>> containing the xtab. In that script get the column value device name
>> and use reportContext.setGlobalVariable("dn", yourvalue);
>>
>> Then in the filter put
>>
>> reportConxtext.getGlobalVariable("dn");
>> instead of
>> data._outer["DEVICE_NAME"]
>>
>> Jason
>>
>>
>>
>> On 2/9/2011 3:41 PM, Dave Remkus wrote:
>>> My application constrains me to using BIRT 2.2.1.
>>>
>>> I'd like to have a table of data with groups defined.
>>>
>>> In the detail row, I'd like to have a crosstab which is filtered on data
>>> from the table.
>>>
>>> I've tried setting a filter on the crosstab .. no luck.
>>>
>>> <property name="level">PerformanceView/DEVICE_NAME</property>
>>> <property name="filter">
>>> <filter-condition-element>
>>> <expression
>>> name="expr">dimension["PerformanceView"]["DEVICE_NAME"] </expression>
>>> <property name="operator">eq</property>
>>> <simple-property-list name="value1">
>>> <value>data._outer["DEVICE_NAME"]</value>
>>> </simple-property-list>
>>> </filter-condition-element>
>>> </property>
>>>
>>>
>>> When I run the report, I get a message
>>> "org.mozilla.javascript.EcmaError: TypeError: Cannot read property
>>> "DEVICE_NAME" from null"
>>>
>>> Any suggestions?
>>>
>>> Thanks
>>>
>>>
>>
>
Re: Crosstab inside of a table [message #653922 is a reply to message #653732] Fri, 11 February 2011 21:20 Go to previous message
Eclipse UserFriend
Originally posted by: remkus.wideopenwest.com

Jason,

I must have typo'd something when I was trying set/getGlobalVariable ...
now that I have the report working with persistent variables, I went
back and tried standard globals and they work fine! (:doooh!)

Thanks

On 02/10/11 15:57, Jason Weathersby wrote:
> Dave,
>
> It was not a typo. Persistent variables are written to the rptdocument
> allowing the separation of run and render task in two java processes. It
> should be fine to use persistent. I am a bit curious why the standard
> global did not work.
>
> Jason
>
>
> On 2/10/2011 3:38 PM, Dave Remkus wrote:
>> Jason,
>>
>> I had been thinking along the lines of setting a variable in the row's
>> onCreate, but it didn't dawn on me that I could just access the variable
>> from the reportContext when building the filter expression!
>>
>> It works ... I'm not sure if you just made a typo or if there's a
>> concept I don't understand between get/setGlobalVarable and
>> get/setPersistentGlobalVariable, but I had to use persistent variables
>> to make my report work
>>
>> Thanks a ton!
>>
>> On 02/10/11 13:43, Jason Weathersby wrote:
>>> Dave,
>>>
>>> Not sure this will work but can you add an oncreate script to the row
>>> containing the xtab. In that script get the column value device name
>>> and use reportContext.setGlobalVariable("dn", yourvalue);
>>>
>>> Then in the filter put
>>>
>>> reportConxtext.getGlobalVariable("dn");
>>> instead of
>>> data._outer["DEVICE_NAME"]
>>>
>>> Jason
>>>
>>>
>>>
>>> On 2/9/2011 3:41 PM, Dave Remkus wrote:
>>>> My application constrains me to using BIRT 2.2.1.
>>>>
>>>> I'd like to have a table of data with groups defined.
>>>>
>>>> In the detail row, I'd like to have a crosstab which is filtered on
>>>> data
>>>> from the table.
>>>>
>>>> I've tried setting a filter on the crosstab .. no luck.
>>>>
>>>> <property name="level">PerformanceView/DEVICE_NAME</property>
>>>> <property name="filter">
>>>> <filter-condition-element>
>>>> <expression
>>>> name="expr">dimension["PerformanceView"]["DEVICE_NAME"] </expression>
>>>> <property name="operator">eq</property>
>>>> <simple-property-list name="value1">
>>>> <value>data._outer["DEVICE_NAME"]</value>
>>>> </simple-property-list>
>>>> </filter-condition-element>
>>>> </property>
>>>>
>>>>
>>>> When I run the report, I get a message
>>>> "org.mozilla.javascript.EcmaError: TypeError: Cannot read property
>>>> "DEVICE_NAME" from null"
>>>>
>>>> Any suggestions?
>>>>
>>>> Thanks
>>>>
>>>>
>>>
>>
>
Previous Topic:Customize a Pie Chart with Java under Eclispe
Next Topic:how to decode base64 password in BIRT script and when
Goto Forum:
  


Current Time: Thu Apr 18 09:24:50 GMT 2024

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

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

Back to the top