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

Scott Andersen

Jaspersoft Staff
  • Posts

    129
  • 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 Scott Andersen

  1. Problem: After installing the 8.0 release of JRS, my embedded reports stopped working. The web page could not find the “visualize” function. I encountered a "visualize not defined" error. This article reviews why this occurs, and several work arounds. Cause: The problem appears when the visualize.js script follows require.js. If you put the script statement identifying visualize.js before the require.js script statement, it works. If the order is switched, it no longer finds the visualize function. <script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script>" <script src="js/require.js"></script> The issue is around how visualize.js is loaded. In version 8.0 a umd header was added into visualize.js script which means that if require.js is loaded before it the visualize.js will load itself into require and not into the window object Here are 5 possible workarounds (try to use any one of them): Load visualize.js script first.In jrs-ui-pro/webpack.config.visualize.js replace libraryTarget: 'umd' to libraryTarget: 'window' and rebuild the visualize.js script. Work with visualize.js as so require(['visualize'], function (visualize) {/* use viz here*/})Temporary replace require with undefined before loading visualize.js require = undefinedUse the following approach:<script src="js/require.js"> <script type='text/javascript' src="http://localhost:8080/jasperserver-pro/client/visualize.js"> <script> require(['visualize'], function (visualize) { window.visualize = visualize }) </script> Although require.js is the jasvavsript library mentioned in this article, it is just one of many implementations of AMD module pattern. It should be the same issue for any AMD loading system used by applications, not just require.js.
  2. The Jaspersoft Studio documentation discusses how to provide different data sourtces to a subreport (Scroll down to the "Specifying the Data Source" section." https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v790/understanding-subreports Other articales that may help: https://community.jaspersoft.com/questions/1145546/defining-different-data-source-subreport https://community.jaspersoft.com/questions/951636/subreport-close-connection Or search for "subreport different data source" in the Jaspersoft community.
  3. It depends on wjhat byou mean by "integrate? I'm assuming you want to integrate the reports designed by Jaspersoft Studio into your application. Jaspersoft Studio is a desktop design tool and as such cannoot be integrated into another application, although the reports created can. The ways to integratereports / visualizations into your app: Using JasperReports Library to code the executioon of the reports into your application. (Available in both commuity and commercial verisons.)Embed using REST services. (This is available in both community and commercial versions, but requires the deploymnent of JasperReports Server which may have licensing implications with your application.)Embed using visualize.js javascript API - (This is only available in the commercial edition ogf Jaspersoft, but is the easiest way to em,bed reports in your application.)
  4. Did you try putting "decorate", "no" on the parameter list of the hyperlink in Studio?
  5. Here is information on localization. https://community.jaspersoft.com/documentation/tibco-jasperreports-server-administrator-guide/v790/localization To implement Rusisian you would need to create a set of russisan locale bundles in the WEB-INF/bundles folder..
  6. This WIKI article might help: https://community.jaspersoft.com/wiki/how-export-my-report-json-format
  7. Automatic Printing in BrowsersFolks using Jaspersoft want a Print button in their applications, to have a report automatically go to the Print dialog in the browser. Lots of folks have this requirement, but it is not easy to solve. https://stackoverflow.com/questions/33254679/print-pdf-in-firefox https://stackoverflow.com/questions/12876000/how-to-build-pdf-file-from-binary-string-returned-from-a-web-service-using-javas The automatic print capability relies on the ability of the different browsers to interact with PDFs. The support for PDFs varies widely across browsers. There are approaches where PDF content is injected into a hidden iFrame, and then iFrame.contentWindow.print() is called. I have found that this does not work for Microsoft browsers. PDFs have the ability to inject JavaScript - like “print();” - that causes actions in the browser when the PDF is downloaded to the browser. Chrome and Firefox will pop the print dialog box in the browser, while Internet Explorer and Edge will not, so those browsers cannot do an automatic print. We have also successfully tested on Safari (iPad), pulling up the print dialog.. To retrieve a PDF from JasperReports Server, a REST or export visualize call has to be made from the browser. Due to cross-origin problems raised by the browsers - again it varies across browsers - the requests have to go through a proxy in the application: “/jasperserver-pro” -> “http:/host:port/jasperserver-pro So the solution…. Add the following into your JasperReports Server. Add the pdfExporterExtensions-1.0.0.jar into WEB-INF/lib. Add the following lines into WEB-INF/applicationContext-remote-services.xml. <util:map id="remoteExportersMap" key-type="java.lang.String" value-type="com.jaspersoft.jasperserver.remote.ReportExporter"> <!-- Add this entry --> <entry key="pdf_print" value-ref="remotePdfPrintExporter"/> </util:map> New bean: <bean id="pdfPrintExportParameters" class="com.jaspersoft.jasperserver.remote.exporters.extension.PdfPrintExportParametersBean"> <property name="javaScript" value="print(true);"/> <property name="repositoryService" ref="${bean.repositoryService}"/> <property name="jasperReportsContext" ref="${bean.jasperReportsContext}"/> </bean> Have a proxy in your application pointing to your JasperReports Server Include the effect of the sample code from TestPrint_REST.html TestPrint_REST.html forces a standard Open or Download option for printing in browsers where the automatic printing does not work. The assumption is that the printing is happening after a JasperReports Server login or SSO, where there is a JasperReports Server user session already in the browser. If a print request is made from a browser that is not logged into JasperReports Server, a Basic Authentication dialog from JasperReports Server will popup. (This was written based on an older version of JRS and has not been evaluated recently.) Credit goes to swood for assistance with this article.
  8. Add it as an attribute for the user. It can then be accessed as $P{LoggedInUser_<attribtureName>}
  9. You could check the "Is for prompting" property for the parameter for testing purposes, then uncheck it after testing and before publishing.
  10. A possible workaround: https://community.jaspersoft.com/wiki/cloning-input-controls
  11. A possible workaround: https://community.jaspersoft.com/wiki/cloning-input-controls
  12. Cloning Input ControlsThere are times you need to duplicate an input control in TIBCO JasperReports® Server. However, the copy / paste function auto-assigns the “Parameter Name”, which is read-only. That column is critical to the usage of the input control, since it must match the parameter name in the Studio Report, so copying and pasting an input control is not an effective way to clone it. Here is a work around that allows you to clone the input control. Steps:Export the Input Control you wish to clone. Do not include any resources or other items in the export – just the input control. Extract the zip file in your file system. In the expanded foldersEdit the Index.xml.Change the “<resource>” to the new input control file name. <resource>/public/Samples/Resources/Input_Controls/Gender</resource> to <resource>/public/Samples/Resources/Input_Controls/Gender2</resource> Rename the resource file to the new name above. …exportresourcespublicSamplesResourcesInput_ControlsGender.xml to …exportresourcespublicSamplesResourcesInput_ControlsGender2.xml Edit the resource file. <name> – The new parameter name. Remember that parameter names cannot contain spaces.<label> – The label for the new input control Add the modified files back into the original zipped export file, overlaying the originals.Import back into JasperReports® Server.The new input control is now in the same folder as the original, with the correct Parameter Name.
  13. Dynamic Report Content in Studio reportsThe TIBCO JasperReports® Server dashboard designer allows users to generate a collection of visualizations in a dashboard, but what if you need the ability to pick and choose content in a pixel perfect report? This article reviews an approach to provide a dynamic PDF report. Assumptions:The master report should be limited to a certain maximum number of sub reports.Not all PDF reports need to use all the available sub reports.The user selects from among a variety of sub reports.The included sub-reports change from user to user as well as the order of the sub-reports.Steps:Create a collection of sub reports to consume. Each sub report should conform to the same report size. This allows the sub reports to be interchangeable. All sub reports should share a common set of input parameters, although a particular sub report does not need to actually use all the parameters. Not all parameters need to be used by every sub report. This allows you to share the “Subreport” component in the master report. When publishing a report to the server you have the option of publishing it either as a “Report Unit” or a “File”. If the report is always going to be used as a sub report, publish it to JasperReports® Server as a “File”. You can still consume a report in a report unit as a sub report but it requires a slightly different path as described below. Create a master report. The master report will control headings, footers, and pagination. On this report place several generic “Subreport” components, up to the maximum number of reports desired.On the “Appearance” Properties tab:Set the “Appearance”, “Print When” property to only show the sub report when the sub report parameter is populated. Set the “Appearance”, “Position Type” to “Float” On the “Subreport” Properties tab:Set the ‘Expression’ property. The sub report expression for each subreport is based on the corresponding parameter. (ie. “Subreport1” parameter is associated with Subreport Component 1, etc.). The parameter contains the URI of the report.Prefix it with “repo:” if it is coming from the Jaspersoft Repository. Set the “Overflow Type” to “Stretch”. Set the height of each Subreport component to a small value (ie. 10 pixels) Create an input parameter for each empty subreport. This parameter contains the URI of the sub-report. Parameter names should not contain spaces. This may cause issues when published to the server. Shared headings should be placed on the master report.“Summary with Page Header and Footer” should be checked on the “Report” Properties page, so that page headers appear on the sub reportsAll resources required by all sub-reports (images, resource files) need to be included in the Master report’s Report Unit.Pagination is controlled by the master report.Create an input control for each subreport parameter. (See alternate approaches below). You need a separate input control for each sub-report. They can be cloned but you still need multipleThe input control can be a list of values, or come from a query. The query can pull information from the JasperReports​​​​​ Server repository database as in the example, or you can set up a separate table containing the available sub reports. This table needs a label field and a URI field.The value to be passed needs to be the path to the desired sub-report in JasperReports​​​​​ Server.If you want to point to a sub report that is in a report unit, the string is “<pathToReportUnitResource>_master_files/main_jrxml” or “<pathToResource>_master_files/Subreport.jrxml”Example: “/public/Dynamic_Subreports/Dynamic_Subreports_master_files/main_jrxml” The path to a file in the sub-report is simply the path to the resource. This URI can be found in TIBCO Jaspersoft® Studio by going to the Advanced Properties for the report (after publishing it to the server), and looking at the checking the “ireport.jasperserver.report.resource” property. This applies to both Report Units and Report files. Notes:You can use the “Save Options” feature in the interactive report viewer to save report configurations. This approach can be used to create dynamic dashboard/KPI reports, (multiple columns), dynamic PDF; dynamic workbooks In this example I have placed all the sub-report resources in the same folder in JasperReports Server repository. This allows me to use a query against the repository database to populate the input control list. Alternatively this list of available sub reports could be placed in a separate database table for querying. Parameter to access sub report needs to point to a .jrxml or .jasper file. Typically .jrxml files are stored in JasperReports​​​​​ Server. You can save/publish a Studio report as a jrxml file if you want to use it as a sub report. You can also reference parts of a report unit to be included as a subreport. Using the scheduler / jobs API, you can generate a dynamic report/pdf easily. Simply set the parameters to reflect the sub reports desired when you schedule the report. Variations:Use the detail section with a single ‘Subreport’ component rather than separate ‘Subrepor’t components. (See the related video linked to below.) This does not allow you to select the order of the sub reports, but does allow you to have unlimited sub reports.Pull the list of reports via a query. Select using a multi-select query input control.Use the parameter into the master report to filter out the desired sub reports in the Dataset and Query using an “$X{IN…} clause.Put the blank Subreport component in the detail section.Use the values from the query to populate the Subreport Expression.Use a report workbook as the master report. This will give you a Table of Contents. Conditional display the subreports as dscribed above. Provide sections for both KPIs and pixel perfect reports. The KPI section could display smaller width sub reports in columns. (See the related video linked to below.)The PDF / full width could be a separate section.List the available reports in a table other than the JasperReports Server repository. Related articles:https://community.jaspersoft.com/wiki/jaspersoft-tech-talks-episode-16-dynamically-loading-subreports
  14. Make the subreport component's Position type = "Float" will place the reports so they follow eah other.
  15. 1 - The mobile summary / detail would best be a separate subreport / jrxml file. 2 - Your main query should return a row for each MISDN. You can then place the MISDN summary/detail on a Detail band.
  16. You can set the subreport's "When No Data type" property to "No pages".
  17. Migrating across TIBCO Jaspersoft® productsJaspersoft offers several products that provide reporting solutions. Different products are applicable to different needs / use cases. Although some of the offerings have advanced functionality, reports created in Jaspersoft® Studio can be used by all. JasperReports® Library is a collection of java classes and is used when reporting needs to be integrated directly in the code of a product. All reports are executed using java, and all aspects of the creation and delivery of the reports, including data connectivity, report generation, and report delivery are coded into the application using the java API. Design of the reports is typically done using Jaspersoft Studio. JasperReports® IO is an HTTP-based reporting service that provides an interface to the JasperReports Library reporting engine through the use of a REST API and a JavaScript API. JasperReports IO wraps the JasperReports Library code in a micro service architecture. Reports are created using Jaspersoft Studio and kept in a file based repository. JasperReports IO can be used to provide easily deliver pixel perfect Studio developed reports. JasperReports® IO At-Scale is a container-based deployment of JasperReports IO for enterprise applications. JasperReports IO At-Scale allows you to scale the JasperReports IO service using specialized sub-services run in separate containers but working together to deliver a single scalable reporting service, allowing you to scale up to thousands of reports per hour and thousands of pages per report. JasperReports IO At-Scale can use either a JasperReports® Server repository or a JasperReports IO repository. JasperReports® Server provides a full featured BI solution. Reports can be designed using Jaspersoft Studio or the ad hoc design in JasperReports Server. The report designs, data connectivity, and other aspects of the BI solution is saved in a repository database. Migration from one solution to the next involves the movement of reports, the connecting to data bases, and the connection to your application. Each migration has it’s own unique considerations. Migrating to JasperReports LibraryMove the report templates to your application. Code the data source connectivity inside your application. Code the report creation inside your application. Code the report delivery inside your application. Migrating to JasperReports IO/JasperReports IO At-ScaleMove the report templates (jrxml files) to the JasperReports IO repository. Set up the data adapters for JasperReports IO. Connect to the reports using REST API or Javascript API. Migrating to JasperReports ServerUse the JasperReports Server UI to create the necessary data sources. Use Jaspersoft Studio to publish the reports to the server. Additional considerations when migrating to different applicationsWhen going from JasperReports Server to JasperReports IO, you lose Ad hoc and dashboard capabilities. This includes the execution of ad hoc reports, as well as the ad hoc and dashboard embedding capability. So it will not be possible to migrate any dashboards / ad hoc reports. If you are implementing JasperReports IO At-Scale with JasperReports Server, no migration is needed. When migrating from JasperReports Server or JasperReports IO to JasperReports Library, you lose API access, both REST and javascript.
  18. You need to upgrade in stages - see the latest Upgrade guide: https://community.jaspersoft.com/documentation/tibco-jasperreports-server-upgrade-guide/v790/upgrading-jasperreports-server-64x-or
  19. Could you provide more details of this error? The "In page" option of JRS input controls work - see the "16. Interactive Sales Report" sample report.
  20. Fishbowl is a product that uses Jaspersoft reports; however Fishbowl has introduced additional functionality / code into their environment. You should contact Fishbowl support for these files.
  21. Fishbowl is a product that uses Jaspersoft reports; however Fishbowl has introduced additional functionality / code into their environment. You should contact Fishbowl support for these files.
  22. Fishbowl is a product that uses Jaspersoft reports; however Fishbowl has introduced additional functionality / code into their environment. You should contact Fishbowl support for these files.
  23. Make sure the background on the text field is "Transparent".
  24. Within Jaspersoft Studio you have the ability to set up accessibility properties for PDF export. Details can be found in the Jaspersoft Studio User Guide https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v790/data-centric-exporters However, there is not much information when it comes to designing a report that is accessible when it is exported to Excel. Excel has a built in ability to test a document for accessibility. The items in this WIKI help you create a document that will pass this test. The items listed are aspects of accessibility provided in Excel, along with information about how you can accomplish it using Jaspersoft. Hyperlinks:If you have hyperlinks in the report, the hyperlink text should reflect the destination / target url. Alternate text will fail the validation. Merged Cells:This is probably the biggest issue when exporting Jaspersoft reports to Excel, and is a big reason for an excel file to not be accessible. When a Jaspersoft report is exported it has to position all content in a column. To reflect the pixel perfect design the exporter merges cells. To avoid this, make sure all cells line up vertically, both in the title, header section, detail section, and footers. Any unaligned field / component will cause a merged cell to be created. In addition, all fields must have the same width as other fields in that vertical collection. Spell check:Proper spelling is critical for accessibility. Underlying data is out of control of the report design, but make sure labels are spelled correctly. Document Properties:You can set the following metadata properties in Studio: net.sf.jasperreports.export.xls.metadata.application - Property that contains the application information to use for the generated XLS metadata. net.sf.jasperreports.export.xls.metadata.author - Property that contains the author information to use for the generated XLS metadata. net.sf.jasperreports.export.xls.metadata.keywords - Property that contains the keywords to use for the generated XLS metadata. net.sf.jasperreports.export.xls.metadata.subject - Property that contains the subject information to use for the generated XLS metadata. net.sf.jasperreports.export.xls.metadata.title - Property that contains the title information to use for the generated XLS metadata. Hide Unused RowsDesigning a report without merged cells as above should also avoid empty rows. Alt Text and CaptionsInsert Alternative Text (ALT text) and captions for informational images or charts. Right click on the image and choose Insert Caption. Right click on the image and choose Format Picture and then, click the third icon over and click on ALT TEXT. Multiple ImagesDo not overlay or group several objects next to one another so they appear as one object. Color to Convey MeaningWhen using color to convey meaning, add a non-color method as well, such as text. Do not use color alone to convey meaning. Color ContrastUse a strong color contrast. This is not usually checked via Microsoft’s Accessibility checker. It requires a visual check. Do not use white text on a gray background.Do not use red and green text and highlighting together.FontsUse fonts that are clear and legible (e.g., Arial or Times New Roman), generally in the 10 to 14 point range.Spacing between lines should be at least 120% of the font size. You can use the padding settings on Text components to ensure this.Use borders on Text components to enhance the ability to identify row, column breaks.Do not use fancy fonts that are more decorative than functional. This is especially important in headings. Accessibility CheckerAlways run the accessibility checker when you are finished with your document to see if any issues are identified, then remediate those items prior to publishing your document. You access the checker by clicking ”File”, the Info menu option will display and then select “Check for Issues”. Select “Check Accessibility”. After Accessibility Checker inspects your content, it reports the inspection results based on the severity of the issue found, categorized as follows: Errors. Issues that are reported as errors include content that is very difficult or impossible for people with disabilities to understand.Warnings. Warnings, in many cases, mean that the content is challenging for people with disabilities to understand.Tips. Tips let you know that, even though people with disabilities can understand the content, it could be better organized or presented to improve their experience.Some of the above hints can also be used to help make a MS Word Document accessible.
×
×
  • Create New...