Bonjour,
J'ai un report crystal composé de Trois sous Rapport
J'utilise Visual studio 2005 et crystal report en C#
J'ai creer donc un fichier
Cahier_otm.rpt
et trois autre fichier
Protocol.rpt
Personnel.rpt
salle.rpt
Lors de l'execution rien ne plante mais....
2 sur les trois report sous rempli de données.
J'ai utilisé les meme methodes dans les Trois rapport (Données XSD, etc, etc, etc....)
Je suis un peuperplexe...
Quelqu'un peu t'il m'aider
Ci joint le code :
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65 public void lauch_crystalViewer(CrystalDecisions.CrystalReports.Engine.ReportClass report) { this.crystalReportViewer1 = new CrystalDecisions.Windows.Forms.CrystalReportViewer(); this.viewer = new System.Windows.Forms.Form(); #region BASEDONNES //Base DataSet dbset = new DataSet(); DbDataAdapter adpter; string scnx = "server = dev0238 ; uid = sa; pwd = sa ; database = OPTIM_OTM_480"; //string scnx = "server = srv3dc74 ; uid = sa; pwd = ; database = OPTIM"; string scmd = "select * from v2LocationBlocSce"; string scmdpersonnel = "select * from vPersonnelSce"; string cmdProtocol = "select * from v2operatingProtocolSce"; adpter = new SqlDataAdapter(); adpter.SelectCommand = new SqlCommand(scmdpersonnel, new SqlConnection(scnx)); adpter.Fill(dbset, "vPersonnelSce"); adpter.SelectCommand = new SqlCommand(scmd, new SqlConnection(scnx)); adpter.Fill(dbset, "v2LocationBlocSce"); adpter.SelectCommand = new SqlCommand(cmdProtocol, new SqlConnection(scnx)); adpter.Fill(dbset, " v2operatingProtocolSce"); report.Subreports["salle.rpt"].SetDataSource(dbset); report.Subreports["personnel.rpt"].SetDataSource(dbset); report.Subreports["protocol.rpt"].SetDataSource(dbset); //report.SetDataSource(dbset); #endregion this.viewer.SuspendLayout(); //Crystal report this.crystalReportViewer1.ActiveViewIndex = 0; this.crystalReportViewer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.crystalReportViewer1.Dock = System.Windows.Forms.DockStyle.Fill; this.crystalReportViewer1.Location = new System.Drawing.Point(0, 0); this.crystalReportViewer1.Name = "Cahier de saisie OTM"; this.crystalReportViewer1.ReportSource = report; this.crystalReportViewer1.Size = new System.Drawing.Size(545, 379); this.crystalReportViewer1.TabIndex = 0; // // Form1 // this.viewer.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.viewer.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.viewer.ClientSize = new System.Drawing.Size(799, 566); this.viewer.Controls.Add(this.crystalReportViewer1); this.viewer.Name = "Cahier de saisie OTM"; this.viewer.Text = "Cahier de saisie OTM"; this.viewer.ResumeLayout(false); this.viewer.Show(); }
PS : Avez vous un lien sympa sur des tutoriaux
Crystal report / VS 2005 /C#
Merci d'avance
Partager