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

jonneighbour76

Members
  • Posts

    2
  • Joined

  • Last visited

jonneighbour76's Achievements

Newbie

Newbie (1/14)

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

Recent Badges

0

Reputation

  1. Hi, I have a large XML jasper print file which I want to load into a JasperPrint object using a virtualizer, I am using the following code to do this: JRVirtualizer virtualizer = new JRSwapFileVirtualizer(3, new JRSwapFile("dir"),4096,50); JasperPrint jasperPrint = JRLoader.loadJasperPrint(tempFile, virtualizer); However when I inspect the jasperPrint object created there are no virtual elements (e.g. JRBasePrintPage instead of JRVirtualPrintPage). When using the same kind of virtualiser and settings for a new report the Fill Manager does create a jasperPrint object with virtual elements Can anyone tell me why this is and if its possible to create a jasperPrint object from XML that does contain virtualized elements?
  2. Hi, I need to be able to convert some old jasperPrint objects stored in a database so they are compliant and up to date with the current version of jasper reports I am using (6.1.0). Part of the reason for doing this was that I found the 6.1.0 JasperViewer would not always render the old 3.7.4 jasperPrint objects. So to convert the old '3.7.4' jasperPrint objects to '6.1.0' jasperPrint objects I wrote a stand alone process to export the original 3.7.4 ones to XML (via xml exporter in jasperreports-3.7.4) and then read back in that XML (via jasperreports-6.1.0) at which point they seem to be converted as required. JasperPrint jasperPrint = JRPrintXmlLoader.load(inputStream) All seems well the reports can be viewed, however I then noticed that the jaserPrint objects were much larger than previously. On investigation it seems its because the newly created versions no longer use JRVirtualPrintPage objects (instead are JRBasePrintPage objects) whereas the original ones did. use virtualisation objects. When generating reports I use a virtualizer and those jasperPrint objects are always created with JRVirtualPrintPage objects and the same size reports are created with a much smaller size of object. So I then tried to use the JRLoader.loadJasperPrint method in my stand alone process however that has made no difference, the jasperPrint object returned is still set with JRBasePrintPage objects even though I specify the same virtualizer settings that I do when creating new reports which does create JRVirtualPrintPage objects JasperPrint jasperPrint = JRLoader.loadJasperPrint(tempFile, new JRSwapFileVirtualizer(2, new JRSwapFile("c:virtualizer",4096,50)) Does anyone know how you can use a virtualizer to create a JasperPrint object from an existing jasperPrint object or XML representation of an existing jasperPrint object? The above seems to ignore the virtaulizer, the swap file is created but is always empty whereas when creating new reports via fill process the swap file is generated with content Thanks in advance...
×
×
  • Create New...