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

HELP URGENTLY NEEDED!


Recommended Posts

By: Charles McClain - cmcclain1

HELP URGENTLY NEEDED!

2003-06-23 02:14

I'm sure that I'm just making some tiny stupid mistake, but I am unable to make parameters work in my WHERE clause.

 

Here is a very simple test query I'm trying to run:

 

select CODE__C, CODE_DESC from CODES_TABLE where TABLE_NAME = $P{tableName}

 

.....where the TABLE_NAME column is defined as an Oracle VARCHAR2 datatype. From the code sample, I understand that the query parameter should NOT be enclosed in single quotes; however, when I try to run this query, I get a

 

"java.sql.SQLException: Non supported SQL92 token at position: 74: tableName"

 

.....error. I have no trouble using the $P{tableName} parameter in the report title; it's only in the SQL query that I get errors.

 

I'm under considerable pressure to resolve this quickly, so any help anyone can provide will be greatly appreciated.

 

Thanks.....

 

 

 

 

By: G r M r - moczar

RE: HELP URGENTLY NEEDED!

2003-06-23 02:29

You have to use parameters like this:

$P!{tablename} in SQL queries.

 

I hope this helps!

 

Gabor

 

 

 

 

By: Giulio Toffoli - gt78

RE: HELP URGENTLY NEEDED!

2003-06-23 03:56

If you are using iReport, leave blank the query field in the compiler form. If you leave the query in the compiler form, iReport will try to execute yourself the query, without resolve parameters (that is an engine task).

 

Giulio

 

 

 

 

 

 

By: Charles McClain - cmcclain1

RE: HELP URGENTLY NEEDED!

2003-06-23 08:39

Thank you, Giulio.

 

Although I did have parameter-passing problems earlier, once I got by that (and didn't realize that I had), my query was REALLY failing because I was retrieving based on the timezone's display name ("Pacific Standard Time") instead of the timezone's ID ("PST") and getting no match.

 

I had had so many earlier problems with the JasperReports parameters that I didn't recognize that I had gotten to this point. Believe it or not, your reply helped me realize what the real problem was.

 

I am interested in what you said about iReport (which I do use). From what you said, it sounds as if there is no way to pass parameter values into iReport, or get it to prompt for parameter values. Is this correct?

 

.....and if so, would you know if there is any prospect of that ever changing?

 

Again, thanks for the help.

 

 

 

 

By: Giulio Toffoli - gt78

RE: HELP URGENTLY NEEDED!

2003-06-23 15:30

 

iReport2 will implement the ability to ask for each parameter (Strings and numbers only) that have the attribute "is for prompting" checked during filling report operation.

 

Really this was the target of Teodor when it though to add this attribute "is for prompting".

 

Giulio

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