Showing posts with label matching. Show all posts
Showing posts with label matching. Show all posts

Friday, March 23, 2012

Problem with inconsistent report data

I am generating a report using Sql Reporting Services, with Sql Server 2000 as the backend. Sometimes, the report shows data which is not matching with the actual data available in the database. Though the query, which is used by the report is tested in the query analyser and it is successful.

Anyone, who can solve this issue, please !!!

Where are you running the report from? Browser or report viewer or Visual Studio?

If you are using the preview tab in VS then please note that some data gets cached in a <rdl name>.data file on your local drive (same directory as the RDL file). Could this caching be causing your issue?

|||

Thanx Adam.

I tried the report in the preview and also in the browser, the result is the same. The data to the report is generated by using a cursor

declare @.count uniqueidentifier
declare cursor_a cursor for select Busi_ID from Temp_View_BusinessUnit
open cursor_a
fetch next from cursor_a into @.count
insert into Temp_BusinessUnit select distinct(businessunitid)
from FilteredBusinessUnit
where FilteredBusinessUnit.businessunitid in
(select businessunitid from FilteredBusinessUnit where parentbusinessunitid = @.count )
and FilteredBusinessUnit.businessunitid not in (select Busi_ID from Temp_View_BusinessUnit)
WHILE @.@.FETCH_STATUS = 0
BEGIN
fetch next from cursor_a into @.count
insert into Temp_BusinessUnit select distinct(businessunitid) from FilteredBusinessUnit where
FilteredBusinessUnit.businessunitid in
(select businessunitid from FilteredBusinessUnit where parentbusinessunitid = @.count )
and FilteredBusinessUnit.businessunitid not in (select Busi_ID from Temp_View_BusinessUnit)
end
deallocate cursor_a

Is the cursor is the problem to this, because whenever I refresh the report preview or the browser the output from the repor is different and rarely it matches with the actual data in the database. But the same query gives the correct output when executed under the data tab.

I hope that this is what you are expecting.

Wednesday, March 21, 2012

Problem with Hyphen in Full Text Catalog Search

Hi All,

we have a problem with the Full Text Catalog Search.
We use the following SQL Statement for matching companies from a table:

select company, lastname, firstname, pkcustomers, fkcustomers,
location, title, fkFunktionen, TypeOfPosition
from customers
where (fkcustomers = 0 or fkcustomers is null)
and active = 1
and pkCustomers in (select [KEY] from CONTAINSTABLE(Customers, Company,
'"*SEARCHTERMS*"'))
order by company asc

The search so far is working perfect.
Now the problem: There are two companies in the table called "i-fabrik"
and "b-wise". Theres no way to find these two companies. I find out
that the search is successful if there are more than three letters in
front of the hyphen (for exampe iii-fabrik or bbb-wise). How can that
be? Why exactly 3 letters?

I hope somebody can help me.

Best regards
Markus Weberhttp://support.microsoft.com/defaul...b;en-us;Q200043

Simon