moyphus Posted June 28, 2010 Share Posted June 28, 2010 How to create table in ireport...It throws an errorCode:<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"> <datasetRun subDataset="RequestApproval"> <dataSourceExpression><![CDATA[$F{requestApproval}]]></dataSourceExpression> </datasetRun> <jr:column width="90"> <jr:columnHeader style="table 1_CH" height="30"> <staticText> <reportElement x="0" y="0" width="90" height="30"/> <textElement/> <text><![CDATA[ApprovalId]]></text> </staticText> </jr:columnHeader> <jr:detailCell style="table 1_TD" height="20"> <textField> <reportElement x="0" y="0" width="90" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{ApprovalId}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="90"> <jr:columnHeader style="table 1_CH" height="30"> <staticText> <reportElement x="0" y="0" width="90" height="30"/> <textElement/> <text><![CDATA[status]]></text> </staticText> </jr:columnHeader> <jr:detailCell style="table 1_TD" height="20"> <textField> <reportElement x="0" y="0" width="90" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{Status}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="90"> <jr:columnHeader style="table 1_CH" height="30"> <staticText> <reportElement x="0" y="0" width="90" height="30"/> <textElement/> <text><![CDATA[statusDescription]]></text> </staticText> </jr:columnHeader> <jr:detailCell style="table 1_TD" height="20"> <textField> <reportElement x="0" y="0" width="90" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{StatusDescription}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="90"> <jr:columnHeader style="table 1_CH" height="30"> <staticText> <reportElement x="0" y="0" width="90" height="30"/> <textElement/> <text><![CDATA[ApprovalType]]></text> </staticText> </jr:columnHeader> <jr:detailCell style="table 1_TD" height="20"> <textField> <reportElement x="0" y="0" width="90" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{ApprovalType}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="90"> <jr:columnHeader style="table 1_CH" height="30"> <staticText> <reportElement x="0" y="0" width="90" height="30"/> <textElement/> <text><![CDATA[RecordUpdatedUserId]]></text> </staticText> </jr:columnHeader> <jr:detailCell style="table 1_TD" height="20"> <textField> <reportElement x="0" y="0" width="90" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{RecordUpdatedUserId}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="90"> <jr:columnHeader style="table 1_CH" height="30"> <staticText> <reportElement x="0" y="0" width="90" height="30"/> <textElement/> <text><![CDATA[RecordUpdatedOn]]></text> </staticText> </jr:columnHeader> <jr:detailCell style="table 1_TD" height="20"> <textField> <reportElement x="0" y="0" width="90" height="20"/> <textElement/> <textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{RecordUpdatedOn}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="90"> <jr:columnHeader style="table 1_CH" height="30"> <staticText> <reportElement x="0" y="0" width="90" height="30"/> <textElement/> <text><![CDATA[RequestId]]></text> </staticText> </jr:columnHeader> <jr:detailCell style="table 1_TD" height="20"> <textField> <reportElement x="0" y="0" width="90" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{RequestId}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="90"> <jr:columnHeader style="table 1_CH" height="30"> <staticText> <reportElement x="0" y="0" width="90" height="30"/> <textElement/> <text><![CDATA[ApprovedBy]]></text> </staticText> </jr:columnHeader> <jr:detailCell style="table 1_TD" height="20"> <textField> <reportElement x="0" y="0" width="90" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{ApprovedBy}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> </jr:table> Link to comment Share on other sites More sharing options...
danielsb2 Posted June 28, 2010 Share Posted June 28, 2010 What is the error?Remember to use in the table only the Fields of your subdataset "RequestApproval"You cannot use other Fields.... but i'm not know it is the problem... i need you send the error...If interest, i made a video showing how to use the table:http://bit.ly/cY4xMH (audio only in portuguese, but i think you will not need the audio) Post Edited by danielsb2 at 28/06/2010 11:55 Link to comment Share on other sites More sharing options...
naseem Posted September 13, 2011 Share Posted September 13, 2011 HiI am in desparate need of using table with in IREPORT but couldnot populate it with date. Can u send me the video on hasilpur@hotmai.com.I will be highly oblidged.thanks in advance.Ahmad Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now