Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Parameter binding on chart as subreport
Parameter binding on chart as subreport [message #156882] Thu, 27 April 2006 17:58 Go to next message
Eclipse UserFriend
Originally posted by: yusufa.zarafin.com

This is a multi-part message in MIME format.

------=_NextPart_000_0019_01C66A34.F0D9B140
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_001A_01C66A34.F0D9B140"


------=_NextPart_001_001A_01C66A34.F0D9B140
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



Helo

My machine specs are:

OS:Windows xpsp2

Eclipse:Version: 3.1.1 Build id: M20050929-0840

Birt 2.0.1

jdk 1.5.0_02



My problem is when i create a chart and want to bind it to a dataset =
that has a parameter it throws an exception=20

A BIRT exception occurred: Error evaluating Javascript expression. =
Script engine error: ReferenceError: "bankid" is not defined.
Script source: ParamBinding(BANKID), line: 0, text:
bankid. See next exception for more information.
Error evaluating Javascript expression. Script engine error: =
ReferenceError: "bankid" is not defined.
Script source: ParamBinding(BANKID), line: 0, text:
bankid



I think i have declared the javascript variable in the container table =
row=20

bankid=3D row["BANKID"];

row["BANKID"];

I run the report in preview and it works perfectly eventhough the error =
occurs.



when i copy my report to the wep app in the live environment .... it =
fails saying

The DataSet bound to the chart returned no rows.



Attached you will find my rptdesign



Thanks in advance

Yusuf



------=_NextPart_001_001A_01C66A34.F0D9B140
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2>Helo</FONT></P>
<P><FONT face=3DArial size=3D2>My machine specs are:</FONT></P>
<P><FONT face=3DArial size=3D2>OS:Windows xpsp2</FONT></P>
<P><FONT face=3DArial size=3D2>Eclipse:Version: 3.1.1 </FONT><FONT =
face=3DArial=20
size=3D2>Build id: M20050929-0840</FONT></P>
<P><FONT face=3DArial size=3D2>Birt 2.0.1</FONT></P>
<P><FONT face=3DArial size=3D2>jdk 1.5.0_02</FONT></P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2>My problem is when i create a chart and =
want to bind=20
it to a dataset that has a parameter it throws an exception </FONT></P>
<P><FONT face=3DArial size=3D2>A BIRT exception occurred: Error =
evaluating=20
Javascript expression. Script engine error: ReferenceError: "bankid" is =
not=20
defined.<BR>&nbsp;Script source: ParamBinding(BANKID), line: 0, =
text:<BR>bankid.=20
See next exception for more information.<BR>Error evaluating Javascript=20
expression. Script engine error: ReferenceError: "bankid" is not=20
defined.<BR>&nbsp;Script source: ParamBinding(BANKID), line: 0,=20
text:<BR>bankid</FONT></P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2>I think i have declared the javascript =
variable in=20
the container table row </FONT></P><FONT size=3D1>
<P>bankid=3D row[</FONT><FONT color=3D#2a00ff =
size=3D1>"BANKID"</FONT><FONT=20
size=3D1>];</P>
<P>row[</FONT><FONT color=3D#2a00ff size=3D1>"BANKID"</FONT><FONT=20
size=3D1>];</FONT></P>
<P><FONT face=3DArial size=3D2>I run the report in preview and it works =
perfectly=20
eventhough the error occurs.</FONT></P>
<P><FONT size=3D1></FONT>&nbsp;</P>
<P><FONT size=3D1><FONT face=3DArial size=3D2>when i copy my report to =
the wep app in=20
the live environment .... it fails saying</FONT></FONT></P>
<P><FONT size=3D1><FONT face=3DArial size=3D2>The DataSet bound to the =
chart returned=20
no rows.</FONT></FONT></P>
<P><FONT size=3D1><FONT face=3DArial size=3D2></FONT></FONT>&nbsp;</P>
<P><FONT size=3D1><FONT face=3DArial size=3D2>Attached you will find my=20
rptdesign</FONT></FONT></P>
<P><FONT size=3D1><FONT face=3DArial size=3D2></FONT></FONT>&nbsp;</P>
<P><FONT size=3D1><FONT face=3DArial size=3D2>Thanks in =
advance</FONT></FONT></P>
<P><FONT size=3D1><FONT face=3DArial size=3D2>Yusuf</FONT></FONT></P>
<P><FONT size=3D1><FONT face=3DArial=20
size=3D2></FONT>&nbsp;</P></FONT></DIV></BODY></HTML >

------=_NextPart_001_001A_01C66A34.F0D9B140--

------=_NextPart_000_0019_01C66A34.F0D9B140
Content-Type: application/octet-stream;
name="WIPAccreditedByBank.rptdesign"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="WIPAccreditedByBank.rptdesign"

<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!-- Written by Eclipse BIRT 2.0 -->
<report xmlns=3D"http://www.eclipse.org/birt/2005/design" version=3D"3" =
id=3D"1">
<property name=3D"author">Yusuf Aboobaker</property>
<property name=3D"createdBy">Eclipse BIRT Designer Version 2.0.1 =
Build &lt;20060222-1204></property>
<property name=3D"units">in</property>
<text-property name=3D"title">Management report Bank =
Stats</text-property>
<data-sources>
<oda-data-source =
extensionID=3D"org.eclipse.birt.report.data.oda.jdbc" name=3D"SATSTDTA" =
id=3D"10">
<property =
name=3D"odaDriverClass">com.ibm.as400.access.AS400JDBCDriver </property>
<property name=3D"odaURL">jdbc:as400://192.168.20.6; =
library=3DSATSTDTA;</property>
<property name=3D"odaUser">yusufs</property>
<encrypted-property =
name=3D"odaPassword">YnJ1dHVz</encrypted-property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set =
extensionID=3D"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " =
name=3D"Management Bank Summary WIP" id=3D"11">
<property name=3D"dataSource">SATSTDTA</property>
<property name=3D"queryText">select *=0A=
from SATSTDTA.MANAGMENTBANKSUMMARY=0A=
where SATSTDTA.MANAGMENTBANKSUMMARY.SUBMITTEDTOBANKS=3D1</property >
</oda-data-set>
<oda-data-set =
extensionID=3D"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " =
name=3D"Report level Totals" id=3D"205">
<property name=3D"dataSource">SATSTDTA</property>
<property name=3D"queryText">select =
SATSTDTA.MANAGMENTBANKSUMMARY.STATUS, =0A=
case SATSTDTA.MANAGMENTBANKSUMMARY.ACCREDITED=0A=
when 1 then 'ACCREDITED'=0A=
else 'UNACCREDITED' =0A=
end as "INDICATOR", =0A=
count(SATSTDTA.MANAGMENTBANKSUMMARY.ACCREDITED) as totalcount ,=0A=
sum(SATSTDTA.MANAGMENTBANKSUMMARY.LOANVALUE) as total =
=0A=
=0A=
from SATSTDTA.MANAGMENTBANKSUMMARY =0A=
where SATSTDTA.MANAGMENTBANKSUMMARY.SUBMITTEDTOBANKS=3D1 =
=0A=
group by SATSTDTA.MANAGMENTBANKSUMMARY.ACCREDITED , =
SATSTDTA.MANAGMENTBANKSUMMARY.STATUS=0A=
order by SATSTDTA.MANAGMENTBANKSUMMARY.ACCREDITED , =
SATSTDTA.MANAGMENTBANKSUMMARY.STATUS =
</property>
</oda-data-set>
<oda-data-set =
extensionID=3D"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " =
name=3D"Bank level chart data" id=3D"247">
<property name=3D"dataSource">SATSTDTA</property>
<property name=3D"cachedRowCount">-1</property>
<list-property name=3D"parameters">
<structure>
<property name=3D"name">BANKID</property>
<property name=3D"dataType">string</property>
<property name=3D"position">1</property>
<expression name=3D"defaultValue">'%'</expression>
<property name=3D"isInput">true</property>
<property name=3D"isOutput">true</property>
</structure>
</list-property>
<property name=3D"queryText">select =
SATSTDTA.MANAGMENTBANKSUMMARY.BANKID as bank, =
SATSTDTA.MANAGMENTBANKSUMMARY.STATUS, =0A=
case SATSTDTA.MANAGMENTBANKSUMMARY.ACCREDITED=0A=
when 1 then 'ACCREDITED'=0A=
else 'UNACCREDITED' =0A=
end as "INDICATOR", =0A=
count(SATSTDTA.MANAGMENTBANKSUMMARY.ACCREDITED) as totalcount =
,sum(SATSTDTA.MANAGMENTBANKSUMMARY.LOANVALUE) as total =
=0A=
=0A=
from SATSTDTA.MANAGMENTBANKSUMMARY =0A=
where SATSTDTA.MANAGMENTBANKSUMMARY.BANKID like ? =0A=
and SATSTDTA.MANAGMENTBANKSUMMARY.SUBMITTEDTOBANKS=3D1 =
=0A=
group by SATSTDTA.MANAGMENTBANKSUMMARY.BANKID, =
SATSTDTA.MANAGMENTBANKSUMMARY.ACCREDITED , =
SATSTDTA.MANAGMENTBANKSUMMARY.STATUS=0A=
order by SATSTDTA.MANAGMENTBANKSUMMARY.BANKID , =
SATSTDTA.MANAGMENTBANKSUMMARY.ACCREDITED , =
SATSTDTA.MANAGMENTBANKSUMMARY.STATUS =
</property>
</oda-data-set>
<oda-data-set =
extensionID=3D"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " =
name=3D"Bank level Overall" id=3D"450">
<property name=3D"dataSource">SATSTDTA</property>
<property name=3D"queryText">select =
SATSTDTA.MANAGMENTBANKSUMMARY.BANKID,=0A=
sum(SATSTDTA.MANAGMENTBANKSUMMARY.LOANVALUE) as banktotal ,=0A=
count( SATSTDTA.MANAGMENTBANKSUMMARY.LOANID) as bankcount=0A=
from SATSTDTA.MANAGMENTBANKSUMMARY=0A=
where SATSTDTA.MANAGMENTBANKSUMMARY.SUBMITTEDTOBANKS=3D 1=0A=
group by SATSTDTA.MANAGMENTBANKSUMMARY.BANKID=0A=
order by SATSTDTA.MANAGMENTBANKSUMMARY.BANKID</property>
</oda-data-set>
<oda-data-set =
extensionID=3D"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet " =
name=3D"Bank level table data" id=3D"461">
<property name=3D"dataSource">SATSTDTA</property>
<list-property name=3D"parameters">
<structure>
<property name=3D"name">BANKID</property>
<property name=3D"dataType">string</property>
<property name=3D"position">1</property>
<expression =
name=3D"defaultValue">'ABSA'</expression>
<property name=3D"isInput">true</property>
<property name=3D"isOutput">false</property>
</structure>
</list-property>
<property name=3D"queryText">select =
SATSTDTA.MANAGMENTBANKSUMMARY.STATUS, =0A=
case SATSTDTA.MANAGMENTBANKSUMMARY.ACCREDITED=0A=
when 1 then 'ACCREDITED'=0A=
else 'UNACCREDITED' =0A=
end as "INDICATOR", =0A=
count(SATSTDTA.MANAGMENTBANKSUMMARY.ACCREDITED) as totalcount ,=0A=
sum(SATSTDTA.MANAGMENTBANKSUMMARY.LOANVALUE) as total =
=0A=
=0A=
from SATSTDTA.MANAGMENTBANKSUMMARY =0A=
where SATSTDTA.MANAGMENTBANKSUMMARY.SUBMITTEDTOBANKS=3D1 =0A=
and SATSTDTA.MANAGMENTBANKSUMMARY.BANKID=3D? =0A=
group by SATSTDTA.MANAGMENTBANKSUMMARY.ACCREDITED , =
SATSTDTA.MANAGMENTBANKSUMMARY.STATUS=0A=
order by SATSTDTA.MANAGMENTBANKSUMMARY.ACCREDITED , =
SATSTDTA.MANAGMENTBANKSUMMARY.STATUS </property>
</oda-data-set>
</data-sets>
<page-setup>
<simple-master-page name=3D"Simple MasterPage" id=3D"2">
<page-footer>
<text id=3D"3">
<property name=3D"contentType">html</property>
<text-property =
name=3D"content"><![CDATA[<value-of>new =
Date()</value-of>]]></text-property>
</text>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<grid id=3D"195">
<property name=3D"height">15.322in</property>
<property name=3D"width">6.427in</property>
<column id=3D"196">
<property name=3D"width">5.989in</property>
</column>
<row id=3D"244">
<property name=3D"textAlign">justify</property>
<cell id=3D"245">
<label id=3D"246">
<property =
name=3D"backgroundColor">#0080FF</property>
<property name=3D"fontFamily">Verdana</property>
<property name=3D"fontWeight">bold</property>
<property name=3D"color">#FFFFFF</property>
<property name=3D"marginRight">4mm</property>
<property name=3D"paddingTop">1mm</property>
<property name=3D"paddingBottom">1mm</property>
<property name=3D"paddingRight">0mm</property>
<property name=3D"textAlign">center</property>
<text-property name=3D"text">Management report =
bank stats</text-property>
</label>
</cell>
</row>
<row id=3D"198">
<cell id=3D"199"/>
</row>
<row id=3D"201">
<property name=3D"height">8.802in</property>
<cell id=3D"202">
<property name=3D"colSpan">1</property>
<property name=3D"rowSpan">1</property>
<grid id=3D"229">
<property name=3D"height">2.989in</property>
<property name=3D"width">5.843in</property>
<column id=3D"230">
<property name=3D"width">2.083in</property>
</column>
<row id=3D"232">
<property name=3D"height">10mm</property>
<cell id=3D"233">
<property =
name=3D"textAlign">left</property>
<property =
name=3D"verticalAlign">middle</property>
</cell>
</row>
<row id=3D"358">
<property name=3D"height">160mm</property>
<property =
name=3D"backgroundColor">#FFFFFF</property>
<cell id=3D"359">
<table id=3D"451">
<property =
name=3D"width">100%</property>
<property name=3D"dataSet">Bank =
level Overall</property>
<column id=3D"458"/>
<header>
<row id=3D"452">
<cell id=3D"453"/>
</row>
</header>
<group id=3D"506">
<property =
name=3D"groupName">BANKID</property>
<property =
name=3D"interval">none</property>
<property =
name=3D"sortDirection">asc</property>
<expression =
name=3D"keyExpr">row["BANKID"]</expression>
<header>
<row id=3D"507">
<cell id=3D"508"/>
</row>
</header>
<footer>
<row id=3D"509">
<cell id=3D"510">
<grid id=3D"537">
<property =
name=3D"width">100%</property>
<column =
id=3D"538">
<property =
name=3D"width">45%</property>
<property =
name=3D"backgroundColor">aqua</property>
</column>
<column =
id=3D"548">
<property =
name=3D"width">25%</property>
</column>
<column =
id=3D"545">
<property =
name=3D"width">30%</property>
</column>
<column =
id=3D"539">
<property =
name=3D"width">10%</property>
</column>
<row id=3D"540">
<cell =
id=3D"541">
<label =
id=3D"543">
=
<property name=3D"fontFamily">Verdana</property>
=
<property name=3D"fontWeight">bold</property>
=
<text-property name=3D"text">Total of business</text-property>
</label>
</cell>
<cell =
id=3D"547">
=
<property name=3D"textAlign">right</property>
<data =
id=3D"536">
=
<property name=3D"fontFamily">Verdana</property>
=
<structure name=3D"numberFormat">
=
<property name=3D"category">Percent</property>
=
<property name=3D"pattern">#,##0.00%</property>
=
</structure>
=
<property name=3D"textAlign">right</property>
=
<expression =
name=3D"valueExpr">Finance.percent(Total.sum(row["BANKTOTAL "],null,Total.=
OVERALL),row["BANKTOTAL"],100)/100</expression>
</data>
</cell>
<cell =
id=3D"544">
=
<property name=3D"textAlign">right</property>
<data =
id=3D"546">
=
<property name=3D"fontFamily">Verdana</property>
=
<structure name=3D"numberFormat">
=
<property name=3D"category">Currency</property>
=
<property name=3D"pattern">#,##0.00</property>
=
</structure>
=
<property name=3D"textAlign">right</property>
=
<expression =
name=3D"valueExpr">Total.sum(row["BANKTOTAL"],null,Total.OVERALL) </expres=
sion>
</data>
</cell>
<cell =
id=3D"542">
=
<property name=3D"textAlign">right</property>
<data =
id=3D"553">
=
<property name=3D"fontFamily">Verdana</property>
=
<structure name=3D"numberFormat">
=
<property name=3D"category">Fixed</property>
=
<property name=3D"pattern">#,##0</property>
=
</structure>
=
<property name=3D"textAlign">right</property>
=
<expression =
name=3D"valueExpr">Total.sum(row["BANKCOUNT"],null,Total.OVERALL) </expres=
sion>
</data>
</cell>
</row>
</grid>
</cell>
</row>
</footer>
</group>
<detail>
<row id=3D"454">
<cell id=3D"455">
<text-data id=3D"228">
<property =
name=3D"backgroundColor">#FFFFFF</property>
<property =
name=3D"fontSize">larger</property>
<property =
name=3D"fontWeight">bold</property>
<property =
name=3D"color">#0080FF</property>
<property =
name=3D"borderBottomColor">#C0C0C0</property>
<property =
name=3D"borderBottomStyle">dotted</property>
<property =
name=3D"borderBottomWidth">thin</property>
<property =
name=3D"borderLeftColor">#C0C0C0</property>
<property =
name=3D"borderLeftStyle">dotted</property>
<property =
name=3D"borderLeftWidth">thin</property>
<property =
name=3D"borderRightColor">#C0C0C0</property>
<property =
name=3D"borderRightStyle">dotted</property>
<property =
name=3D"borderRightWidth">thin</property>
<property =
name=3D"borderTopColor">#C0C0C0</property>
<property =
name=3D"borderTopStyle">dotted</property>
<property =
name=3D"borderTopWidth">thin</property>
<property =
name=3D"paddingTop">1mm</property>
<property =
name=3D"paddingLeft">1mm</property>
<property =
name=3D"paddingBottom">1mm</property>
<property =
name=3D"paddingRight">1mm</property>
<property =
name=3D"textAlign">center</property>
<method =
name=3D"onRender"><![CDATA[var cid;]]></method>
<expression =
name=3D"valueExpr">bankid=3D row["BANKID"];=0A=
row["BANKID"];</expression>
<property =
name=3D"contentType">html</property>
</text-data>
<extended-item =
extensionName=3D"Chart" id=3D"330">
<property =
name=3D"height">2.854in</property>
<property =
name=3D"width">5.708in</property>
<property =
name=3D"dataSet">Bank level chart data</property>
<list-property =
name=3D"paramBindings">
<structure>
<property =
name=3D"paramName">BANKID</property>
<expression =
name=3D"expression">bankid</expression>
</structure>
</list-property>
<xml-property =
name=3D"xmlRepresentation"><![CDATA[<model:ChartWithAxes =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =
xmlns:attribute=3D"http://www.birt.eclipse.org/ChartModelAttribute" =
xmlns:data=3D"http://www.birt.eclipse.org/ChartModelData" =
xmlns:layout=3D"http://www.birt.eclipse.org/ChartModelLayout" =
xmlns:model=3D"http://www.birt.eclipse.org/ChartModel" =
xmlns:type=3D"http://www.birt.eclipse.org/ChartModelType">
<Type>Bar Chart</Type>
<SubType>Stacked</SubType>
<Block>
<Children xsi:type=3D"layout:TitleBlock">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>false</Visible>
<Label>
<Caption>
<Value>Bar Chart Title</Value>
<Font>
<Size>16.0</Size>
<Bold>true</Bold>
<Alignment>
<horizontalAlignment>Center</horizontalAlignment>
<verticalAlignment>Center</verticalAlignment>
</Alignment>
</Font>
</Caption>
<Background xsi:type=3D"attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Label>
</Children>
<Children xsi:type=3D"layout:Plot">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Anchor>North</Anchor>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>true</Visible>
<HorizontalSpacing>3</HorizontalSpacing>
<VerticalSpacing>5</VerticalSpacing>
<ClientArea>
<Background xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>254</Red>
<Green>254</Green>
<Blue>254</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>192</Red>
<Green>192</Green>
<Blue>192</Blue>
</Color>
<Visible>true</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>0.0</Left>
<Bottom>0.0</Bottom>
<Right>0.0</Right>
</Insets>
</ClientArea>
</Children>
<Children xsi:type=3D"layout:Legend">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>true</Visible>
<ClientArea>
<Outline>
<Style>Solid</Style>
<Thickness>0</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>2.0</Top>
<Left>2.0</Left>
<Bottom>2.0</Bottom>
<Right>2.0</Right>
</Insets>
</ClientArea>
<Text>
<Value>&lt;undefined></Value>
<Font>
<Alignment/>
</Font>
</Text>
<Orientation>Vertical</Orientation>
<Direction>Top_Bottom</Direction>
<Position>Above</Position>
<ItemType>Series</ItemType>
<Title>
<Caption>
<Value>&lt;undefined></Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type=3D"attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>false</Visible>
</Title>
<TitlePosition>Above</TitlePosition>
</Children>
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>410.25</Width>
<Height>204.75</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Background xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Visible>true</Visible>
</Block>
<Dimension>Two_Dimensional_With_Depth</Dimension>
<Units>Points</Units>
<SeriesThickness>10.0</SeriesThickness>
<SampleData>
<BaseSampleData>
<DataSetRepresentation>'A','B','C'</DataSetRepresentation>
</BaseSampleData>
<OrthogonalSampleData>
<DataSetRepresentation>5,4,12</DataSetRepresentation>
<SeriesDefinitionIndex>0</SeriesDefinitionIndex>
</OrthogonalSampleData>
</SampleData>
<Interactivity/>
<Axes>
<Type>Text</Type>
<Title>
<Caption>
<Value>X-Axis Title</Value>
<Font>
<Size>14.0</Size>
<Bold>true</Bold>
<Alignment>
<horizontalAlignment>Center</horizontalAlignment>
<verticalAlignment>Center</verticalAlignment>
</Alignment>
</Font>
</Caption>
<Background xsi:type=3D"attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>false</Visible>
</Title>
<TitlePosition>Below</TitlePosition>
<AssociatedAxes>
<Type>Linear</Type>
<Title>
<Caption>
<Value>Y-Axis Title</Value>
<Font>
<Size>14.0</Size>
<Bold>true</Bold>
<Alignment>
<horizontalAlignment>Center</horizontalAlignment>
<verticalAlignment>Center</verticalAlignment>
</Alignment>
<Rotation>90.0</Rotation>
</Font>
</Caption>
<Background xsi:type=3D"attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>false</Visible>
</Title>
<TitlePosition>Left</TitlePosition>
<SeriesDefinitions>
<Query>
<Definition>row[&quot;INDICATOR&quot;]</Definition >
</Query>
<SeriesPalette>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>80</Red>
<Green>166</Green>
<Blue>218</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>242</Red>
<Green>88</Green>
<Blue>106</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>232</Red>
<Green>172</Green>
<Blue>57</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>255</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>64</Red>
<Green>128</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>128</Green>
<Blue>192</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>170</Red>
<Green>85</Green>
<Blue>85</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>128</Green>
<Blue>0</Blue>
</Entries>
</SeriesPalette>
<Series xsi:type=3D"type:BarSeries">
<Visible>true</Visible>
<Label>
<Caption>
<Value>&lt;undefined></Value>
<Font>
<Name>Verdana</Name>
<Size>7.0</Size>
<Alignment/>
</Font>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Caption>
<Background xsi:type=3D"attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Label>
<DataDefinition>
<Definition>row[&quot;TOTAL&quot;]</Definition>
</DataDefinition>
<SeriesIdentifier>&lt;undefined></SeriesIdentifier>
<DataPoint>
<Components>
<Type>Orthogonal_Value</Type>
<FormatSpecifier =
xsi:type=3D"attribute:NumberFormatSpecifier">
<Prefix></Prefix>
<Suffix></Suffix>
<FractionDigits>2</FractionDigits>
</FormatSpecifier>
</Components>
<Separator>, </Separator>
</DataPoint>
<LabelPosition>Inside</LabelPosition>
<Stacked>true</Stacked>
<Riser>Rectangle</Riser>
</Series>
<Grouping>
<Enabled>false</Enabled>
<GroupingInterval>2</GroupingInterval>
<GroupType>Text</GroupType>
<AggregateExpression>Sum</AggregateExpression>
</Grouping>
</SeriesDefinitions>
<Orientation>Vertical</Orientation>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>true</Visible>
</LineAttributes>
<Label>
<Caption>
<Value>&lt;undefined></Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type=3D"attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Label>
<LabelPosition>Left</LabelPosition>
<MajorGrid>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>196</Red>
<Green>196</Green>
<Blue>196</Blue>
</Color>
<Visible>false</Visible>
</LineAttributes>
<TickStyle>Across</TickStyle>
<TickAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>196</Red>
<Green>196</Green>
<Blue>196</Blue>
</Color>
<Visible>true</Visible>
</TickAttributes>
</MajorGrid>
<MinorGrid>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>225</Red>
<Green>225</Green>
<Blue>225</Blue>
</Color>
<Visible>false</Visible>
</LineAttributes>
<TickStyle>Across</TickStyle>
<TickAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>225</Red>
<Green>225</Green>
<Blue>225</Blue>
</Color>
<Visible>false</Visible>
</TickAttributes>
</MinorGrid>
<Scale>
<MinorGridsPerUnit>5</MinorGridsPerUnit>
</Scale>
<Origin>
<Type>Min</Type>
<Value xsi:type=3D"data:NumberDataElement">
<Value>0.0</Value>
</Value>
</Origin>
<PrimaryAxis>true</PrimaryAxis>
<Percent>false</Percent>
</AssociatedAxes>
<SeriesDefinitions>
<Query>
<Definition></Definition>
</Query>
<SeriesPalette>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>80</Red>
<Green>166</Green>
<Blue>218</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>242</Red>
<Green>88</Green>
<Blue>106</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>232</Red>
<Green>172</Green>
<Blue>57</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>255</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>64</Red>
<Green>128</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>128</Green>
<Blue>192</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>170</Red>
<Green>85</Green>
<Blue>85</Blue>
</Entries>
<Entries xsi:type=3D"attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>128</Green>
<Blue>0</Blue>
</Entries>
</SeriesPalette>
<Series>
<Visible>true</Visible>
<Label>
<Caption>
<Value>&lt;undefined></Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type=3D"attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
Re: Parameter binding on chart as subreport [message #157081 is a reply to message #156882] Fri, 28 April 2006 11:26 Go to previous message
David Michonneau is currently offline David MichonneauFriend
Messages: 1145
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0023_01C66AC7.64D080A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Yusuf,

You can't access script variables defined in a table from the chart =
directly. However you shouldn't need to do that, as you can access the =
parent's data easily, use the Expression builder to construct your data =
expression.

Thanks,

David
"Yusuf Aboobaker" <yusufa@zarafin.com> wrote in message =
news:e2r0o2$dlb$1@utils.eclipse.org...


Helo

My machine specs are:

OS:Windows xpsp2

Eclipse:Version: 3.1.1 Build id: M20050929-0840

Birt 2.0.1

jdk 1.5.0_02



My problem is when i create a chart and want to bind it to a dataset =
that has a parameter it throws an exception=20

A BIRT exception occurred: Error evaluating Javascript expression. =
Script engine error: ReferenceError: "bankid" is not defined.
Script source: ParamBinding(BANKID), line: 0, text:
bankid. See next exception for more information.
Error evaluating Javascript expression. Script engine error: =
ReferenceError: "bankid" is not defined.
Script source: ParamBinding(BANKID), line: 0, text:
bankid



I think i have declared the javascript variable in the container table =
row=20

bankid=3D row["BANKID"];

row["BANKID"];

I run the report in preview and it works perfectly eventhough the =
error occurs.



when i copy my report to the wep app in the live environment .... it =
fails saying

The DataSet bound to the chart returned no rows.



Attached you will find my rptdesign



Thanks in advance

Yusuf



------=_NextPart_000_0023_01C66AC7.64D080A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2873" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Yusuf,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>You can't access script variables =
defined in a=20
table from the chart directly. However you shouldn't need to do that, as =
you can=20
access the parent's data easily, use the Expression builder to construct =
your=20
data expression.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>David</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Yusuf Aboobaker" &lt;<A=20
href=3D"mailto:yusufa@zarafin.com">yusufa@zarafin.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:e2r0o2$dlb$1@utils.eclipse.org">news:e2r0o2$dlb$1@utils.ecli=
pse.org</A>...</DIV>
<DIV>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2>Helo</FONT></P>
<P><FONT face=3DArial size=3D2>My machine specs are:</FONT></P>
<P><FONT face=3DArial size=3D2>OS:Windows xpsp2</FONT></P>
<P><FONT face=3DArial size=3D2>Eclipse:Version: 3.1.1 </FONT><FONT =
face=3DArial=20
size=3D2>Build id: M20050929-0840</FONT></P>
<P><FONT face=3DArial size=3D2>Birt 2.0.1</FONT></P>
<P><FONT face=3DArial size=3D2>jdk 1.5.0_02</FONT></P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2>My problem is when i create a chart and =
want to=20
bind it to a dataset that has a parameter it throws an exception =
</FONT></P>
<P><FONT face=3DArial size=3D2>A BIRT exception occurred: Error =
evaluating=20
Javascript expression. Script engine error: ReferenceError: "bankid" =
is not=20
defined.<BR>&nbsp;Script source: ParamBinding(BANKID), line: 0,=20
text:<BR>bankid. See next exception for more information.<BR>Error =
evaluating=20
Javascript expression. Script engine error: ReferenceError: "bankid" =
is not=20
defined.<BR>&nbsp;Script source: ParamBinding(BANKID), line: 0,=20
text:<BR>bankid</FONT></P>
<P><FONT face=3DArial size=3D2></FONT>&nbsp;</P>
<P><FONT face=3DArial size=3D2>I think i have declared the javascript =
variable in=20
the container table row </FONT></P><FONT size=3D1>
<P>bankid=3D row[</FONT><FONT color=3D#2a00ff =
size=3D1>"BANKID"</FONT><FONT=20
size=3D1>];</P>
<P>row[</FONT><FONT color=3D#2a00ff size=3D1>"BANKID"</FONT><FONT=20
size=3D1>];</FONT></P>
<P><FONT face=3DArial size=3D2>I run the report in preview and it =
works perfectly=20
eventhough the error occurs.</FONT></P>
<P><FONT size=3D1></FONT>&nbsp;</P>
<P><FONT size=3D1><FONT face=3DArial size=3D2>when i copy my report to =
the wep app=20
in the live environment .... it fails saying</FONT></FONT></P>
<P><FONT size=3D1><FONT face=3DArial size=3D2>The DataSet bound to the =
chart=20
returned no rows.</FONT></FONT></P>
<P><FONT size=3D1><FONT face=3DArial size=3D2></FONT></FONT>&nbsp;</P>
<P><FONT size=3D1><FONT face=3DArial size=3D2>Attached you will find =
my=20
rptdesign</FONT></FONT></P>
<P><FONT size=3D1><FONT face=3DArial size=3D2></FONT></FONT>&nbsp;</P>
<P><FONT size=3D1><FONT face=3DArial size=3D2>Thanks in =
advance</FONT></FONT></P>
<P><FONT size=3D1><FONT face=3DArial size=3D2>Yusuf</FONT></FONT></P>
<P><FONT size=3D1><FONT face=3DArial=20
size=3D2></FONT>&nbsp;</P></FONT></DIV></BLOCKQUOTE ></BODY></HTML>

------=_NextPart_000_0023_01C66AC7.64D080A0--
Previous Topic:Charting in RCP application
Next Topic:how can I prepare data set inside of code and insert into report?
Goto Forum:
  


Current Time: Thu Dec 26 11:12:28 GMT 2024

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

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

Back to the top