mike jan

Greenhorn
+ Follow
since May 22, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by mike jan

Background

In real application of web report, users often want to export report to PDF files. However, when users export web report to PDF file with API, there is usually no page break As a result, the exported PDF file may be very large, and the PDF file is of text mode.

Solution
RAQ Report is a Excel-like web-based Java reporting tool, and it provides a perfect solution to solve this problem.

With the API of RAQ Report, users can export web report as PDF file easily. Moreover, RAQ Report can export PDF files as image format with page break. As a result, the PDF file won’t be very large.

The only thing users need to do is setting the page break mode and image format for exporting web report to PDF file. The codes are as follows:

import java.io.FileOutputStream;
import java.io.OutputStream;
import com.runqian.report4.model.ReportDefine;
import com.runqian.report4.model.engine.ExtCellSet;
import com.runqian.report4.usermodel.Context;
import com.runqian.report4.usermodel.Engine;
import com.runqian.report4.usermodel.IReport;
import com.runqian.report4.util.ReportUtils;
public class ExportToPdf {
public static void main(String[] args) {
try{
String report = "D:/toExcel.raq"; //The location of report template
String pdfPath= "D:/test.pdf";
String licenceFile = "D:/2009-12-31V4.0Windows.lic"; //The location of authorization file
//Read report template
ReportDefine rd = (ReportDefine) ReportUtils.read( report );
//Second step: set report authorization file,and compute report.
ExtCellSet.setLicenseFileName( licenceFile );
Context context = new Context();
Engine enging = new Engine( rd, context);
IReport iReport = enging.calc();
ReportUtils.exportToPDF(pdfPath,iReport,true,true);
}catch(Exception e){
e.printStackTrace();
}catch(Throwable t){
t.printStackTrace();
}
}
}
The parameters of function exportToPDF(pdfPath,iReport,true,true):

The first parameter pdfPath is the path of the PDF file.

The second parameter iReport is the object of the report.

The third parameter is the page break mode of the PDF file. True means page break, while false means no page break.

The fourth parameter is the format of the PDF file. True means image, while false means text.

With this wonderful function, users can export perfect PDF file easily.

15 years ago
Background

Most Java web reporting tools, especially those have some BI characteristics, often claim to end users that their products are simple to use. Some reporting tools promise that they can allow end users to make various statistical reports follow their own inclinations, and evenmake a report just by drag and drop.

Has web report development become so easily?!

The fact is that programmers are still struggling against various reports. Both web reporting softwares and OLAP products seldom allow end users to use them directly, therefore, end users are still using Excel.

For end users, making a simple Web report (with row grouping or simple cross) with these common reporting softwares is ok, as they can do with the wizard and the semantic layer. However, end users can not make most complex reports by dragging and dropping the relations of data structure which they do not understood. Therefore, it is impossible for end users to make all the report with these common reporting softwares.

Drag and drop can only set the positions of data items, but they even can not do this very well. As current reporting tools’ editing styles are commonly based on controls, and it is a general editing proposal of graphical primitive, it absolutely does not show the regularity of table. However, real successful table products like Excel are not based on controls. For summary conditions, grouping rules and operation formulas, which have to be dealt with in complex reports, drag and drop can do nothing at all. Therefore, end users have to understand the operation model of report first, and then, write abstract expressions. This is not much easier than coding.

Solution

Then, is it impossible for end users to make Web reports by themselves?

Yes, it is possible of course!

However, they can only make those simple reports with universal web reporting tools. In order to make complex industry reports, they must use reporting tools with industry characteristics. In other words, programmers must add industry experience into some technical reporting tools, and set the styles and templates of report. Then, end users only need to input parameters and indicators to make various complex reports. The degree of difficulty is determined by the functions and integration of the reporting tool.

To sum up, it is not easy to make complex web reports by drag and drop as others said.


This post is from freezea's blog. You are welcomed cc it anywhere, and please indicate the source.
If you would like to read more articles about reporting tool, you are also welcome to refer to his blog.
15 years ago
Overview:

In Java environment, RAQ Report has obvious advantages in deployment, integration, application and application program interface as a pure Java reporting tool.

In non-Java environment, both RAQ Report and Crystal Report operate in the independent report service mode. Therefore, there is no much difference.

In report design, RAQ Report is obvious more convenient in report plotting than Crystal Report. More important, the data models of RAQ Report make its ability of making complex reports much better than that of Crystal Report. Therefore, the report design efficiency of RAQ Report is much higher than that of Crystal Report.

In report display, there is no much difference between RAQ Report and Crystal Report. RAQ Report only has a few details better than Crystal Report.
15 years ago