示例#1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crptprojects rpt = new crptprojects();

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
        private void report_Load(object sender, EventArgs e)
        {
            SqlConnection sqlCon = new SqlConnection(@"Data Source=.;Initial Catalog=ProjectA;Integrated Security=True");

            sqlCon.Open();
            SqlDataAdapter sqlDa = new SqlDataAdapter("EntireReport", sqlCon);

            sqlDa.SelectCommand.CommandType = CommandType.StoredProcedure;
            DataSet dsAProject = new DataSet();

            sqlDa.Fill(dsAProject);
            sqlCon.Close();
            CrystalReport.crptprojects crptEntireReport = new CrystalReport.crptprojects();
            crptEntireReport.Database.Tables["Person"].SetDataSource(dsAProject.Tables[0]);
            crviewer2.ReportSource = null;
            crviewer2.ReportSource = crptEntireReport;
        }
示例#3
0
        private void new_Load(object sender, EventArgs e)
        {
            SqlConnection sqlCon = new SqlConnection(@"Data Source=.;Initial Catalog=ProjectA;Integrated Security=True");

            sqlCon.Open();
            SqlDataAdapter sqlDa = new SqlDataAdapter("ProjectReport", sqlCon);

            sqlDa.SelectCommand.CommandType = CommandType.StoredProcedure;
            DataSet dsProject = new DataSet();

            sqlDa.Fill(dsProject);
            sqlCon.Close();


            CrystalReport.crptprojects crptProject = new CrystalReport.crptprojects();
            crptProject.Database.Tables["Project"].SetDataSource(dsProject.Tables[0]);
            crptProject.Database.Tables["Advisor"].SetDataSource(dsProject.Tables[1]);
            crptProject.Database.Tables["Students"].SetDataSource(dsProject.Tables[2]);
            crvViewer.ReportSource = null;
            crvViewer.ReportSource = crptProject;
        }