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

narcism

Members
  • Posts

    319
  • 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 narcism

  1. You could use the Repository Explorer from Studio to browse the Server's Repository. From there you can open a report (a local copy that is linked to the one on server is created), modify and upload it back.
  2. From the TIBCO JasperReports Server User Guide: "The repository is the server’s internal storage for reports, analysis views, and related files. The repository is organized as a structure of folders containing resources, much like a file system. However, unlike a file system, the repository is stored as a private database that only JasperReports Server can access directly."
  3. A couple of things to check, each at a time: 1. Make sure you recompile your subreport every time you modify it. You may have an old *.jasper file for it and that one gets picked up by your mainReport. 2. Place some limits on the mainReport's query and check the data from the subreport. You could even place some textfields with your parameters at the top of the subreport, in a title band for instance, to see if they get passed correctly. 3. Perform some record counting to understand how big the resultsets are, especially for the subReport's query.
  4. You need to look into subreports: https://community.jaspersoft.com/wiki/subreports
  5. Hi, Ernesto! The main dataset query could be left empty in this case. I believe that what you have as field expression/description is not exactly what JSONQL expects. This should work: In essence, to pick the users.name(or similar) key you need the ["users.name"] JSONQL expression. This happens because the users.name key is not a legal Javascript identifier an must be wrapped in quotes and surrounded by square brackets. It is similar to the Javascript way of accessing object keys. More specific details could be found here: http://jasperreports.sourceforge.net/sample.reference/jsonqldatasource/index.html#jsonql
  6. You need to manually remove the forecolor="#000000" attribute for the <reportElement/> that is inside the <textField/> element from the "Source" view of your report. It overwrites the one coming from the style.
  7. Step #1. Use an empty queryString in your subreport. You are going to pass the data(the routes array) straight from the main report. <queryString language="JSON"> <![CDATA[]]></queryString>[/code]Make sure you recompile the subReport so that the mainReport picks up the new one. Step #2. In the main report, set the subReport's dataSourceExpression by subDataSource-ing the report dataSource with the "routes" path: <subreport> <reportElement x="0" y="19" width="555" height="207" uuid="0e5f93b0-ab4d-4538-ac8f-3c10b85e36e2"/> <dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("routes")]]></dataSourceExpression> <subreportExpression><![CDATA["Simple_Blue_Routes.jasper"]]></subreportExpression></subreport>[/code]You should be able to use the same approach from the routes subReport to pass down the "tasks" array to a deeper subReport.
  8. Try setting evaluationTime to 'Early' and isForPrompting to 'false' for the json source parameter. Your JRXML should look like so: <parameter name="net.sf.jasperreports.json.source" class="java.lang.String" isForPrompting="false" evaluationTime="Early"> <defaultValueExpression><![CDATA["https://itunes.apple.com/search?term=" + $P{term}]]></defaultValueExpression> </parameter>
  9. Please post the config object that you pass to the report function inside the visualize callback.
  10. Yes, it is possible to achieve what you want. The best way is to use the JasperReports API programmatically. But first you need to adjust the report template so that you pass your XML file by parameter: <parameter name="net.sf.jasperreports.xml.source" class="java.lang.String"> <defaultValueExpression><![CDATA["path/to/data.xml"]]></defaultValueExpression></parameter> Then, for the tool-ing part you could simply resort to the JasperReports sample running mechanism or get inspiration from there. For example, the XML Data Source Sample (https://github.com/Jaspersoft/jasperreports/tree/master/jasperreports/demo/samples/xmldatasource), when run with the "ant javac compile fill pdf" command, it will:1. compile the Java code from the src folder2. compile the report templates from the reports folder3. fill the compiled reports4. export to pdf the filled reports You could modify the filling part and pass your "net.sf.jasperreports.xml.source" parameter(also holded by the JRXPathQueryExecuterFactory.XML_SOURCE constant) instead of the XML_DATA_DOCUMENT one, here: https://github.com/Jaspersoft/jasperreports/blob/master/jasperreports/demo/samples/xmldatasource/src/XmlDataSourceApp.java#L104
  11. If you are using the same XML file in both Main report and Subreport you could just pass the parsed Document from main to subreport with this parameter: <subreport> ... <subreportParameter name="XML_DATA_DOCUMENT"> <subreportParameterExpression><![CDATA[$P{XML_DATA_DOCUMENT}]]></subreportParameterExpression> </subreportParameter> ... </subreport> You can see this in action in the CustomersReport.jrxml from the XML Data Source Sample: https://github.com/Jaspersoft/jasperreports/blob/master/jasperreports/demo/samples/xmldatasource/reports/CustomersReport.jrxml#L52
  12. The browser's Console is always the good place to start debugging your script(s).
  13. 1. Set the MainDataset variable's Calculation to "System" to preserve the value you return from the subDataset. 2. Depending where you use the variable, set the Evaluation Time for the textField showing it to something other than "Now", like "Report" or "Band".
  14. You need to use the lowercase property name for the field: <field name="jobPK" class="main.java.gls.entities.JobPK"> <fieldDescription><![CDATA[jobPK]]></fieldDescription> </field>
  15. XPATH and JSON/JSONQL query languages are not compatible in terms of functions/syntax. Please refer to the documentation for the JSON/JSONQL datasource samples for more details: JSONQL: http://jasperreports.sourceforge.net/sample.reference/jsonqldatasource/index.html#jsonqldatasource JSON: http://jasperreports.sourceforge.net/sample.reference/jsondatasource/index.html#jsondatasource
  16. You should be able to achieve what you want with either JSON or JSONQL query languages. JSONQL has more features and is meant to replace JSON. Your case looks similar to the ones described in the documentation for JSONQL datasource: JSONQL: http://jasperreports.sourceforge.net/sample.reference/jsonqldatasource/index.html#jsonqldatasource You can also grab the sample files from the github project: https://github.com/Jaspersoft/jasperreports/tree/jr-6-3-1/jasperreports/demo/samples/jsonqldatasource
  17. This is one way to do it: With current JSON language: With the newer JSONQL language(but simpler, without the table):
  18. Do you want "fecha", "periodo" and "cod" to be columns along with "base de datos", "sinVariacion" and "variacionPositiva"? Please post a complete fragment with the desired output. This would help us better understand what you want to achieve
  19. You cannot use an SQL function inside a JasperReports $X clause function as per: http://jasperreports.sourceforge.net/sample.reference/query/index.html#clause_functions Instead, you could have something like this in your SQL: and substr(t1.i_rep_no,1,1) IN ($P!{type}) with parameter type as a java.lang.String with comma separated values, or as anything that resolves to that.
  20. Most likely, you are interested in designing a crosstab. Check out the Jaspersoft Studio User Guide here: http://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v630/working-crosstabs
  21. Try setting the Overflow Type to No Stretch in the Subreport tab of the Properties view for the subreport element.
×
×
  • Create New...