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();
}
}
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();
}
}