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

davidcanos

Members
  • Posts

    1
  • Joined

  • Last visited

davidcanos'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. I'm building a PDF with the same image in each page. I'm trying to avoid the duplicated images by using the script Lucianc said in 2009: http://community.jaspersoft.com/questions/529773/export-huge-pdf#node-576652 However doesnt seem to work in 6.2.0 neither 6.1.0. My code looks like this LocalJasperReportsContext ctx = new LocalJasperReportsContext(DefaultJasperReportsContext.getInstance());RenderableUtil renderableUtil = RenderableUtil.getInstance(ctx);Renderable image = renderableUtil.getRenderable("http://myimagelocation.jpg"); List<JasperPrint> jasperPrint = new ArrayList<JasperPrint>(); for(Ticket ticket : tickets){ Map<String, Object> params = new HashMap<>(); params.put("image", image); try{ JasperPrint aux = JasperFillManager.fillReport(jasperReport, params, new JREmptyDataSource()); jasperPrint.add(aux); } catch(JRException jre){ }} return jasperPrint;[/code]Report is a simple onepage with one image lazy=false, cache=true, evaluationTime = Report, printRepeatedValues = true, no grouped Parameter "image" is typed: net.sf.jasperreports.engine.Renderable (since i'm using 6.2.0) any idea what i'm doing wrong? thanks in advanced
×
×
  • Create New...