Ejemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ListOfLockers rpt = new ListOfLockers();

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        private void LockerListButton_Click(object sender, EventArgs e)
        {
            ReportViewer    f2 = new ReportViewer();
            TableLogOnInfos reportLogonInfos = new TableLogOnInfos();
            TableLogOnInfo  reportLogonInfo  = new TableLogOnInfo();
            ConnectionInfo  reportConInfo    = new ConnectionInfo();
            Tables          tables           = default(Tables);
            //	Table table = default(Table);
            var with1 = reportConInfo;

            with1.ServerName   = "tcp:KyotoServer,49172";
            with1.DatabaseName = "KeyRegistar";
            with1.UserID       = "sa";
            with1.Password     = "******";
            ListOfLockers cr = new ListOfLockers();

            tables = cr.Database.Tables;
            foreach (Table table in tables)
            {
                reportLogonInfo = table.LogOnInfo;
                reportLogonInfo.ConnectionInfo = reportConInfo;
                table.ApplyLogOnInfo(reportLogonInfo);
            }
            //f2.crystalReportViewer1.ParameterFieldInfo = paramFields;
            //set the parameterfield information in the crystal report
            f2.crystalReportViewer1.ReportSource = cr;
            this.Visible = false;

            f2.ShowDialog();
            this.Visible = true;
        }