i've got an error when render report. am stuck here, please help me..
error like :
Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: One or more parameters required to run the report have not been specified.
my code is :
private void RenderReport()
{
LocalReport localReport = new LocalReport();
localReport.ReportPath = PemFormatHelper.GetReportFile("test.rdlc");
DataAccess.SPHPDa sphpDa = new DataAccess.SPHPDa();
dtHdrSource = sphpDa.ReportHdrSPHP(sphp.SphpId, ConnectionSession.LoginID, sphp.SphpType);
List<ReportParameter> paramCollection = new List<ReportParameter>();
paramCollection.Add(new ReportParameter("NamaKanwil", dtHdrSource.Rows[0]["NM_KANWIL"].ToString()));
paramCollection.Add(new ReportParameter("NamaKPP", dtHdrSource.Rows[0]["NM_KPP"].ToString()));
paramCollection.Add(new ReportParameter("AlamatKPP", dtHdrSource.Rows[0]["ALAMAT_KPP"].ToString()));
paramCollection.Add(new ReportParameter("KotaKPP", dtHdrSource.Rows[0]["KOTA_KPP"].ToString()));
paramCollection.Add(new ReportParameter("KdPosKPP", dtHdrSource.Rows[0]["KD_POS_KPP"].ToString()));
paramCollection.Add(new ReportParameter("KTKPos", dtHdrSource.Rows[0]["KTK_POS"].ToString()));
paramCollection.Add(new ReportParameter("TelpKpp", dtHdrSource.Rows[0]["TELP_KPP"].ToString()));
paramCollection.Add(new ReportParameter("FaxKpp", dtHdrSource.Rows[0]["FAX_KPP"].ToString()));
paramCollection.Add(new ReportParameter("CompCtr", dtHdrSource.Rows[0]["COMP_CTR"].ToString()));
paramCollection.Add(new ReportParameter("SMSCenter", dtHdrSource.Rows[0]["SMS"].ToString()));
paramCollection.Add(new ReportParameter("TollFree", dtHdrSource.Rows[0]["TOLL_FREE"].ToString()));
ReportDataSource dtSourceHeader = new ReportDataSource("DataReport_Sphp", dtHdrSource);
localReport.DataSources.Add(dtSourceHeader);
string reportType = "PDF";
string mimeType;
string encoding;
string fileNameExtension;
string deviceInfo =
"<DeviceInfo>" +
" <OutputFormat>PDF</OutputFormat>" +
" <PageWidth>8.5in</PageWidth>" +
" <PageHeight>11in</PageHeight>" +
" <MarginTop>0.5in</MarginTop>" +
" <MarginLeft>1in</MarginLeft>" +
" <MarginRight>1in</MarginRight>" +
" <MarginBottom>0.5in</MarginBottom>" +
"</DeviceInfo>";
Warning[] warnings;
string[] streams;
byte[] renderedBytes;
//Render the report
localReport.Render(reportType, deviceInfo, out mimeType, out encoding, out fileNameExtension, out streams, out warnings);
}