try { FrmRpt.RPAfficher.LocalReport.ReportEmbeddedResource = "GestionDeStock.RAP.RP_Produit.rdlc"; ReportParameter PCat = new ReportParameter("RP_Categorie", Nom_Categorie); ReportParameter PMarque = new ReportParameter("RP_Marque", Product.Nom_Produit); ReportParameter PCouleur = new ReportParameter("RP_Couleur", Product.Couleur_Produit); ReportParameter PTaille = new ReportParameter("RP_Taille", Product.Taille_Produit.ToString()); ReportParameter PQuantite = new ReportParameter("RP_Quantite", Product.Quatite_Produit.ToString()); ReportParameter PPrix = new ReportParameter("RP_Prix", Product.Prix_Produit.ToString()); string ImageString = Convert.ToBase64String(Product.Image_Produit); ReportParameter PImage = new ReportParameter("RP_Image", ImageString); FrmRpt.RPAfficher.LocalReport.SetParameters(new ReportParameter[] { PCat, PMarque, PCouleur, PTaille, PQuantite, PPrix, PImage }); FrmRpt.RPAfficher.RefreshReport(); FrmRpt.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); }
FrmRpt.RPAfficher.LocalReport.ReportEmbeddedResource = "GestionDeStock.RAP.RP_Produit.rdlc";
Microsoft.Reporting.WinForms.LocalProcessingException : 'Une erreur s'est produite lors du traitement du rapport local.'
NullReferenceException : La référence d'objet n'est pas définie à une instance d'un objet.
Cette exception a été levée à l'origine dans cette pile des appels :
[Code externe]
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionReportParameter PCat = new ReportParameter("RP_Categorie", Nom_Categorie);
FrmRpt.RPAfficher.LocalReport.ReportEmbeddedResource = "GestionDeStock.RAP.RP_Produit.rdlc";
System.IO.FileLoadException : 'Impossible de charger le fichier ou l'assembly 'Microsoft.ReportViewer.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' ou une de ses dépendances. La définition trouvée du manifeste de l'assembly ne correspond pas à la référence de l'assembly. (Exception de HRESULT : 0x80131040)'
this.RPAfficher = new Microsoft.Reporting.WinForms.ReportViewer();