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_ManualBuild(object sender, EventArgs e) { bool isLezartNaplo; Boolean.TryParse(Report.Parameters.FindByName("isLezartNaplo").Value.ToString(), out isLezartNaplo); if (isLezartNaplo) { OsztalyozoLezaras.Visible = true; } DataSourceBase tanuloAlapadatok = Report.GetDataSource("TanuloAlapAdatok"); DataTanuloAlapadatok.DataSource = tanuloAlapadatok; DataTanuloNevsor.DataSource = tanuloAlapadatok; tanuloAlapadatok.Init(); // Tanulók elérhetőségei DataSourceBase tanuloElerhetosegei = Report.GetDataSource("TanuloElerhetosegei"); DataTanuloElerhetosegei.DataSource = tanuloElerhetosegei; Relation rel2 = new Relation(); rel2.Name = "TanuloEler"; rel2.ParentDataSource = tanuloAlapadatok; rel2.ChildDataSource = tanuloElerhetosegei; rel2.ParentColumns = new string[] { "tanuloID" }; rel2.ChildColumns = new string[] { "tanuloID" }; Report.Dictionary.Relations.Add(rel2); tanuloElerhetosegei.Init(tanuloAlapadatok); // Tanulók gondviselői DataSourceBase tanuloGonviselokAdatai = Report.GetDataSource("TanuloGonviselokAdatai"); DataTanuloGondviselo.DataSource = tanuloGonviselokAdatai; Relation rel3 = new Relation(); rel3.Name = "TanuloGondviselo"; rel3.ParentDataSource = tanuloAlapadatok; rel3.ChildDataSource = tanuloGonviselokAdatai; rel3.ParentColumns = new string[] { "tanuloID" }; rel3.ChildColumns = new string[] { "TanuloId" }; Report.Dictionary.Relations.Add(rel3); tanuloGonviselokAdatai.Init(tanuloAlapadatok); } private void FejlecOldal_StartPage(object sender, EventArgs e) { 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; Text86.Text = Text16.Text; } } }