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

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     rptParentCategory rpt = new rptParentCategory();
     rpt.Site = this.Site;
     return rpt;
 }
Exemplo n.º 3
0
        private void CollectParentCategory()
        {
            try
            {
                String sqlCommand = SqlQueries.GetQuery(Query.ViewParentCategory);

                CDalConfig oTempDal = ConfigManager.GetConfig<CDalConfig>();

                String tempConnStr = oTempDal.ConnectionString;

                // Create a new data adapter based on the specified query.
                SqlDataAdapter dataAdapter = new SqlDataAdapter(sqlCommand, tempConnStr);

                SqlCommandBuilder commandBuilder = new SqlCommandBuilder(dataAdapter);

                DataTable parentCategory = new DataTable();
                parentCategory.Locale = System.Globalization.CultureInfo.InvariantCulture;
                dataAdapter.Fill(parentCategory);

                rptParentCategory objParentCategory = new rptParentCategory();
                objParentCategory.SetDataSource(parentCategory);
                string reportHeader = RMSAdminController.CollectHeader();
                string reportFooter = RMSAdminController.CollectFooter();
                objParentCategory.SetParameterValue(0, reportHeader);
                objParentCategory.SetParameterValue(1, reportFooter);

                dataAdapter.Dispose();

                RecportViewerCtl objRptViewer = new RecportViewerCtl(this);
                objRptViewer.cRptViewerAdmin.ReportSource = objParentCategory;

                pnlContext.Controls.Clear();

                objRptViewer.Parent = this;
                pnlContext.Controls.Add(objRptViewer);
                objRptViewer.Dock = DockStyle.Fill;

            }
            catch (Exception exp)
            {
                throw exp;
            }
        }