Example #1
0
        private void Reportbtn_Click(object sender, EventArgs e)
        {
            IReports m_Reports;

            m_Reports = new ReportsClass();
            string strQuery;

            strQuery = Tablecombo.Text;
            if (strQuery == "")
            {
                MessageBox.Show("Enter the table name");
            }
            else if (NormalBtn.Checked == true)
            {
                m_Reports.FillReport(strQuery);
            }
            else if (Withcaptionbtn.Checked == true)
            {
                string strCaption;
                strCaption = CaptionTxt.Text;
                if (strCaption == "")
                {
                    MessageBox.Show("Please enter the caption");
                }
                else
                {
                    m_Reports.FillReportWithCaption(strQuery, strCaption);
                }
            }
            else if (Aditinalinfobtn.Checked == true)
            {
                string strHeading;
                string strAdheading;
                int    bshowheader = 1;
                int    bshowfooter = 1;
                strHeading   = HeadingTxt.Text;
                strAdheading = AddHeadingTxt.Text;
                if (strHeading == "")
                {
                    MessageBox.Show("Enter the Heading");
                }
                else if (strAdheading == "")
                {
                    MessageBox.Show("Enter the additional Heading");
                }
                else if ((strAdheading == "") && (strHeading == ""))
                {
                    MessageBox.Show("Enter the Heading and Additional Heading");
                }
                else
                {
                    m_Reports.FillReportEx(strQuery, strHeading, strAdheading, bshowheader, bshowfooter);
                }
            }
        }
Example #2
0
        private void OkBtn_Click(object sender, EventArgs e)
        {
            //IGrid m_Grid;
            m_Grid = new GridClass();

            IReports m_Reports;

            m_Reports = new ReportsClass();

            try
            {
                GetValues();
                m_Grid.ResetGrid();

                m_Grid.ReadOnly         = iReadOnly;
                m_Grid.NoOfRows         = Convert.ToInt32(strNoOfRow);
                m_Grid.NoOfColumns      = Convert.ToInt32(strNoOfCol);
                m_Grid.NoOfFixedRows    = Convert.ToInt32(strNoOfFRow);
                m_Grid.NoOfFixedColumns = Convert.ToInt32(strNoOfFCol);
                m_Grid.set_RowHeight(Convert.ToInt32(strRow), Convert.ToInt32(strRowHieght));
                m_Grid.set_ColumnWidth(Convert.ToInt32(strCol), Convert.ToInt32(strColWidth));
                if (strCellColor == "RED")
                {
                    m_Grid.set_CellColour(Convert.ToInt32(strRow), Convert.ToInt32(strCol), Convert.ToInt32(ColorTranslator.ToOle(Color.FromArgb(255, 0, 0))));
                }
                else if (strCellColor == "BLUE")
                {
                    m_Grid.set_CellColour(Convert.ToInt32(strRow), Convert.ToInt32(strCol), Convert.ToInt32(ColorTranslator.ToOle(Color.FromArgb(0, 0, 255))));
                }
                else
                {
                    m_Grid.set_CellColour(Convert.ToInt32(strRow), Convert.ToInt32(strCol), Convert.ToInt32(ColorTranslator.ToOle(Color.FromArgb(0, 255, 0))));
                }
                m_Grid.UnmergeCells(Convert.ToInt32(strRow), Convert.ToInt32(strCol), Convert.ToInt32(strRow) + 1, Convert.ToInt32(strCol) + 1);
                m_Grid.MergeCells(Convert.ToInt32(strRow), Convert.ToInt32(strCol), Convert.ToInt32(strRow) + 1, Convert.ToInt32(strCol) + 1);
            }
            catch (Exception EX)
            {
                MessageBox.Show(EX.ToString());
            }
        }
Example #3
0
 private void Reports_Load(object sender, EventArgs e)
 {
     r = new ReportsClass();
 }