Click here to Skip to main content
15,896,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have used Report viewer but the problem is content inside the report viewer is coming left side of that viewer i have tried all possible solutions for it

XML
<table width="100%" border="1" align="center">
        <tr id="RepView">
            <td align="justify">

                <rsweb:ReportViewer ID="ReportViewer1" AsyncRendering="true" runat="server" Height="600px"
                    Width="100%" align="center" DocumentMapWidth="100%"
                    SizeToReportContent="True" ZoomMode="PageWidth">
                </rsweb:ReportViewer>
            </td>
        </tr>
    </table>

plz any one who can tel how to see content in the center.... of the report viewer thanks...
Posted
Updated 14-Apr-12 1:42am
v6

1 solution

Hey,

try following

C#
fillReport();
            ReportPageSettings rst = reportViewer1.LocalReport.GetDefaultPageSettings();
            if (reportViewer1.ParentForm.Width > rst.PaperSize.Width)
            {
                int vPad = (reportViewer1.ParentForm.Width - rst.PaperSize.Width) / 2;
                reportViewer1.Padding = new Padding(vPad-20, 1, vPad-20, 1);
            }


Hope it will help u

Best luck
Happy Coding:)
 
Share this answer
 
Comments
Kiirrii 13-Apr-12 8:32am    
I tried dude not working...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900