Error: subreport could not be shown

S

sue fal

I'm having the same problem and have tried taking out the subreport
parameters and everything else that has been suggested. I downloaded a
sample (from microsoft, I think) and it works but the same sort of thing
doesn't work in my own code. It's very frustrating.
Here's my code:
public ViewReportMatrices2()
{
InitializeComponent();
this.reportViewer1.LocalReport.SubreportProcessing +=
new
SubreportProcessingEventHandler(LocalReport_SubreportProcessing);
}

public void LocalReport_SubreportProcessing(object sender,
SubreportProcessingEventArgs e)
{
etc.
}
private void ViewReportMatrices2_Load(object sender, EventArgs
e)
{
this.reportViewer1.LocalReport.Refresh();
this.reportViewer1.RefreshReport();
}

Theirs:
public Form1()
{
InitializeComponent();
this.reportViewer1.LocalReport.SubreportProcessing += new
SubreportProcessingEventHandler(LocalReport_SubreportProcessing);
}

void LocalReport_SubreportProcessing(object sender,
SubreportProcessingEventArgs e)
{
e.DataSources.Add(new
ReportDataSource("OrderDetailsDataSet_OrderDetails",
OrderDetailsDataSet.Tables[0]));
}


Maybe this will help someone!
private void Form1_Load(object sender, EventArgs e)
{
this.OrdersDataSet.ReadXml("Orders.xml");
this.OrderDetailsDataSet.ReadXml("OrderDetails.xml");
this.reportViewer1.RefreshReport();
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top