Esempio n. 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            BarcodeAll rpt = new BarcodeAll();

            rpt.Site = this.Site;
            return(rpt);
        }
Esempio n. 2
0
 public frmReporting(string Parameter, string Modifier)
 {
     InitializeComponent();
     if (Parameter == "All" && Modifier == "All")
     {
         DataSet.DataSet1 dset   = new DataSet.DataSet1();
         DataTable        dtable = dset.Tables.Add("Subs");
         dtable = DBLayer.RefreshTable("SELECT SubID,SubName FROM Subs");
         BarcodeAll _Report = new BarcodeAll();
         _Report.SetDataSource(dtable);
         crystalReportViewer1.ReportSource = _Report;
         crystalReportViewer1.Refresh();
     }
     if (Parameter.Length > 0 && Modifier == "Game")
     {
         DataSet.DataSet1 dset   = new DataSet.DataSet1();
         DataTable        dtable = dset.Tables.Add("Subs");
         dtable = DBLayer.RefreshTable(@"SELECT
                             Subs.SubID,
                             Subs.SubName
                             FROM
                             Subs ,
                             Games
                             INNER JOIN Reservations ON Reservations.GameID = Games.GameID AND Reservations.SubID = Subs.SubID
                             WHERE
                             Games.GameName ='" + Parameter + "' ");
         BarcodeAll _Report = new BarcodeAll();
         _Report.SetDataSource(dtable);
         crystalReportViewer1.ReportSource = _Report;
         crystalReportViewer1.Refresh();
     }
     if (Parameter.Length > 0 && Modifier == "Name")
     {
         DataSet.DataSet1 dset   = new DataSet.DataSet1();
         DataTable        dtable = dset.Tables.Add("Subs");
         dtable = DBLayer.RefreshTable(@"SELECT
                         Subs.SubID,
                         Subs.SubName
                         FROM
                         Subs
                         WHERE
                         Subs.SubName LIKE '%" + Parameter + "%' ");
         BarcodeSingle _Report = new BarcodeSingle();
         _Report.SetDataSource(dtable);
         crystalReportViewer1.ReportSource = _Report;
         crystalReportViewer1.Refresh();
     }
 }