patricia.williams
-
Posts
28 -
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
Posts posted by patricia.williams
-
-
I have a variable that I've defined as a date. I have a timestamp that is read from my database.
<field name="eff_stop_ts" class="java.sql.Timestamp"/>
<variable name="lateday" class="java.sql.Date"><variableExpression><![CDATA[new java.util.Date()]]></variableExpression>I want to see if the timestamp > date$F{eff_stop_ts}.after($V{lateday}) ? "" : $F{holdoffice}which gets these errors:returning thisnet.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: $F{eff_stop_ts}.after($V{lateday}) ? "" : $F{holdoffice}at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:506)at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:481)at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:362)at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)Caused by: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: $F{eff_stop_ts}.after($V{lateday}) ? "" : $F{holdoffice}at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:264)at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:610)at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:578)at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:1015)at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:572)at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:556)at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:454)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2029)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:755)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:262)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:122)at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:551)at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:119)at java.lang.Thread.run(Unknown Source)Caused by: java.lang.ClassCastException: java.util.Date cannot be cast to java.sql.Dateat CandidateTreasurers_1485893188234_921646.evaluate(CandidateTreasurers_1485893188234_921646:250)at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:251)... 14 moreI also tried setting latedate to a timestamp and just doing eff_stop_ts > latedate and it returns errors as well. -
when you open the spreadsheet, its name is the sheet name. I'd like to set the sheet name to the date of creation.
-
-
Seems like the timeout for jasperadmin is about 5-10 minutes. I'd like to have it more like 30-45 minutes. I can't find anywhere to change the value.
-
XML source shows:
<field name="due_dt" class="java.sql.Date"/>
<field name="filed_ts" class="java.sql.Timestamp"/>
<![CDATA[select fe.filer_event_id, fe.filer_info_id, fe.filer_event_cd, fe.report_type_cd, fe.form_type_cd, fe.applicable_year,fe.period_start_dt, fe.period_end_dt, fe.due_dt, r.report_info_id, r.filed_ts, r.report_type_cd, r.form_type_cd,r.period_start_dt, r.period_end_dt, r.source_category_cd, f.filer_identfrom filer_event feinner join filer_info f on fe.filer_info_id=f.filer_info_idinner join filer_event_report fer on fe.filer_event_id=fer.filer_event_idinner join report_info r on fer.report_info_id=r.report_info_idwhere r.filed_ts is not nulland r.form_type_cd=$P{FilerType}and r.filed_ts >fe.due_dtand (fe.due_dt between to_date ($P{StartDate},'yyyy-mm-dd') and to_date ($P{EndDate},'yyyy-mm-dd') )and r.source_category_cd='ELECTRONIC'and r.report_type_cd not like '%EXCEED%'and r.report_type_cd not like '%A10%'and fe.filer_event_id not in (select fe.filer_event_id from filer_event feinner join filer_event_document fed on fe.filer_event_id=fed.filer_event_idinner join document_info d on fed.document_info_id=d.document_info_idwhere d.document_cd='LATEA'and (fe.due_dt between to_date ($P{StartDate},'yyyy-mm-dd') and to_date ($P{EndDate},'yyyy-mm-dd') ))order by f.filer_ident]]>This select means that r.filed_ts = 2017-01-17 15:15:15 when due_dt is 2017-01-17 turns up late. I want it such that any filed_ts up to 2017-01-17 24:60:59 is timely. So if I strip the timestamp from filed_ts so that I compare date to date, it would work. But I can't figure out how to do that solely within the select statement. -
jasperserver Version: 6.0.0Build: 20141128_1450
my report contains a title band with a customized title depending on input parameters and then the detail band contains a table for the subquery.
the table has a column header row which is repeated for each of my pdf pages. However, if I specify xlsx output, I don't want it to repeat. If I run the query directly from jasperserver and then use the file icon to select export as xlsx, I get my 2 rows of title and 1 row of column header. If I run the query via my visualize.js calls, I get 2 rows of title, and the column row is repeated every page. How do I get rid of that? I have the following properties in my jrxml
<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="ContributionsByFilerID" language="groovy" pageWidth="792" pageHeight="612" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="752" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="604b7d16-b321-4d3f-b4d7-290ff6ab6d3d"><property name="com.jaspersoft.studio.data.defaultdataadapter" value="TECInternal"/><property name="ireport.jasperserver.url" value="http://10.10.10.32:8082/jasperserver-pro/"/><property name="ireport.jasperserver.user" value="jasperadmin"/><property name="ireport.jasperserver.report.resource" value="/public/Test_Data/ContributionsByFilerID_files/main_jrxml"/><property name="ireport.jasperserver.reportUnit" value="/public/Test_Data/ContributionsByFilerID"/><property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/><property name="net.sf.jasperreports.export.xls.ignore.cell.background" value="true"/><property name="net.sf.jasperreports.export.xls.ignore.anchors" value="true"/><property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.1" value="pageFooter"/>I have tried <property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.2" value="columnHeader"/> but it changes nothing so I removed it.The following is the container I use. I get multiple rows of just column headers. The code $outputformat in red below is either pdf or xlsx.
Container code:
var t = encodeURIComponent("u=PUBLIC2|expireTime=';echo $expire;echo '");visualize({auth: {token: t,preAuth: true,tokenName: "tec-pp"}}, function (v) {//render report from provided resourcevar $button = $("#button");var is_ready = false;var export_pending = false;var report = v.report({resource: "';echo $reportString;echo '", container: "#container",';echo $parmString;echo ',error: handleError,success: onVisualizeReady});//show errorfunction handleError(err){alert(err.message);}function onVisualizeReady(){is_ready=true;if (export_pending) {alert("running pending")doExport();}}function doExport(){report.export({ outputFormat: "';echo $outputformat;echo '" }).done(function (link) {window.open(link.href); // open new window to download report}).fail(function (err) {alert(err.message);});}$button.click(function () {if (is_ready) {doExport();}else {alert("pending");export_pending = true;}}); -
when name= "Merrill Lynch, Pierce, Fenner & Smith, Inc." it does not split into 2 rows.
-
when name=Kkkkkkkkkk
and first_name=Deanna Rrrrrr
it doesn't split the line into 2 rows!
When it split the other one the Ssssssss part was on a line by itself in the excel. In the pdf it looks like it is on a line by itself but maybe not because it is right where there is a page break. I don't think you can actually tell in the pdf, one page has the Kkkkkkk, Amanda and the next page has the Ssssssss.
-
I have a text field defined
<textField isStretchWithOverflow="true" isBlankWhenNull="true"><reportElement x="30" y="0" width="120" height="20" uuid="dc57d609-c89f-444c-815f-5bad95e2d1e9"/><textElement verticalAlignment="Middle"><font size="10" isBold="true"/></textElement><textFieldExpression><![CDATA[$F{filer_persent_type_cd} == "ENTITY" ? $F{name} : $F{name}+", "+$F{filer_name_first}]]></textFieldExpression></textField>My query returns 1473 rows and out of all those rows only 1 row gets split into two seperate rows. The value for$name = Kkkkkkk$filer_name_first=Amanda SsssssssWhen you see it in the pdf, Sssssss part is on a line all by itself. Same is true if I export to xlsx, it gets its own row. Does it have to do with the lenght of filer_name_first? I have some $name that are bigger than this length but they are all in name and not name+,+first.Here are the properties I have in my xml:<property name="com.jaspersoft.studio.data.defaultdataadapter" value="TECInternal"/><property name="ireport.jasperserver.url" value="http://10.10.10.32:8082/jasperserver-pro/"/><property name="ireport.jasperserver.user" value="jasperadmin"/><property name="ireport.jasperserver.report.resource" value="/public/StaticLists/RegisterdLobbyistsByYear_files/main_jrxml"/><property name="ireport.jasperserver.reportUnit" value="/public/StaticLists/RegisterdLobbyistsByYear"/><property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/><property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/><property name="net.sf.jasperreports.export.xls.ignore.cell.background" value="true"/><property name="net.sf.jasperreports.export.xls.ignore.anchors" value="true"/><property name="net.sf.jasperreports.export.xls.white.page.background" value="false"/><property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.1" value="title"/><property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.2" value="pageHeader"/><property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.3" value="pageFooter"/><property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.4" value="columnHeader"/><property name="net.sf.jasperreports.export.xls.show.gridlines" value="true"/><property name="net.sf.jasperreports.export.xls.ignore.graphics" value="true"/><property name="net.sf.jasperreports.export.xls.collapse.row.span" value="true"/> -
After I closed the application this weekend and logged back in today, preview no longer complains about an unknown column. I really don't understand why this app flags errors and after a close/ reopen the app no longer complains!
Nor why I can close the application and my workspace directory shows no red X over my project explorer directory or jrmlx file afer successful compiles and previews. But when I reopen, it goes back to having the red X before you even open it again.
Strange behavior to say the least (and frustrating!!)
-
Here's the jrxml without the concat of the two fields
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 -->
<!-- 2016-04-04T15:13:53 -->
<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="RegisterdLobbyistsByYear" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="7a5c9b49-9dc5-422a-ac69-e92cf61ef530">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="TECInternal"/>
<property name="ireport.jasperserver.url" value="http://10.10.10.32:8082/jasperserver-pro/"/>
<property name="ireport.jasperserver.user" value="jasperadmin"/>
<property name="ireport.jasperserver.report.resource" value="/public/StaticLists/RegisterdLobbyistsByYear_files/main_jrxml"/>
<property name="ireport.jasperserver.reportUnit" value="/public/StaticLists/RegisterdLobbyistsByYear"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
<property name="net.sf.jasperreports.export.xls.ignore.cell.background" value="true"/>
<property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.1" value="title"/>
<property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.2" value="pageHeader"/>
<property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.3" value="pageFooter"/>
<property name="net.sf.jasperreports.export.xls.show.gridlines" value="true"/>
<property name="net.sf.jasperreports.export.xls.ignore.graphics" value="true"/>
<style name="Title" forecolor="#FFFFFF" fontName="Times New Roman" fontSize="50" isBold="false"/>
<style name="SubTitle" forecolor="#CCCCCC" fontName="Times New Roman" fontSize="18" isBold="false"/>
<style name="Column header" forecolor="#666666" fontName="Times New Roman" fontSize="14" isBold="true"/>
<style name="Detail" mode="Transparent" fontName="Times New Roman"/>
<style name="Row" mode="Transparent" fontName="Times New Roman" pdfFontName="Times-Roman">
<conditionalStyle>
<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression>
<style mode="Opaque" backcolor="#F0EFEF"/>
</conditionalStyle>
</style>
<parameter name="Year" class="java.lang.String"/>
<queryString>
<![CDATA[SELECT DISTINCT
filer_ident,
filer_name_last, filer_name_first, filer_name_middle, filer_name_organization,
filer_persent_type_cd, primary_business, lobby_reporting_interval_cd,
addr_1, addr_2, city, state_cd, region, postal_code, country_cd, phone_number
from tecadhoc.lobby_client_list($P{Year}) order by filer_ident]]>
</queryString>
<field name="filer_ident" class="java.lang.String"/>
<field name="filer_name_last" class="java.lang.String"/>
<field name="filer_name_first" class="java.lang.String"/>
<field name="filer_name_middle" class="java.lang.String"/>
<field name="filer_name_organization" class="java.lang.String"/>
<field name="filer_persent_type_cd" class="java.lang.String"/>
<field name="primary_business" class="java.lang.String"/>
<field name="lobby_reporting_interval_cd" class="java.lang.String"/>
<field name="addr_1" class="java.lang.String"/>
<field name="addr_2" class="java.lang.String"/>
<field name="city" class="java.lang.String"/>
<field name="state_cd" class="java.lang.String"/>
<field name="region" class="java.lang.String"/>
<field name="postal_code" class="java.lang.String"/>
<field name="country_cd" class="java.lang.String"/>
<field name="phone_number" class="java.lang.String"/>
<group name="Group1">
<groupExpression><![CDATA[(int)($V{REPORT_COUNT}/15)]]></groupExpression>
</group>
<group name="Group2">
<groupExpression><![CDATA[(int)($V{REPORT_COUNT}/5)]]></groupExpression>
</group>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="102" splitType="Stretch">
<image onErrorType="Blank">
<reportElement x="725" y="0" width="77" height="102" uuid="651ccc4b-e999-40fe-bcbf-1f25bcfc98af"/>
<imageExpression><![CDATA["repo:/public/publicData/image/WhiteCapitolDome_BlueBackground"]]></imageExpression>
</image>
<frame>
<reportElement mode="Opaque" x="0" y="0" width="721" height="66" backcolor="#000000" uuid="d8d9e644-3a32-491d-97cb-a277aff17133"/>
<staticText>
<reportElement x="0" y="0" width="721" height="30" forecolor="#FFFFFF" uuid="13d40517-c3ed-41c3-b3bd-81699b9c30ef"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="22" isBold="false"/>
</textElement>
<text><![CDATA[Texas Ethics Commission ]]></text>
</staticText>
<textField>
<reportElement x="0" y="32" width="721" height="30" forecolor="#FFFFFF" uuid="9e9caab2-4e23-495a-91d1-fe40b600efee"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="20"/>
</textElement>
<textFieldExpression><![CDATA[$P{Year}+" LIST OF REGISTERED LOBBYISTS"]]></textFieldExpression>
</textField>
</frame>
<frame>
<reportElement mode="Opaque" x="0" y="67" width="721" height="32" forecolor="#000000" backcolor="#7CCBFC" uuid="b0c895f6-6dbd-477d-9858-9ad66af087e1"/>
<textField pattern="MMMMM dd, yyyy">
<reportElement x="0" y="0" width="721" height="32" forecolor="#FFFFFF" uuid="a33fce3b-20c1-4696-873a-fe134d1e7d88"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="12"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</frame>
</band>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<detail>
<band height="20" splitType="Stretch">
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement x="30" y="0" width="120" height="20" uuid="dc57d609-c89f-444c-815f-5bad95e2d1e9"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{filer_persent_type_cd}.equals("ENTITY") ? $F{filer_name_organization} : $F{filer_name_last}+", "+$F{filer_name_first}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="216" y="0" width="150" height="20" uuid="81ccf5bf-1a02-42dc-8c9d-f307e75320fc">
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{addr_1}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement x="366" y="0" width="70" height="20" uuid="4a8bd66a-fa16-4fbf-ad4b-04fd691ef3b1"/>
<textElement verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{addr_2}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="436" y="0" width="71" height="20" uuid="0f545c95-f34b-44da-98e7-7b577cb9096b"/>
<textElement textAlignment="Justified" verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{city}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="507" y="0" width="40" height="20" uuid="5135a86f-c2a9-4caf-a4d3-39b3705f29e5"/>
<textElement verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{state_cd}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="547" y="0" width="81" height="20" uuid="352e2ee6-cd1c-4c44-9a7a-dd64c54ad118"/>
<textElement verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA[$F{postal_code}]]></textFieldExpression>
</textField>
<textField pattern="" isBlankWhenNull="true">
<reportElement x="628" y="0" width="100" height="20" uuid="a65e53e5-dd53-428e-aa54-732fd8a68457"/>
<textElement verticalAlignment="Middle">
<font size="9"/>
</textElement>
<textFieldExpression><![CDATA["("+$F{phone_number}.substring(0,3)+")"+$F{phone_number}.substring(3,6)+"-"+$F{phone_number}.substring(6)]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="false">
<reportElement x="150" y="0" width="66" height="20" uuid="86e8f2fc-a82b-4dbd-85c0-c81f9ef4c8fe">
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{filer_ident}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="2" y="0" width="28" height="20" uuid="34adc2ef-6a90-4e4a-a0d0-1b8a14d3cbf2">
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
</textField>
</band>
</detail>
<pageFooter>
<band height="25" splitType="Stretch">
<frame>
<reportElement mode="Opaque" x="0" y="0" width="802" height="25" forecolor="#D0B48E" backcolor="#000000" uuid="ffb10ec8-0371-4545-8eaa-96d62ad3cec0"/>
<textField evaluationTime="Report">
<reportElement style="Column header" x="757" y="3" width="40" height="20" forecolor="#FFFFFF" uuid="b5521ea6-5f36-4864-856f-58d0bcd011f2"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Column header" x="677" y="3" width="80" height="20" forecolor="#FFFFFF" uuid="e625ea3c-1741-4cfe-81cf-fbbdd00162c8"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField pattern="EEEEE dd MMMMM yyyy">
<reportElement style="Column header" x="2" y="3" width="197" height="20" forecolor="#FFFFFF" uuid="0c9f7e91-d3f5-47f9-82b7-0b2b3a43a5d6"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</frame>
</band>
</pageFooter>
<summary>
<band splitType="Stretch"/>
</summary>
</jasperReport>
-
I am not using any scriplets.
-
No error if I call out the names, but if I do that then I get all the name_last alphabetized first followed by all the name_organization alphabetized at the end. I want to alphabetize them regardless of type.
-
The xml is very simple and no complaints from dataset and Query Dialog wizard and I can preview my list:
SELECT DISTINCT filer_ident, filer_name_organization, filer_name_last, filer_name_first, filer_name_middle,filer_persent_type_cd, primary_business,lobby_reporting_interval_cd, addr_1, addr_2, city, state_cd,region, postal_code, country_cd, phone_numberFROM tecadhoc.list_lobby_clients_2016The tecadhoc.list_lobby_clients_2016 is a database view, not a database table. Depending on a type code, either filer_name_organization or filer_name_last is null. I want to combine filer_name_organization and filer_name_last so that I can order by name. So I change the xml toSELECT DISTINCT filer_ident, concat(filer_name_organization, filer_name_last) as name, filer_name_first, filer_name_middle,filer_persent_type_cd, primary_business,lobby_reporting_interval_cd, addr_1, addr_2, city, state_cd,region, postal_code, country_cd, phone_numberFROM tecadhoc.list_lobby_clients_2016order by nameThe database wizard doesn't complain about syntax. But preview gives the errorField not found: filer_name_organization --- net.sf.jasperreports.engine.design.JRDesignExpression@7528da35 (and same error for filer_name_last)Why is that? I also tried coaelse of the two as name and it complains. I know it lets me do this if it is a table, why not a view? -
I have created a report using Jaspersoft 6.1 and it is installed on myJasper Server build 20141128_1450. When I run the report, one of my text field parameters is a hyperlink to a document existing elsewhere in my network. It works fine. If I click on the export As PDF, the report is viewable in another browser window with a url as http://10.10.10.32:8082/jasperserver-pro/flow.html/flowFile/C_EsummaryTotalsStatic.pdf and the links work just fine. However, I want this report to exists somewhere else on my network for others to view/use. But after a copy, the links are not active. What am I doing wrong? Or how do I export the pdf with working links to put somewhere on my network for public viewing?
-
they are in the report, main has StartDate,EndDate parameters, table subreport has Start, End parameters, table has dataset parameters mapped with Start->StartDate, End->EndDate. The main query is select 1 as dummy. The table query from jrxml is
<queryString>
<![CDATA[select *
from (
select c.contribution_amount, to_char(c.contribution_dt,'mm-dd-yyyy') as date,
c.contribution_descr, c.report_info_id,
p.name_last, p.name_first,
concat(p.name_last, concat(' ,',p.name_first)) as name,p.name_organization,persent_type_cd,
p.employer,p.occupation,p.job_title,
a.city, a.state_cd, a.postal_code,
r.report_info_ident, r.filer_info_id,r.report_type_cd
from contribution_info c
inner join contribution_persent cp on c.contribution_info_id=cp.contribution_info_id
inner join persent_info p on cp.persent_info_id=p.persent_info_id
inner join persent_address pa on p.persent_info_id=pa.persent_info_id
inner join address_info a on pa.address_info_id=a.address_info_id
inner join report_info r on c.report_info_id=r.report_info_id
where 1=1
and $P!{CNameClause}
and (c.contribution_dt between $P{Start} and $P{End}) ) A
INNER JOIN (
select f1.filer_ident,f1.filer_info_id as FILER_ID, fp1.filer_persent_kind_cd,
p1.name_last as FILER_LAST, p1.name_first as FILER_FIRST,p1.name_organization as FILER_ENTITY, p1.persent_type_cd as FILER_TYPE
from filer_info f1
inner join filer_persent fp1 on f1.filer_info_id=fp1.filer_info_id
inner join persent_info p1 on fp1.persent_info_id=p1.persent_info_id
where fp1.filer_persent_kind_cd='FILER') B
on A.filer_info_id = B.FILER_ID]]>
</queryString>and again here is the jasperlog complaining about the type
2015-09-02 15:53:45,538 DEBUG JRJdbcQueryExecuter,ContributionsByContribName subreports #1:396 - Parameter #1 (Start of type java.lang.String): 2013-01-01
2015-09-02 15:53:45,539 DEBUG JRJdbcQueryExecuter,ContributionsByContribName subreports #1:396 - Parameter #2 (End of type java.lang.String): 2015-12-31 -
woops, here is the jasperlog
2015-09-02 15:53:45,538 DEBUG JRJdbcQueryExecuter,ContributionsByContribName subreports #1:396 - Parameter #1 (Start of type java.lang.String): 2013-01-01
2015-09-02 15:53:45,539 DEBUG JRJdbcQueryExecuter,ContributionsByContribName subreports #1:396 - Parameter #2 (End of type java.lang.String): 2015-12-31
2015-09-02 15:53:45,542 ERROR JRFillSubreport,pool-9-thread-106:840 - Fill 1: exception
net.sf.jasperreports.engine.JRException: Error executing SQL statement for : ContributionsByContribName_ContributorsFiler_1441227207148_917879maybe i should also add that studio puts up this error when I do the read fields inside the dataset query dialog:
operator does not exist: date >=character varying
No operator matches the given name & argument type.
You might need explicit type casts.
-
the database is postgres, and it is the same for studio 6.1 and jasperserver 6.0, when I did preview in studio I got
net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error executing SQL statement for: ContributionsByContribName_ContributorsFiler_1441227044181_117244.
So I pushed it over to the server to see what that meant and see in my browser
net.sf.jasperreports.engine.JRException: Error executing SQL statement for : ContributionsByContribName_ContributorsFiler_1441227207148_917879
and this in the jasperserver.log
net.sf.jasperreports.engine.JRException: Error executing SQL statement for : ContributionsByContribName_ContributorsFiler_1441227207148_917879
-
i think this problem is related to type casting. I prompt for a date and it is a string, $P{start}. I want to use it in my subquery where the query has something like
where $P!{CNameClause} and (c.contribution_dt between $P{Start} and $P{End})
If I push it to the server and run it so I can find the sql output, I have where c.contribution_name like 'vander%' and (c.contribution_dt between ? and ?) causing an exception
Is there a way to define a new $P{DateBegin} say as a sql.date and convert $P{Start}? What would the $P{DateBegin} look like in the expression viewer?
-
here's what the server shows on the where clause when I push it over to the server and run it there
from contribution_info c
inner join contribution_persent cp on c.contribution_info_id=cp.contribution_info_idinner join persent_info p on cp.persent_info_id=p.persent_info_idinner join persent_address pa on p.persent_info_id=pa.persent_info_idinner join address_info a on pa.address_info_id=a.address_info_idinner join report_info r on c.report_info_id=r.report_info_idwhere 1=1and c.contribution_dt between ? and ?and (lower(p.name_last) like 'vandergrif' or lower(p.name_organization) like 'vandergrif') -
also I setup StartDate and EndDate as java.sql.date
-
My postgres db has a date field and pgadmin query
select * from contribution_info where contribution_dt between '2015-01-01' and '2015-12-31'
results in a dt field like "2015-06-15" . When I try to preview my studio report i get prompts for StartDate and EndDate and I fill those in with 2015-01-01 and 2015-12-31 respectively. However, I get the java exception then that says net.sf.jasperreports.engine.JRException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date
What am I doing wrong? Here's the snippet of dataset query that has the date clause
and c.contribution_dt between $P{StartDate} and $P{EndDate}
-
My query runs fine under pgadmin query tool but the dataset and query dialog wizard gives the error. Here's the query
select f.filer_ident, f.filer_info_id, r.report_info_ident, r.report_type_cd, r.info_only_flag,to_char(c.contribution_dt,'fmMonth dd, yyyy') as cdate, c.contribution_amount, c.contribution_descr,concat(p.name_last,concat(',',p.name_first)) as name, p.name_organization, p.employer, p.occupation, p.job_title,a.city,a.state_cd, a.postal_codefrom filer_info fleft join report_info r on f.filer_info_id = r.filer_info_id and r.info_only_flag != 'Y' and (r.report_type_cd !='SS' and r.report_type_cd not like 'DAILY%')left join contribution_info c on r.report_info_id = c.report_info_id and c.itemize_flag = 'Y'left join contribution_persent cp on c.contribution_info_id=cp.contribution_info_idleft join persent_info p on cp.persent_info_id=p.persent_info_idleft join persent_address pa on cp.persent_info_id=pa.persent_info_idleft join address_info a on pa.address_info_id=a.address_info_idwhere f.filer_info_id=$P{FilerInfoID} order by name -
we have a contract for JasperReports and I thought we get the professional version of JasperSoft for free. After something got corrupted, a google hit said remove your .metadata and restart. Now when I restart, it is asking for a license (expiration 5/6/15). When I logged in to support and downloaded the professional version, no license was asked for. Where do I get my license? Is it the same one I will use for JasperReports?
how to upgrade studio 6.3.0?
in Products
Posted
I've seen TIBCO announcements and was wondering how to go about upgrading my 6.3.0.Final version to 6.4.x? Is there a wiki page or a how to article somewhere?