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 GroupHeader1_BeforePrint(object sender, EventArgs e) { } private void IntezmenyFejlec_StartPage(object sender, EventArgs e) { DataSourceBase fejlecDS = Report.GetDataSource("Fejlec"); Data5.DataSource = fejlecDS; fejlecDS.Init(); DataSourceBase TANULOK = Report.GetDataSource("Tanulo"); Data7.DataSource = TANULOK; Relation rel0 = new Relation(); rel0.ParentDataSource = fejlecDS; rel0.ChildDataSource = TANULOK; rel0.ParentColumns = new string[] { "OsztalyId" }; rel0.ChildColumns = new string[] { "OsztalyCsoportId" }; Report.Dictionary.Relations.Add(rel0); TANULOK.Init(fejlecDS); DataSourceBase TARGYAK = Report.GetDataSource("Tantargy"); Data8.DataSource = TARGYAK; Relation rel = new Relation(); rel.ParentDataSource = TANULOK; rel.ChildDataSource = TARGYAK; rel.ParentColumns = new string[] { "TanuloId" }; rel.ChildColumns = new string[] { "TanuloId" }; Report.Dictionary.Relations.Add(rel); TARGYAK.Init(TANULOK); DataSourceBase TABLE = Report.GetDataSource("MulasztasokReszletezese"); Data9.DataSource = TABLE; Relation rel2 = new Relation(); rel2.ParentDataSource = TARGYAK; rel2.ChildDataSource = TABLE; rel2.ParentColumns = new string[] { "TanuloId", "OsztalyCsoportId", "TantargyId" }; rel2.ChildColumns = new string[] { "TanuloId", "OsztalyCsoportId", "TantargyId" }; Report.Dictionary.Relations.Add(rel2); TABLE.Init(TARGYAK); DataSourceBase TABLEOSSZESITO = Report.GetDataSource("Tantargy"); Data10.DataSource = TABLEOSSZESITO; TABLEOSSZESITO.Init(); string alulirottMegnevezese = Report.Parameters.FindByName("AlulirottMegnevezese").Value.ToString(); int index = alulirottMegnevezese.IndexOf(" - "); string nev = alulirottMegnevezese.Substring(0, index).Trim(); Text2.Text = nev; string beosztas = alulirottMegnevezese.Substring(index + " - ".Length).Trim(); Text17.Text = beosztas; } } }