Subreport processing on the main form
Im close via processing the subreport on the mainform, but for some season when I call the
LocalReport_SubreportProcessing, it does not going into or should I say it doesnt not jump into the method when I click the plus or minus sign, i get a dataretrieve error, please reiview error log , I dont
know where to the error logs on the computer.
this.reportViewer.LocalReport.SubreportProcessing
+= new
SubreportProcessingEventHandler(LocalReport_SubreportProcessing);
it never jumps into this method below, can someone assist me
protected
void
LocalReport_SubreportProcessing(object
sender, Microsoft.Reporting.WinForms.SubreportProcessingEventArgs
e)
{
ReportParameterInfoCollection
getParam = e.Parameters;
DateTime
DateTimeByOp = Convert.ToDateTime(reportViewer.LocalReport.OriginalParametersToDrillthrough[0].Values[0].ToString());
e.DataSources.Add(
new
ReportDataSource("Datatable",this.BindingSource.Filter
= "OpTimeStamp = #"
+ DateTimeByOp + "#"));
reportViewer.LocalReport.ReportEmbeddedResource =
"Example.rdlc";
this.rDataSource.Value
= this.BindingSource;
this.titleParameter
= new
ReportParameter("BookTitle",
this.BookTitle);
this.reportViewer.LocalReport.SetParameters(new
ReportParameter[]
{ titleParameter });
this.reportViewer.LocalReport.DataSources.Add(DataSource);
this.reportViewer.LocalReport.Refresh();
this.reportViewer.RefreshReport();
}
November 12th, 2010 12:59pm
Hi,
From your information, I notice that you want to display a subreport in a main report within local
mode report, this kind of the report is not like reporting service, of course the method of creating a subreport in the main report is different as well. Besides the main report datasource, you should add subreport's datasource to the main report as well.
This walkthrough is focus this issue, you could click this link to get a detailed reference:
http://cid-45bfd76b0f2c3808.photos.live.com/view.aspx/picture/Walkthrough-Displaying%20Sub%20report%20in%20Main%20report%20of%20local%20report%20using%20Report%20Viewer.docx
Thanks,
Challen Fu
Free Windows Admin Tool Kit Click here and download it now
November 16th, 2010 10:10pm
I have a question I notice on one of the steps you said tabular , why not matrix?, keep in mind im in visual studio 2010, So i thinks already defaulted to matrix table instead of tabulaf, if you dont mind can you give instruction from visual 2010? or link
where in they are showing steps from 2010 c#
November 25th, 2010 2:52am
Another thing keep in mind i only have one one raw dataset and then a generic dataset .I also have 3 report files or 3 rdlc files which all uses the same generic dataset.
So let my bill the hierachy.
Level1_Report
Level2_Report
Level3_Report
I want embed Level2_Report on or in the Level1_Report and drill down using a toggle or hyperlink to go to Level2_report. Keep in mind again they all uses the generic dataset. I do a merge from the raw dataset to the generic dataset
Free Windows Admin Tool Kit Click here and download it now
November 25th, 2010 3:16am