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"); Data1.DataSource = fejlecAdatok; fejlecAdatok.Init(); // Tanulók DataSourceBase tanuloAdatok = Report.GetDataSource("Tanulok"); Data2.DataSource = tanuloAdatok; 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); } } }