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

dknutson

Members
  • Posts

    30
  • 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 dknutson

  1. That's how to change it in the report using iReports. I need to know how to do this in the input control. What I actually will need later on is much more involved than a simple default date, but I thought that figuring out how to set that in the input control would be a good place to learn how to make a custom input.
  2. I need to have a fairly simple custom input control created for JasperReports CE 4.5. My reports would use parameters pStartDate and pEndDate. The control would offer up a list of possible choices, such as Today Yesterday Week to date and it would return a start date and end date based on the selected entry. The default for this input would be 'Yesterday'. This needs to work with scheduled reports also. If interested, please email me with your requirements.
  3. I need to have a date parameter that will default to yesterday. I've read a number of post on creating custom input controls, and I've dug into the DefaultParametersForm.jsp. I've even purchased the latest version of the Jasperserver Ultimate Guide. I'm just not getting it. Does anyone have a form sample that set's a default date?
  4. Is it possible to disable the requirement for an output location when you schedule a report? I plan to only deliver report to users via emailed pdfs.
  5. Considering using Jasperserver, but will need to create a custom input page for a week parameter. In our calendar, the first day of the week starts on Thursday. We also go by Periods instead of months, so Period 9 week 4 starts on 3/15/12 and ends on 3/21/12 - and is also reference by the subperiod ID = 742. I've seen instructions for creating a custom input page. My question is about report scheduling. Say I've got a report that provides data by subperiod. I want it scheduled so that it always returns data for the previous subperiod. How would I do that? Do I need to write a custom scheduler, or do I do this in SQL?
  6. Not sure if this is a bug or what. My system is JasperServer 3.7 and iReports 3.7. I'm using the parameter $P{LoggedInUsername} to get the name of the user logged into Jasperserver. This works just fine, unless I set a default value for the parameter. Jasperserver will only return the name if a default hasn't been set. My problem is that once I set a default on this parameter the only way to get it to work properly again is to edit the file's XML entries. If I simply delete the value from the iReports designer screen it left this in the XML - <defaultValueExpression><![CDATA[]]></defaultValueExpression> And Jasperserver is seeing this as a default value of NULL. I have to delete this from the XML before it will work. So, bug or something wrong with my iReports?
  7. Amazing what a new day will bring. After sleeping on it I found what was causing the problem. When you set a default for LoggedInUsername, the following entry is created in XML - <parameter name="LoggedInUsername" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA['TEST"]]></defaultValueExpression> </parameter> Now, if I delete the default value of "TEST", iReports still leaves the string <defaultValueExpression><![CDATA[]]></defaultValueExpression> Jasperserver is seeing this as being a default value set to NULL and uses that instead of the login name. If I delete this string, then everything works.
  8. Folks, I'm completing stuck. I'm using the parameter $P{LoggedInUsername} in a very simple report. I've actually tried this both ways - once using only $P{LoggedInUsername} and also by using the 2 parameters $P{LoggedInUser} and $P{LoggedInUsername}. Both fail in the same way. I've included the xml for both reports. Here is what happens. I create report1 and it works! It shows the user login name and returns the correct values from the query. Then I edit the report to add another field to the query. The report stops working because it now returns a NULL for the login name. It's not the query as the report does the same thing even if I hardcode the login name. HELP! Report 1 - the working report <?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="test2" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <parameter name="LoggedInUserName" class="java.lang.String"> <defaultValueExpression><![CDATA["DMKtest"]]></defaultValueExpression> </parameter> <parameter name="LoggedInUsername" class="java.lang.String"/> <queryString> <![CDATA[select sd.storeid from bkdata.dbo.storedata sd inner join jasperreports.dbo.selectstores ss on sd.storeid = ss.storeid and ss.userid = $P{LoggedInUsername}]]> </queryString> <field name="storeid" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <background> <band/> </background> <title> <band height="19"/> </title> <pageHeader> <band height="14"/> </pageHeader> <columnHeader> <band height="61"> <textField> <reportElement x="51" y="21" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$P{LoggedInUsername}]]></textFieldExpression> </textField> </band> </columnHeader> <detail> <band height="25"> <textField> <reportElement x="51" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{storeid}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="45"/> </columnFooter> <pageFooter> <band height="54"/> </pageFooter> <summary> <band height="42"/> </summary> </jasperReport> The bad report - <?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="test3" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <parameter name="LoggedInUserName" class="java.lang.String"> <defaultValueExpression><![CDATA["DMKtest"]]></defaultValueExpression> </parameter> <parameter name="LoggedInUsername" class="java.lang.String"> <defaultValueExpression><![CDATA[]]></defaultValueExpression> </parameter> <queryString> <![CDATA[select sd.district, sd.storeid from bkdata.dbo.storedata sd inner join jasperreports.dbo.selectstores ss on sd.storeid = ss.storeid and ss.userid = $P{LoggedInUsername}]]> </queryString> <field name="district" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="storeid" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <background> <band/> </background> <title> <band height="19"/> </title> <pageHeader> <band height="14"/> </pageHeader> <columnHeader> <band height="61"> <textField> <reportElement x="51" y="21" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$P{LoggedInUsername}]]></textFieldExpression> </textField> </band> </columnHeader> <detail> <band height="25"> <textField> <reportElement x="51" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{storeid}]]></textFieldExpression> </textField> <textField> <reportElement x="174" y="0" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{district}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="45"/> </columnFooter> <pageFooter> <band height="54"/> </pageFooter> <summary> <band height="42"/> </summary> </jasperReport> Post Edited by dknutson at 01/17/2010 17:55
  9. I just loaded up a 3.5 Jasperserver and tested this. I logged in as userid = DMKTest. It's giving me the current default for LoggedInUsername "DMK" not the userid. Any idea why?
  10. Thanks - that clears up something. A few months back I tried this with 3.5 and had no problems. With 3.7 it doesn't work. I think I'll reload 3.5.
  11. How exactly are you useing "LoggedInUsername" and what do you mean by eliminates one parameter? I've tried using it by itself setup as you describe and it come up null. I've gotten it to work where LoggedInUsername references a second parameter containing LoggedInUser.getUserName(), but at this time I can't get the parameter to work in a query.
  12. Thanks for the reply. I was thinking that if I copy the correct jar to the iReports lib folder, then set LoggedInUser with a default, it should work. Problem is I'm not sure of which jar and where to put it - iReports or Java folder
  13. I've read all the entries related to how to use a user login in a report, but I'm missing something. I've got 3.7 verson of jasperserver and the 3.6 version of iReports. Most of the posts related to this say that you need to create 2 parameters. In iReports I've created a parameter LoggedInUser and set the Parameter Class to com.jaspersoft.jasperserver.api.metadata.user.domain.User and with a default value expression = Test Then I create a second parameter UserID and give it a default value expression of $P{LoggedInUser}.getFullName() The report has only one element - a text field to show the value of UserID. When compiled I get the error - ClassNotFoundException: com.jaspersoft.jasperserver.api.metadata.user.domain.User Can anyone tell me what I'm doing wrong?? Here is the XML - <?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="LoginNameTest" language="groovy" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <parameter name="LoggedInUser" class="com.jaspersoft.jasperserver.api.metadata.user.domain.User" isForPrompting="false"> <defaultValueExpression><![CDATA[aaa]]></defaultValueExpression> </parameter> <parameter name="UserID" class="java.lang.String"> <defaultValueExpression><![CDATA[$P{LoggedInUser}.getFullName()]]></defaultValueExpression> </parameter> <background> <band/> </background> <title> <band height="79"/> </title> <pageHeader> <band height="35"/> </pageHeader> <columnHeader> <band height="61"/> </columnHeader> <detail> <band height="125"> <textField> <reportElement x="247" y="58" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$P{UserID}.toString()]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="45"/> </columnFooter> <pageFooter> <band height="54"/> </pageFooter> <summary> <band height="42"/> </summary> </jasperReport>
  14. I'm running jasperserver 3.7 and have created reports using iReports 3.6. The reports are formated so they print well in PDF format. Problem is, when I run the report from the server, the page initially loads as html and the font size is so small as to be unreadable. What do I need to do to address this problem? Is there a setting somewhere that will control the page and is this in jasperserver or in iReports? Thanks!
  15. I'm accessing a 3.7 version of JasperServer using IE8 on a vista machine. In the left corner of the IE screen it provides the warning the the page was displayed, but that there were errors. Clicking on error icon brings up an explorer status box that says -"webHelpModule is undefined" What is the webHelpModule and is this issue related to IE8 alone? I don't see it when using Firefox from a linux machine.
  16. Thanks - that's what I thought. Seems like the best setup would be to establish a separate folder for each user where their scheduled reports would be deposited and use overwrite to control the number of files. Does that make sense?
  17. I see that to create a scheduled report, you are required to tell it where in the repository to store the content. Isn't there some place where this requirement can be changed? I only want the report emailed to the user - I don't need to keep a copy of it. I anticipate that there will be at least 100 users with about 6 different scheduled reports each - that's going to be alot of files.
  18. Just checked my notes. It had a version of 1.5 - didn't get which one, but pretty sure it was before 17. I replaced it with 1.6.0_17
  19. Glory be - got it working! Replaced java with the last 1.5 version. Now the bundled version is staying up - at least so far it's been up for 48 hours. Most I got before was about an hour.
  20. What would you suggest I do to get the latest version installed? I've had the same problem with the bundled versions of 3.5 and 3.7. It is Tomcat that's stopping, but I'm not seeing anything it the logs. Would it be more successful on Ubutu or Debian? I've installed Tomcat and Mysql separately on this machine and it works fine. just can't get Jasperserver to install. When I try to use the installer and have it use the existing tomcat and mysql I can't get past the point where I need to tell it where mysql is. When I try the WAR install, it installs with no problem, but the login page won't open.
  21. Thanks for the tip. I've implemented the change you suggested to context.xml. I'm not really sure that it's the mysql connection. When it stops working I can't get to the tomcat page either (site:8080/manager) - unless in the bundled version when one part stops it all stops.
  22. I'm currently using the bundled install of Jasperserver 3.5. System runs fine, but if I don't access jasperserver frequently - like within a hour - it stops working. I do a jasperctl.sh stop then start and it is back. Can someone tell me why this is happening? The install is on a stable suse 10 system. I don't see anything in the catalina logs. I've also installed the bundled version of the lastest 3.7 package on a second server - it does the same thing. Help!
  23. I'm currently using the bundled install of Jasperserver 3.5. System runs fine, but if I don't access jasperserver frequently - like within a hour - it stops working. I do a jasperctl.sh stop then start and it is back. Can someone tell me why this is happening? The install is on a stable suse 10 system. I don't see anything in the catalina logs. I've also installed the bundled version of the lastest 3.7 package on a second server - it does the same thing. Help!
  24. I can get this to almost work if instead of type ReportExecution I use Reference and add the parameters to the end of the expression. I just bought the JasperServer manual, and it only mentions the ReportExecution method - which isn't working. When should I use Reference and when would I use ReportExecution?
×
×
  • Create New...