hi
i am using multi select dropdown i am selecting ex.(venky,ram)the field save in database
i want create report for seperate name ex.venky name
i am using split method split the name and store in array and give the for each condtion first time loop execute display the venky next time display ram
i am using the following code
DataTable dt = Controller.GetNameDetailsToDataset("PurchaseEnquiryReport", txtpeno.Text).Tables[0];
string[] s = (dt.Rows[0][17].ToString()).Split(',');
if (dt.Rows.Count == 0)
{
foreach (string str in s)
{
DataSet dt1 = Controller.GetNameDetailsToDataset("GetaddressforPurchaseEnquiry", str);
string issalaried = "";
DataTable DsRep = dt;
issalaried = "Y";
ReportDataSource datasource = new ReportDataSource("DataSet1", DsRep);
ReportParameter[] Param = new ReportParameter[1];
Param[0] = new ReportParameter("Param_IsSalaried", issalaried);
Warning[] warnings;
string[] streamIds;
string mimeType = string.Empty;
string encoding = string.Empty;
string extension = string.Empty;
// Setup the report viewer object and get the array of bytes
ReportViewer viewer = new ReportViewer();
viewer.ProcessingMode = ProcessingMode.Local;
viewer.LocalReport.ReportPath = Server.MapPath("~\\Presentation Layer\\Report\\PurchaseEnquiry.rdlc");
//Datasource
viewer.LocalReport.DataSources.Add(datasource);
//viewer.LocalReport.SetParameters(Param);
viewer.LocalReport.EnableExternalImages = true;
byte[] bytes = viewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings);
// viewer.ReportRefresh();
// Now that you have all the bytes representing the PDF report, buffer it and send it to the client.
Response.Buffer = true;
Response.Clear();
Response.ContentType = mimeType;
Response.AddHeader("content-disposition", "attachment; filename=" + "Purchaseenquiry" + "." + extension);
Response.Flush();
Response.BinaryWrite(bytes); // create the file
Response.End();
}
i want output first time loop excute display one pdf next time excute another pdf.