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

darth_fader

Members
  • Posts

    245
  • Joined

  • Last visited

  • Days Won

    1

 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 darth_fader

  1. I think "exclude" options based on a key will do the trick, I've used a similar approach with csv files. Check out this link of stackoverflow, should get you where you need to go https://stackoverflow.com/questions/18585154/how-to-hide-textfield-in-report-generated-in-specified-format
  2. No, but can you send along the url you're using and the root folder name containing your reports? I can see if anything's wrong there. You're successfully making the request might just be something slightly wrong with the url
  3. The original version of the REST API supports this in its own unique way: GET /jasperserver/rest/resources/yourReportFolderName?type=reportUnit&recursive=1 Will list out all report units currently on your server instance. So, you can plug this into the url http://yourjasperserver.com:8080/jasperserver/rest/resources/yourReportFolderName?type=reportUnit&recursive=1 And you'll get xml output of all the report units in that folder. This is the only way I'm currently aware of.
  4. There is one documented option that bypasses the cloud formation template, info here: http://community.jaspersoft.com/documentation/tibco-jaspersoft-aws-user-guide/v60/launching#installation_726256148_1034399 Specifically, the section "To create a JasperReports Server instance from the EC2 console:" Take note of the warning you'll receive when you bypass the cloud formation template and what that implies (details in link) http://community-static.jaspersoft.com/Resources/Images/no-role-error_524x104.png
  5. Joda Time is the easiest way to do time zone manipulations on date time fields in Jasper Reports (at least until Java 8 is fully supported). joda time download link: http://joda-time.sourceforge.net/installation.html For jasper-server, add the joda time jar file into: YOUR-JASPER-DIRECTORY/WEB-INF/lib You'll notice other jar files there as well. WIll require a server restart to take effect. If you're just using IReport/Jasper Studio, you'll need to add the jar to the class path, something along the lines of Tools-->Option-->Classpath-->Add JAR The code reference will be something like; see the ref to the example field below? You'll probably be able to make a go of it after this example: <textFieldExpression><![CDATA[new org.joda.time.DateTime($F{YOUR_DATE_FIELD}).withZone(org.joda.time.DateTimeZone.forID("UTC"))]]></textFieldExpression> It may be easier to add this in through the expression editor in IReport/Jasper Studio. let me know if you run into any issues
  6. Looks like you need the following: 1) dynamic (based on parameter) location of generated reports 2) post report generation database inserts/updates to confirm job completion/execution etc etc You'll need to use a Java solution and work with the Report Scheduler API to make this happen. This gives you access to the scheduler functionality, i.e. the ability to schedule a new job, set any parameters for the reports, and do any post-processing such as relocating the output or writing to the db post completion. http://community.jaspersoft.com/documentation/jasperreports-server-ultimate-guide/v55/report-scheduling-api Here are the provided configuration options for the reports scheduler in jasper server you can set without writing java code: http://community.jaspersoft.com/wiki/configuring-report-scheduler
  7. Although the following posts are slightly dated, I think it's still applicable for inline svgs Show how to use proper renderer for inline svgs: http://community.jaspersoft.com/questions/826134/how-use-svg-information-jasper-report and more info on svg rendering in general: http://community.jaspersoft.com/questions/525861/how-use-svg-jasperreports http://community.jaspersoft.com/wiki/how-add-svg-image-your-report-jrxml
  8. You need to design a report that receives parameters and reference those parameters in your chart/graph. If you're not familiar with parameters and/or charts/graphs, I recommend you start with some basic tutorials on report design and chart/graph design. There are many available online and through jaspersoft wikis/docs/tutorials etc. You can test out your design from end to end via jaspersoft studio report designer. Once you get the design basics in place, then you could consider how you'll be getting your clients input. The standard approach is jasper server, but jasper reports can be directly integrated into web applications, and jasper server has a rest api that allows for even greater flexibility of systems integration.
  9. In your output pattern for the date/time in the report, use a capital H to specify 24 hr time vs 12. For example, "M/d/yy h:mm a" would give you the 1:30 PM, M/d/yy H:mm" would give you 13:30
  10. You can add an attribute to each user in your jasperserver installation that sets a value in the JDBC connection dynamically based on user. For example, you can set properties in the jdbc connection based on those attributes. In this way you can change the datasource based on the user. Again, this is all done at the jasperserver level. There is a reference that also accomplishes something similar via spring, but I don't think it's necessary. http://community.jaspersoft.com/wiki/switching-datasource-based-user
  11. You can use conditional styles to achieve what you're looking for, here's a reference that should do the trick: http://community.jaspersoft.com/wiki/how-apply-conditional-formatting-your-text-fields
  12. Try this in your textFieldExpression, wherever you want to display that YES/NO <textFieldExpression><![CDATA[iF($F{FNAME} == NULL, "YES","NO")]]></textFieldExpression> Simple conditional, displays YES or NO depending on whether or not FNAME is null. The IF conditional works as follows: IF(testExpression, true, false)
  13. You have two options: 1) rework your layout to support both pdf and excel by remove all white space in bands, deleting unused bands, ignoring graphics, and adding configuration parameters for excel output such as those found here: http://jasperreports.sourceforge.net/config.reference.html For example: see net.sf.jasperreports.export.xls.detect.cell.type 2) create a separate report template optimized for each output type I typically go with option two; PDF output deals with a fixed page width/height and printer friendly concerns, excel really doesn't. That alone can require significant differences in layouts. And if your requirements evolve, say now you need to create multiple worksheets in excel but need images etc for pdf, you may be forced at that point to create multiple templates. But like I mentioned, it comes with overhead. If I make a change in logic or computation and need consistent results across output formats, that change needs to be made in multiple places. Option one may or may not be simple, export your current report to excel as is and review the results. you may notice many extra columns and rows in excel and eliminating those can be tedious. In my experience it can be done but can be a pain. Also you have to filter out images, fonts, etc., enable cell type detection, check to see if things still work as expected in pdf output, so on and so on.
  14. I don't expect there is direct support for xhtml via the HtmlExporter. As an alternative, you could export to XML (JRXmlExporter) and use an XSLT processor to get the XHTML output you're looking for. Converting from HTML output to XHTML could be more problematic and have less consistent results. According to Jaspersoft: The XhtmlExporter class "is subject to font metric mismatches between client browsers, which can result in text being cut off." I'm assuming this is why they've deprecated the XhtmlExporter. It's rarely a good idea to use deprecated classes; it implies it will be desupported/removed altogether in future releases.
  15. You'll need to include the jasperreports-functions jar in your project, put it on your class path etc. to be able to use dateformat Jar file available here: http://community.jaspersoft.com/project/jasperreports-library/releases
  16. You may or may not be able to pull this off by nesting a bunch of the "TEXT" functions built in to jaspersoft studio, combining 'substitute',and 'search' to whittle this string down to everything between the third and fourth instances of '-', but I don't recommend it. If it is possible, it's not easily maintainable. What you could do is add apache's commons-lang jar into your project, split that string (using, no surprise, the StringUtils.split() method) on the '-' hyphen char, and return the appropriate string from the resulting array list. The split method can split your string into an array list of strings based on a given character. https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringUtils.html#split-java.lang.String-char- Also, to be fair, Java also has a string split method, but it's not as intuitive: https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#split(java.lang.String,%20int) And finally, I'm sure you can do this via regex as well, but again it's not as intuitive as the apache commons-lang approach: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
  17. This is fairly straightforward, but if you want to keep it in the query (I strongly recommend that approach, you're on the right track), but it depends on the DB environment you're using. Each flavor of DB has it's own date/time functions for date manipulations
  18. no, i'm fairly certain the report query would execute for each output format as Jasper does specific in memory calculations/processing with the query results for each; so you should be seeing this four times. Even if the query execution/results were being cached, then I would expect one query execution for all four output formats. Two runs just doesn't seem logical here.
  19. Put this in your text field expression: org.joda.time.format.DateTimeFormat.forPattern("MM/dd/yyyy").print(new org.joda.time.DateTime($F{dob}).withZone(org.joda.time.DateTimeZone.forID("UTC"))) There may be a way to preserve the format attribute on the text field tag, if that's a necessity let me know
  20. Need more info: 1) what is the error? provide stack trace if possible 2) what type of data source? xml, csv, database, if database, what flavor? 3) are you getting an incompatible datatype when referencing that column as a timestamp? what do you mean by "not recognizing it"
  21. JasperServer doesn't provide support directly for this type of input, but you still have options. I've seen this type of UI input before, but it's rare and is implemented many different ways. You can after input, within the report and possibly some supporting java code, break up the user's input whatever way you'd like. In other words, you could pass in a comma delimited string "single value" input/parameter and parse that within the report. What's missing is validation at the point of input; if your user enters garbage, you'd already be in the "run report with inputs" stage. Alternatively, you can create your own custom input control, but be warned this is an advanced approach (in terms of Jasper Server customization) that would require much work. You may be able to get away with reusing most of the "single value" input code and simply modify validation to fit your needs.
  22. What database environment are you working in? PostgreSQL, SQL Server, MySQL etc?
  23. The community edition is absolutely free, fine for production systems, and is perfectly legal to use that way. The community edition is under http://www.gnu.org/licenses/agpl-3.0.html , for specific restrictions etc. contact Jaspersoft. I've used the community edition in multiple production systems without issue. The premium editions come with more features etc., and I think is also required if you're supporting multiple organizations/tennats with the same install. For supporting one organization you're fine. If that is an issue contact jaspersoft for details.
×
×
  • Create New...