Home » Developer & Programmer » Reports & Discoverer » Parameters & single quotes (Reports 10g - Solaris)
Parameters & single quotes [message #393549] Mon, 23 March 2009 05:40 Go to next message
bartleby
Messages: 2
Registered: March 2009
Junior Member
Hello,

We are currently using Oracle iAS 10g Forms & Reports Services. We try to execute .rdf using rwservlet, but when we pass user parameters with single quotes, we get "REP-300: invalid number".

For example:

http://<server_name>:<port_number>/reports/rwservlet?destype=cache&P_LIST1="('0619','0001')"&P_LIST2="('001')"&P_LIST3= "('0101')"...

It returns:

REP-300: invalid number
SELECT distinct KFCATENO . ESCE_CO_CODESC , KFCATENO . SOCI_CO_CODSOC , KFCATENO . COGE_CO_COGRAL FROM KFCATENO , KFSOCITO B WHERE ESCE_CO_CODESC IN 0101 AND KFCATENO.SOCI_CO_CODSOC IN 0619 AND ==> COGE_CO_COGRAL IN 001 AND KFCATENO . SOCI_CO


We try to use PARAMFORM=YES, but we have the same problems. URL encoding not work.
Anybody knows how to fix this issue without modified reports?

Thanks in advance.
Re: Parameters & single quotes [message #393555 is a reply to message #393549] Mon, 23 March 2009 06:14 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
I suspect the problem is with your tables rather than your parameters.
Post a desc of the two tables.
Re: Parameters & single quotes [message #393562 is a reply to message #393549] Mon, 23 March 2009 06:49 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
WHERE ESCE_CO_CODESC IN 0101
The bold code is wrong (as well as the rest of IN structures); should be
WHERE esce_co_codesc in ('0101')
So, how does your query look like?
Re: Parameters & single quotes [message #393576 is a reply to message #393562] Mon, 23 March 2009 07:39 Go to previous messageGo to next message
bartleby
Messages: 2
Registered: March 2009
Junior Member
Yes, it's wrong. I have found something in my tests but I don't understand yet.

If I encode those characters and I add %20% (space code) at the end of each parameter, the report works fine:

http://<server_name>:<port_number>/reports/rwservlet?report=KFIE07R1.rdf&desformat=pdf&destype=cache&P_LIST1=%28%270001%27%2C%270619%27%29%20&P_LIST2=%28%27001%27%2C%27002%27%29%20&P_LIST3%28%270101%27%29%20&P_...

But if I delete the %20%, I get the error. Anybody could tell me why?

Thank you.
Re: Parameters & single quotes [message #393592 is a reply to message #393576] Mon, 23 March 2009 08:25 Go to previous message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Because - if there's no space there - values are sticked to the next parameter? (By the way, this example is different from the first one.)
Previous Topic: Problem with Reports 6i & Oracle 9i & Vista 64-bit
Next Topic: SRW.MESSAGE
Goto Forum:
  


Current Time: Wed Apr 24 13:00:00 CDT 2024