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

ryanl

Members
  • Posts

    3
  • Joined

  • Last visited

ryanl's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. We are seeing FTP errors for reports scheduled via API even though we are passing empty values. Here is the respose for the GET jobs call for one of the reports that is throwing an error: "repositoryDestination": { "folderURI": "/organizations/organization_1/Report_Results", "id": 110545, "overwriteFiles": true, "sequentialFilenames": true, "version": 0, "timestampPattern": "yyyyMMdd", "saveToRepository": true, "usingDefaultReportOutputFolderURI": false, "outputFTPInfo": { "userName": "anonymous", "folderPath": "", "serverName": "", "type": "ftp", "port": 21, "implicit": true, "pbsz": 0, "propertiesMap": {} } The error we are seeing at run time is: report.scheduling.error.upload.to.ftp.server (Error UID:)java.net.ConnectException: Connection refused (Connection refused) I double checked in the UI to ensure the FTP output checkbox is not checked. Is there something in the API that we need to pass to ensure it is disabled?
  2. My previous commented solution doesn't work when the timestamp = 00:00:00. When I tested DAY-1 in both start, end it excludes this timestamp. :( It seems like the $X{Between should do >= AND < so that it captures what happens at 00:00:00. Wonder if there is a way to do change this for relative dates. Edit: There is a way to solve this by using: $X{[bETWEEN, <column_name>, <left_parameter_name>, <right_parameter_name>}[/code]The key difference is where the "[" value is used. You can find more information on the different built-in SQL clause functions here: http://jasperreports.sourceforge.net/sample.reference/query/
  3. <parameter name="USER_START_DATETIME" class="net.sf.jasperreports.types.date.TimestampRange"/> <parameter name="begin_date" class="java.sql.Timestamp" nestedType="java.sql.Timestamp" isForPrompting="false"> <defaultValueExpression><![CDATA[$P{USER_START_DATETIME}.getStart()]]></defaultValueExpression> </parameter> <parameter name="USER_END_DATETIME" class="net.sf.jasperreports.types.date.TimestampRange"/> <parameter name="end_date" class="java.sql.Timestamp" nestedType="java.sql.Timestamp" isForPrompting="false"> <defaultValueExpression><![CDATA[$P{USER_END_DATETIME}.getEnd()]]></defaultValueExpression> </parameter>[/code]Not sure if things changed from this post to the new version (running 7.1), but I was having issues using this when trying to get relative date ranges like "Last Week", "Last Month". The reason was that I am working with Timestamp data, which I read on Jaspersoft's docs you can use TimestampRange. Using the examples from their docs still don't give me what I needed, so I used what you posted and converted it to timestamp, now it works great! The only weird thing that I can't seem to get to work is for the manual date, time selection to work through Studio, but it works fine in Web. So this works for both manually entered dates and for relative dates where it will get the Start, End of the day based on the input. Example: Last Month: MONTH-1, MONTH-1 will give me all activity for the first day of the month 00:00:00 and the last day of the month 23:59:59. Thank you so much for posting this, I don't think I could have gotten this far without it.
×
×
  • Create New...