Yes, i-net Clear Reports supports the export in multiple file formats, e.g.: PDF, RTF, HTML, … (see Supported Output Formats). You can start the export either with the button in the Java Client, via the API of the Java Client or via the Engine API without a preview in the Java Client.
For more information about this please refer to the API documentation. The Java code samples can be installed using the i-net Clear Reports setup that you can download from i-net software's website.
You can find the list of the supported output formats in the documentation.
Yes, it is possible to export a report to the .xls, .pdf, .doc format. In the documentation you can find the complete list of the supported export formats.
With Microsoft Word you can import *.rtf documents.
| Feature | Supported | Comments |
|---|---|---|
| Field objects | Yes | |
| Text objects | Yes | |
| Graphics - and Blob objects | No | |
| Crosstab objects | No | |
| Sub-Reports | No | |
| Lines- and rectangle objects | No | |
| Overlapping objects | No | Restriction of the CSV file format |
| Refresh report (refresh button) | Yes | Property “ReloadOnNewRequest” need to be true: Cache Properties. |
| Export in a single file | Yes | |
| Hyperlinks | No | |
| Drill Down | No | |
| Mailing Label | No |
The HTML export currently only supports the HTML 3 format.
| Feature | Supported | Comments |
|---|---|---|
| Field objects | Yes | |
| Text objects | Yes | |
| Graphics-, blob- and diagram- objects | Yes | as JPEG images |
| Crosstab objects | Yes | (with table width <page) |
| Sub-Reports | Yes | |
| Vertical lines- and rectangle objects | No | Restriction of the HTML 3 file format. HTML 4 format will be supported in future version. |
| Overlapping objects | No | Restriction of the HTML 3 file format. HTML 4 format will be supported in future version. |
| Refresh report (refresh button) | Yes | Property “ReloadOnNewRequest” need to be true: Cache Properties. |
| Export in a single file | Yes | Supported since version 5.2. With the property “layout” it is possible to set the format of the HTML export. The following value are possible: - single: complete report in one HTML file with one Page Header and one Page Footer - concat: complete report in one HTML file with Page Header and Page Footer per report page - property not specified (default): single HTML file for each report page. |
| Hyperlinks | Yes | |
| Drill Down | No | |
| Mailing Label | Yes |
| Feature | Supported | Comments |
|---|---|---|
| Field objects | Yes | |
| Text objects | Yes | |
| Graphics- and Blob objects | Yes | as JPEG images |
| Crosstab objects | Yes | (with table width <page) |
| Sub-Reports | Yes | |
| Lines- and rectangle objects | Yes | |
| Overlapping objects | Yes | z-order: boxes, lines, other elements |
| Refresh report (refresh button) | Yes | Property “ReloadOnNewRequest” need to be true: Cache Properties. |
| Export in a single file | Yes | |
| Hyperlinks | Yes | |
| Drill Down | Yes | |
| Mailing Label | Yes |
| Feature | Supported | Comments |
|---|---|---|
| Field objects | Yes | |
| Text objects | Yes | |
| Graphics- and Blob objects | Yes | as JPEG images |
| Crosstab objects | Yes | (with table width < page) |
| Sub-Reports | Yes | |
| Lines- and rectangle objects | Yes | |
| Overlapping objects | Yes | z-order: boxes, lines, other elements |
| Refresh report (refresh button) | Yes | Property “ReloadOnNewRequest” need to be true: Cache Properties. |
| Export in a single file | Yes | |
| Hyperlinks | Yes | |
| Drill Down | No | |
| Mailing Label | Yes |
| Feature | Supported | Comments |
|---|---|---|
| Field objects | Yes | |
| Text objects | Yes | |
| Graphics- and Blob objects | Yes | Supported since version 8.0 |
| Crosstab objects | Yes | Supported since version 6.0 |
| Sub-Reports | Yes | |
| Lines- and rectangle objects | Yes | Supported since version 7.0 |
| Overlapping objects | No | Restriction of the XLS file format |
| Refresh report (refresh button) | Yes | Property “ReloadOnNewRequest” need to be true: Cache Properties. |
| Export in a single file | Yes | |
| Hyperlinks | No | |
| Drill Down | No | |
| Mailing Label | Yes |
Yes, it is possible to embed ttf fonts in the exported pdf file.
To do you need to:
You can use all supported export formats on the:
… Engine eng = new Engine(Engine.EXPORT_XLS); eng.setReportFile( "file:C:/report/MySample.rpt" ); … eng.execute(); File exportedFile = new File("c:/sample.xls"); FileOutputStream fos = new FileOutputStream(exportedFile); for(int i=1;i<=eng.getPageCount();i++) { fos.write(eng.getPageData(i)); } fos.close(); …
This code works for all export formats except the HTML format. The export to HTML produces an HTML file for each report page and an image file for each image in the report. The format of the byte array that is returned by getPageData is the following:
size of the file name file name size of the file content file content size of the file name file name size of the file content file content …
The sample “Export_without_Viewer_to_HTML.java” demonstrates how you can export to HTML on the server without preview.
After you have created a report template with the i-net Designer you can export this report:
“Export_with_Viewer.java” in the directory “samples/export” of the i-net Clear Reports documentation): // Initialize the viewer, add a report view connected to the URL of a report. URLRenderData renderData = new URLRenderData("http://<ServerName>:9000/?report=file:C:/samples/sample.rpt"); SwingReportViewer viewer = new SwingReportViewer(); ReportView view = viewer.addNewReportView(renderData); // Export report to desired file view.export(ReportView.EXPORT_PDF, "C:/myExports/sample.pdf");
http://ServerName:9000/?file:c:/sample.rpt&init=pdfEngine eng = new Engine(Engine.EXPORT_PDF); // Set the export format e.g. pdf eng.setReportFile( "file:C:/MyReports/Sample.rpt" ); // Set values for needed parameters //eng.setDll("....dll"); //eng.setHost("..."); //eng.setPrompt("...",0); eng.execute(); File pdfFile = new File("C:/MyExports/Sample.pdf"); FileOutputStream fos = new FileOutputStream(pdfFile); for(int i=1;i<=eng.getPageCount();i++){ fos.write(eng.getPageData(i)); } fos.close();
You can find the complete sample “Export_without_Viewer.java” in the directory “sample\export” that is part of the i-net Clear Reports documentation.
We assume that you have requested two or more input streams (see java's urlConnection.getInputStream()) by sending the following URL:
http://<server>:port/?report=<reportname>&init=rtf
If stream1 corresponds to the first rtf file and stream2 to the second, then the last byte of stream1 must be deleted, byte string ”/page” must be attached to stream1 and finally stream2 without the first byte must be attached.
If you receive the error: “This operation requires the merged cells to be identically sized.”, then you must split the cells first.
Please mark all cells (with ^A) and then:
After that you can sort the columns.
The i-net Clear Reports postscript export supports postscript levels 1, 2 and 3. In general the PS level 1 export creates larger documents but is very fast. Postscript level 2 export is slower but can be previewed with ghostview for example because it contains proper DSC comments. Postscript level 3 is like postscript level 2 but embeds the TTF fonts used by the document into the document itself.
| Level 1 | Level 2 | Level 3 (supported since version 5.1) | |
|---|---|---|---|
| Streaming possible | yes | no | no |
| Page preview in ghostview | no (page n of m - DSC comment is missing because streaming) | yes | yes |
| TTF font embedding | no | no | yes |
| Report generation | fast | slow (because page n of m - DSC comment used) | slow (because page n of m - DSC comment used) |
Assuming that your application to view CSV responds to application/MyApp and you want to view CSV in your application, please create a checkProperties() method:
public void checkProperties (Properties props, Object servletRequest) { if(props.getProperty("content").equals("text/x-comma-separated-values") { props.put("content", "application/MyApp"); } }
After that your application MyApp starts and reads CSV whenever you type init=csv.
If you use quotation marks in the report URL (e.g. for multiple value string prompt fields) and you use the Internet Explorer to display the exported .pdf file directly with init=pdf then you will get a corrupt pdf file that cannot be displayed in the Adobe Acrobat Reader 6 plug-in.
Solution:
…&prompt0=[%22promptValue%22]&… instead of …&prompt0=['promptValue']&… or
i-net software strives to provide accurate product documentation. Please give us your feedback using the form below.
NOTE: This form is for documentation feedback only. For technical assistance, please send an email to clearreports@inetsoftware.de.