Jump to content
We've recently updated our Privacy Statement, available here ×

nitin403

Members
  • Posts

    73
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by nitin403

  1. Hi! to all. I need to create a report who's datasource is XML. But datasource is not in the format as required. I am using Servlet's to generate report and don't wish to do any modification in my servlet code. So I wish to change my datasource into CSV in run-time using scriplet. So is it possible to code a scriplet to change XML datasource into CSV? If yes, then how to do that. Thanks for you help in advance. Post edited by: nitin403, at: 2007/08/21 08:25
  2. Hi! to all. I am using iReport. I have created a variable as follows Variable Expression:- Float.valueOf ($F{itemamount}) Variable Name:-Amount Variable class Type:-java.lang.Float Reset Type:-Report Increment Type:-None Calculation Type:-Sum The field itemamount has three values 170.36 322.60 59.33 Total of these is 552.29 But I am getting 552.29004 And when I change the class type to Double It give me 552.290000001 Please suggest me what is going wrong and what is the remedy of it. Thanks in advance.
  3. Hi fabismt! Thanks a lot I am using iReport. But I don't know how to create variables and how to use them. I am a bit confused:blink: about using variables. What I want to do is get the summation of a field. The field has a Double value. And in the columnFooter I want to show the sum of that Field. Thanks a lot once again.
  4. Hi! to All. I need to get total of an Field. So How to add or sum an single field. Examples will also be very helpful. Thank you in advance.
  5. Hi! to All:) Is it Possible to query datasource passed/new to report. For some Reason I need to query from inside the report. My datasource is SQL. I want to fill a text field in detail band after querying the datasource. This Query will return a string. If this is possible:woohoo: Then please give me a small example of code. Since I am not good at coding of this types.:dry: Thank a lot in advance.
  6. Hi! To all. Is it possible to use excel as a datasource in Jasperreport. If yes :woohoo: then how can we do that. I don't have a good hand in coding for Excel. Thank for help in advance. P.S. Examples will be extremely helpful
  7. Hi javanewbie80! I am not an expert of the topic.:whistle: But the best idea I can give is 1). Somehow make your Querys to return a single datasource/ResultSet.(Find some guys from java/SQL to do that) 2). Use subreport and pass Datasource to the subreport as an parameter. Also try to study demo/samples/subreport examples. I know it is boring, but it will surely help U. By the way jasper we cannot pass 2 datasource at the same time and use to fill the fields. The reason for that maybe, that different datasource may have different Number of row and that might confuse the jasperengine. Also the fields in the detail band is execute the number of rows available in the DataSource. Post edited by: nitin403, at: 2007/08/03 13:15
  8. Hi! Thanks jwsmith22. But your idea doesn't gives the desire result's. Still, Thanks a lot. I trying to workaround using subreport to get the desire results.
  9. Hi lucianc and jwsmith22! Thank a lot lucianc and jwsmith22. Below is my XML datasource. In my report let say I need /MyReport/EvalData/Quarter/no and /MyReport/QHighLight/HeaderQH/subHeader feild to be used in my Report. I tried using pipe function but it fails to retrieve all the field,it gave me only first field. So my situation what should I do. Code:<?xml version="1.0" encoding="UTF-8"?> <MyReport> <EvalData> <Quarter> <no>Q306</no> <EvalValue>3</EvalValue> <CommonValue>Text1</CommonValue> </Quarter> <Quarter> <no>Q406</no> <EvalValue>1</EvalValue> <CommonValue>Text1</CommonValue> </Quarter> <Quarter> <no>Q107</no> <EvalValue>4</EvalValue> <CommonValue>Text</CommonValue> </Quarter> </EvalData> <QHighLight> <HeaderQH hdrText="Created IC Calculates and rolled out to field"> <subHeader>We are posting personalized IC Calculators every month</subHeader> <subHeader>Weghfgh are posting personalized IC Calculators every month</subHeader> </HeaderQH> <HeaderQH hdrText="Created SA(Sales Analysis) Reports and rolled out to field managers"> <subHeader>We are posting SA Reports every month</subHeader> </HeaderQH> <HeaderQH hdrText="Created Personalized web homepages with all current and revelant IC documents"> <subHeader>Created personalized Viewer homepages where the reps get links</subHeader> </HeaderQH> <HeaderQH hdrText="Reduced the proceeeing time for monthly processing"> <subHeader>Completing the non-payout month processing in just one week</subHeader> </HeaderQH> </QHighLight> <OutlookNQ> <Header1>1Create new IC Calculator Summary report and deliver the same in non payout month</Header1> <Header1>2Deliver Budget Management and Plan Effectiveness Reports cocurrent with the Payroll report.</Header1> </OutlookNQ> <SynygyCI> <Employee> <Name>Schering-Plough</Name> <Title>Healthcare Products</Title> <Phone_Number>610-494-3300x2129</Phone_Number> <Email_Add>proj129@synygy.com</Email_Add> </Employee> <Employee> <Name>Divid Grossberg</Name> <Title>Managing Consultant</Title> <Phone_Number>610-494-3300x(7045)</Phone_Number> <Email_Add>grossberg@synygy.com</Email_Add> </Employee> <Employee> <Name>Peter Lamb</Name> <Title>Managing Direntor</Title> <Phone_Number>610-494-3300x(7656)</Phone_Number> <Email_Add>lamb@synygy.com</Email_Add> </Employee> </SynygyCI> <ccur> <quarter no="1"> <Credit>210 </Credit> <TC>180</TC> </quarter> <quarter no="2"> <Credit>190 </Credit> <TC>160</TC> </quarter> <quarter no="3"> <Credit>175 </Credit> <TC>155</TC> </quarter> </ccur> </MyReport> Thanks a lot in advance.
  10. Thanks a billion shertage. It really helped a lot.:woohoo:
  11. I want to add bullets in my report. Currently I am doing it using Images. Does some one knows how to add bullets to report. I also would like to know how to add numberlist in reports. Thanks for your help in advance.:lol:
  12. Hi to All. I trying to use XML as my datasource using iReport. This is my source Code:<?xml version="1.0" encoding="UTF-8"?> <MyReport> <EvalData> <Quarter> <no>Q306</no> <EvalValue>3</EvalValue> <CommonValue>Text1</CommonValue> </Quarter> <Quarter> <no>Q406</no> <EvalValue>1</EvalValue> <CommonValue>Text1</CommonValue> </Quarter> <Quarter> <no>Q107</no> <EvalValue>4</EvalValue> <CommonValue>Text</CommonValue> </Quarter> </EvalData> <QHighLight> <HeaderQH hdrText="Created IC Calculates and rolled out to field"> <subHeader>We are posting personalized IC Calculators every month</subHeader> </HeaderQH> <HeaderQH hdrTest="Created SA(Sales Analysis) Reports and rolled out to field managers"> <subHeader>We are posting SA Reports every month</subHeader> </HeaderQH> <HeaderQH hdrTest="Created Personalized web homepages with all current and revelant IC documents"> <subHeader>Created personalized Viewer homepages where the reps get links</subHeader> </HeaderQH> <HeaderQH hrdtest="Reduced the proceeeing time for monthly processing"> <subHeader>Completing the non-payout month processing in just one week</subHeader> </HeaderQH> </QHighLight> <OutlookNQ> <Header1>2Deliver Budget Management and Plan Effectiveness Reports </Header1> <Header1>1Create new IC Calculator Summary report and deliver the same in non</Header1> </OutlookNQ> <SynygyCI> <Employee> <Name>Schering-Plough</Name> <Title>Healthcare Products</Title> <Phone_Number>610-494-3300x2129</Phone_Number> <Email_Add>proj129@synygy.com</Email_Add> </Employee> <Employee> <Name>Divid Grossberg</Name> <Title>Managing Consultant</Title> <Phone_Number>610-494-3300x(7045)</Phone_Number> <Email_Add>grossberg@synygy.com</Email_Add> </Employee> <Employee> <Name>Peter Lamb</Name> <Title>Managing Direntor</Title> <Phone_Number>610-494-3300x(7656)</Phone_Number> <Email_Add>lamb@synygy.com</Email_Add> </Employee> </SynygyCI> <ccur> <quarter no="1"> <Credit>210 </Credit> <TC>180</TC> </quarter> <quarter no="2"> <Credit>190 </Credit> <TC>160</TC> </quarter> <quarter no="3"> <Credit>175 </Credit> <TC>155</TC> </quarter> </ccur> </MyReport> My JRXML files is Code:[code]<?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="QuarterHL" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="2" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <queryString language="xPath"><![CDATA[/MyReport/QHighLight/HeaderQH]]></queryString> <field name="hdrText" class="java.lang.String"> <fieldDescription><![CDATA[@hdrText]]></fieldDescription> </field> <field name="subHeader" class="java.lang.String"> <fieldDescription><![CDATA[subHeader]]></fieldDescription> </field> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="50" isSplitAllowed="true" > </band> </title> <pageHeader> <band height="50" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="30" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="100" isSplitAllowed="true" > <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="37" y="10" width="312" height="26" key="textField-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{hdrText}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="37" y="46" width="311" height="34" key="textField-2"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{subHeader}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="30" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="50" isSplitAllowed="true" > </band> </pageFooter> <lastPageFooter> <band height="50" isSplitAllowed="true" > </band> </lastPageFooter> <summary> <band height="50" isSplitAllowed="true" > </band> </summary> </jasperReport> Whenever I run this files it shows only the first value and the rest is show null. I tried multiple combination's but none helped. Can anybody help me. And tell me where I am making the mistake. Thanks for your help in advance.
  13. Hi! I creating an report using XML files as datasource. I have tried using multiple combination of querying the datasource in iReport. But none were able give the correct result. Whenever I query the datasource it give either null or only the first value of the result. My XML datasource is Code:<?xml version="1.0" encoding="UTF-8"?> <MyReport> <EvalData> <Quarter> <no>Q3'06</no> <EvalValue>3</EvalValue> <CommonValue>Text1</CommonValue> </Quarter> <Quarter> <no>Q4'06</no> <EvalValue>1</EvalValue> <CommonValue>Text1</CommonValue> </Quarter> <Quarter> <no>Q1'07</no> <EvalValue>4</EvalValue> <CommonValue>Text</CommonValue> </Quarter> </EvalData> <QHighLight> <Header hdrText="Created IC Calculates and rolled out to field"> <subHeader>We are posting personalized IC Calculators every month.</subHeader> </Header> <Header hdrTest="Cteated SA(Sales Analysis) Reports and rolled out to field managers"> <subHeader>We are posting SA Reports every month.</subHeader> </Header> <Header hdrTest="Created Personalized web homepages with all current and revelant IC documents"> <subHeader>Created personalized Viewer homepages where the reps get links.</subHeader> </Header> <Header hrdtest="Reduced the proceeeing time for monthly processing"> <subHeader>Completing the non-payout month processing in just one week.</subHeader> </Header> </QHighLight> <OutlookNQ> <Header>1-Create new IC Calculator Summary report and deliver the same in non payout month</Header> <Header>2-Deliver Budget Management and Plan Effectiveness Reports concurrent with the Payroll report.</Header> </OutlookNQ> <SynygyCI> <Name>Schering-Plough</Name> <Title>Healthcare Products</Title> <Phone_Number>610-494-3300x2129</Phone_Number> <Email_Add>proj129@synygy.com</Email_Add> <Name>Divid Grossberg</Name> <Title>Managing Consultant</Title> <Phone_Number>610-494-3300x(7045)</Phone_Number> <Email_Add>grossberg@synygy.com</Email_Add> <Name>Peter Lamb</Name> <Title>Managing Direntor</Title> <Phone_Number>610-494-3300x(7656)</Phone_Number> <Email_Add>lamb@synygy.com</Email_Add> </SynygyCI> <ccur> <quarter no="1"> <Credit>210 </Credit> <TC>180</TC> </quarter> <quarter no="2"> <Credit>190 </Credit> <TC>160</TC> </quarter> <quarter no="3"> <Credit>175 </Credit> <TC>155</TC> </quarter> </ccur> </MyReport> My JRXML files is Code:[code]<?xml version="1.0" encoding="ISO-8859-1" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="OutlokkNQ" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="535" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenNoDataType="AllSectionsNoDetail" isTitleNewPage="false" isSummaryNewPage="true" whenResourceMissingType="Error"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="ISO-8859-1" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <queryString language="xPath"><![CDATA[/MyReport/OutlookNQ]]></queryString> <field name="Header" class="java.lang.String"> <fieldDescription><![CDATA[Header]]></fieldDescription> </field> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="33" isSplitAllowed="true" > <staticText> <reportElement mode="Opaque" x="0" y="0" width="266" height="28" backcolor="#CCCCCC" key="staticText"/> <box topBorder="Thin" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000" bottomBorder="Thin" bottomBorderColor="#000000"/> <textElement textAlignment="Left" verticalAlignment="Bottom" rotation="None" isStyledText="true" lineSpacing="Single"> <font fontName="Arial" size="18" isBold="true"/> </textElement> <text><![CDATA[Outlook for Next Quarter]]></text> </staticText> </band> </title> <pageHeader> <band height="80" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="44" isSplitAllowed="true" > <elementGroup><!-- Start: 1 !--> <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="17" y="7" width="389" height="30" key="textField-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement isStyledText="true"> <font fontName="Times New Roman" size="10" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{Header}]]></textFieldExpression> </textField> <image evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="6" y="7" width="11" height="10" key="image-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <graphicElement stretchType="NoStretch"/> <imageExpression class="java.lang.String"><![CDATA["C:\Documents and Settings\Jainn\My Documents\My Pictures\bullet.bmp"]]></imageExpression> </image> </elementGroup><!-- End 1 !--> </band> </detail> <columnFooter> <band height="0" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="90" isSplitAllowed="true" > </band> </pageFooter> <summary> <band height="0" isSplitAllowed="true" > </band> </summary> </jasperReport> Please help I have wasted days for this one but didn't got any fruitful result. Later on I am also going to query the complete data source. I have read many tutorials on Xpath also. Thank for your help in advance. Post edited by: nitin403, at: 2007/08/01 08:35
  14. Hi! I created a XML data source. But after connecting to the datasource it only show's the first value of it.:dry: Here is the XML datasource I am trying to using. <?xml version="1.0" encoding="UTF-8"?> <MyReport> <EvalData> <Quarter> <no>Q3'06</no> <EvalValue>24</EvalValue> </Quarter> <Quarter> <no>Q4'06</no> <EvalValue>3.6</EvalValue> </Quarter> <Quarter> <no>Q1'07</no> <EvalValue>3.7</EvalValue> </Quarter> </EvalData> <QHighLight> <Header hdrText="Created IC Calculates and rolled out to field"> <subHeader>We are posting personalized IC Calculators every month.</subHeader> </Header> <Header hdrTest="Cteated SA(Sales Analysis) Reports and rolled out to field managers"> <subHeader>We are posting SA Reports every month.</subHeader> </Header> <Header hdrTest="Created Personalized web homepages with all current and revelant IC documents"> <subHeader>Created personalized Viewer homepages where the reps get links.</subHeader> </Header> <Header hrdtest="Reduced the proceeeing time for monthly processing"> <subHeader>Completing the non-payout month processing in just one week.</subHeader> </Header> </QHighLight> <OutlookNQ> <Header>1-Create new IC Calculator Summary report and deliver the same in non payout month</Header> <Header>2-Deliver Budget Management and Plan Effectiveness Reports concurrent with the Payroll report.</Header> </OutlookNQ> <SynygyCI> <Name>Schering-Plough</Name> <Title>Healthcare Products</Title> <Phone_Number>610-494-3300x2129</Phone_Number> <Email_Add>proj129@synygy.com</Email_Add> <Name>Divid Grossberg</Name> <Title>Managing Consultant</Title> <Phone_Number>610-494-3300x(7045)</Phone_Number> <Email_Add>grossberg@synygy.com</Email_Add> <Name>Peter Lamb</Name> <Title>Managing Direntor</Title> <Phone_Number>610-494-3300x(7656)</Phone_Number> <Email_Add>lamb@synygy.com</Email_Add> </SynygyCI> <ccur> <quarter no="1"> <Credit>210 </Credit> <TC>180</TC> </quarter> <quarter no="2"> <Credit>190 </Credit> <TC>160</TC> </quarter> <quarter no="3"> <Credit>175 </Credit> <TC>155</TC> </quarter> </ccur> </MyReport> This is my JRXML files <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="CcurDemo" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <parameter name="CompanyLogo" isForPrompting="false" class="java.lang.String"> <defaultValueExpression ><![CDATA["102.gif"]]></defaultValueExpression> </parameter> <field name="hdrText" class="java.lang.String"> <fieldDescription><![CDATA[/MyReport/QHighLight/Header/@hdrText]]></fieldDescription> </field> <field name="subHeader" class="java.lang.String"> <fieldDescription><![CDATA[/MyReport/QHighLight/Header/subHeader]]></fieldDescription> </field> <field name="Header" class="java.lang.String"> <fieldDescription><![CDATA[/MyReport/OutlookNQ/Header]]></fieldDescription> </field> <field name="Name" class="java.lang.String"> <fieldDescription><![CDATA[/MyReport/SynygyCI/Name]]></fieldDescription> </field> <field name="Title" class="java.lang.String"> <fieldDescription><![CDATA[/MyReport/SynygyCI/Title]]></fieldDescription> </field> <field name="Credit" class="java.lang.String"> <fieldDescription><![CDATA[/MyReport/ccur/quarter/Credit]]></fieldDescription> </field> <field name="TC" class="java.lang.String"> <fieldDescription><![CDATA[/MyReport/ccur/quarter/TC]]></fieldDescription> </field> <field name="CCURTitle" class="java.lang.String"> <fieldDescription><![CDATA["This is Title" ]]></fieldDescription> </field> <field name="no" class="java.lang.String"> <fieldDescription><![CDATA[/MyReport/EvalData/Quarter/no]]></fieldDescription> </field> <field name="EvalValue" class="java.lang.Integer"> <fieldDescription><![CDATA[/MyReport/EvalData/Quarter/EvalValue]]></fieldDescription> </field> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="66" isSplitAllowed="true" > <textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="119" y="1" width="257" height="65" key="textField-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement textAlignment="Center" verticalAlignment="Middle"> <font pdfFontName="Helvetica-Bold" size="18" isBold="true" isItalic="false"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{CCURTitle}]]></textFieldExpression> </textField> <image evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="0" y="1" width="119" height="45" key="image-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <graphicElement stretchType="NoStretch"/> <imageExpression class="java.lang.String"><![CDATA["\Logo-RGB300dpi.jpg"]]></imageExpression> </image> <image evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="412" y="1" width="123" height="45" key="image-2"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <graphicElement stretchType="NoStretch"/> <imageExpression class="java.lang.String"><![CDATA["images\"+$P{CompanyLogo}]]></imageExpression> </image> </band> </title> <pageHeader> <band height="25" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="140" isSplitAllowed="true" > <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="311" y="9" width="166" height="34" key="textField-2"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{Header}]]></textFieldExpression> </textField> <stackedBar3DChart> <chart hyperlinkTarget="Self" > <reportElement x="11" y="0" width="215" height="133" key="element-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <chartLegend textColor="#000000" backgroundColor="#FFFFFF" > </chartLegend> </chart> <categoryDataset> <dataset > </dataset> <categorySeries> <seriesExpression><![CDATA[""]]></seriesExpression> <categoryExpression><![CDATA[$F{no}]]></categoryExpression> <valueExpression><![CDATA[$F{EvalValue}]]></valueExpression> <itemHyperlink > </itemHyperlink> </categorySeries> </categoryDataset> <bar3DPlot > <plot /> <categoryAxisFormat> <axisFormat > </axisFormat> </categoryAxisFormat> <valueAxisFormat> <axisFormat > </axisFormat> </valueAxisFormat> </bar3DPlot> </stackedBar3DChart> </band> </detail> <columnFooter> <band height="30" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="50" isSplitAllowed="true" > </band> </pageFooter> <lastPageFooter> <band height="50" isSplitAllowed="true" > </band> </lastPageFooter> <summary> <band height="50" isSplitAllowed="true" > </band> </summary> </jasperReport> I created this JRXML in iReport. When Execute this files it just prints the first value of EvalValue and the rest R not shown. Why is this happening and what is the remedies of it. Thanks for your Help in advance.
  15. Hi! First I create a post. Then I edited it. Every time I edit a post it create a new post. I don't know Y but to me it looks like a bug. Anyways, How do I remove one of my own posts. Thanks.
  16. Hi! I am trying pass an XML datasource as a parameter in HashMap Since I am using 2 diffrent datasource. I created a subreport. But I am not able to fill data into the subreport which takes XML data. I have attach the code of my Master JRXML is <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="JasperTest" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false" whenResourceMissingType="Empty"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <parameter name="Test" isForPrompting="false" class="java.lang.String"/> <parameter name="Image" isForPrompting="false" class="java.lang.String"> <defaultValueExpression ><![CDATA["102.gif"]]></defaultValueExpression> </parameter> <parameter name="No" isForPrompting="false" class="java.lang.String"> <defaultValueExpression ><![CDATA["Null some"]]></defaultValueExpression> </parameter> <queryString><![CDATA[sELECT * FROM dbo.TestJasper]]></queryString> <field name="EmpName" class="java.lang.String"/> <field name="EmpId" class="java.lang.String"/> <field name="Address" class="java.lang.String"/> <field name="City" class="java.lang.String"/> <field name="ChartData" class="java.lang.Integer"/> <field name="CharData1" class="java.lang.Integer"/> <background> <band height="0" isSplitAllowed="false" > </band> </background> <title> <band height="39" isSplitAllowed="false" > <staticText> <reportElement x="8" y="0" width="494" height="30" key="staticText-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font fontName="Times New Roman" pdfFontName="Times-Bold" size="24" isBold="true" isItalic="true" isUnderline="false" isPdfEmbedded ="true" isStrikeThrough="false" /> </textElement> <text><![CDATA[My Company]]></text> </staticText> </band> </title> <pageHeader> <band height="0" isSplitAllowed="false" > </band> </pageHeader> <columnHeader> <band height="14" isSplitAllowed="false" > <staticText> <reportElement x="0" y="0" width="80" height="13" key="staticText-2"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <text><![CDATA[Employees ID]]></text> </staticText> <staticText> <reportElement x="85" y="0" width="80" height="13" key="staticText-3"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <text><![CDATA[Emp Name]]></text> </staticText> <staticText> <reportElement x="170" y="0" width="80" height="13" key="staticText-4"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <text><![CDATA[Address]]></text> </staticText> <staticText> <reportElement x="255" y="0" width="70" height="13" key="staticText-5"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <text><![CDATA[City]]></text> </staticText> </band> </columnHeader> <detail> <band height="15" isSplitAllowed="true" > <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="0" y="0" width="86" height="15" forecolor="#000000" backcolor="#0033FF" key="textField-1" isRemoveLineWhenBlank="true"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font fontName="Times New Roman" size="12" isBold="true" isPdfEmbedded ="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{EmpId}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Transparent" x="180" y="0" width="73" height="15" forecolor="#000000" key="textField-3" isRemoveLineWhenBlank="true"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font fontName="Times New Roman" size="12" isBold="true" isPdfEmbedded ="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{Address}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="258" y="0" width="70" height="15" forecolor="#000000" backcolor="#0033FF" key="textField-4" isRemoveLineWhenBlank="true"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font fontName="Times New Roman" size="12" isBold="true" isPdfEmbedded ="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{City}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="91" y="0" width="84" height="15" forecolor="#000000" backcolor="#0033FF" key="textField-2" isRemoveLineWhenBlank="true"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font fontName="Times New Roman" size="12" isBold="true" isItalic="false" isPdfEmbedded ="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{EmpName}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="0" isSplitAllowed="false" > </band> </columnFooter> <pageFooter> <band height="0" isSplitAllowed="false" > </band> </pageFooter> <lastPageFooter> <band height="1" isSplitAllowed="false" > </band> </lastPageFooter> <summary> <band height="474" isSplitAllowed="false" > <image scaleImage="FillFrame" isUsingCache="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement mode="Transparent" x="174" y="-51" width="204" height="112" key="image-1" positionType="Float" isPrintRepeatedValues="false"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <graphicElement stretchType="NoStretch" pen="None"/> <imageExpression class="java.lang.String"><![CDATA["/images/"+$P{Image}]]></imageExpression> </image> <stackedBar3DChart> <chart hyperlinkType="RemotePage" hyperlinkTarget="Blank" bookmarkLevel="4" > <reportElement x="127" y="2" width="361" height="169" key="element-1" stretchType="RelativeToTallestObject"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <chartLegend textColor="#000000" backgroundColor="#FFFFFF" > </chartLegend> </chart> <categoryDataset> <dataset > </dataset> <categorySeries> <seriesExpression><![CDATA[$F{EmpName}]]></seriesExpression> <categoryExpression><![CDATA[$F{EmpName}]]></categoryExpression> <valueExpression><![CDATA[$F{ChartData}]]></valueExpression> <itemHyperlink hyperlinkType="Reference" hyperlinkTarget="Blank"> <hyperlinkReferenceExpression><![CDATA[$F{EmpName}]]></hyperlinkReferenceExpression> <hyperlinkParameter name="Test"> <hyperlinkParameterExpression><![CDATA[$F{EmpName}]]></hyperlinkParameterExpression> </hyperlinkParameter> </itemHyperlink> </categorySeries> </categoryDataset> <bar3DPlot > <plot /> <categoryAxisFormat> <axisFormat > </axisFormat> </categoryAxisFormat> <valueAxisFormat> <axisFormat > </axisFormat> </valueAxisFormat> </bar3DPlot> </stackedBar3DChart> <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="2" y="2" width="124" height="35" key="textField-5"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement isStyledText="true"> <font isPdfEmbedded ="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{Test}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="2" y="37" width="95" height="20" key="textField-6"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$P{No}]]></textFieldExpression> </textField> <subreport isUsingCache="true"> <reportElement x="2" y="173" width="514" height="299" key="subreport-1" isPrintWhenDetailOverflows="true"/> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression class="java.lang.String"><![CDATA["CCUR_Test.jasper"]]></subreportExpression> </subreport> </band> </summary> </jasperReport> and this my child JRXML <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="CCUR_Test" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="AllSectionsNoDetail" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <queryString language="xPath"><![CDATA[/ccur/quarter/*]]></queryString> <field name="no" class="java.lang.String"> <fieldDescription><![CDATA[no]]></fieldDescription> </field> <field name="Credit" class="java.lang.String"> <fieldDescription><![CDATA[Credit]]></fieldDescription> </field> <field name="TC" class="java.lang.String"> <fieldDescription><![CDATA[TC]]></fieldDescription> </field> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="45" isSplitAllowed="true" > <staticText> <reportElement x="33" y="26" width="95" height="16" key="staticText-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <text><![CDATA[No]]></text> </staticText> <staticText> <reportElement x="129" y="26" width="117" height="16" key="staticText-2"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <text><![CDATA[Credit]]></text> </staticText> <staticText> <reportElement x="246" y="25" width="120" height="17" key="staticText-3"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <text><![CDATA[Tc]]></text> </staticText> </band> </title> <pageHeader> <band height="0" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="25" isSplitAllowed="true" > <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="32" y="2" width="95" height="22" key="textField-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{no}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="130" y="4" width="114" height="19" key="textField-2"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{Credit}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="245" y="4" width="120" height="20" key="textField-3"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> <textElement> <font/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{TC}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="74" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="50" isSplitAllowed="true" > </band> </pageFooter> <lastPageFooter> <band height="50" isSplitAllowed="true" > </band> </lastPageFooter> <summary> <band height="50" isSplitAllowed="true" > </band> </summary> </jasperReport> My child JRXML shows correct output as a single Report. In Servlet which I created I am passing the XML datasource as Document in the HashMap() and passing this to the JasperRunManager. Can anybody please pointout the mistake I am doing and how to remove this mistake. Thank of your help in advance. [file name=JasperTest.jrxml size=11941]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/JasperTest.jrxml[/file]
  17. Hi! to all. Is it possible to convert an XML datasource into an instance of JRDataSource. If yes please give a small example(I really hate to read other sample programs or document). I really need to know. Thanks a lot in advance.
  18. Thanks A lot giroe. A Question. My both the datasource are not fixed. And in the JasperfillManager just take one connection object as far as I have seen. So how can I use 2 datasource for my report. Thank a lot for your help once again.
  19. Thanks for the Reply. Can please give me a simple example of it. Because I have no clue of how to do that. Let's assume I have a simple static report with no data in it. Now I want to insert a string in my report. Let that string="My string" OK. Now I create a field "xyz" in my JRXML template. 1). So What will be name format in the JRXML template 2). How in the runtime I will pass this parameter(My String). Once again Thank's a lot.:lol:
  20. Hi! I need to create a report which take XML as well as SQL data. My Report Need SQL data and Lotus Notes data. Since jasper doesn't support Lotus Notes data so we may convert Notes data into XML data manually. 1). Any Suggestion in how to convert Lotus Notes data into any usable datasource in jasperReport. 2). This is the main Q? That is it possible to use multiple datasource. If yes then how to do that. My thank's to you in advance. :)
  21. Hi! I have system to create Excel sheet all ready in place. So is it possible to convert those excel sheet into PDF using jasper. Thank a lot for your help in advance.
  22. Hi! I am new to JasperReport. Now I have create a JRXML files. I am able to create the reports. For some reason I need to pass few parameter in run time and display it in the report. So How do I pass parameter's to in jasperReport. And I how do I use that parameter's in jasperReport template(JRXML files). Thanks for your help in advance.:)
×
×
  • Create New...