I want to show my report in a ReportViewer control, but when
I click on the arrow in the Report property from the property grid,
it does not show available reports - what is wrong?
Make sure that to follow our best practices and have the report in a separate code library that is referenced in the web app/site. Check if the class library containing the report is referenced in your app/site and that you have rebuilt your app/site.
The most reliable way to specify a report for the ReportViewer is to do this programmatically on the Page_Load event of the page. For example:
CopyC#
Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack)
{
this.ReportViewer1.Report = new ReportLibrary.Report1();
}
}
CopyVB.NET
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Me.ReportViewer1.Report = New ReportLibrary.Report1()
End If
End Sub
A multi-column report shows fine when using Preview,
but when used as a subreport, it shows as a one-column report only
The multi-column functionality is intended to be used only in the main
report because all report sections (excluding Page sections) are rendered in
a column-wise layout, thus the report can be wide only one column.