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

shardalule

Members
  • Posts

    12
  • Joined

  • Last visited

shardalule's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Need to channge the backcolor of the cell in the crosstab through the same condition . How to change the backcolor through if and else condtion in the same conditional expression .Please help. Thanks and regards,
  2. Hello, I am using this condition expression in the same condition style condition exp: $V{state abbr}.toString() == "hawaii" || $V{population Measure}.intValue() > 0 and its showing only one background color which i assigned as red.But i want the back color should change on one conditon and on the other condition.some kind of if else condition.Please suggest how to write the expression in the condition set.
  3. Hi, I m using the crosstab but i want some of the data should appear in the different color in the crosstab.As depend on the conditions if some data is more than 1000 then it should appear in the red color. Please can anybody suggest me how to write the expression for the crosstab. Thanks and Regards,
  4. Hi, As you posted i have tried same like that but only the legend is showing the data but the chart label are not showing .please can you suggest me where i am going wrong. I am attaching the code and the also the pdf of the Output .please help. Regards, Code:<?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="chartexample1" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="163"/> <queryString language="SQL"> <![CDATA[select * from test.unitedstates;]]> </queryString> <field name="state" class="java.lang.String"/> <field name="city" class="java.lang.String"/> <field name="population" class="java.lang.Integer"/> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"/> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="61" splitType="Stretch"/> </columnHeader> <detail> <band height="125" splitType="Stretch"/> </detail> <columnFooter> <band splitType="Stretch"/> </columnFooter> <pageFooter> <band splitType="Stretch"/> </pageFooter> <summary> <band height="185" splitType="Stretch"> <pieChart> <chart> <reportElement x="68" y="18" width="200" height="100"/> <chartTitle/> <chartSubtitle/> <chartLegend/> </chart> <pieDataset> <keyExpression><![CDATA[$F{state}]]></keyExpression> <valueExpression><![CDATA[$F{population}]]></valueExpression> </pieDataset> <piePlot labelFormat="{1}" legendLabelFormat="{0}"> <plot/> <itemLabel color="#000000" backgroundColor="#FFFFFF"/> </piePlot> </pieChart> </band> </summary></jasperReport>
  5. I am not able to provide the lable inside the chart with the provided data the expression is not helping out.Please suggest some changes that will help me out. thanks and regards,
  6. Hello All, I am creating the Bar char but not able to provide the label to the chart .To the x axis and y axis .Please help and please tell me which property i need to change.what is Category axis tick label mask property. Pls help Thanks and regards,
  7. I have manually created the variable while using in the table its giving me error as "variable not found".Please suggest where i am going wrong. Thanks and regards, Code:<?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Sandeep_test" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <style name="table"> <box> <pen lineWidth="1.0" lineColor="#000000"/> </box> </style> <style name="table_TH" mode="Opaque" backcolor="#F0F8FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table_CH" mode="Opaque" backcolor="#BFE1FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table_TD" mode="Opaque" backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table 1"> <box> <pen lineWidth="1.0" lineColor="#000000"/> </box> </style> <style name="table 1_TH" mode="Opaque" backcolor="#F0F8FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table 1_CH" mode="Opaque" backcolor="#BFE1FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <subDataset name="Sandeep"> <queryString language="SQL"> <![CDATA[select g.name,count(h.hostid) as total_servers from hosts h inner join hosts_groups hg on hg.hostid = h.hostid inner join groups g on g.groupid = hg.groupid inner join hosts_profiles hp on hp.hostid = h.hostid where h.status = 0 and g.name like '%mum%' and g.name not like '%IT%' and g.name not like '%SOC%' and g.name not like '%COLL%' and g.name not like '%zabbix%' and g.name not like '%TGIM-TEST-APPL%' and g.name not like '%DEV_ORACLE_APPS%' group by g.name;]]> </queryString> <field name="name" class="java.lang.String"/> <field name="total_servers" class="java.lang.Long"/> </subDataset> <queryString language="SQL"> <![CDATA[select g.name,count(h.hostid) as total_servers from hosts h inner join hosts_groups hg on hg.hostid = h.hostid inner join groups g on g.groupid = hg.groupid inner join hosts_profiles hp on hp.hostid = h.hostid where h.status = 0 and g.name like '%mum%' and g.name not like '%IT%' and g.name not like '%SOC%' and g.name not like '%COLL%' and g.name not like '%zabbix%' and g.name not like '%TGIM-TEST-APPL%' and g.name not like '%DEV_ORACLE_APPS%' group by g.name;]]> </queryString> <field name="name" class="java.lang.String"/> <field name="total_servers" class="java.lang.Long"/> <variable name="Total" class="java.lang.Long" calculation="Sum"> <variableExpression><![CDATA[$F{total_servers}]]></variableExpression> </variable> <background> <band height="50"/> </background> <title> <band height="68"> <staticText> <reportElement x="34" y="13" width="134" height="27" forecolor="#00FFFF" backcolor="#CCFFFF"/> <textElement> <font fontName="Times New Roman" size="16"/> </textElement> <text><![CDATA[TGIM Server Data]]></text> </staticText> <image> <reportElement x="194" y="13" width="177" height="44"/> <imageExpression class="java.lang.String"><![CDATA["C:\\Documents and Settings\\idmlocal.TCS104491\\Desktop\\zabbix1.JPG"]]></imageExpression> </image> </band> </title> <summary> <band height="177" splitType="Stretch"> <componentElement> <reportElement key="table 1" style="table 1" x="18" y="12" width="76" height="51"/> <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="Sandeep"> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> </datasetRun> <jr:column width="124"> <jr:tableHeader style="table 1_TH" height="30" rowSpan="1"/> <jr:tableFooter style="table 1_TH" height="30" rowSpan="1"/> <jr:columnHeader style="table 1_CH" height="30" rowSpan="1"> <staticText> <reportElement x="0" y="0" width="90" height="30"/> <textElement/> <text><![CDATA[Name]]></text> </staticText> </jr:columnHeader> <jr:columnFooter style="table 1_CH" height="30" rowSpan="1"> <textField> <reportElement x="0" y="0" width="124" height="30"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$V{COLUMN_COUNT}]]></textFieldExpression> </textField> </jr:columnFooter> <jr:detailCell style="table 1_TD" height="20" rowSpan="1"> <textField> <reportElement x="0" y="0" width="90" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{name}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="133"> <jr:tableHeader style="table 1_TH" height="30" rowSpan="1"/> <jr:tableFooter style="table 1_TH" height="30" rowSpan="1"/> <jr:columnHeader style="table 1_CH" height="30" rowSpan="1"> <staticText> <reportElement x="0" y="0" width="90" height="30"/> <textElement/> <text><![CDATA[Total Server]]></text> </staticText> </jr:columnHeader> <jr:columnFooter style="table 1_CH" height="30" rowSpan="1"> <textField> <reportElement x="0" y="0" width="90" height="30"/> <textElement/> <textFieldExpression class="java.lang.Long"><![CDATA[$V{total}]]></textFieldExpression> </textField> </jr:columnFooter> <jr:detailCell style="table 1_TD" height="20" rowSpan="1"> <textField> <reportElement x="0" y="0" width="90" height="20"/> <textElement/> <textFieldExpression class="java.lang.Long"><![CDATA[$F{total_servers}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> </jr:table> </componentElement> </band> </summary></jasperReport>
  8. I have pasted the code below .The query contains only ten rows but while displaying the report it showing around 7 pages. Even i kept the table in the summary band but it stills repeating the values. Please suggest if possible. Thanks and regards Code:<?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Test1" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="98"/> <style name="table"> <box> <pen lineWidth="1.0" lineColor="#000000"/> </box> </style> <style name="table_TH" mode="Opaque" backcolor="#F0F8FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table_CH" mode="Opaque" backcolor="#BFE1FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table_TD" mode="Opaque" backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table 1"> <box> <pen lineWidth="1.0" lineColor="#000000"/> </box> </style> <style name="table 1_TH" mode="Opaque" backcolor="#F0F8FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table 1_CH" mode="Opaque" backcolor="#BFE1FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <subDataset name="Report"> <queryString language="SQL"> <![CDATA[ SELECT userid FROM users u limit 0,10]]> </queryString> <field name="userid" class="java.math.BigInteger"/> </subDataset> <subDataset name="New Dataset 1"> <queryString language="SQL"> <![CDATA[ SELECT userid FROM users u limit 0,10]]> </queryString> <field name="userid" class="java.math.BigInteger"/> </subDataset> <queryString language="SQL"> <![CDATA[sELECT userid FROM users u limit 0,10]]> </queryString> <field name="userid" class="java.math.BigInteger"/> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"/> </title> <pageHeader> <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="61" splitType="Stretch"/> </columnHeader> <detail> <band height="74" splitType="Stretch"> <componentElement> <reportElement key="table 1" style="table 1" x="47" y="10" width="90" height="48"/> <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="New Dataset 1"> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> </datasetRun> <jr:column width="90"> <jr:tableHeader style="table 1_TH" height="30"/> <jr:tableFooter style="table 1_TH" height="30"/> <jr:columnHeader style="table 1_CH" height="30"> <staticText> <reportElement x="0" y="0" width="90" height="30"/> <textElement/> <text><![CDATA[userid]]></text> </staticText> </jr:columnHeader> <jr:columnFooter style="table 1_CH" height="30"/> <jr:detailCell style="table 1_TD" height="20"> <textField> <reportElement x="0" y="0" width="90" height="20"/> <textElement/> <textFieldExpression class="java.lang.Number"><![CDATA[$F{userid}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> </jr:table> </componentElement> </band> </detail> <columnFooter> <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary></jasperReport>
  9. I m using the table in the iReport to present my report.The data is also displaying but the table gets repeated and the data also get repeated .I m having only 21 rows to display but its providing the ooutput of about 23 pages. I have checked all the properties but no good luck the data is repeating in the table and also the pages in the output is also increasing. Please suggest in which band i need to place the table and which properties i need to check to stop the repition of data. Thanks and regards,
  10. Created the table but the data is not displaying while previewing the data. Error is also not there .please suggest some idea.
  11. How to call the .jrxml file from other opensource and how to execute that particular report . Please suggest any idea how to do this .
  12. Hello All, I am new to this product.Not able to create the report in the table format.. Done the sql connection and the fields are dragged into the table but its giving the error as Field Not Found. Where i am going wrong.Please can somebody send me the URL for understading how to use table in the iReport. Thanks and regards,
×
×
  • Create New...