4

I am trying to freeze all column headers in a report when scrolling down. I have read numerous articles about how to go to Advanced Mode, select the header and set FixedData to True, KeepWithGroup to After, RepeatOnNewPage to True. That works when previewing a report, but it does not work in a browser. I have tried using IE 11, Chrome, and other browsers, but none of them fix the column headers while scrolling.

I have spent hours trying to get this to work and have read articles such as: Freeze column header while scrolling and Freezing column headers while scrolling in SSRS, but none of them accomplish this in a browser.

I tried creating a simple table report from the report wizard and following these instructions, but it still does not work. This is very critical to get working in order to use SSRS. I am using SSRS 2012. Any help would be greatly appreciated.

Community
  • 1
  • 1
Jeff Stock
  • 3,796
  • 12
  • 46
  • 61
  • Are the reports rendering to PDF, HTML, or some other format? – JSuar Jan 20 '14 at 18:21
  • The report is being rendered in a browser. It is not working in the Report Viewer control nor the Report Manager. – Jeff Stock Jan 20 '14 at 18:42
  • Well, [from what I'm reading here](http://msdn.microsoft.com/en-us/library/ee240753(v=sql.110).aspx#sectionToggle2), freezing functionality may not be supported across all output formats. That's why I asked how it was rendered in the browser. – JSuar Jan 20 '14 at 18:47
  • Report Manager, report preview, and the report viewer control do support it, which is what I'm trying to do here. – Jeff Stock Jan 20 '14 at 18:51
  • This must have something to do with the instance of reporting services on the server because it works in the preview. When viewing any report the toolbar is scrollable, which should always be fixed. Something has to be wrong with the configuration. I am going to try reinstalling SSRS altogether on the report server. – Jeff Stock Jan 21 '14 at 19:19
  • I had added this code to the javascript on the report server to fix viewing reports in other browsers: function pageLoad() { var element = document.getElementById("ctl32_ctl09"); if (element) { element.style.overflow = "visible"; } } However, that caused the fixed headers to not be fixed in the Report Manager. I removed that code and the fixed headers worked, but only in the Report Manager in IE. It does not work in the Report Viewer, which is my main way of viewing reports. – Jeff Stock Jan 22 '14 at 14:39

5 Answers5

1

It's crucial to select the correct "Static" member before setting those properties. For your scenario I think you want the Static member within the Row Groups list.

If there are several "Static" members, select them in turn and note where the selection box moves to in your tablix - this can help pick the right one - usually the last.

My favourite post on this is from Robert B:

http://blogs.msdn.com/b/robertbruckner/archive/2008/10/13/repeat-header-and-visible-fixed-header-table.aspx

Good luck - this is still such an unbeleivable mess after 5 years and 3 releases ...

Mike Honey
  • 14,523
  • 1
  • 24
  • 40
  • I have followed these exact instructions over and over again and still the header row does not stay fixed. I created a simple report in both BI Development Studio and Report Builder, both with the same results. Has anyone else got this to work in SSRS 2012? Is the toolbar supposed to stay fixed as well because it doesn't either? – Jeff Stock Jan 21 '14 at 14:19
  • This sounds really odd. Exactly how is the report "rendered in the browser"? – Mike Honey Jan 21 '14 at 22:12
  • I got it working in the Report Manager, but not the Report Viewer. See my latest comment above. – Jeff Stock Jan 22 '14 at 15:15
1

It appears fixed headers simply do not work in the ASP.NET Report Viewer control. I have a simple aspx page with the ReportViewer control on it, testing it in IE 11. The fixed headers work in the Preview and Report Manager, but not the ASP.NET Report Viewer control. Therefore, I decided to simply show my reports using the built-in Report Viewer instead. Fixed column headers work that way.

Jeff Stock
  • 3,796
  • 12
  • 46
  • 61
  • Is this still an issue without a fix for viewing in a browser? Just stumbled across the same issue and cannot get the report to behave on Microsoft Edge. – R_Avery_17 Oct 25 '17 at 15:26
  • I believe it's still an issue, though I haven't tried it in SSRS 2016 yet. – Jeff Stock Oct 26 '17 at 15:51
1

This is a crazy idea, but instead of using the Report Viewer, could you render the report to HTML and add it to a web page that has a CSS class that will change the header to position:fixed;?

adam0101
  • 29,096
  • 21
  • 96
  • 174
1

I just spent a couple of days investigating this exact issue. Worked in preview, didn’t when deployed. I had noticed my fixed columns stopped working a few years ago.

My break through was when I started testing using a fresh SSRS 2012 install the freezing rows and columns worked perfectly. By comparing the differences between that and my live system I found the issue was changes made to ReportingServices.js to fix blank reports showing in Chrome.

Forcing el.style.overflow = "visible" instead of its default of “auto” breaks the freezing in IE. Our web developer changed the if statement so it doesn’t do the replace for IE by checking a non IE function exists (window.addEventListener).

if (el  && window.addEventListener)
    el.style.overflow = "visible";

So the complete code added to a fresh ReportingServices.js is the following

function pageLoad() {
   el = document.getElementById("ctl32_ctl09"),

   //Fix Chrome invisible report
   if (el  && window.addEventListener)
      el.style.overflow = "visible";
}
if (window.addEventListener) {
   window.addEventListener('load', pageLoad, false);
} else {
   window.attachEvent('onload', pageLoad);
}

C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportManager\js\ ReportingServices.js

Bluey
  • 180
  • 6
  • Can you tell me which exact version of SQL Server 2012 you were using? If it was pre-SP1, it may match my current setup, where I'm seeing similar behavior in IE 11 and 10, but not in any other IE versions or latest Chrome. Thanks! – idclaar May 09 '16 at 20:56
0

I was able to get my column headings to freeze in IE 9. IE 11 was having issues. IE 11 also did not display vertical and horizontal scrollbars The Solution (for me) was to put IE 11 to compatibility mode.

Instructions to use compatibility mode. 1) Right click the top of the window and then choose to show the "menu bar" 2) in the menu click tools 3) Click "Compatibility View" to add the current web url to the list of pages to show in the compatibility view, this list can be managed by rather clicking "Compatibility View settings"

Hope this helps.. I could not find this documented elsewhere.

Barry
  • 1