Report Viewer control - vertical align for subreport
Hi, I have SSRS 2005 installed. I had to build a report which contains few subreports. Basically it looks like: -list - subreport - subreport -endlist Subreports contain just a table, nothing fancy. When I execute the report from BIDS, everything looks good, subreports data is aligned to the top of their region. When the report is executed through report viewer control, subreports data is vertically aligned to middle. When I export from report viewer control, it displays correctly. This happens on all current browsers. Is there anything I can do in order to display correctly subreports in report viewer control ? Thanks in advance.
August 17th, 2011 3:11am

Can you try placing the subreport inside rectangle? I have seen some weird alignment issues fixing itself when we do this (although I have tried this only in SSRS 2008).
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2011 5:20am

Hi, I have already tried that. Placed the subreport inside a rectangle, also placed the content of subreport inside a rectangle, but nothing changed. Tho', i haven't seen any Vertical Align property for rectangle.
August 17th, 2011 7:41am

Can you create a dummy table and move the subreports to it's cells?
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2011 8:33am

It's not fixing if placed in table either. Could it be something external, like properties of the control container ?
August 18th, 2011 2:39am

Hi Barbiduc, Thanks for your post. According to your description, I guess there is a blank space between the report data region and report boundaries, so I suggest you to do an adjustment to your report. Please refer to the below steps: 1. Open the subreport, right-click the report body, select view, check the Ruler item. 2. Drag and adjust the data region to the top of the report body. 3. Open the main report, to do the same adjustment to the list. I have tested it in my test environment, it works fine in report viewer control, and please just have a try. If you have any more questions, please feel free to let me know. Thanks, Bill Lu Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
August 20th, 2011 6:29am

Hi Barbiduc, Thanks for your post. According to your description, I guess there is a blank space between the report data region and report boundaries, so I suggest you to do an adjustment to your report. Please refer to the below steps: 1. Open the subreport, right-click the report body, select view, check the Ruler item. 2. Drag and adjust the data region to the top of the report body. 3. Open the main report, to do the same adjustment to the list. I have tested it in my test environment, it works fine in report viewer control, and please just have a try. If you have any more questions, please feel free to let me know. Thanks, Bill Lu Please remember to mark the replies as answers if they help and unmark them if they provide no help. Hi, unfortunately, i have no idea of what Ruler you are talking about. If you are referring to the ruler that's already in VS2005 on Layout tab, that's there by default, and i dont think there's a way to take it out. If you can be more specific (may add some screen shots) would be great. Regarding my issue, the problem is not that content of the subreport is not aligned to the top .. the problem is the content of the SUBREPORT is vertically aligned to middle, and that's what i`m referring at - why does it align to the middle when I have not set any Vertical Align to middle, everything is aligned to the top.. Thanks in advance, Horia.
September 7th, 2011 5:47pm

Hi Barbiduc, Just as you said, it was just the layout tab ruler which assist you adjust the location of the report control. I suggest you to adjust the report control’s location (left and top) referencing the report body‘s size. Report body’s size: 1. Click report body, and then press F4. 2. In the properties panel, scroll to the size property. 3. Expand the size node, there are two sub properties, width and height. Report control’s location: 1. In the properties panel, choose the relevant control from the drop down list. 2. Scroll to the Location property. 3. Expand the Location node, there two sub properties, left and top. Please have a try, if you have anything unclear, please feel free to let me know. Thanks, Bill Lu Please remember to mark the replies as answers if they help and unmark them if they provide no help.If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
Free Windows Admin Tool Kit Click here and download it now
September 7th, 2011 10:07pm

Hi Barbiduc, Just as you said, it was just the layout tab ruler which assist you adjust the location of the report control. I suggest you to adjust the report control’s location (left and top) referencing the report body‘s size. Report body’s size: 1. Click report body, and then press F4. 2. In the properties panel, scroll to the size property. 3. Expand the size node, there are two sub properties, width and height. Report control’s location: 1. In the properties panel, choose the relevant control from the drop down list. 2. Scroll to the Location property. 3. Expand the Location node, there two sub properties, left and top. Please have a try, if you have anything unclear, please feel free to let me know. Thanks, Bill Lu Please remember to mark the replies as answers if they help and unmark them if they provide no help.If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. Hi, if I do that, my report wont be arranged as it is required. I dont think you understand what the problem is. Here's a screenshot: When I run this report from a website via ReportViewer, the content of the SUBREPORT is vertically alligned to middle. Subreport contains a table only. If table has one row that row will show where "TestSub1" text is showing in the above. If I run the subreport on its own, result is vertically aligned to the top. The lines have to be there. Thanks.
September 9th, 2011 7:13am

Hi Barbiduc, I mean to adjust the data region to the left-top corner in the sub report (you can select the tablix, and then press left arrow or top arrow to move it to the left-top corner on the report body), and then in the main report, to move the subreport to the left-top corner of the list, at last, move the list to the left boundary of the report body. After a series testing, it works fine both in BIDS and reportViewer. Thanks, Bill Lu Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
September 13th, 2011 1:09am

Hi, Thanks for your answer, but it still doesn't work. I guess i will just need to find another way to do it. Just out of curiosity, what ReportViewer version did you test on ? And another question, is there anything external that might cause this ? Like the <div> reportviewer is placed on could have some properties / styles that can affect this ? or even reportviewer control, can it have any properties that can affect the vertical alignment ? Thanks.
September 13th, 2011 4:34pm

Hi Barbiduc, I take use of BIDS 2005 to create the report project and publish it to reportServer, and then I test it both in Report Manager and ReportServer(in which report was load in reportViewer), all looks fine. Moreover, I test it in a web project which was create in VS 2008, it also not disappoint me. Additionally, if you reference your report in a web or winform project, and you are not sure whether the middle align are relate to style settings (div element or other factors), you can modify your code like below: <div> <rsweb:ReportViewer ID="ReportViewer1" runat="server" width="916px" visible="false" AsyncRendering="False"> </rsweb:ReportViewer> </div> And then bind the relevant report to the reportview thru back-end code. Somehow , I don’t think your current issue was caused by these factors, maybe you can use another server or your fellow’s computer to do the same task to do verification. Thanks, Bill Lu Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
September 14th, 2011 7:15am

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

Other recent topics Other recent topics