Search Results

Search found 1 results on 1 pages for 'user95542'.

Page 1/1 | 1 

  • ReportViewer add Parameters ...

    - by user95542
    Hi, I need help.Well, i need add image logo in reportviewer dynamically.I get this image from db, convert toBase64 and i need add in reportviewer.... this code next.. rpViewer.LocalReport.EnableExternalImages = true; Company _company = db.Companys.Where(c => c.codCompany == c.codCompany).Single(); //first step byte[] img = _company.imagem.ToArray(); // i get image from db MemoryStream _ms = new MemoryStream(img); string logo = Convert.ToBase64String(img); //convert to base64 // 2 step List<ReportParameter> lstReportParams = new List<ReportParameter>();//Create params lstReportParams.Add(new ReportParameter("Logo", logo)); lstReportParams.Add(new ReportParameter("LogoMimeType", "image/png")); this.rpViewer.LocalReport.SetParameters(lstReportParams); // Here don´t work´s {"An error occurred during local report processing."} {"An attempt was made to set a report parameter 'Logo' that is not defined in this report."} this.rpViewer.RefreshReport(); In Rldc.... MIMEType =Parameters!LogoMimeType.value Value ="System.Convert.FromBase64String(Parameters!Logo.Value)" Why not work? Why is not recognizing the parameter? need help urgente.I can load that image in reportviewer...Thank´s..

    Read the article

1