This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to connect to data source when making web report?

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.


RAQ Report is a free excel-like java reporting tool. RAQ Report gives two methods to solve this problem.

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

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;
}catch(ClassNotFoundException cne){
conn= DriverManager.getConnection("jdbc:hsqldb:hsql://localhost:9001/runqianDB","sa","");
}catch(SQLException e){
return conn;

When developing 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.

    Bookmark Topic Watch Topic
  • New Topic