using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Forms; using System.Drawing; using System.Data; using FastReport; using FastReport.Data; using FastReport.Dialog; using FastReport.Barcode; using FastReport.Table; using FastReport.Utils; namespace FastReport { public class ReportScript { private void Page1_StartPage(object sender, EventArgs e) { // Fejléc DataSourceBase fejlecAdatok = Report.GetDataSource("Fejlec"); Data2.DataSource = fejlecAdatok; fejlecAdatok.Init(); // Tanulók DataSourceBase tanuloAdatok = Report.GetDataSource("JegyekReszletezese"); Data1.DataSource = tanuloAdatok; // GroupHeader3.Condition = "[JegyekReszletezese.GROUPPARAMETER]"; // GroupHeader4.Condition = "[JegyekReszletezese.TANTARGY]"; Relation rel1 = new Relation(); rel1.Name = "FejlecTanulo"; rel1.ParentDataSource = fejlecAdatok; rel1.ChildDataSource = tanuloAdatok; rel1.ParentColumns = new string[] { "OsztalyId" }; rel1.ChildColumns = new string[] { "OsztalyId" }; Report.Dictionary.Relations.Add(rel1); tanuloAdatok.Init(fejlecAdatok); string alulirottMegnevezese = Report.Parameters.FindByName("AlulirottMegnevezese").Value.ToString(); int index = alulirottMegnevezese.IndexOf(" - "); string nev = alulirottMegnevezese.Substring(0, index).Trim(); string beosztas = alulirottMegnevezese.Substring(index + " - ".Length).Trim(); Text16.Text = nev + "\r\n" + beosztas; } } }