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

kiran_3

Members
  • Posts

    6
  • 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 kiran_3

  1. here is my jrxml file <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.0.1.final using JasperReports Library version 6.0.0 --><!-- 2015-05-14T10:50:59 --><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="TestTestMultiQuery" pageWidth ="595" pageHeight ="842" columnWidth="555" leftMargin="20" rightMargin ="20" topMargin ="20" bottomMargin="20" uuid="90abb488-1239-4b84-865e-291aa3094758"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="mysql_db"/> <parameter name="source" class="java.util.Collection"/> <parameter name="p_source" class="java.lang.String" isForPrompting="false"> <defaultValueExpression> <![CDATA[((!$P{source}.isEmpty() && $P{source}!=null)?"":$P{source}.toString().replaceAll("[\[\]]", "'").replaceAll(", ", "', '"))]]> </defaultValueExpression> </parameter> <queryString> <![CDATA[select id,title,creator_id from need n where ($X{IN,n.source,p_source})]]> </queryString> <field name="id" class="java.lang.Long"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="title" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="creator_id" class="java.lang.Long"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <detail> <band height="125" splitType="Stretch"/> </detail></jasperReport>[/code]here, my parameter source is not-required param. when i tried running this report its showing me An error has occurred. Please contact your system administrator. (5321)[/code]If I make it manditory i am not getting this error. what might be the issue? and I tried a solution from internet for this kind of error but it(in tomcat/config/server.xml file urlencoding shoudd be utf-8) didn't work.
  2. i have table name say 'call_records' having sample data as follows id5member_id542call_duration97created2014-11-28 17:00:28statusansweredhere call_duration is varchar(255) i want get the call_duration time and show in a chart like , on x-axis points(call_duration) should be like 0-20 , 21-40, 41-60 and so on and each point will have a bar chart(if i took as bar chart while designing) having height of its count(ex:number of people who spoke between 0-20). how can i achieve this in jasper reprots, i can't really frame the question to search in google but even though i tried didn't get the expecetd solution . i am using jaspesoft studio.here is the query i am using to get call duration for every record. select vmc.created as 'date', vmc.call_duration as 'call_duration' from call_records as vmc where vmc.created between $P{startDate} AND $P{endDate}[/code]
  3. like this only right? i am new to this tool so i need to confirm $P{REPORT_PARAMETERS_MAP} $P{REPORT_CONNECTION} "callduation.jasper"
  4. i am trying to do a report which contains two charts in one report with two different queries which take same parameters. this is my jrxml file main report and sub-report respectively . when i preview my report first chat is coming while second chart is not coming,i am using jaspersoft studio professional in ubuntu 14, did i miss anything? <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.0.1.final using JasperReports Library version 6.0.0 --><!-- 2015-02-20T17:34:56 --><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="virtual_number" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="2c7c66ad-110f-4423-b087-53c5b107339b"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="mysql_db"/> <parameter name="startDate" class="java.util.Date"/> <parameter name="endDate" class="java.util.Date"/> <queryString> <![CDATA[select date(vnc.created) as 'date',sum(if(vnc.status='not_answered', 1,0)) as 'no answer', sum(if(vnc.status='answered', 1,0)) as 'Answered' ,sum(if(vnc.status is null, 1,0)) as 'nothing' from virtual_number_contacted as vnc where vnc.created between $P{startDate} AND $P{endDate} group by status]]> </queryString> <field name="date" class="java.lang.String"/> <field name="no answer" class="java.lang.Long"/> <field name="Answered" class="java.lang.Long"/> <field name="nothing" class="java.lang.Long"/> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"/> </title> <summary> <band height="506" splitType="Stretch"> <lineChart> <chart evaluationTime="Report"> <reportElement x="40" y="11" width="660" height="200" uuid="4bd5812c-6956-415a-ace6-8d16bb00ba6e"/> <chartTitle/> <chartSubtitle/> <chartLegend/> </chart> <categoryDataset> <categorySeries> <seriesExpression><![CDATA["answered"]]></seriesExpression> <categoryExpression><![CDATA[$F{date}]]></categoryExpression> <valueExpression><![CDATA[$F{Answered}]]></valueExpression> </categorySeries> <categorySeries> <seriesExpression><![CDATA["not-answered"]]></seriesExpression> <categoryExpression><![CDATA[$F{date}]]></categoryExpression> <valueExpression><![CDATA[$F{no answer}]]></valueExpression> </categorySeries> <categorySeries> <seriesExpression><![CDATA["nothing"]]></seriesExpression> <categoryExpression><![CDATA[$F{date}]]></categoryExpression> <valueExpression><![CDATA[$F{nothing}]]></valueExpression> </categorySeries> </categoryDataset> <linePlot> <plot/> <categoryAxisFormat> <axisFormat/> </categoryAxisFormat> <valueAxisFormat> <axisFormat/> </valueAxisFormat> </linePlot> </lineChart> <subreport> <reportElement x="3" y="210" width="750" height="200" uuid="230e6022-d9f9-4bcf-a75a-b5f42f1c5b05"/> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA["callduation.jasper"]]></subreportExpression> </subreport> </band> </summary></jasperReport>[/code]here is my sub-report <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="callduation" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="62f38574-322f-415e-a109-1595b0458790"> <parameter name="startDate" class="java.util.Date"/> <parameter name="endDate" class="java.util.Date"/> <queryString> <![CDATA[select vmc.created as 'date', sum(if(vmc.status='OPEN', 1,0)) as 'no answer' from need as vmc where vmc.created between $P{startDate} AND $P{endDate}]]> </queryString> <field name="date" class="java.sql.Timestamp"/> <field name="call_duration" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <detail> <band height="125" splitType="Stretch"/> </detail> <summary> <band height="237" splitType="Stretch"> <lineChart> <chart evaluationTime="Report"> <reportElement x="-20" y="37" width="578" height="200" uuid="8ea113c9-49b3-49de-beb0-13ca1a35ac3b"/> <chartTitle/> <chartSubtitle/> <chartLegend/> </chart> <categoryDataset> <categorySeries> <seriesExpression><![CDATA["SERIES 1"]]></seriesExpression> <categoryExpression><![CDATA[$F{date}]]></categoryExpression> <valueExpression><![CDATA[$F{call_duration}]]></valueExpression> </categorySeries> </categoryDataset> <linePlot> <plot/> <categoryAxisFormat> <axisFormat/> </categoryAxisFormat> <valueAxisFormat> <axisFormat/> </valueAxisFormat> </linePlot> </lineChart> </band> </summary></jasperReport>[/code]
  5. no it didn't work and its still prompting me the param to fill, it seems not a straight forward thing, my code is here http://pastebin.com/7QzHV5zp u can check and suggest me a work around. i am using jasper studio.
  6. I am new to jasper reports , I want to build a report which takes few fields among them few are required and few not required fields. I ran a sample report in jasper studio which has single parameter . how can I mention such non required parameters in the query . Required parameter can be mentioned as below. select * from member where first_name=$P{param_name}; is there anyway to put non-required field in that query, say when i run the report it asks me to enter that parameter rite , if i didn't give param value it doesn't execute the report. in my case if i give parameter take it show based on it else show me all records. can i do it using any if else condition?
×
×
  • Create New...