table not properly rendered when linked to empty data set
Hi there, I am using Reporting Services 2005 and I have the following problem. When the data set linked to my table is empty, only the header row and the first row of data are shown in the report. This seems like a bug because my table has several rows with contain static values and those should not depend on whether the linked data set is empty or not. If I link my table to a different non-empty data set, then everything is fine. Does anyone have an idea what the problem might be? Thanks and best wishes Oliver
November 10th, 2010 9:14am

Can you post the data set queries? Kalman Toth, SQL Server & Business Intelligence Training; SQL 2008 GRAND SLAM
Free Windows Admin Tool Kit Click here and download it now
November 10th, 2010 9:41am

sure, this is the data set, which is empty in the described case (i.e. for a paricular choice of the parameter acreage_id): SELECT dbo.Acreage_Legal.ID, dbo.Acreage_Legal.UAI, dbo.Acreage_Legal.Acreage_Size, dbo.Acreage_Legal.Granted_Right_Type, dbo.Acreage_Legal.Lessor, dbo.Acreage_Legal.Lessor_Type, dbo.Acreage_Legal.Lessor_Num, dbo.Acreage_Legal.Lessor_Authority, dbo.Acreage_Legal.Eff_Date_Acreage, dbo.Acreage_Legal.Eff_Date_OMV, dbo.Acreage_Legal.Expiry_Date, dbo.Acreage_Legal.Extension, dbo.Acreage_Legal.Commercial_Field_Code, dbo.Acreage_Legal.Contract_Type, dbo.Acreage_Legal.Last_Published_Date, dbo.Acreage_Legal.Workflow_Status, dbo.Acreage_Legal.Update_Date, dbo.Acreage_Legal.Update_User, dbo.Size_Uom.Name AS Acreage_Size_Uom, dbo.Lessor.Name AS Lessor_Name, dbo.Contract_Type.Contract_Type_Alias FROM dbo.Country INNER JOIN dbo.Venture ON dbo.Country.Country_Code = dbo.Venture.Country_Code INNER JOIN dbo.Acreage_Legal INNER JOIN dbo.Size_Uom ON dbo.Size_Uom.Code = dbo.Acreage_Legal.Acreage_Size_Uom INNER JOIN dbo.Lessor ON dbo.Acreage_Legal.Lessor = dbo.Lessor.Id INNER JOIN dbo.Contract_Type ON dbo.Acreage_Legal.Contract_Type = dbo.Contract_Type.Contract_Type INNER JOIN dbo.Acreage_General ON dbo.Acreage_Legal.ID = dbo.Acreage_General.ID INNER JOIN dbo.Contract_Area ON dbo.Acreage_General.Contract_Area_Code = dbo.Contract_Area.Contract_Area_Code ON dbo.Country.Country_Code = dbo.Contract_Type.Country_Code AND dbo.Venture.Venture_Code = dbo.Contract_Area.Venture_Code where dbo.Acreage_Legal.ID= CAST(@acreage_id as int) and this is the query of the dataset, which is not empty: SELECT dbo.Acreage_General.ID, dbo.Acreage_General.UAI, dbo.Acreage_General.Block_Name, dbo.Acreage_General.Acreage_Type, dbo.Acreage_General.Acreage_Status, dbo.Acreage_General.Acreage_Status_Date, dbo.Acreage_General.Data_Source, dbo.Acreage_General.Remark, dbo.Acreage_General.On_Offshore, dbo.Acreage_General.Min_Depth, dbo.Acreage_General.Max_Depth, dbo.Acreage_General.Geological_Restriction, dbo.Acreage_General.County_Authority, dbo.Acreage_General.Last_Published_Date, dbo.Acreage_General.Workflow_Status, dbo.Acreage_General.Update_Date, dbo.Acreage_General.Update_User, dbo.Contract_Area.Contract_Area_Name, dbo.Venture.Venture_Name, dbo.Acreage_Type.Acreage_Type_Alias, dbo.Country.Country_Name, dbo.Acreage_Status.Status_Alias FROM dbo.Acreage_General INNER JOIN dbo.Contract_Area ON dbo.Acreage_General.Contract_Area_Code = dbo.Contract_Area.Contract_Area_Code INNER JOIN dbo.Venture ON dbo.Contract_Area.Venture_Code = dbo.Venture.Venture_Code INNER JOIN dbo.Country ON dbo.Country.Country_Code = dbo.Venture.Country_Code INNER JOIN dbo.Acreage_Type ON dbo.Acreage_General.Acreage_Type = dbo.Acreage_Type.Acreage_Type_Code AND dbo.Country.Country_Code = dbo.Acreage_Type.Country_Code INNER JOIN dbo.Acreage_Status ON dbo.Acreage_General.Acreage_Status = dbo.Acreage_Status.Status_Code AND dbo.Acreage_Status.Country_Code = dbo.Country.Country_Code where dbo.Acreage_General.ID = CAST(@acreage_id as int)
November 10th, 2010 10:32am

There might be a group by or some filtering clause based on the columns of the original empty dataset. Can you just create a new tablix, and then associate it the dataset using the properties? If this doesnt work, a work around would be to put a dummy column in your dataset.Cheers, Jason P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)
Free Windows Admin Tool Kit Click here and download it now
November 10th, 2010 10:59am

When the data set linked to my table is empty, only the header row and the first row of data are shown in the report. Oliver, It appears to me that it should not show anything if the dataset is empty. Can you explain details? You can also post (copy/paste) screen images here, but first you have to upload them to www.skydrive.com .Kalman Toth, SQL Server & Business Intelligence Training; SQL 2008 GRAND SLAM
November 10th, 2010 11:00am

Hi Kalman, Column 1 contains only static values and Column 2 contains the data from my dataset. In the layout modus, my table looks like this: Column1 Column2 Legal Data Acreage Size: =Expression(..) Contract Type: =Expression(..) Granted Right: =Expression(..) ............................... I would expect the table to look like this in the report: Column1 Column2 Legal Data Acreage Size: Contract Type: Granted Right: ............................... Instead, the table is cut off and looks like this: Column1 Column2 Legal Data Acreage Size: ...... If I link it to a nonemtpy dataset, it looks as expected, even if the expressions in column2 still refer to the empty data set. I have no idea what is the problem. To me, it really looks like a bug in reporting services.
Free Windows Admin Tool Kit Click here and download it now
November 10th, 2010 11:34am

To me, it really looks like a bug in reporting services. You can file a bug report at Connect: http://social.msdn.microsoft.com/Forums/en/category/sqlserver If you do, can you post the link here? Thanks.Kalman Toth, SQL Server & Business Intelligence Training; SQL 2008 GRAND SLAM
November 10th, 2010 2:13pm

I found the solution myself. If the linked dataset is empty, no rows are created while rendering. I guess that's good if the whole table is dymanic. Not sure if that feature is so great if the table contains static rows. I found a "workaround" for this scenario though. I can just declare my static rows as "header". Best wishes Oliver
Free Windows Admin Tool Kit Click here and download it now
November 11th, 2010 4:13am

Hi olliog, Good job, great sharing! :)
November 11th, 2010 5:11am

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

Other recent topics Other recent topics