Discussion:
Problems setting webform Report Viewer control height to 100%
(too old to reply)
Chris G.
2006-08-31 17:14:02 UTC
Permalink
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]
2006-09-01 02:06:21 UTC
Permalink
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]
2006-09-05 13:02:53 UTC
Permalink
Hello Chris,

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

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

Sincerely,

Wei Lu

Microsoft Online Community Support
Chris G.
2006-09-05 19:17:05 UTC
Permalink
Hi Wei,
Post by Wei Lu [MSFT]
Post by Wei Lu [MSFT]
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?
Post by Wei Lu [MSFT]
Post by Wei Lu [MSFT]
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
Post by Wei Lu [MSFT]
Hello Chris,
How is everything going? Does my suggestion resolve your problem?
If you have any feedback, please feel free to let me know.
Sincerely,
Wei Lu
Microsoft Online Community Support
Chris G.
2006-09-05 19:42:01 UTC
Permalink
Hi Wei,
Post by Wei Lu [MSFT]
Post by Wei Lu [MSFT]
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
Post by Wei Lu [MSFT]
Hello Chris,
How is everything going? Does my suggestion resolve your problem?
If you have any feedback, please feel free to let me know.
Sincerely,
Wei Lu
Microsoft Online Community Support
Wei Lu [MSFT]
2006-09-06 10:17:45 UTC
Permalink
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.)
Chris G.
2006-09-07 18:33:01 UTC
Permalink
Post by Wei Lu [MSFT]
Post by Wei Lu [MSFT]
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
Post by Wei Lu [MSFT]
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.)
Chris G.
2006-09-07 21:40:02 UTC
Permalink
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?
Post by Wei Lu [MSFT]
Post by Wei Lu [MSFT]
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?
Post by Wei Lu [MSFT]
Post by Wei Lu [MSFT]
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
Post by Wei Lu [MSFT]
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.)
Wei Lu [MSFT]
2006-09-08 12:45:45 UTC
Permalink
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.

Sincerely,

Wei Lu

Microsoft Online Community Support
vinod kumar
2010-11-04 10:41:11 UTC
Permalink
Thank you !!!!

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

Thanks
Vinod
Post by Chris G.
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
Post by Wei Lu [MSFT]
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.)
Post by Wei Lu [MSFT]
Hello Chris,
How is everything going? Does my suggestion resolve your problem?
If you have any feedback, please feel free to let me know.
Sincerely,
Wei Lu
Microsoft Online Community Support
Post by Wei Lu [MSFT]
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.)
Post by Wei Lu [MSFT]
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.
Sincerely,
Wei Lu
Microsoft Online Community Support
Post by andy62
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
Post by unknown
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
Post by unknown
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
Wei, that sorted my problem right out - thanks!!
From http://www.developmentnow.com/g/115_2006_8_0_0_814757/Problems-setting-webform-Report-Viewer-control-height-to-100.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/
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
andy62
2006-09-07 12:20:01 UTC
Permalink
I have removed the line
in my case
the solution perfectly works
thanks Wei
andrea
Post by Wei Lu [MSFT]
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.)
Chris G.
2006-09-07 18:34:02 UTC
Permalink
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
Post by andy62
I have removed the line
in my case
the solution perfectly works
thanks Wei
andrea
Post by Wei Lu [MSFT]
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.)
andy62
2006-09-20 13:43:02 UTC
Permalink
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
Post by Chris G.
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
Post by andy62
I have removed the line
in my case
the solution perfectly works
thanks Wei
andrea
Post by Wei Lu [MSFT]
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.)
unknown
2009-01-11 06:41:22 UTC
Permalink
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
unknown
2009-01-11 06:41:48 UTC
Permalink
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
Matt B
2010-08-20 16:29:17 UTC
Permalink
Wei, that sorted my problem right out - thanks!

From http://www.developmentnow.com/g/115_2006_8_0_0_814757/Problems-setting-webform-Report-Viewer-control-height-to-100.ht

Posted via DevelopmentNow.com Group
http://www.developmentnow.com/g/
b***@gmail.com
2016-03-16 06:13:39 UTC
Permalink
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

Loading...