Bonjour, j'ai un rapport contenant que du text pour test, quand je veux l'afficher a travers mon application il ne s'affiche pas j'ai uniquement le report viewer vide, mais quand je test le meme rapport dans localhost/report il s'affiche sans probleme, voici le code que j'ai mise :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
string nBV = Convert.ToString(m_NumBV);
            string anneeBV = Convert.ToString(m_AnneeBV);
            string envoiBV = Convert.ToString(m_NumEnvoiBV);
 
            System.Net.NetworkCredential nt = new System.Net.NetworkCredential("WORK", "n123");
            rptBV.ServerReport.ReportServerCredentials.NetworkCredentials = nt;
 
            Microsoft.Reporting.WinForms.ReportParameter[] RptParameters =
                new Microsoft.Reporting.WinForms.ReportParameter[3];
            RptParameters[0] =
                new Microsoft.Reporting.WinForms.ReportParameter("NumBV", nBV);
 
            RptParameters[1] =
                new Microsoft.Reporting.WinForms.ReportParameter("AnneeBV", anneeBV);
 
            RptParameters[2] =
                new Microsoft.Reporting.WinForms.ReportParameter("NumEnvoiBV", envoiBV);
 
            this.rptBV.ServerReport.SetParameters(RptParameters);
            this.rptBV.RefreshReport();
            this.rptBV.ShowProgress = true;
            this.rptBV.UseWaitCursor = true;
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
this.rptBV = new Microsoft.Reporting.WinForms.ReportViewer();
            this.SuspendLayout();
            // 
            // rptBV
            // 
            this.rptBV.Dock = System.Windows.Forms.DockStyle.Fill;
            this.rptBV.Location = new System.Drawing.Point(0, 0);
            this.rptBV.Name = "rptvPV";
            this.rptBV.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
            this.rptBV.ServerReport.ReportPath = "/ReportRecettes/BV";
            this.rptBV.ServerReport.ReportServerUrl = new System.Uri("http://localhost/reportserver", System.UriKind.Absolute);
            this.rptBV.ShowBackButton = false;
            this.rptBV.ShowContextMenu = false;
            this.rptBV.ShowCredentialPrompts = false;
            this.rptBV.ShowDocumentMapButton = false;
            this.rptBV.ShowFindControls = false;
            this.rptBV.ShowPageNavigationControls = false;
            this.rptBV.ShowParameterPrompts = false;
            this.rptBV.ShowPromptAreaButton = false;
            this.rptBV.ShowRefreshButton = false;
            this.rptBV.ShowStopButton = false;
            this.rptBV.ShowZoomControl = false;
            this.rptBV.Size = new System.Drawing.Size(584, 346);
            this.rptBV.TabIndex = 0;
            this.rptBV.UseWaitCursor = true;
            this.rptBV.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;
            this.rptBV.ZoomPercent = 50;
            // 
            // BV
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(284, 262);
            this.Name = "BV";
            this.Text = "BV";
            this.Load += new System.EventHandler(this.BV_Load);
            this.ResumeLayout(false);