Jump to content
JasperReports Library 7.0 is now available ×

Recommended Posts

By: tim hatzenbeler - timhatz

sql question

2002-03-12 22:58

Is it possible to add SQL commands before and after the query string?

 

Use Case: I would like to issue commands to create temporary tables, for praticular views, to allow joins durring the query... And then delete those temporary tables after the report is done running...

 

But I would like to issue these SQL commands in the XML file, so there part of the report.

 

Thanks, tim

 

 

By: Teodor Danciu - teodord

RE: sql question

2002-03-15 05:59

 

Hi,

 

I have posted an answer to this in the other thread:

https://sourceforge.net/forum/forum.php?thread_id=651523&forum_id=113529

 

Thanks!

Teodor

Link to comment
Share on other sites

  • 8 months later...
  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 years later...

I can't get there either. This thread is quite stale, but useful as a historical reference, so I'll mention that this thread:

http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=8388

addresses the question, albeit briefly.

The query executer provided by JasperReports, JRJdbcQueryExecuter, calls PreparedStatement.executeQuery, which can only do selects, not updates or table creation. In that other thread Teodor suggests creating a "custom query executer" that could add some intelligence to the built-in query executer. "The Definitive Guide to JasperReports" talks about this in Chapter 8 in the section "Query Executer API."

Walter Gillett

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...