Set page break as you like with Java web reporting tool — RAQ Report

Background

Web Report always needs printing, while printing always needs page break.

A kind of common page break is automatic page break by paper size and page margins. Before printing or displaying, it will calculate that how many rows and columns can be displayed in each piece of paper according to page size and page margins. However, this mode is easy only when the height and width of rows and columns are fixed.

As data are dynamically fetched from database, if they exceed the width of cells, they will widen or heighten cells. Therefore, users have to fetch data and judge whether the data will exceed the width of cells first. Then, they can calculate that how many rows and columns can be displayed in each piece of paper.

Another kind is page break by fixed row number. It means that each piece of paper display fixed number of rows, and the remaining will be displayed in following pages. Users always use this mode for orderly format or preformatted paper printing.

For it needs not to do complex calculations, this mode seems easier. However, as users’ requirements are various, data may exceed the width of cells. It means that the data have to wrap text without change the width and height of cells. Then, the only solution is to shrink font. Nevertheless, it is difficult. For best display effect, the final font is decided with complicated calculations according to both width and height of cells.

In addition, there is another problem about empty rows. As data are dynamically fetched from database, the number of rows is unfixed, and there may be empty rows in the last page. Therefore, users have to supplement these empty rows. Then, how many empty rows are there? It is difficult to know, and users have to do dynamic calculations according to practical condition.

Moreover, there are more complex page break modes. For example, page break with automatic adaptation to paper size. This mode is usually used in reports with dynamically horizontal expansion. As users want to print report in a piece of paper without horizontal page break, and the column number is unfixed, it needs to adjust column width according to final column number.

To sum up, page break is important in web report, and the page break modes provided by a web reporting tool can influence the work efficiency of users greatly.

Solution

As a pure Java web reporting tool, RAQ Report is doing well in this aspect by providing a series of simple and useful modes. After report design, users only need to select a page break mode and a zoom mode, and set related parameters like Rows per page, Print type of vertical break, Print type of table header and footer, etc.

Graphic Illustration

set zoom mode of printing web report with RAQ Report

Zoom mode

set page break mode of printing web report with RAQ Report

Page Break Mode

The effect of supplementing empty rows of print web report with RAQ Report

The effect of supplementing empty rows.

Source: Knowledge Base of RAQ Report
Related Articles:
Export image format PDF files with page break in web reporting tool;
Arrange card type reports easily with reporting tool;
Set pagination for mergence cell with reporting tool ;
High-efficiency report design with Excel-like reporting tool;
Useful Links:
Free Reporting Tool;
Freezea’s Report Lesson;
Reporting Insights from Raqman;
Crystal Reports Basics: Using Page Breaks;

Print web report immediately while loading report with RAQ Report

Background

For printing web report, users often need to print it by clicking the print button. However, sometimes users may want to print report immediately when loading the report on browser.

Solution

As a real Excel-like web reporting tool, RAQ Report provides a direct print function for users. You only need to use the tag <object></object> in the JSP file to call the applet program directly. The solution is that write a print class, which inherits the direct print class DirectPrintApplet,and call the print program directly in the DirectPrintApplet.java. Then you can print the uploading report directly without the trigger program.

Easy operation

1. Write a print class, which inherits the direct print class DirectPrintApplet.(You can choose the DirectPrintWithoutShow name as you like).

2. Put the print class into runqianReport4Applet.jar. Remember to decompress runqianReport4Applet.jar firstly and delete the mete folder before compress it.

3. Sign the new runqianReport4Applet.jar.

4. Use the new class name instead of the called class name in the jsp when direct print while loading report.

Source: Knowledge Base of RAQ Report
Related Articles:
Preformatted Paper Printing of RAQ Report;
Save printing configuration at client-side with Java reporting tool - RAQ Report;
Arrange card type reports easily with reporting tool;
How to easily set page break as you like? ;
Useful Links:
Excel-like Web-based Reporting Software;
Freezea’s Report Lesson;
Reporting Insights from Raqman;
Automatically Printing Crystal Reports in ASP.NET;

Print web report on a specified paper with RAQ Raport

Background

Sometimes, we want to print a web report on a preformatted paper. Such as invoice, bill, credential, etc. With traditional reporting tools, it will be very difficult.

Solution

But now, it will be very easy. With the background picture mode of RAQ Report, we can solve the problem of preformatted paper printing very easily.

Example

Following the example below, you can have a try of preformatted paper printing.

Step 1: Open the report IDE of RAQ Report, and create a new report.
(Tip: You can choose Normal Report or Input Report in “Properties > Report Properties > Input type”. If the data of the report for preformatted paper printing are fetched from database, you can create a Normal Report. If it needs to input data and backfill them into the database, you should create an Input Report.)

Step 2: Choose “Insert > Background”, and the Report Properties dialog box is shown below:
Report Properties dialog box in RAQ Report

Select Each page in the Display Mode drop-down box. Then, the background picture will be displayed in each page. Click the button next to the URL/class name box to select the path of the background picture for preformatted paper printing. Click the OK button to close the Report Properties dialog box, and the background picture is displayed in current report as shown below:

insert preformatted paper image and align the gridlines of RAQ Report to the preformatted paper image

Step 3: Drag the gridlines of report to align them with the gridlines of background picture as shown above. After adjusting the size of each cell, input needed information in appropriate positions. (Make sure that characters are in blank areas.)
(If the data are fetched from database, you can write expressions in cells directly like Normal Report. If it needs to input data and backfill them into the database, you have to set the properties of cells to which data will be inputted as Editable.)

Step 4: Choose “Properties > Report Properties”, and check the Print background at the lower left in the Print tab. It means to print the report with the background picture. (If uncheck it, it means to print the report without the background picture.) As shown below:
check print background to print the paper with the preformatted paper image

Step 5: Save the report as bill.raq.

Step 6: Preview the report in browser as shown below:
preview the preformatted paper report in RAQ Raport

Source: Knowledge Base of Java Reporting Tool
Related Articles:
Display a specific page or specific pages in web report;
Can we make Java report just by drag and drop?;
Set page break as you like with reporting tool ;
Arrange card type reports easily with reporting tool;
Useful Links:
Web-based Excel Reporting Software;
Freezea’s Report Lesson;
Jackson’s Reporting Review;
Known Issues with Printing BIRT Reports using Maximo v7;

Export high precision time data from web report to Excel/Word file

Background

When exporting web report to Excel/Word file, the precision of high precision time data will decrease. That is because of the display format of Excel/Word. For example, if there are time data of millisecond, it will changed to second after being exported to Excel/Word.

This is troublesome for users of web report. then, is there a way to keep the precision of time data?

Solution

The answer is yes!

As a professional web-based Java reporting tool, RAQ Report pays a lot of attention to details. For this problem, RAQ Report provides a wonderful function — str().

Easy Operation

Users only need to write the function as str(value(),”yyyy-MM-dd HH:mm s.S”) as shown below. Then, time data can be displayed correctly after being exported to Excel/Word file.

Users only need to write the display value expression here.

Source: Knowledge Base of Web Reporting Tool
Related Articles:
7 shortnesses of displayTag;
Comparison between RAQ Report and Crystal Report;
HTML report dengan VB;
Exports generated crystal report into Excel Format & download;
Useful Links:
Excel-like Web-based Java Reporting Software;
Freezea’s Report Lesson;
Jackson’s Reporting Review;
Dotnet SourceCode;

Export image format PDF files with page break in web reporting tool

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.

Source: Knowledge Base of Web Reporting Tool
Related Articles:
7 shortnesses of displayTag;
Comparison between RAQ Report and Crystal Report;
Business Objects - Get Crystal Report 2008 Prompts using InfoStore from CMS Repository;
Comma separated Column value in Crystal Report;
Useful Links:
Excel-like Web-based Java Reporting Software;
Freezea’s Report Lesson;
Jackson’s Reporting Review;
*****## R.MARAN. ## *****;

Save printing configuration at client-side with Java reporting tool — RAQ Report

Background

For users’ convenience, RAQ Report provides a lot of printing properties. Such as page margins (left margin, right margin, top margin, bottom margin), paper direction (vertical or horizontal), paper type, paper size, etc. With these available options, users can print their reports accurately.

Sometimes, users may wish that their printing configurations can be saved at client-side. As a result, they can print reports directly without setting each time. As a professional Java reporting tool, RAQ Report realized this wonderful function after thorough research.

Commonly, a client-side computer links to a printer. So the function is designed to save the printing configuration of each report.

Then, another problem appears. A printer/report may be used by several users. Therefore, the printing configuration of each user should be saved.

Solution

With RAQ Report, it is easy to solve the problem. Users only need to call the API of RAQ Report, and write program with user information to save printing configuration.

Operation

Add servlet in web.xml:
<servlet>
<servlet-name>com.runqian.report4.usermodel.PrintSetupServlet</servlet-name>
<servlet-class>com.runqian.report4.usermodel.PrintSetupServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>com.runqian.report4.usermodel.PrintSetupServlet</servlet-name>
<url-pattern>/servlet/PrintSetupServlet</url-pattern>
</servlet-mapping>
Add savePrintSetup=”yes”

Then, a clientPrintSetup.properties configuration file will be generated automatically for saving printing configuration.

Source: Knowledge Base of RAQ Report
Related Articles:
How to arrange card type reports with ease?; Set page break as you like with reporting tool; Economising on Customer Service; MicroStrategy Announces MicroStrategy 9;
Useful Links:
Knowledge Base of RAQ Report; Freezea’s Report Lesson; The Data-Driven Enterprise Community; Vara Prasad S Manjula’s Blog; SAS: Great Revenues in a Bad Economy