Jump to content
Changes to the Jaspersoft community edition download ×

accessing ResultSet in scriptlet?


Recommended Posts

By: N Custer - ncuster3

accessing ResultSet in scriptlet?

2002-12-04 10:40

Is there anyway to access the resultset in a scriptlet? I am writing a report that has a normal report layout using the SQL in the queryData tag in the report design. I also want a graph, using jFreeChart in the report, so I'm writing a scriptlet to facilitate that. What I am trying to avoid is having to maintain the query in the xml report design and the scriptlet class as well. If I could access the rset, or even just the pstmt, then I could execute it within the scriptlet, not requiring the scriptlet to know anything about the actual query.

 

Thanks,

Nathan

 

 

By: Teodor Danciu - teodord

RE: accessing ResultSet in scriptlet?

2002-12-07 02:09

 

Hi,

 

In the scriptlets, you have access to report fields

as the engine iterates through the data source.

I guess you will be creating the chart using values

that come from the report data source (result set).

 

You could build a data structure within your scriptlet

object that you'll then pass to the chart library.

 

I hope this helps.

Teodor

 

 

 

By: N Custer - ncuster3

RE: accessing ResultSet in scriptlet?

2002-12-09 10:51

Duh, didn't even think about getting the fields (was already getting parameters in the scriptlet). Thanks for the help, that will work 100% for what I need. I just hated to duplicate the query (and therefore having to maintain it in two places) in my scriptlet.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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