Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / January 2009

Tip: Looking for answers? Try searching our database.

ReportViewer control and scaling issue

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Keith - 26 Oct 2005 20:30 GMT
When using the reportviewer control on a web page, we would like to set the
width and heighth to a percentage of the container that it is placed in.  It
appears that the defaults are 400px.  Of course these can be changed, but you
may experience horizontal and/or vertical scroll bars or a window that is too
large for the report.  What we are trying to achieve is to have the contents
of the exposed SRS report scale properly when the size of the browser window
is changed.  Has anyone else come across or tried to solve this issue ?
Andrew - 27 Oct 2005 13:51 GMT
Keith,
What I did was create one table with one cell and set the height and width
to 100%.  Next put the report viewer control inside the table and set the
height and width to lets say 95%(this can be flexible whatever fits your
situation).  The outside table will act as a container and will adjust
appropriately to the users screen resolution and the ReportViewer control
will just follow the tables lead.
Signature

Andrew
MCSA,MCDBA

--
Andrew
MCSA,MCDBA

> When using the reportviewer control on a web page, we would like to set the
> width and heighth to a percentage of the container that it is placed in.  It
[quoted text clipped - 3 lines]
> of the exposed SRS report scale properly when the size of the browser window
> is changed.  Has anyone else come across or tried to solve this issue ?
Keith - 07 Nov 2005 22:03 GMT
Thank you for the response.

I did try that as evidenced in this code:
   <table id="rptViewer" runat=server align=center width="100%"
height="100%">
       <tr>
           <td>
               <rsweb:ReportViewer ID="ReportViewer1" runat="server"
Font-Names="Verdana" Font-Size="8pt" Height="95%" ProcessingMode="Remote"
Width="95%" ShowCredentialPrompts="true">
                   <ServerReport
ReportPath="/chartingtest/horizontalreport_large"
ReportServerUrl="http://localhost/reportserver" />
               </rsweb:ReportViewer>
           </td>
       </tr>
   </table>

As you can see I am using SQL Reporting Services ReportViewer control.  With
this configuration, nothing is rendered within the reportviewer when I run
the application.  From what I see, the ReportViewer is not accepting a
percenrtage width.

Any other ideas are greatly appreciated.

> Keith,
> What I did was create one table with one cell and set the height and width
[quoted text clipped - 11 lines]
> > of the exposed SRS report scale properly when the size of the browser window
> > is changed.  Has anyone else come across or tried to solve this issue ?
Michael R - 02 Dec 2005 23:56 GMT
I have experienced the same difficulty.  When the Height property of the
reportviewer control is set to a percentage, it appears that the report does
not display - only the toolbar and parameters.  The width as a percentage
seems to work just fine.

Is this a bug in the ReportViewer control?  Is there a workaround or fix?

Mike

> Thank you for the response.
>
[quoted text clipped - 36 lines]
> > > of the exposed SRS report scale properly when the size of the browser window
> > > is changed.  Has anyone else come across or tried to solve this issue ?
Rajeev Karunakaran [MSFT] - 15 Dec 2005 03:18 GMT
Please see Question 14 in the FAQ: http://www.gotreportviewer.com/

Signature

Rajeev Karunakaran [MSFT]
Microsoft SQL Server Reporting Services

This posting is provided "AS IS" with no warranties, and confers no rights.

>I have experienced the same difficulty.  When the Height property of the
> reportviewer control is set to a percentage, it appears that the report
[quoted text clipped - 59 lines]
>> > > is changed.  Has anyone else come across or tried to solve this issue
>> > > ?
Michael R - 12 Jan 2006 01:04 GMT
I added the following code to my body tag - and it worked!!!  The
reportviewer control acts as if the height were set to 100% (give or take,
based on what you subtract from the 'clientHeight').  I also added the script
to the onload event, so my report will always be the correct height.

<body
onresize="javascript:document.getElementById('ReportViewer1').style.height =
document.documentElement.clientHeight - 100;">

hope this helps.  Enjoy!

Mike Rainey

> I have experienced the same difficulty.  When the Height property of the
> reportviewer control is set to a percentage, it appears that the report does
[quoted text clipped - 45 lines]
> > > > of the exposed SRS report scale properly when the size of the browser window
> > > > is changed.  Has anyone else come across or tried to solve this issue ?
thejez - 20 Jan 2006 14:59 GMT
I have the same issue with the control not recognizing height.  I am going to
submit it as a bug even though this workaround *may* work its very kludgey
and the bug should be fixed (or else and explanation should be made here by
MS).

> I added the following code to my body tag - and it worked!!!  The
> reportviewer control acts as if the height were set to 100% (give or take,
[quoted text clipped - 58 lines]
> > > > > of the exposed SRS report scale properly when the size of the browser window
> > > > > is changed.  Has anyone else come across or tried to solve this issue ?
Raghu - 31 Jan 2006 21:50 GMT
Try removing the code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> at the top of the aspx
page.

I too had the same issue, but was able to fix it by deleting the above
code in my aspx page that hosted the reportviewer control.
azharkp - 11 Jan 2009 06:49 GMT
>Try removing the code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
>"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> at the top of the aspx
>page.
>
>I too had the same issue, but was able to fix it by deleting the above
>code in my aspx page that hosted the reportviewer control.

Guys here is a good news for you all, the solutiono is really very simple.
set AsyncRendering to false in the Report viewer control, that should solve
your problem.

For Example..

<rsweb:ReportViewer ID="rptViewer" SizeToReportContent="true" Width="100%"
runat="server" AsyncRendering="false">
       </rsweb:ReportViewer>    

Chill !!!
Azhar
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.