private void metroButton1_Click(object sender, EventArgs e)
 {
     try
     {
         DailyReportSpectacle rpt = new DailyReportSpectacle();
         rpt.RecordSelectionFormula = "{receipt1.ReceiptDate} in Date(" + DateStartDate.Value.ToString("yyyy,MM,dd") + ") to Date(" + DateEndDate.Value.ToString("yyyy,MM,dd") + ") AND {spectacles1.Branch} = " + Session.BranchId + "AND {receipt1.OrderType} = 'SPEC'";
         new UI_REPORT_VIEWER(rpt).Show();
     }
     catch (Exception ex)
     {
         CommonFunctions.ShowError(this, ex.ToString());
         CommonFunctions.WriteToErrorLog(ex.ToString());
     }
 }
 private void BtnSpectacles_Click(object sender, EventArgs e)
 {
     try
     {
         fromYear  = DateDailyReport.Value.Year.ToString();
         fromMonth = DateDailyReport.Value.Month.ToString();
         fromDay   = DateDailyReport.Value.Day.ToString();
         DailyReportSpectacle rpt = new DailyReportSpectacle();
         rpt.RecordSelectionFormula = "{receipt1.ReceiptDate} = DATE(" + fromYear + "," + fromMonth + "," + fromDay + ") AND {spectacles1.Branch} = " + Session.BranchId + "AND {receipt1.OrderType} = 'SPEC'";
         new UI_REPORT_VIEWER(rpt).Show();
     }
     catch (Exception ex)
     {
         CommonFunctions.ShowError(this, ex.ToString());
         CommonFunctions.WriteToErrorLog(ex.ToString());
     }
 }