Exemple #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ContractCrystalReport rpt = new ContractCrystalReport();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        private void ContractForm_Load(object sender, EventArgs e)
        {
            string contractDate = DateTime.Now.ToString("dd", CultureInfo.InvariantCulture) + " of " + DateTime.Now.ToString("MMMM", CultureInfo.InvariantCulture) + ",  " + DateTime.Now.ToString("yyyy", CultureInfo.InvariantCulture);

            ContractCrystalReport c = new ContractCrystalReport();

            c.SetParameterValue("firstParagraph", "DARELL B. DELA FLOR");
            c.SetParameterValue("lessor", _row["l_firstname"].ToString().ToUpper() + " " + _row["l_middlename"].ToString().ToUpper() + " " + _row["l_lastname"].ToString().ToUpper());
            c.SetParameterValue("lessorName", _row["l_firstname"].ToString().ToUpper() + " " + _row["l_middlename"].ToString().ToUpper() + " " + _row["l_lastname"].ToString().ToUpper() + " ");
            c.SetParameterValue("mayorName", "DARELL B. DELA FLOR");
            c.SetParameterValue("stallsize", _row["stall_floor_alength"].ToString() + " feet, by " + _row["stall_floor_blength"].ToString() + " feet");
            c.SetParameterValue("startdate_enddate", _row["start_date"].ToString() + " and renewable upon expiry on   " + _row["due_date"].ToString() + ";");
            c.SetParameterValue("stallrate", "One Thousand Two Hundred Pesos(P1,200.00)");
            c.SetParameterValue("contractDate", contractDate);
            c.SetParameterValue("footer", "<b>" + _row["l_firstname"].ToString().ToUpper() + " " + _row["l_middlename"].ToString().ToUpper() + " " + _row["l_lastname"].ToString().ToUpper() + "</b>, and <b>DARELL B. DELA FLOR</b>");
            ContractCrystalReportViewer.ReportSource = c;
        }