Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Problems with doc generation ( footer header)
moflopes
Good afternoon,
I have a rptdesign report where I put margin 0 with no header or footer. When I generate a document thru actuate birt report designer using options >> run >> view report >> as doc, the output is normal. But when I generate thru an application, it puts header and footer each with 1,27. What can I do to remove those? Would it be an onrender event?
Find more posts tagged with
Comments
Yaytay
Can you post a sample report that demonstrates the problem?
moflopes
Attached rptdesign
Yaytay
<blockquote class='ipsBlockquote' data-author="'moflopes'" data-cid="95686" data-time="1328870167" data-date="10 February 2012 - 03:36 AM"><p>
Attached rptdesign<br /></p></blockquote>
I ran this through my standard test harness using BIRT 3.7.1 and it produced zero height headers in all cases, what version of BIRT are you using?<br />
<br />
The code I used is:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
runAndRenderReportDefaultTask( "test.rptdesign", "doc");
protected InputStream runAndRenderReportDefaultTask( String filename, String outputFormat ) throws BirtException, IOException {
IReportEngine reportEngine = createReportEngine();
String filepath = deriveFilepath(filename);
InputStream resourceStream = openFileStream( filename );
assertNotNull( resourceStream );
try {
IReportRunnable reportRunnable = reportEngine.openReportDesign( resourceStream );
assertNotNull(reportRunnable);
File tempDoc = createTempFile( baseFilename( filename ), ".rptdocument");
assertNotNull(tempDoc);
try {
IRunTask reportRunTask = reportEngine.createRunTask( reportRunnable );
assertNotNull(reportRunTask);
try {
addParameters( reportRunTask );
addFilepathToAppContext(filepath, reportRunTask);
startTime = System.currentTimeMillis();
IReportDocument reportDocument = runReport(reportEngine,
reportRunTask, tempDoc);
runTime = System.currentTimeMillis();
IRenderTask renderTask = reportEngine.createRenderTask( reportDocument );
assertNotNull(renderTask);
try {
File tempOutput = createTempFile(baseFilename( filename ), "." + outputFormat);
System.err.println( tempOutput );
FileOutputStream outputStream = new FileOutputStream( tempOutput );
assertNotNull(outputStream);
try {
renderTask.setRenderOption(prepareRenderOptions( outputFormat, outputStream ));
renderTask.render();
renderTime = System.currentTimeMillis();
assertEquals(0, renderTask.getErrors().size());
} finally {
outputStream.close();
}
return new ByteArrayInputStream(getBytesFromFile(tempOutput));
} finally {
renderTask.close();
}
} finally {
reportRunTask.close();
}
} finally {
tempDoc.delete();
}
} finally {
resourceStream.close();
}
}
</pre>
moflopes
Thank You. I'll test your code.