Home » Developer & Programmer » Reports & Discoverer » Single quote problem with reports
Single quote problem with reports [message #353426] Mon, 13 October 2008 18:45 Go to next message
sg52
Messages: 7
Registered: October 2008
Junior Member
Hi,

I am facing a very strange problem.
Actually our application is reporting application which provide reports to the user.

There is a report where data is being fetched from database and this report has a hyperlink to a different report.
The data selected in report one is being passed to another report using user parameter.
The problem is that one of the column which is passed to report2 has a value in database as "FA'S customer info".

Now when i pass this value to report2 and when i execute this, it gives an error that:
"quoted string not properly terminated"
I know that its because of the value in database.

The thing is in report 2 as soon as it get inside a user defined parameter i cant do any manipulation on that
or i cant think how to do that.

Can you suggest some method to take care of this situation.

Basically when i am passing the value how can i eliminate this problem.

I thought of using replace so that i can substitute one single quotes with two so when this parameter is passed
in where clause it takes 2 single quotes and
hence no problem, but dont know how to go about it.
Kindly help with any solution which you think can be helpful here.

Thanks in advance.
Re: Single quote problem with reports [message #354779 is a reply to message #353426] Tue, 21 October 2008 03:44 Go to previous messageGo to next message
dude4084
Messages: 221
Registered: March 2005
Location: Mux
Senior Member
Try using single qutoe three times. i.e. '''

Ignore my post if it does not work.


-Good Luck
Re: Single quote problem with reports [message #354785 is a reply to message #353426] Tue, 21 October 2008 04:38 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
one of the column which is passed to report2 has a value in database as "FA'S customer info".

I don't know what this value represents, but it *sounds* like some kind of a name. Is there, by any chance, an "ID" column in this table which would uniquely identify this "name" value? Something like this:
select name
from your_table
where id = 1234;

name
------------------
fa's customer info

If so, how about passing ID value to the REPORT2 report, instead of "name" value? It would require REPORT2's modification as well, but - I prefer such an approach.
Re: Single quote problem with reports [message #354980 is a reply to message #353426] Wed, 22 October 2008 02:06 Go to previous message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Hi,

As i understood, please try this in where condition

REPLACE(COLUMN_NAME,'''','')=REPLACE(COLUMN_NAME,'''','')

Previous Topic: Page number in report
Next Topic: jpg image format in reports 6i
Goto Forum:
  


Current Time: Sun Dec 11 04:04:27 CST 2016

Total time taken to generate the page: 0.12145 seconds