|
Re: Show a preview of the report through runtime API [message #750401 is a reply to message #750129] |
Tue, 25 October 2011 19:27 |
|
You can get a thumbnail of the report but I do not think this is what
you want. Take a look at the general properties and click on the ...
button next to the Thumbnail property. This will generate one for you.
Jason
On 10/25/2011 12:45 PM, Alessio Pollero wrote:
> I want to show a preview of a report in a JEditorPane, usually i run the
> report and display it in a JEditorPane running an IRenderTask run method.
>
> As preview i mean show only the report layout without any data ...
>
> Is there a way to execute only a preview of the report without loading
> the data from the datasource ( without executing the query on the
> database), so the report should run faster ?
>
|
|
|
|
Re: Show a preview of the report through runtime API [message #750519 is a reply to message #750473] |
Tue, 25 October 2011 20:36 |
|
I believe it is 180x229 pixels. Look at an example one attached.
If you generate it as part of the design process you can get it at run
time like:
design = engine.openReportDesign("Reports/TopNPercent.rptdesign");
ReportDesignHandle rdh = (ReportDesignHandle)design.getDesignHandle();
byte[] ba = rdh.getThumbnail();
ByteArrayInputStream inputStream = new ByteArrayInputStream( ba );
Image image = new Image( null, inputStream );
try {
final BufferedImage bufferedImage = ImageIO.read(new
ByteArrayInputStream(ba));
ImageIO.write(bufferedImage, "png", new
File("c:/test/image2.png"));
} catch (IOException e) {
e.printStackTrace();
}
Jason
On 10/25/2011 4:11 PM, Alessio Pollero wrote:
> Ok, Thanks.
>
> What are the size of the thumbnail image ?
>
> Can i retrieve this thumbnail from engine API ?
-
Attachment: image.png
(Size: 6.50KB, Downloaded 139 times)
|
|
|
Powered by
FUDForum. Page generated in 0.26375 seconds