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

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        private void CollectFoodType()
        {
            String sqlCommand = String.Empty;

            sqlCommand = SqlQueries.GetQuery(Query.ViewCategory1);

            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 table = new DataTable();
            table.Locale = System.Globalization.CultureInfo.InvariantCulture;
            dataAdapter.Fill(table);

            rptFoodType objFoodType = new rptFoodType();
            objFoodType.SetDataSource(table);
            string reportHeader = RMSAdminController.CollectHeader();
            string reportFooter = RMSAdminController.CollectFooter();
            objFoodType.SetParameterValue(0, reportHeader);
            objFoodType.SetParameterValue(1, reportFooter);

            dataAdapter.Dispose();

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

            pnlContext.Controls.Clear();

            objRptViewer.Parent = this;
            pnlContext.Controls.Add(objRptViewer);
            objRptViewer.Dock = DockStyle.Fill;
        }
Ejemplo n.º 3
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     rptFoodType rpt = new rptFoodType();
     rpt.Site = this.Site;
     return rpt;
 }