SSRS Report does not display Result set though the dataset (Stored procedure/SQL query) returns result set
I have following issue I am creating a simple SSRS table report through Report Builder. My dataset is looking for the stored procedure . When I execute the Stored procedure through SSMS I get resutset for certain parameters. I execute the dataset (Store procedure) through query designer in dataset properties and I get results back. But when I try to run the report and see the preview, I do not get any results displayed. I been looking on the same issue form last 3-4 days and have not found any clue. Can somebody please help me. Following is the stored procedure I am using. Also I am passing multivalued parameter through report as well, and I am using spilt function to seperate the libraryid I am reading from parameter values. This works fine. I have similar kind of four other reports and with different stored procedure which exactly follow the same method , like multivalue parameters and other criteria are also very similar. All other reports works just fine . This perticular report has issue for displying results, following is the stored procedure I am using SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[ReportUserReview] @libraryId varchar(4000), @reviewStartDate datetimeoffset, @reviewEndDate datetimeoffset =null AS BEGIN SELECT LP_NAME.KeyValue LibraryName, O.ISBN, O.Title, O.Author, O.BisacDesc, O.SupplierDesc as Publisher, A.LibraryID, A.ItemID, ISNULL(CT.TotalCirculation,0) TotalCirculation, ISNULL(CT.CurrentCirculation,0) CurrentCirculation, CAST(CT.TotalCirculation As DECIMAL(6,2))/CAST(A.TotalQuantity AS DECIMAL(6,2)) Turns, (DATEDIFF(Day,A.CreateDate,GetDate()))/nullif(CAST(CT.TotalCirculation As DECIMAL(6,2))/CAST(A.TotalQuantity AS DECIMAL(6,2)),0) DaysToTurn, A.TotalQuantity QuantityOwned,A.CreateDate AddedDate, O.PubDate , COALESCE (HQ.TotalHolds ,0)CurrentHolds, COALESCE (IR.NumOfReviews,0) NumberOfReviews FROM Availability A INNER JOIN LibraryProperty LP_ID ON LP_ID.PropertyID = '18' AND A.LibraryID = LP_ID.LibraryID AND LP_ID.KeyValue IN (SELECT * FROM dbo.SplitLibrary(@libraryId, ',')) INNER JOIN LibraryProperty LP_NAME ON LP_NAME.PropertyID = '7' AND A.LibraryID = LP_NAME.LibraryID INNER JOIN OMNI.dbo.OMNI O ON A.ItemID = O.BTKey LEFT JOIN (SELECT P.LibraryID, C.ItemID, COUNT(*) TotalCirculation, SUM(CASE WHEN C.IsValid = 1 THEN 1 ELSE 0 END) CurrentCirculation FROM CheckoutTransaction C INNER JOIN Patron P ON C.PatronID = P.ID GROUP BY P.LibraryID, C.ItemID ) CT ON A.ItemID = CT.ItemID AND upper(A.LibraryID) = upper(CT.LibraryID) LEFT JOIN (SELECT P.LibraryID, H.ItemID, COUNT(*) TotalHolds FROM HoldTransaction H INNER JOIN Patron P ON H.PatronID = P.ID GROUP BY P.LibraryID, H.ItemID) HQ ON A.ItemID = HQ.ItemID AND A.LibraryID = HQ.LibraryID INNER JOIN (SELECT ItemID, LibraryID,COUNT(ID) NumOfReviews FROM UserReview WHERE DATEDIFF(DAY, @reviewStartDate, ReviewDate) >= 0 AND DATEDIFF(DAY, ReviewDate, ISNULL(@reviewEndDate,GETDATE())) >= 0 GROUP BY ItemID,LibraryID HAVING COUNT(ID)>0 ) IR ON A.LibraryID = IR.LibraryID AND A.ItemID = IR.ItemID END Any help appreciated
October 10th, 2012 2:28pm

... when I try to run the report and see the preview ... I presume you mean using Visual Studio / BIDS? It might be a symptom of this issue: http://bidshelper.codeplex.com/wikipage?title=Delete%20Dataset%20Cache%20Files
Free Windows Admin Tool Kit Click here and download it now
October 10th, 2012 11:05pm

Thank you Mike! I am using Report Builder 3 to create the reports. At one point I have tried using BIDs also, I created this same report using BIDS and everything wend well. In preview I can see the resultset, but when I deploy this report to the sharepoint site and access it from there I do not see anything in the report . It is empty with just header cells. I have trying creating same report multiple time refreshing dataset/recreating dataset and still no luck in both Report builder and BIDS. Let me know if you need anymore details to understand the problem. Thanks so much A
October 11th, 2012 9:41am

Thanks Mike! I resolved this issue. It was an issue with the database( not sure why other reports working fine and this particular not). I was working Shared Dev database instance, I replaced with a copy of QA database for this particular report and it worked as expected. Thanks A
Free Windows Admin Tool Kit Click here and download it now
October 11th, 2012 2:42pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics