Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Different no of pages for pdf and docx reports
Migrateduser
<p>Hi,</p>
<p> </p>
<p>We have written the java code to generate a report in pdf and docx. But the problem we noticed is the number of pages for each format is different from each other.</p>
<p>For example if report generated in pdf is taking 92 pages then same report while generated in docx is taking 72 reports. Its about 20 pages. Is it possible to get same pages for different formats?</p>
<p>The below mentioned code is used to generate the report.</p>
<p> </p>
<p> Code:</p>
<p> EngineConfig config = new EngineConfig();<br>
Platform.startup(config);<br>
ReportEngine engine = new ReportEngine(config);<br>
IReportRunnable reportRunnable = engine.openReportDesign(reportDesign);<br>
IRunAndRenderTask runAndRender = engine.createRunAndRenderTask(reportRunnable);<br>
<br>
PDFRenderOption option = new PDFRenderOption();<br>
option.setOutputFileName(PropertyFactory.getProperty("PdfSavingPath")+reportName);<br>
option.setOutputFormat(reportFormatType);<br>
option.setOption(IRenderOption.HTML_PAGINATION, Boolean.TRUE);<br>
runAndRender.setRenderOption(option);<br>
<br>
HashMap<String,List<DataPage>> appContext = new HashMap<String,List<DataPage>>();<br>
appContext.put("ScriptedDataSetData", dataPages);<br>
runAndRender.setAppContext(appContext);<br>
<br>
runAndRender.run();<br>
runAndRender.close();<br>
engine.destroy();<br>
Platform.shutdown();</p>
<p> </p>
<p> </p>
<p>Thanks,</p>
<p>Ravi</p>
Find more posts tagged with
Comments
There are no comments yet