Showing posts with label Reporting Services. Show all posts
Showing posts with label Reporting Services. Show all posts

Friday, April 4, 2008

Repeating label value with multiple row groups -- SSRS

I was getting this weird behavior on my reports wherever I'd two row groups and multiple column groups in a matrix report. The label that I'd set on to show for the row group (the other row group was an invisible row group to have alternate colors in the rows) was repeating twice when it was rendered on a web page. While the label will show only once on my local machine in preview mode in IDE. The report looked something like:



The Date row header that was showing twice was placed on the designed only once. Couldn't locate any instance where somebody else too had this issue.

So, finally I implemented a workaround to get away from this.
1.) Removed the text from the row group header text box.
2.) Put in a rectangle at that text box
3.) Put a text box within the rectangle and wrote the required text.

And there it was. The text was now appearing only once. Happy that I was able to get rid of it. Took me some time for this idea to strike.

Thursday, April 3, 2008

Reporting Services & IE7 scrolling issue

All the reports that I'd developed were working fine till the time they were tested on my PM's machine with Vista & IE7. On the spot, I was able to convince him that this is something specific to Vista and hence will need some more work (I could get off very easily with this).
But when I installed IE7 on my machine it was giving the same weird behaviour.. the columns to the right were not showing up.

Then I found this link: http://arcanecode.wordpress.com/2007/11/29/sql-server-2005-reporting-services-reportviewer-control-and-ie7/
(I know everybody looking for this issue will get this link prior to getting to my page; but just in case their site is scrapped then I got a chance). So, I'll repeat the steps (copyright remains with the original publisher I don't want it: This is my disclaimer).
a.) Remove the DOCTYPE tag in it's entirety from the ASPX page. Those with master pages don't have to worry. It won't be there.
b.) Set the AsyncRendering property to False for the ReportViewer control on aspx page. This is True by default. This did the trick in my case.
c.) Make sure the width of the ReportViewer control is set to 100% and remove any references to height property.

I needed to do only the second point as the 3rd was already done and 1st was not required because my page is a content page contained within a master page.

Hope this helps somebody someday!
Cheers (not of the weekend kinds)

UPDATE:
I noticed later that carrying out the above changes played havoc with my page layout. The text was getting out of the intended place and all.
So, to correct that I removed the width=100% and set it to a specific pixel width(against what's advised in the link above) I got everything corrected and received the scroll bars as well. After that I reset the "AsyncRendering" to "True" and it was still working fine. Can't explain for sure as to why it's so; but the only thing I've changed when I was getting the error and the correctly showing page is
a.) specifically set the "AsyncRendering" to "True", and
b.) removed the width=100% that was there earlier to a specific pixed width value.

Hope this helps somebody else as well.