Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems setting webform Report Viewer control height to 100%

1,569 views
Skip to first unread message

Chris G.

unread,
Aug 31, 2006, 1:14:02 PM8/31/06
to
SSRS 2005

I have an ASP.NET app using the Report Viewer control.

I would like the Report Viewer control to resize as the browser (web page)
is resized.

Setting <rsweb:ReportViewer ... Width="100%" ... </rsweb:ReportViewer>
controls the width as expected. As the page is made wider, the control
resizes.

However, when I use <rsweb:ReportViewer ... Height="100%" ...
</rsweb:ReportViewer> to do the same for the height of the control, the
report content does not appear. The toolbars appear, but the report content
does not.

I have to do something like <rsweb:ReportViewer ... Height="300px" ...
</rsweb:ReportViewer> to get my report content to appear.

Is this a known problem?

Is there something I am overlooking, like is there another property I need
to set to get this to work? I cannot find any other property that looks like
it is related to this problem.

--
Chris, SSSI

Wei Lu [MSFT]

unread,
Aug 31, 2006, 10:06:21 PM8/31/06
to
Hello Chris,

This is a XHTML artifact. If you remove the doctype in the asp.net page, it
will work.

Please remove the line <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> in the asp.net
page.

Sincerely,

Wei Lu

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

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

Wei Lu [MSFT]

unread,
Sep 5, 2006, 9:02:53 AM9/5/06
to
Hello Chris,

How is everything going? Does my suggestion resolve your problem?

If you have any feedback, please feel free to let me know.

Chris G.

unread,
Sep 5, 2006, 3:17:05 PM9/5/06
to
Hi Wei,

>>This is a XHTML artifact.

Can you explain in more detail what you mean? Why is the presence of DOCTYPE
causing this behavior in the Report Viewer Control?

>>If you remove the doctype in the asp.net page, it will work.
>>Please remove the line <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
>>Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>in the asp.net page.

Why will this fix the problem?

What if any other problems will removing that line of code cause?

Thanks!

--
Chris, SSSI

Chris G.

unread,
Sep 5, 2006, 3:42:01 PM9/5/06
to
Hi Wei,

>>If you remove the doctype in the asp.net page, it will work.
>>Please remove the line <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
>>Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>in the asp.net page.

Our ASP.NET pages have this line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Not the one that you mentioned.

Also, I removed the line of code above, and it made no difference. The
report content still does not appear when Height="100%". Only the Report
Viewer Control tool bars appear. The report does not appear in the HTML
rendering. However, if I export the report being viewed to PDF format, all
report content is rendered. This looks like a bug in the Report Viewer
Control.

--
Chris, SSSI

Wei Lu [MSFT]

unread,
Sep 6, 2006, 6:17:45 AM9/6/06
to
Hello Wei,

How you test the page?

Would you please try to test on a simple page with only one report viewer
control on it?

Please remove the line and have the height to "100%" for the report viewer.

Sincerely,

Wei Lu

Microsoft Online Community Support

==================================================

andy62

unread,
Sep 7, 2006, 8:20:01 AM9/7/06
to
I have removed the line
in my case
the solution perfectly works
thanks Wei
andrea

Chris G.

unread,
Sep 7, 2006, 2:33:01 PM9/7/06
to
>>Would you please try to test on a simple page with only one report viewer
control on it?

I can, but my application does not have a "simple page with only one report
viewer
control on it". So even if it works on a simple page that does not solve my
problem.

How do you propose that I fix this problem in my application?

-- Chris

--
Chris, SSSI

Chris G.

unread,
Sep 7, 2006, 2:34:02 PM9/7/06
to
Andy62,

What is the nature of your page? Is it ASP.NET 1.0, 1.1 or 2.0?

Are you using master pages? (we are).

-- Chris

--
Chris, SSSI

Chris G.

unread,
Sep 7, 2006, 5:40:02 PM9/7/06
to
Hi Wei,

The good news is I solved my problem.

I did have to remove the !DOCTYPE as you suggested. But the problem also was
related to the fact that the Report Viewer Control was contained inside a
table on the page. And that table had no height specified. Once I set
height="100%" on the table, the report content for the Report Viewer Control
appeared. I thought that if you do not set a size for an html table, that it
will be sized based on its content. Since the Report Viewer Control shows the
report pages, I would expect the table to be sized accordingly. Anyway I am
not sure I understand why my fix solved the problem, but it did fix it.

===================
MORE IMPORTANTLY
===================

I had some questions in a earlier pose in this thread that you did not
answer. Can you please answer them now?

>>This is a XHTML artifact.

Can you explain in more detail what you mean? Why is the presence of DOCTYPE

causing this behavior in the Report Viewer Control?

>>If you remove the doctype in the asp.net page, it will work.


>>Please remove the line <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
>>Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>in the asp.net page.

Why does this fix the problem?

What, if any, other problems will removing that line of code cause?

-- Chris

--
Chris, SSSI

Wei Lu [MSFT]

unread,
Sep 8, 2006, 8:45:45 AM9/8/06
to
Hello Chris,

I think this is that the Report Viewer Control rendered the HTML code does
not matc the XHTML artifact.

This issue is a known issue of the Report Viewer Control. I got this
workaround from the product team and they do not provide more detailed
information on this issue.

Anyway, I am glad to discuss more detail on this issue but since this is
relate the Report Viewer Control Code, I could not provide more detailed
information now. Thank you for your follow up.

andy62

unread,
Sep 20, 2006, 9:43:02 AM9/20/06
to
Hi Chris
excuse for the delay of my answer.
1) Asp.Net 2.0
2) No, I don't use master page!

andrea
--
andrea tiveron
director
e-metodi.it
rome
italy

azharkazi

unread,
Jan 11, 2009, 1:41:22 AM1/11/09
to
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

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com/default.aspx?ref=ng

azharkazi

unread,
Jan 11, 2009, 1:41:48 AM1/11/09
to

Matt B

unread,
Aug 20, 2010, 12:29:17 PM8/20/10
to

vinod kumar

unread,
Nov 4, 2010, 6:41:11 AM11/4/10
to
Thank you !!!!

It is perfectly working after removing the doc type in the page

Thanks
Vinod


>> On Friday, September 01, 2006 2:06 AM wrote:

>> Hello Chris,
>>
>>
>>
>> This is a XHTML artifact. If you remove the doctype in the asp.net page, it
>>
>>
>>
>> will work.
>>
>>
>>
>> Please remove the line <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
>>
>>
>>
>> Transitional//EN"
>>
>>
>>
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> in the asp.net
>>
>>
>>
>> page.
>>
>>
>>

>> Sincerely,
>>
>>
>>
>> Wei Lu
>>
>>
>>
>> Microsoft Online Community Support
>>
>>
>>

>> ==================================================
>>
>>
>>
>> Get notification to my posts through email? Please refer to
>>
>>
>>
>> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>>
>>
>>
>> ications.
>>
>>
>>
>> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
>>
>>
>>
>> where an initial response from the community or a Microsoft Support
>>
>>
>>
>> Engineer within 1 business day is acceptable. Please note that each follow
>>
>>
>>
>> up response may take approximately 2 business days as the support
>>
>>
>>
>> professional working with you may need further investigation to reach the
>>
>>
>>
>> most efficient resolution. The offering is not appropriate for situations
>>
>>
>>
>> that require urgent, real-time or phone-based interactions or complex
>>
>>
>>
>> project analysis and dump analysis issues. Issues of this nature are best
>>
>>
>>
>> handled working with a dedicated Microsoft Support Engineer by contacting
>>
>>
>>
>> Microsoft Customer Support Services (CSS) at
>>
>>
>>
>> http://msdn.microsoft.com/subscriptions/support/default.aspx.
>>
>>
>>
>> ==================================================
>>
>>
>>
>> (This posting is provided "AS IS", with no warranties, and confers no
>>
>>
>>
>> rights.)


>>>> On Wednesday, September 06, 2006 10:17 AM wrote:

>>>> Hello Wei,
>>>>
>>>>
>>>>
>>>> How you test the page?
>>>>
>>>>
>>>>
>>>> Would you please try to test on a simple page with only one report viewer
>>>>
>>>>
>>>>
>>>> control on it?
>>>>
>>>>
>>>>
>>>> Please remove the line and have the height to "100%" for the report viewer.
>>>>
>>>>
>>>>

>>>> Sincerely,
>>>>
>>>>
>>>>
>>>> Wei Lu
>>>>
>>>>
>>>>
>>>> Microsoft Online Community Support
>>>>
>>>>
>>>>

>>>> ==================================================
>>>>
>>>>
>>>>
>>>> Get notification to my posts through email? Please refer to
>>>>
>>>>
>>>>
>>>> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>>>>
>>>>
>>>>
>>>> ications.
>>>>
>>>>
>>>>
>>>> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
>>>>
>>>>
>>>>
>>>> where an initial response from the community or a Microsoft Support
>>>>
>>>>
>>>>
>>>> Engineer within 1 business day is acceptable. Please note that each follow
>>>>
>>>>
>>>>
>>>> up response may take approximately 2 business days as the support
>>>>
>>>>
>>>>
>>>> professional working with you may need further investigation to reach the
>>>>
>>>>
>>>>
>>>> most efficient resolution. The offering is not appropriate for situations
>>>>
>>>>
>>>>
>>>> that require urgent, real-time or phone-based interactions or complex
>>>>
>>>>
>>>>
>>>> project analysis and dump analysis issues. Issues of this nature are best
>>>>
>>>>
>>>>
>>>> handled working with a dedicated Microsoft Support Engineer by contacting
>>>>
>>>>
>>>>
>>>> Microsoft Customer Support Services (CSS) at
>>>>
>>>>
>>>>
>>>> http://msdn.microsoft.com/subscriptions/support/default.aspx.
>>>>
>>>>
>>>>
>>>> ==================================================
>>>>
>>>>
>>>>
>>>> (This posting is provided "AS IS", with no warranties, and confers no
>>>>
>>>>
>>>>
>>>> rights.)

>>>>> Sincerely,
>>>>>
>>>>>
>>>>>
>>>>> Wei Lu
>>>>>
>>>>>
>>>>>
>>>>> Microsoft Online Community Support


>>>>>> On Wednesday, September 20, 2006 9:43 AM andy6 wrote:

>>>>>> Hi Chris
>>>>>> excuse for the delay of my answer.
>>>>>> 1) Asp.Net 2.0

>>>>>> 2) No, I do not use master page!


>>>>>>
>>>>>> andrea
>>>>>> --
>>>>>> andrea tiveron
>>>>>> director
>>>>>> e-metodi.it
>>>>>> rome
>>>>>> italy
>>>>>>
>>>>>>
>>>>>> "Chris G." wrote:


>>>>>>> On Sunday, January 11, 2009 1:41 AM Azhar Kazi wrote:

>>>>>>> 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


>>>>>>>> On Sunday, January 11, 2009 1:41 AM Azhar Kazi wrote:

>>>>>>>> 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


>>>>>>>>> Submitted via EggHeadCafe - Software Developer Portal of Choice
>>>>>>>>> Composing WCF applications
>>>>>>>>> http://www.eggheadcafe.com/tutorials/aspnet/b428fb65-08b4-45c8-97cd-47ee1a1eaf41/composing-wcf-applications.aspx

bibekana...@gmail.com

unread,
Mar 16, 2016, 2:13:46 AM3/16/16
to
Hi all


as the solutions u mentioned here not even one solution also working in my case to set the reportview Height.

i m using masterpage also
i have deleted the doctype from masterpage.
even i gave 100% height to my reportviewr and table which is containing report viewer.
AsyncRendering="false" this one also i added

So please help me out fix this isssue
and in my case its worikg fine in chrome browser without any changed also only in IE i m facing this problem.


Thanks

pappu roy
0 new messages