Tuesday, March 27, 2012

Changing the ReportViewer control size.

I have an aspx page that uses the ReportViewer control. The dimensions are
set at runtime.
private void Page_Load(object sender, System.EventArgs e)
{
reportViewer.ServerUrl = "http://localhost/reportserver";
reportViewer.ReportPath = "/Samples/Company Sales";
reportViewer.Width = 900;
reportViewer.Height = 580;
}
Is it possible to change the size of the control everytime the browser
window is resized?
TIA.You can set the size to a percent.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"TechnoSpyke" <technospyke@.yahoo.com> wrote in message
news:OqzqmWrEFHA.2572@.tk2msftngp13.phx.gbl...
>I have an aspx page that uses the ReportViewer control. The dimensions are
>set at runtime.
> private void Page_Load(object sender, System.EventArgs e)
> {
> reportViewer.ServerUrl = "http://localhost/reportserver";
> reportViewer.ReportPath = "/Samples/Company Sales";
> reportViewer.Width = 900;
> reportViewer.Height = 580;
> }
> Is it possible to change the size of the control everytime the browser
> window is resized?
> TIA.
>|||Thank you.
This worked, but first I had to modify the ReportViewer.dll since, by
default, it doesn't accept precentage for dimensions.
"Jeff A. Stucker" <jeff@.mobilize.net> wrote in message
news:ekIm4R5EFHA.3200@.TK2MSFTNGP10.phx.gbl...
> You can set the size to a percent.
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "TechnoSpyke" <technospyke@.yahoo.com> wrote in message
> news:OqzqmWrEFHA.2572@.tk2msftngp13.phx.gbl...
>>I have an aspx page that uses the ReportViewer control. The dimensions
>>are set at runtime.
>> private void Page_Load(object sender, System.EventArgs e)
>> {
>> reportViewer.ServerUrl = "http://localhost/reportserver";
>> reportViewer.ReportPath = "/Samples/Company Sales";
>> reportViewer.Width = 900;
>> reportViewer.Height = 580;
>> }
>> Is it possible to change the size of the control everytime the browser
>> window is resized?
>> TIA.
>|||Great, I'm glad you got it working. Sometimes I forget all the steps when I
did something, but just remember that it works!!
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"TechnoSpyke" <technospyke@.yahoo.com> wrote in message
news:eoca6W5EFHA.2600@.TK2MSFTNGP09.phx.gbl...
> Thank you.
> This worked, but first I had to modify the ReportViewer.dll since, by
> default, it doesn't accept precentage for dimensions.
>
> "Jeff A. Stucker" <jeff@.mobilize.net> wrote in message
> news:ekIm4R5EFHA.3200@.TK2MSFTNGP10.phx.gbl...
>> You can set the size to a percent.
>> --
>> Cheers,
>> '(' Jeff A. Stucker
>> \
>> Business Intelligence
>> www.criadvantage.com
>> ---
>> "TechnoSpyke" <technospyke@.yahoo.com> wrote in message
>> news:OqzqmWrEFHA.2572@.tk2msftngp13.phx.gbl...
>>I have an aspx page that uses the ReportViewer control. The dimensions
>>are set at runtime.
>> private void Page_Load(object sender, System.EventArgs e)
>> {
>> reportViewer.ServerUrl = "http://localhost/reportserver";
>> reportViewer.ReportPath = "/Samples/Company Sales";
>> reportViewer.Width = 900;
>> reportViewer.Height = 580;
>> }
>> Is it possible to change the size of the control everytime the browser
>> window is resized?
>> TIA.
>>
>

No comments:

Post a Comment