Arrange card type web reports easily with RAQ Report

Background

Card type web report is usually used in practical web reporting applications, such as employee information card, ID card, business card, etc. Card type report’s characteristic is that the area of each card is small, and many cards need to be arranged on a piece of paper. Moreover, there is a gap between two pages for clipping.

Have you ever been frustrated with a condition like this when you are making card type report with web reporting tool? Then, how to do it?

With common web reporting tool, the most direct method is to calculate the numbers of rows and columns can be deployed on a piece of paper according to the sizes of paper and card. However, as users usually want to configure the numbers of rows and columns, it has to do complex dynamic computations to get the gap between two cards according to users’ configuration before printing and displaying.

For the title of card type web report, there are two modes, one card one title and one paper one title. Then, it should allow users to choose the mode they like. For the one paper one title mode, it needs to independently deploy the title first, and then deploy the remaining data area.

Solution

As a pure Java web reporting tool, RAQ Report does a lot of work on this problem for users’ convenience. As a result, users can make card type reports with it easily. They just need to set parameters of print and page break after report design.

Graphic Illustration

set Print parameters in RAQ Report.
Print parameters needed to be set.

set Page break parameters in RAQ Report
Page break parameters needed to be set.

One card one card mode and one card one piece mode in RAQ Report

Source: Knowledge Base of RAQ Report
Related Articles:
How to fix report head easily?;
Set page break as you like with reporting tool;
Set pagination for mergence cell with reporting tool ;
Make title area always aligned with data area;
Useful Links:
Free Java Reporting Tool;
Freezea’s Report Lesson;
Jackson’s Reporting Review;
Business Card Report;

Network connection ways of debugging web report on different operating systems with VMware

When developing web report, many developers use VMware to simulate different operating systems on a same server. Then, they can realize cross-platform deployment and debug of web report. According to real application of web report, I will discuss three network setting ways of VMware with all of you.

Bridge way

This is the simplest way as it bridges the virtual network card to a physical network card directly. It is similar to a network card binding with two different addresses in linux. In fact, it sets the network card as promiscuous mode, and then the card can sniff several IP addresses.

In this mode, the internal network card of virtual machine(eth0 under linux is an example) is linked to the network of physical network card directly, and you can imagine that virtual machine and host machine have equal status in network relation.

To use this way, you need to get more than one IP address.

This way is not suitable for those who want to do network experiments, because you can not control the network of virtual machine.

Nat way

In this way, a virtual network card vmnet8(by default) appears in the host machine. If you have experiences of Nat server, you can imagine that vmnet8 is equal to the network card linked to internal network, while the virtual machine is equal to the machine running in internal network, and the internal network card(eth0) of virtual machine is independent of vmnet8.

You can find that the own dhcp of vmware will be loaded to the interface of vmnet8 by default. Then, virtual machine can use dhcp service. More important, vmware has its own Nat service which provides address transformation from vmnet8 to outer network.

Therefore, there is a real running Nat server, but only used for virtual machine.

Obviously, if you have only one Outer network address, this way is quite suitable.

Hostonly way

This is the most flexible way, and you can do all kinds of network experiments. The only difference with Nat way is that it has no address transformation service. Therefore, virtual machine only has access to host machine by default. This is the meaning of the name “hostonly”.

By default, a dhcp service will be loaded to vmnet1. Then, the virtual machine linked to vmnet1 also can be setted as dhcp, and this makes the configuration of system easy.

Is this way can not link to outer network?

No. In fact, it is more suitable as you can use your own way to get the best configuration.

Examples:

1. Use your own dhcp service. First, you should stop the dhcp service of vmware, and make dhcp service more uniform.

2. Use your own Nat, and add firewall easily. There are many ways to do Nat with windows host. The Internet sharing of window XP

is a simple one, and the Nat service of windows server is a complicated one.

3. Use your own firewall. As you can totally control vmnet1, you can add (or try) a firewall between vmnet11 and outer network.

As stated above, you can see that this way is similar to that common Nat server link to outer network with the whole internal network. So you can do related experiments easily. For example, the setting of firewall.

Source: Knowledge Base of RAQ Report
Related Articles:
Preformatted Paper Printing of RAQ Report;
How to insert local report with report wizard?;
Built-in dataset: an innovation in reporting tool;
Save printing configuration at client-side with Java reporting tool ;
Useful Links:
Excel-like Web-based Java Reporting Tool;
Live in Reporting;
Jackson’s Reporting Review;
Testing and Debug of Reports;

Analyse the error of database connection factory in web report development

Problem

For the users of web report tool, when developing web report, they need to configure dataset at first. When data source is complicated, they often want do some special handling to dataset. With the dataset factory listener class of RAQ Report, they can realize this idea.

However, users may meet a few problems in the use of dataset factory listener class. Next, we will introduce the common problems to help users to develop web report correctly with RAQ Report.

Error information

Error code 500 Message: : Failed to generate dataset factory: com.runqian.report4.dataset.SQLDataSetFactory Error source: : In dataset ds1, datasource report/core_epm is setted falsely or not running, please check data source: Abnormity: : Failed to generate dataset factory: com.runqian.report4.dataset.SQLDataSetFactory Error source: : In dataset ds1, datasource report/core_epm is setted falsely or not running, please check data source: at com.runqian.report4.model.CalcReport.calcDataSet(Unknown Source:317) at com.runqian.report4.usermodel.Engine.calc(Unknown Source:96) at ep.verify.expression.VerifyExpression.reportExpressionCalc(VerifyExpression.java:57) at ep.commons.init.InitShowReportParams.verifyReport(InitShowReportParams.java:63) at ep.commons.init.InitShowReportParams.(InitShowReportParams.java:43) at org.apache.jsp.reportJsp.showReport_jsp._jspService(showReport_jsp.java:68) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

Possible Reasons

1. Check the contxet of public void beforeCreated method which is setted to the IDataSetFactoryListener interface. If there is only connection in it, you’d better to set dataset factory. Then, if the connection in context is closed, data can be got from dataset factory.

2. Print connection. If it isn’t empty, the reason may be that datasource is configured repeatedly. If data source information is configured in reportConfig.xml before, users are not allowed to configure it in custom codes again. Or else, it will report error. To solve the problem, users only need to delete those configuration codes.

Source: Knowledge Base of Java Reporting Tool
Related Articles:
Display a specific page or specific pages in web report;
Make cell unassailable to random content with reporting tool;
Built-in dataset: an innovation in reporting tool;
Keep the matching between code and display value in reporting tool ;
Useful Links:
Web Report Software;
Freezea’s Report Lesson;
Jackson’s Reporting Review;
Using a supplied connection with BIRT;

Connect to data source when making web report with Java reporting tool — RAQ Report

Background

When users are making web report, they always have to connect to data source. As users’ data requirements are differ in thousand ways, so users often need to define data source by themselves. Sometimes, this may be very complex.

Solution

As a professional Java web-based reporting tool, RAQ Report givesout two methods to solve this problem.

1. Connect to data source with the API of RAQ Report. And the program is as follows:

context.setDefDataSourceName("demo");
context.setConnection("demo",con);
DataSourceConfig dsoc = new DataSourceConfig(2,
true, "GBK", "GBK", false);
context.setDataSourceConfig("demo", dsoc);

2. Connect to data source with jdbc. And the program is as follows:

public java.sql.Connection getConnection() throws Exception {
Connection conn=null;
try{
Class.forName("org.hsqldb.jdbcDriver");
}catch(ClassNotFoundException cne){
cne.printStackTrace();
}
try{
conn= DriverManager.getConnection("jdbc:hsqldb:hsql://localhost:9001/runqianDB","sa","");
}catch(SQLException e){
e.printStackTrace();
}
return conn;
}

When develop web reporting project, users can connect to data source easily with these two methods provided by RAQ Report. Accoding to real business, users can choose a better one.

Source: Knowledge Base of Java Reporting Tool
Related Articles:
Change data source dynamically while updating web input report;
7 shortnesses of displayTag;
Submit data to multi-dataset/multi-source with web-based reporting tool — RAQ Report;
High-Efficiency Report Design ;
Useful Links:
Excel-like Web-based Java Reporting Tool;
Freezea’s Report Lesson;
Reporting Insights from Raqman;
How To: Create a Crystal Report from ADO.NET Dataset using Visual Basic .NET Introduction:;

Display current page number and page amount with RAQ Report extHtml Tag

Background

Sometimes, in real business of web report, the volume of data may be very huge. Then, when reading, displaying and exporting the report, problems like low speed, memory overflow, and system crash may appear.

How to solve the problem?

As a professional Java Web reporting tool, RAQ Report always tries best to make users convenient. RAQ Report provides advanced paging tag extHtml which expands the functions of original Html tag, and realizes reading, displaying, and exporting data by page. Therefore, it decreases memory footprint, enhances operating efficiency, and avoids memory overflow.

Then, how to display a specific page or several specific pages in cell with RAQ Report extHtml paging tag?

Solution

There are two solutions.

1. Supposed that the number of default cache page is 100, set the value of cachePageNum as 1. Input expression “beginRow/20+1″ in a cell to display current page number, and input the expression “totalCount/20″ in a cell to display total number of pages. If the value of cachePageNum is not set as 1, the value of beginRow will not change, and the current page number will be 1 all the time.

2. Set the data type of a cell as html, and input the js code below to the cell.

<script>
document.write(report1_getCurrPage());
</script>

Then the current page number will be displayed when clicking “next page”.

Input the expression “=floor(query(’SELECT count(*) FROM Dataset ‘/20,0)+1″ in a cell to display total number of pages.

Source: Knowledge Base of Web Reporting Tool
Related Articles:
BIRT Tips for Java Developers; Save printing configuration at client-side with Java reporting tool; 7 shortnesses of displayTag; BIRT automatic odd even rows highlighting using style;
Useful Links:
Excel-like Web-based Java Reporting Tool; Freezea’s Report Lesson; a developer’s breadcrumb; Random problems about computer and linux, java, programming, etc; Jackson’s Reporting Review

Better integration solution of Web reporting tool

Background

Report development is only a part of application program, therefore, the integration of Web reporting tool is of great importance.

All the traditional Web reporting tools provide an independent report server without exception. With an independent report server, the application architecture is shown below:

The application architecture of traditional reporting tool

The application architecture of traditional reporting tool

The disadvantages of an independent report server:
● The independent report server communicates with application program via network protocol, and this degrades system performance seriously.
● It is unable to use all the advantageous functions of application server, such as the cluster capability, the management capability of connection pool, etc.
● Report server has an independent management mechanism of user permissions, which can not adapt the requirements of particular user role management from various industries and applications. It is insufficient, while it force application program to obey its rules.
● With too few APIs and weak control, it is hard to integrate.

Solution

RAQ Report is a professional Web reporting tool.
As a pure Java reporting software, RAQ Report provides integration as Jar package to programmers. Without independent report server, application infrastructure, and independent management mechanism of user permissions, RAQ Report can help programmers to implement integration conveniently. Its application architecture is shown below:

The application architecture of RAQ Report

The application architecture of RAQ Report

The advantages of no independent report server:
● The server of RAQ report is submitted as Jar package or application of application server. Therefore, it can get integrated with application program seamlessly to achieve the peak operating efficiency.
● Share the cluster capability and the management capability of connection pool of application server.
● Make unified deployment. Use the user role management mechanism of Web application directly to avoid the incompatible problem of two management mechanisms. Provide a unified login screen, and end users need not to log in twice.

Source: Knowledge Base of Web Reporting Tool
Original Post: Better integration solution of Web reporting tool
Related Articles:
How to arrange card type reports with ease?; Input type of RAQ Report; Which one is better for reporting tool: open source or charge?; Keep the matching between code and display value in reporting tool;
Useful Links:
Excel-like Web-based Java Reporting Tool; Freezea’s Report Lesson; Insights from Raqman; Live in Reporting; Jackson’s Reporting Review