Filter issue with the keywords "contains"
Hi,
I have run into a wall trying to figure out an issue with Report Builder
and I hope you can help me out. We have ReportBuilder 12.05 Build 224.
The issue is as follows.
We apply a filter on some data in our GUI, which is this:
select ID from MyTable where ID in (select Document.ObjectID from
Document left join DocumentContent on Document.DocumentID =
DocumentContent.DocumentID where Document.DocumentTypeID in (16454) and
contains( DocumentContent.Content, "Hi there" ))
This filter is applied succesfully. At this point, we run a report. I
have verified many times that the filter passed to ReportBuilder is the
filter above. However, the query ReportBuilder sends to the database is
this:
SELECT
FROM
WHERE
( MyTable.ID IN
(select,Document.ObjectID,from,Document,left,join,DocumentContent,on,Document.DocumentID,=,DocumentContent.DocumentID,where,Document.DocumentTypeID,in,(16454),and,contains(,DocumentContent.Content,N'"Hi,there"',))
)
)
ORDER BY
As you can see, all the spaces in the filter given to ReportBuilder have
been converted to commas. Needless to say, this causes the report to
fail. :-(
I am fairly sure the root cause of this issue is the keyword "contains"
in my filter. When I run other filters on that table, they all work
fine with the report. The only two that fail are the ones that have the
keyword "contains".
Any help would be greatly appreciated.
Thank you,
Anda
I have run into a wall trying to figure out an issue with Report Builder
and I hope you can help me out. We have ReportBuilder 12.05 Build 224.
The issue is as follows.
We apply a filter on some data in our GUI, which is this:
select ID from MyTable where ID in (select Document.ObjectID from
Document left join DocumentContent on Document.DocumentID =
DocumentContent.DocumentID where Document.DocumentTypeID in (16454) and
contains( DocumentContent.Content, "Hi there" ))
This filter is applied succesfully. At this point, we run a report. I
have verified many times that the filter passed to ReportBuilder is the
filter above. However, the query ReportBuilder sends to the database is
this:
SELECT
FROM
WHERE
( MyTable.ID IN
(select,Document.ObjectID,from,Document,left,join,DocumentContent,on,Document.DocumentID,=,DocumentContent.DocumentID,where,Document.DocumentTypeID,in,(16454),and,contains(,DocumentContent.Content,N'"Hi,there"',))
)
)
ORDER BY
As you can see, all the spaces in the filter given to ReportBuilder have
been converted to commas. Needless to say, this causes the report to
fail. :-(
I am fairly sure the root cause of this issue is the keyword "contains"
in my filter. When I run other filters on that table, they all work
fine with the report. The only two that fail are the ones that have the
keyword "contains".
Any help would be greatly appreciated.
Thank you,
Anda
This discussion has been closed.
Comments
Which database and connectivity are you using with this report? Which
version of Delphi are you using?
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
-SQLServer 2008 R2
-Embarcadero Delphi XE (we upgraded a few months ago from Delphi 7, but
I am not sure if it related)
-for connectivity we use a TADOConnection, I believe
Thank you for looking into this.
Thanks for the info. I'm unfortunately having trouble recreating this
here on my machine. I have SQL server to work with. If possible,
please send a simple example demonstrating this behavior to
support@digital-metaphors.com in .zip format and I'll take a look at it
for you.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
provide. Did the keyword 'contains' give you no problems when you tried
it out?
Sorry for the delayed response. We received your mail and are
researching the issue. We will contact you via email if we need more
information.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com