views:

2407

answers:

6

Report viewer width/height is not display properly in Mozila Firefox, but perfectly displayed in IE. Dispaly size in Mozila is 450 width and 175 height and perfectly in IE shown in full page. I have set width in px instead of %age but getting same. Does anyone have solution of this issue? here is my .aspx page source

 <form id="form1" runat="server">
<div id="divException" runat="server" style="text-align: center; padding-top: 100px"
    visible="false">
    <asp:Label ID="lblException" runat="server" Text="Sorry, no data found!!!" Font-Size="Large"
        ForeColor="Red"></asp:Label>
</div>
<div style="height: 100%; width: 100%;">
    <rsweb:ReportViewer ID="rptvReport" runat="server" Width="100%" Height="95%">
    </rsweb:ReportViewer>
</div>
</form>
A: 

Are you triggering quirks mode in IE, by chance? Anyway it is hard to tell what happens, unless you specify the styles applied to all the higher level elements (body?)

EFraim
thanks for your quick replyI have only add the following style in head tag and nothing else define in the page. <style type="text/css" media="screen"> html, body { height: 100%; width: 100%; margin: 0px; padding: 0px; } </style>
Muhammad Akhtar
A: 

That helped me for the width problem...

Browse to C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\Pages\ReportViewer.aspx

Add info to the tag style property.

<RS:ReportViewerHost style="display:table; margin: 0px; overflow: auto" ID="ReportViewerControl" runat="server" .....

from here.

Print and search won't work. We create the pdf-document and use that for printing and searching...

Peter
I am unable to find next to this directoryC:\Program Files\Microsoft SQL Server\here I found MSSQL.1 and MSSQL.2 but not found MSSQL.3 and so on.....
Muhammad Akhtar
+1  A: 

Very Tricky solution......

Adding this style, resolve the problem, but some features missing as Microsoft pointed http://msdn.microsoft.com/en-us/library/ms156511.aspx

 <style type="text/css">
    html, body, form
    {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
    }
    table#rptvReport
    {
        display: table !important;
        background-color:White;
        min-height:500px;
    }
</style>

where this is rptvReport the ID of the ReportViewer, here should be set the ID of your ReportView control. Actually what was the problem here is, When report is rendered a table has style property like

style="display:inline-block"

that is creating problem, what I have did here is changing this into

 display: table !important;

and that resolve the problem

Muhammad Akhtar
A: 

Excellent - fixed my FireFox ReportViewer display issue.

Eric
A: 

yeah i got the same problem hw can u rectify dat can u please tell me

anuhsa