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

rodney.barbati

Members
  • Posts

    2
  • Joined

  • Last visited

rodney.barbati's Achievements

Newbie

Newbie (1/14)

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

Recent Badges

0

Reputation

  1. Things I would try to resolve this... I notice you are passing a significant amount of text as parameters. I also observe that you are saying that that significant amount of text is what is being truncated in the report output. I would guess (with a strong chance that this is the case), that the width of the element is not sufficient to contain the text AND that the element is not set to grow vertically AND that the band the element is in is not actually large enough vertically to contain said text. So, that means the element receiving the text should be widened, it should be set to stretch vertically (it will word wrap within its width) ie. field.setStretchType(StretchTypeEnum.RELATIVE_TO_BAND_HEIGHT). This will cause it to grow to the height of the band it is in. Make sure the band is large enough to contain the text. An alternative to the above is to actually create the report such that each page is a separate report definition. You would create a report definition for each distinct page using only the detail band and turning off all other bands. You would then create the actual report definition and include the distinct page definitions in its detail band as subreports. The containing report definition could then have actual report headers and footers, and the subreports take care of laying out each page.
  2. In the past, multiple times, I have created jasper reports integration in web applications in the following manner... This assumes that you have created your reports with the data source defined in the report definition (i.e. The SQL statement to select data for the report is in the report definition.) Create database table for storing the following...Report DefinitionsNamejrxml file nameCLOB containing HTML needed to present form to collect input parameters for report from userCreate a servlet which the reporting UI will use to communicate with the server and jasper reports engineCreate a web page that presents the Report UILet user select desired report from list retrieved from above table through the above servletOn selection of report...Retrieve the HTML associated with the report from above table through above servletPresent form retrieved from above table in divLet user edit the formSubmit the form to the servletOn the server, compile the jrxml file associated with the selected reportPump the parameters obtained in the last submit to the servlet into the compiled reportProduce the report using the jasper engine to a .pdf streamOutput that stream to the report UI for display (and possible conversions supported by the report UI)This approach provides your web application with a single implementation that allows for producing and viewing any or all reports, as well as allowing the user to control the rendering of the report as well (i.e. turn headers on/off). By presenting the reports in the UI as well, you can also provide buttons for printing and converting to different formats which can be used by all reports.
×
×
  • Create New...