Jump to content
We've recently updated our Privacy Statement, available here ×

iReport 0.4.0 Parameters


2004 IR Help

Recommended Posts

By: Graham Pearson - gspearson

iReport 0.4.0 Parameters

2004-11-30 08:53

I am a new user of iReport and have a report which compiles correctly without a parameter. Now I am wanting to add a parameter to limit the results. Following the video tutorial works up to the point of adding $P{name} to my sql query and after clicking on Read Fields, I get an error message which states.

 

General problem: Sourced file: inline evaluation of : ''bshCalculator.evaluate(832);" : nullCheck username and password;. is the DBMS active ?!

 

The video tutorials have been written for 0.2.2 and instructions do not work for iReport 0.4.0.

 

Suggestions?

 

 

 

 

By: Graham Pearson - gspearson

RE: iReport 0.4.0 Parameters

2004-11-30 10:52

With this issue, I am getting the following message in the iReport window:

 

Kindergarten_Report_Card.java:829: inconvertible types

found : int

required: java.lang.Integer

value = (java.lang.Integer)(4945);

 

This same message is also on lines 1397 and 1965

 

 

 

 

By: 16N4C10 - jignacio

RE: iReport 0.4.0 Parameters

2004-12-01 04:24

Try this:

add a default value for the parameter, example for a double parameter -> new Double('1')

then add the parameter to the query as

... = $P!{parameter_name}

This worked properly for me.

good luck!

 

 

 

 

By: Graham Pearson - gspearson

RE: iReport 0.4.0 Parameters

2004-12-01 06:16

Let me make sure I am doing this correctly. Under Report Parameters I have:

 

Parameter name site_id

Parameter Class java.lang.Integer

Default value expression 4945

 

 

Then under the Report Query, I have my SQL Query which in the where clause I have

 

and users.site_id = $P!{site_id}

 

 

In the report parameter if I remove the default value, I will get a message that states please set a default value for the parameter 'site_id' which is what I expect. However if I put in 4945 as the default value I get the DBMS error message.

 

 

 

 

By: Erik Tennant - tennant

RE: iReport 0.4.0 Parameters

2004-12-01 14:53

I'm getting the same error, although a slightly different flavor. For a Long, if I put a default value in of 1, I get the exact same nullCheck message. If I remove the default, or change the default to say something like new Long (1) then I get a message saying "Non Supported SQL92 token at position:74"

 

I'm going against Oracle, if that makes a difference.

 

Did you try using something like new Integer(4945) for a default? What message does it give you then?

 

 

 

 

 

 

By: Erik Tennant - tennant

RE: iReport 0.4.0 Parameters

2004-12-02 08:49

It looks like my issue turned out to be from mismatched casing between what I put in the Parameter dialog and what I used in the SQL Query. (Field_id and $P!{Field_Id} )

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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