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

Portlight

Members
  • Posts

    138
  • 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 Portlight

  1. I have a report that I need to be able to utlilize by creating a side by side output but using two different time frames - any ideas? Right now I pass a startdate and an enddate - I am wondering if I could create a startdate2 and enddate2 as variables to populate a dataset?
  2. SOLUTION 1. create my report 2. create a bat file - called it report.bat in which the repository is exported and then JUST the files I want to be available for the client are moved to a rootlevel directory bat file: call js-export --uris /ContentFiles/Covington --output-dir D:\ReportsTest echo moving files to reportTest move D:\ReportsTest\resources\ContentFiles\Covington\*.csv D:\creditcardpayments This did exactly what I needed - I then created a scheduled task so that exports are done daily and a record is kept. works
  3. iReport is not an option for me - however I did find a solution. 1. create my report 2. create a bat file - called it report.bat in which the repository is exported and then JUST the files I want to be available for the client are moved to a rootlevel directory bat file: call js-export --uris /ContentFiles/Covington --output-dir D:\ReportsTest echo moving files to reportTest move D:\ReportsTest\resources\ContentFiles\Covington\*.csv D:\creditcardpayments This did exactly what I needed - I then created a scheduled task so that exports are done daily and a record is kept. works
  4. I need to export a file to a simple root directory NOT resources\ContentFiles\Newdirectory JUST TO newDirectory is there anyway at all to do this Our clients do not want to have to drill down to get the reports we have exported!
  5. Just in case others need this! My mistake was not navigating to the correct directory where the js-export script is housed. Once i was in the correct directory the above command line worked so this is the correct version: d:\jasper3.7directory/scripts/js-export --uris = ContentFiles/Covington --output-di r = c:\covington
  6. You can use the js-export function to send the reports to a folder outside of the database - the reports are stored as pdf's. You can not at this point store the reports elsewhere on a server than in the repository. The command for storing a report somewhere besides the jaspserserver js-export --uris /ContentFiles/Covington --output-dir c:\covington where --uris is the directory within the repository The only other way that you might could do this is to export the actual job on a scheduled basis; you would still use the js-export command.
  7. I have created a scheduled report - saves the results in a folder: export command js-export --uris /ContentFiles/Covington --output-dir c:\covington I have writen a batch file that allows me to create a scheduled task of exporting results in the above folder to harddrive: listed in the export statement above issue: The results include the file (*.csv) and the *.xml file in a directory so deep that I am afraid the client is going to get aggrivated drilling down and overwrites everything that is already in this directory. Desired fix: I would like to export ONLY the *.csv file I would like to export it directly into c:/covingtion instead of c:\covington\resources\ContentFiles\Covington I woud like for the export command to NOT overwrite the files that are already in the folder. Is there a way to achieve this.
  8. I am running 4.0.2 on windows 7 64 bit with no problems. Check to make sure you are not missing some jar files from you classpath
  9. I created a report using ireport that is having some issues. Versions of ireport and jasperServer match. We also have some of jasperReports integrated into our bls. Additionally we use JasperReports(Server) to create scheduled tasks (this feature has not been integrated yet). PROBLEM: The report returns the correct dataset when executed via iReport and our BLS application. I import the report into JaspserServer(reports) and it returns an empty dataset. However the report does not give any errors so it thinks it is populating correctly. The log I am viewing is in this folder: jasperreports-server-cp-4.0.0\apache-tomcat\webapps\jasperserver\WEB-INF\logs Is this the correct file - it does not show any parameters that was passed or execution of ANY reports and some are working. Additionally is there a specific reason a report will not work in jaspserServer BUT everywhere else. I am attaching the iReport, the stored proc code and an image desired results created properly within iReport. Code:ALTER PROCEDURE [dbo].[pmt_to_file] @startDate DATETIME, @endDate DATETIME, @utilityKey VARCHAR(38), @autodate int = nullAS declare @begin datetimedeclare @end datetimeset @begin = cast(@startDate as datetime) set @end =cast(@endDate as datetime)if @autodate is not nullbeginIF @autodate = '0' BEGIN SET @begin = DATEADD(yyyy,DATEDIFF(yyyy,0,GETDATE())-20,0)-- all dates SET @end = DATEADD(yyyy, DATEDIFF(yyyy,0,getdate())+1, 0)END IF @autodate = '1' BEGIN SET @begin = GETDATE()-- today SET @end = DATEADD(dd, DATEDIFF(dd,0,getdate())+1, 0)END IF @autodate = '2' BEGIN SET @begin = DATEADD(dd,DATEDIFF(dd,0,GETDATE())-1,0)-- yesterday SET @end = GETDATE()END IF @autodate = '3' BEGIN SET @begin = DATEADD(wk,DATEDIFF(wk,0,GETDATE()),-1)-- this week SET @end = DATEADD(wk,DATEDIFF(wk,0,GETDATE()),+6)END IF @autodate = '4' BEGIN SET @begin = DATEADD(wk,DATEDIFF(wk,0,GETDATE())-1,0) -- last week SET @end = DATEADD(wk,DATEDIFF(wk,0,GETDATE()),-1)END IF @autodate = '5' BEGIN SET @begin = DATEADD(m,DATEDIFF(m,0,GETDATE()),0) -- this month SET @end = DATEADD(m,DATEDIFF(m,0,GETDATE()),+30)END IF @autodate = '6' BEGIN SET @begin = DATEADD(m,DATEDIFF(m,0,GETDATE())-1,0) -- last month SET @end = DATEADD(m,DATEDIFF(m,0,GETDATE()),0)END IF @autodate = '7' BEGIN SET @begin = DATEADD(yy,DATEDIFF(yy,0,GETDATE()),0)--this year SET @end = DATEADD(yy,DATEDIFF(yy,0,GETDATE())+1,0)END IF @autodate = '8' BEGIN SET @begin = DATEADD(yy,DATEDIFF(yy,0,GETDATE())-1,0) -- last year SET @end = DATEADD(yy,DATEDIFF(yy,0,GETDATE()),0)END IF @autodate = '9' BEGIN SET @begin = @begin SET @end = @end ENDend IF @startDate IS NULL SET @startDate = '1900-01-01 00:00:00' IF @endDate IS NULL SET @endDate = '2040-01-01 00:00:00' DECLARE @template VARCHAR(4000) SET @template = 'select CC_ACNT, cc_amount,cc_UCODE,cc_TIME,UTILITY_NAME, y = case WHEN CC_STATUS IS null THEN ''Y'' WHEN CC_STATUS LIKE ''%'' THEN ''Y'' END FROM CC_PMT, utility_info WHERE cc_ucode = utility_key AND cc_time BETWEEN ''' + CAST(@startDate AS VARCHAR(100)) + ''' AND ''' + CAST(@endDate AS VARCHAR(100)) + ''' AND cc_ucode = ''' + @utilityKey + '''' EXEC (@template)
  10. I created a report using ireport that is having some issues. Versions of ireport and jasperServer match. We also have some of jasperReports integrated into our bls. Additionally we use JasperReports(Server) to create scheduled tasks (this feature has not been integrated yet). PROBLEM: The report returns the correct dataset when executed via iReport and our BLS application. I import the report into JaspserServer(reports) and it returns an empty dataset. However the report does not give any errors so it thinks it is populating correctly. The log I am viewing is in this folder: jasperreports-server-cp-4.0.0\apache-tomcat\webapps\jasperserver\WEB-INF\logs Is this the correct file - it does not show any parameters that was passed or execution of ANY reports and some are working. Additionally is there a specific reason a report will not work in jaspserServer BUT everywhere else. I am attaching the iReport, the stored proc code and an image desired results created properly within iReport. Code:ALTER PROCEDURE [dbo].[pmt_to_file] @startDate DATETIME, @endDate DATETIME, @utilityKey VARCHAR(38), @autodate int = nullAS declare @begin datetimedeclare @end datetimeset @begin = cast(@startDate as datetime) set @end =cast(@endDate as datetime)if @autodate is not nullbeginIF @autodate = '0' BEGIN SET @begin = DATEADD(yyyy,DATEDIFF(yyyy,0,GETDATE())-20,0)-- all dates SET @end = DATEADD(yyyy, DATEDIFF(yyyy,0,getdate())+1, 0)END IF @autodate = '1' BEGIN SET @begin = GETDATE()-- today SET @end = DATEADD(dd, DATEDIFF(dd,0,getdate())+1, 0)END IF @autodate = '2' BEGIN SET @begin = DATEADD(dd,DATEDIFF(dd,0,GETDATE())-1,0)-- yesterday SET @end = GETDATE()END IF @autodate = '3' BEGIN SET @begin = DATEADD(wk,DATEDIFF(wk,0,GETDATE()),-1)-- this week SET @end = DATEADD(wk,DATEDIFF(wk,0,GETDATE()),+6)END IF @autodate = '4' BEGIN SET @begin = DATEADD(wk,DATEDIFF(wk,0,GETDATE())-1,0) -- last week SET @end = DATEADD(wk,DATEDIFF(wk,0,GETDATE()),-1)END IF @autodate = '5' BEGIN SET @begin = DATEADD(m,DATEDIFF(m,0,GETDATE()),0) -- this month SET @end = DATEADD(m,DATEDIFF(m,0,GETDATE()),+30)END IF @autodate = '6' BEGIN SET @begin = DATEADD(m,DATEDIFF(m,0,GETDATE())-1,0) -- last month SET @end = DATEADD(m,DATEDIFF(m,0,GETDATE()),0)END IF @autodate = '7' BEGIN SET @begin = DATEADD(yy,DATEDIFF(yy,0,GETDATE()),0)--this year SET @end = DATEADD(yy,DATEDIFF(yy,0,GETDATE())+1,0)END IF @autodate = '8' BEGIN SET @begin = DATEADD(yy,DATEDIFF(yy,0,GETDATE())-1,0) -- last year SET @end = DATEADD(yy,DATEDIFF(yy,0,GETDATE()),0)END IF @autodate = '9' BEGIN SET @begin = @begin SET @end = @end ENDend IF @startDate IS NULL SET @startDate = '1900-01-01 00:00:00' IF @endDate IS NULL SET @endDate = '2040-01-01 00:00:00' DECLARE @template VARCHAR(4000) SET @template = 'select CC_ACNT, cc_amount,cc_UCODE,cc_TIME,UTILITY_NAME, y = case WHEN CC_STATUS IS null THEN ''Y'' WHEN CC_STATUS LIKE ''%'' THEN ''Y'' END FROM CC_PMT, utility_info WHERE cc_ucode = utility_key AND cc_time BETWEEN ''' + CAST(@startDate AS VARCHAR(100)) + ''' AND ''' + CAST(@endDate AS VARCHAR(100)) + ''' AND cc_ucode = ''' + @utilityKey + '''' EXEC (@template)
  11. Can someone please tell me why this report will work everywhere BUT in jasperserver! 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="pmts2file" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" whenResourceMissingType="Error"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <parameter name="startDate" class="java.sql.Timestamp"> <parameterDescription><![CDATA[start Date]]></parameterDescription> <defaultValueExpression><![CDATA[new java.sql.Timestamp(0)]]></defaultValueExpression> </parameter> <parameter name="endDate" class="java.sql.Timestamp"> <parameterDescription><![CDATA[End Date]]></parameterDescription> <defaultValueExpression><![CDATA[new java.sql.Timestamp(0)]]></defaultValueExpression> </parameter> <parameter name="utilityKey" class="java.lang.String"> <parameterDescription><![CDATA[utility]]></parameterDescription> <defaultValueExpression><![CDATA[""]]></defaultValueExpression> </parameter> <parameter name="userInput" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA[]]></defaultValueExpression> </parameter> <parameter name="autoDate" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["1"]]></defaultValueExpression> </parameter> <parameter name="operator" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["LIKE 'yxx3xxy%'"]]></defaultValueExpression> </parameter> <parameter name="exportFormat" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["PDF"]]></defaultValueExpression> </parameter> <queryString> <![CDATA[EXEC pmt_to_file $P{startDate}, $P{endDate}, $P{utilityKey} ,$P{autoDate}]]> </queryString> <field name="CC_ACNT" class="java.lang.String"/> <field name="cc_amount" class="java.math.BigDecimal"/> <field name="cc_UCODE" class="java.lang.String"/> <field name="cc_TIME" class="java.sql.Timestamp"/> <field name="y" class="java.lang.String"/> <background> <band/> </background> <title> <band/> </title> <columnHeader> <band height="20"/> </columnHeader> <detail> <band height="20"> <textField> <reportElement x="1" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{CC_ACNT}]]></textFieldExpression> </textField> <textField pattern="0.00"> <reportElement x="227" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{cc_amount}]]></textFieldExpression> </textField> <textField> <reportElement x="454" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{y}]]></textFieldExpression> </textField> </band> </detail> <pageFooter> <band height="23"/> </pageFooter> <lastPageFooter> <band height="20"/> </lastPageFooter></jasperReport>
  12. Is there a simple way to bypass the login screen. Is there documentation or threads to illistrate how to do this. Is there a way to allow the administrator to login IF the login screen is bypassed.
  13. I have posted several times about the differences between ireport and ireportpro but get no answers - and yes i have posted in the ireport boards - does anyone know if you must have jasperserverpro to run reports created in ireportspro
  14. I would like to customize the login screen so that it does not have the "whats new" text below. I would like just the logo and login box - how do i do this.
  15. another difference: new java.sql.Timestamp(new java.util.Date().getTime()) is used in the paramater class and compiles - in the pro-version it is altered when opening the report to java.sql.Timestamp if changed back so that the default date within the repository is todays date - the report will not compile. solution ideas
  16. in your reports - or in the server itself set up the data as new java.sql.Timestamp(new java.util.Date().getTime()) of course with the correct datediff settings.
  17. I have the opportunity to upgrade to the purchased version however I have some real concerns about the jasper products. Currently I have a very difficult time getting feedback and help on the boards. Right now I need to understand why one file gives a different set of values between the two versions of software. SAME stored procedure SAME jrxml DIFFERENCE - how report returns the catagories. these are sample results using the same file - notice the legend is only pulling one variable in the pro version
  18. you need to try changing your resetType in your code - are you not pulling data from a database?
  19. If you can post your jrxml I can look at it and see if I see anything.
  20. did you get this worked out. If not can you post your xml and i will see what i can do
  21. Anton, for each variable you place in your report - if using ireport as your designer - there is a box which allows you to control when the variable is evaluated. I have included a picture of what this box looks like.
  22. jasperforge.org/plugins/espforum/view.php Above is the link to a question I am still needing help with. If you have encountered anything like this I would appreciate knowing the problem and the solution.
  23. Expanding on issue of legend not being consistent from chart to chart - pulled from the same query I am including two versions of the report, a couple screen shots to show exactly what i am talking about and the jrxml 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="CallLoadAnalysisCharts" pageWidth="850" pageHeight="600" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="790" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20"> <property name="ireport.scriptlethandling" value="0"/> <property name="ireport.encoding" value="UTF-8"/> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <import value="net.sf.jasperreports.engine.*"/> <import value="java.util.*"/> <import value="net.sf.jasperreports.engine.data.*"/> <style name="Crosstab Data Text" hAlign="Center"/> <parameter name="startDate" class="java.sql.Timestamp"> <parameterDescription><![CDATA[start Date]]></parameterDescription> <defaultValueExpression><![CDATA[new java.sql.Timestamp(0)]]></defaultValueExpression> </parameter> <parameter name="endDate" class="java.sql.Timestamp"> <parameterDescription><![CDATA[End Date]]></parameterDescription> <defaultValueExpression><![CDATA[new java.sql.Timestamp(0)]]></defaultValueExpression> </parameter> <parameter name="userInput" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA[]]></defaultValueExpression> </parameter> <parameter name="utilityKey" class="java.lang.String"> <parameterDescription><![CDATA[utility]]></parameterDescription> <defaultValueExpression><![CDATA[""]]></defaultValueExpression> </parameter> <queryString> <![CDATA[exec reportLoadTimeAnalysis_T $P{startDate}, $P{endDate}, $P{utilityKey}]]> </queryString> <field name="Application" class="java.lang.String"/> <field name="Count" class="java.lang.Integer"/> <field name="Utility" class="java.lang.String"/> <field name="Type" class="java.lang.String"/> <field name="OrderBy" class="java.lang.Integer"/> <field name="Label" class="java.lang.String"/> <sortField name="Type"/> <sortField name="OrderBy"/> <sortField name="Application"/> <group name="Utility"> <groupExpression><![CDATA[$F{Utility}]]></groupExpression> <groupHeader> <band height="23"> <textField> <reportElement x="30" y="2" width="627" height="20"/> <textElement> <font size="14" isBold="true" isItalic="false"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{Utility}]]></textFieldExpression> </textField> </band> </groupHeader> <groupFooter> <band height="8"/> </groupFooter> </group> <group name="StatType" isStartNewPage="true"> <groupExpression><![CDATA[$F{Type}]]></groupExpression> <groupHeader> <band/> </groupHeader> <groupFooter> <band height="421"> <rectangle> <reportElement x="40" y="0" width="742" height="16" forecolor="#FFFFFF" backcolor="#97B6FA"/> </rectangle> <stackedBarChart> <chart theme="default"> <reportElement key="element-1" x="0" y="0" width="790" height="419"/> <chartTitle position="Top"> <titleExpression><![CDATA[$F{Type}]]></titleExpression> </chartTitle> <chartSubtitle/> <chartLegend textColor="#000000" backgroundColor="#FFFFFF" position="Bottom"/> </chart> <categoryDataset> <dataset resetType="Group" resetGroup="StatType"/> <categorySeries> <seriesExpression><![CDATA[$F{Application}]]></seriesExpression> <categoryExpression><![CDATA[$F{Label}]]></categoryExpression> <valueExpression><![CDATA[$F{Count}]]></valueExpression> </categorySeries> </categoryDataset> <barPlot isShowLabels="true" isShowTickLabels="true" isShowTickMarks="true"> <plot backgroundAlpha="0.5" foregroundAlpha="0.5"> <seriesColor seriesOrder="0" color="#025510"/> </plot> <itemLabel color="#000000" backgroundColor="#FFFFFF"/> <categoryAxisFormat> <axisFormat> <labelFont/> <tickLabelFont/> </axisFormat> </categoryAxisFormat> <valueAxisFormat> <axisFormat> <labelFont/> <tickLabelFont/> </axisFormat> </valueAxisFormat> </barPlot> </stackedBarChart> </band> </groupFooter> </group> <background> <band/> </background> <title> <band height="51"> <staticText> <reportElement key="staticText-1" x="10" y="10" width="240" height="22"/> <textElement> <font size="14" isBold="true"/> </textElement> <text><![CDATA[iVR Call Load Analysis]]></text> </staticText> <textField pattern="" isBlankWhenNull="false"> <reportElement key="textField" x="61" y="31" width="120" height="16" forecolor="#000000" backcolor="#FFFFFF"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"> <font size="10"/> </textElement> <textFieldExpression class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression> </textField> <staticText> <reportElement x="10" y="31" width="51" height="16"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[Print Date]]></text> </staticText> <image hAlign="Right" isUsingCache="true" onErrorType="Blank"> <reportElement x="672" y="0" width="118" height="50"/> <imageExpression class="java.lang.String"><![CDATA["\\MilsoftIVR\\Reporting\\images\\milsoft.gif"]]></imageExpression> </image> </band> </title> <pageHeader> <band/> </pageHeader> <pageFooter> <band height="21"> <textField> <reportElement x="662" y="1" width="80" height="20"/> <textElement textAlignment="Right"/> <textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression> </textField> <line> <reportElement key="line" x="0" y="0" width="790" height="1"/> </line> <textField evaluationTime="Report"> <reportElement x="742" y="1" width="40" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression> </textField> <textField> <reportElement x="0" y="1" width="475" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$P{userInput}]]></textFieldExpression> </textField> </band> </pageFooter></jasperReport>
  24. I have created a graph which is part of a group. The graph implements each time a 'type' or the controller for the group changes. My issue is that the legend colors change for each chart ie: chart 1 ap1 - green, ap2 = red, ap3 = blue chart 2 ap1 = purple, ap2= red, ap3= green and so forth. what should i do.
×
×
  • Create New...