Nerd Nord
Nerd Nord

Reputation: 151

Make report viewer body invisible?

I have a report viewer whose body I want to make invisible except for head where you can choose the desired format. Here's my ASP.NET code:

    <rsweb:ReportViewer runat="server" ID="report" Font-Names="Calibri" Font-Size="12pt" WaitMessageFont-Names="Calibri" WaitMessageFont-Size="14pt" Width="383px" Height="30px">
        <LocalReport ReportPath="ReportFatture.rdlc">
            <DataSources>
                <rsweb:ReportDataSource DataSourceId="ObjectDataSource2" Name="DataSet2" />
            </DataSources>
        </LocalReport>
    </rsweb:ReportViewer>

Is there any property I can use?

Upvotes: 1

Views: 629

Answers (1)

Rahul Nikate
Rahul Nikate

Reputation: 6337

Use below code in Page Load to hide report body

report.ShowReportBody = false;

Again you can make it visible like below

report.ShowReportBody = true; 

Here's MSDN link for ReportViewer.ShowReportBody Property

Upvotes: 2

Related Questions