Jump to content

narcism

Members
  • Posts

    319
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Everything posted by narcism

  1. What you are experiencing is the expected behavior given your current reports(main + subreports) designs. If you were to set a background for each subreport element in the main report(see the attached image: yellow for 1st, purple for 2nd), you would notice that the user2 subreport, at page 2 in the main, would try to fill the remaining space but would not fit completely(but render something - its 1st actual subreport page) and would overflow on the third page of the main, which is actually the second page of the subreport. To fix this, you need to adjust your main report design like so: - adjust the second subreport element size to be at least the size of the topMargin(20px) + page header(50px) that you have in user2 subreport, to a total of at least 70px. This should force user2 subreport to overflow completely onto the next page if the engine cannot render at least the margin and the page header in the remaining space. - optionally, set the detail band to wrap the two subreport elements tightly. The detail band should end right after the second subreport element in order to avoid preserving unnecessary white space
  2. Please post a sample JRXML demonstrating the issue.
  3. This has been asked before. There is no solution out of the box. You would have to write a custom rewindable data source wrapper. Follow the link below. A relevant search on the answer section: http://community.jaspersoft.com/answers?search_api_views_fulltext=rewindable+wrapper
  4. It seems that you have answered yourself here: http://stackoverflow.com/questions/43157569/jsondatasource-for-table-fields-get-empty-jasper-report
  5. For XML namespace support you need to parse the document with the namespace aware flag (http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/util/JRXmlUtils.html#parse(java.io.File,%20boolean)). In the mentioned sample that would look like: Document document = JRXmlUtils.parse(JRLoader.getLocationInputStream("data/northwind.xml"), true);[/code] A side note: if you are subDataSource-ing for the subReport, you don't have to pass the XML_DATA_DOCUMENT
  6. Just replace your pageHeader band with a detail one. So instead of: <pageHeader>...</pageHeader>, you should have <detail>...</detail>
  7. If you are using the same XML document in your main report and subreports, it may happen that your XML document does not reach the subreports, which may have already been compiled with JSS and contain the original XML location. You should remove that property/properties, recompile and use the following approach. A similar case is described in the JasperReports xmldatasource sample(http://jasperreports.sourceforge.net/sample.reference/xmldatasource/index.html#xmldatasource): - the XML document is parsed and passed as parameter(see the fill() method used in the sample: https://github.com/Jaspersoft/jasperreports/blob/jr-6-3-1/jasperreports/demo/samples/xmldatasource/src/XmlDataSourceApp.java#L99) - then, inside the main JRXML, the same parameter is passed onto the subreport to avoid parsing the document again(see the main report from the sample: https://github.com/Jaspersoft/jasperreports/blob/jr-6-3-1/jasperreports/demo/samples/xmldatasource/reports/CustomersReport.jrxml#L52) - you may need to consider using the date/number patterns, locale and timezone parameters if your XML contains data related to these items
  8. Switching datasources like that is not possible right now out of the box, but will be in the upcoming release(6.4) through the use of Dataset propertyExpressions(that you set when designing the report JRXML template - and not when creating the ReportUnit) where you could use a parameter that could specify the datasource repository location. This should go hand in hand with the scheduled report's parameters. Other ways to get there could involve developing: a ParameterContributor extension(http://community.jaspersoft.com/wiki/parameter-contributors)or, for more advanced use cases, a Custom Datasource(http://community.jaspersoft.com/documentation/tibco-jasperreports-server-ultimate-guide/v630/custom-data-sources)
  9. The datasource declaration is part of the ReportUnit(http://community.jaspersoft.com/documentation/tibco-jasperreports-server-user-guide/v630/overview-report-unit). Some report units might use a datasource, others might not. When viewing a job definition with the jobs Service (http://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v630/jobs-service#Viewing_a_Job_Definition) you could grab the reportUnitURI from the response and use it with the resources service. With cUrl you would write something like this: curl -u jasperadmin:jasperadmin -H "Accept:application/json" http://localhost:8080/jasperserver/rest_v2/resources/{paht/to/ReportUnit}?expanded=true
  10. To have this working in JasperSoft Studio(JSS): 1. Export your data adapter from the Repository Explorer view to a file, let's say, JsonDataAdapter.xml. 2. In the Main report, for the subreport, specify only the subreport expression: <subreport> <reportElement x="0" y="0" width="200" height="200" uuid="dcbf5591-7870-4d6e-9812-b373f3e03f0c"/> <subreportExpression><![CDATA[$P{SUBREPORT_DIR}+"000062_sub.jasper"]]></subreportExpression></subreport>[/code]Subdatasource-ing here makes no sense since you are already under the "report62.results" path. 3. In the Subreport report add this property: <property name="net.sf.jasperreports.data.adapter" value="path/to/JsonDataAdapter.xml"/>[/code]with the proper value to the JsonDataAdapter. xml from step #1 and recompile. You need this property because JSS will not provide an adapter for the subreport. You might also need to set this property in the Main report when deploying it, unless JSS fills it for you(it might do that when deploying to a JasperReports Server).
  11. Please post complete JRXML content for Main and Subreport. Your fragments are without context and we would just guess what the problem might be.
  12. You need to remove the "backcolor" atribute on the reportElement from your JRXML. It takes precedence over the one coming from the style. You can manually remove the attribute: in the "Appearance" tab of the textField's Properties view by right-clicking the Backcolor color box and selecting the "Set to Null" option orfrom the "Source" tab of your report by directly editing the JRXML
  13. A general rule may be that white space in subreports is preserved in general. There have been a lot of questions related to subreport spacing. Please search for "subreport space" in the answer section.
  14. This is a known issue affecting JasperReports Server v6.1.1 that was fixed in v6.2.0. Please upgrade to at least version 6.2.0.
  15. Those IDs are kept on the session created when you log in. Because you are using two systems to access the server you are loosing that. It has always been like this: http://community.jaspersoft.com/questions/819079/cannot-check-status-assync-execution-using-restv2
  16. We would need to see some sample JRXMLs and sample JSON data. Could you post that?
  17. Please post some JRXML samples illustrating your issue.
  18. If the 2 queries are exactly the same, then maybe you do not need to use a list(with a subdataset and the same query as the main one). You could have the contents of the list placed directly in the detaild band. But we are just guessing here. That's why we need a sample JRXML to work on.
  19. There is a sample - webapp-repo(https://github.com/Jaspersoft/jasperreports/tree/master/jasperreports/demo/samples/webapp-repo) that comes with the jasperreports project - in which most of the interactive features that JasperReports Server exposes can be achieved in a servlet container. To run the sample: 1. Download the jasperreports project source files(https://github.com/Jaspersoft/jasperreports). If you want a stable version pick the latest tag 2. Install apache ant if you don't have it 3. Build the main project(the root of the <jasperreports-project> that contains a build.xml) with: ant alljars 3. Navigate to <jasperreports-project>/demo/samples/webapp-repo and create the application war with: ant war 4. Deploy the jasperreports.war to a servlet container like Tomcat
  20. This is not something built into Visualize.js. However, a resource from the result of a resourceSerch has a URI that you can prefix with: http://<host>:<port>/jasperserver[-pro]/rest_v2/resources and open in a new window. This is taken from the REST API here: http://community.jaspersoft.com/documentation/tibco-jasperreports-server-rest-api-reference/v630/working-file-resources#Downloading_File_Resources You may also need to check the authentication part from the REST API as well since those links may require authentication.
×
×
  • Create New...