So, I'm pretty new to Reporting Services and this is my first post in this forum. So basically I was creating a report which contains a chart. I configure the dataset, chart values, etc and the chart shows up blank. The title of the chart shows, but nothing else shows. The way I created the report in the designer is no different that another report that actually works.
I've searched google with every word I could think of and I haven't been able to find this issue anywhere. Is this some crazy Microsoft hiccup?
Here is the Stored Procedure that I am using as my dataset:
CREATE PROCEDURE YearlyTotalsInPercentages(@.Yearint) ASBEGINDECLARE @.TotalSumintSELECT SUM(dbo.Main.Hours) AS CBDCYearlyTotals, dbo.Project.ProductLine AS ProductLineINTO #tempTotalsFROM dbo.Main INNER JOIN dbo.Department ON dbo.Main.DeptNo = dbo.Department.DeptNo INNER JOIN dbo.Project ON dbo.Main.ProjectNo = dbo.Project.ProjectNoWHERE dbo.Main.UserID LIKE'CI%' AND dbo.Project.ControlLocation ='IND' AND DATEPART(yyyy, dbo.Main.DataDate) = @.Year AND dbo.Main.Active = 1GROUP BY dbo.Project.ProductLine SET @.TotalSum = (SELECT SUM(dbo.Main.Hours)FROM dbo.Main INNER JOIN dbo.Department ON dbo.Main.DeptNo = dbo.Department.DeptNo INNER JOIN dbo.Project ON dbo.Main.ProjectNo = dbo.Project.ProjectNoWHERE dbo.Main.UserID LIKE'CI%' AND dbo.Project.ControlLocation ='IND' AND DATEPART(yyyy, dbo.Main.DataDate) = @.Year AND dbo.Main.Active = 1) SELECT t.CBDCYearlyTotals AS CBDCYearlyTotals, t.ProductLine AS ProductLine, ROUND((t.CBDCYearlyTotals/@.TotalSum) * 100, 1) AS Percentage FROM #tempTotals tENDGO
I can present the rdl if necessary.
Muchos Gracias
So, in doing deeper searching I found another forum that said temp tables may not be supported and that table variables should be used instead. So, I'm attempting that route, but running into problems with the query when it comes to dividing by @.TotalSum. It returns 0 now and not the number that I had gotten previously.
Just one road block after the other. Ah, the joys of programming.
Anybody got any clues as to why this would happen?
No comments:
Post a Comment