示例#1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            pay_ag_period rpt = new pay_ag_period();

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
        private void mor_acc_rep_lnk_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                repoerts_form mor_rp_form = new repoerts_form();

                pay_ag_period p_mor_rp = new pay_ag_period();


                ParameterFields mor_params = new ParameterFields();
                //////////mor name/////////////
                ParameterField         mor_name_par = new ParameterField();
                ParameterDiscreteValue mor_nam_dis  = new ParameterDiscreteValue();
                mor_nam_dis.Value = 0;
                mor_name_par.Name = "mor_id";
                if (mor_name_cmbx.Text.Trim() != "")
                {
                    mor_nam_dis.Value = meth.select_mor_by_name_or_code(mor_name_cmbx.SelectedValue.ToString(), "NULL").Rows[0][0];
                }



                mor_name_par.CurrentValues.Add(mor_nam_dis);
                mor_params.Add(mor_name_par);
                /////////////////////////////////////////////////////choice////////
                ParameterField         choice_par = new ParameterField();
                ParameterDiscreteValue choice_dis = new ParameterDiscreteValue();

                choice_par.Name = "choice_par";
                if (query_choice_cmbx.SelectedIndex == 0)
                {
                    choice_dis.Value = 1;
                }
                else
                {
                    choice_dis.Value = 0;
                }


                choice_par.CurrentValues.Add(choice_dis);
                mor_params.Add(choice_par);

                //////////////////////////////////////////////////////////////////////////////////////////////////////start date
                ParameterField         mor_start_dat_par = new ParameterField();
                ParameterDiscreteValue mor_start_dat_dis = new ParameterDiscreteValue();

                mor_start_dat_par.Name  = "start_date";
                mor_start_dat_dis.Value = mor_acc_start_date.Text;

                mor_start_dat_par.CurrentValues.Add(mor_start_dat_dis);
                mor_params.Add(mor_start_dat_par);
                ///////////////////////////////////////////////////////////end date//////////////
                ParameterField         mor_end_dat_par = new ParameterField();
                ParameterDiscreteValue mor_end_dat_dis = new ParameterDiscreteValue();

                mor_end_dat_par.Name  = "end_date";
                mor_end_dat_dis.Value = mor_acc_end_date.Text;

                mor_end_dat_par.CurrentValues.Add(mor_end_dat_dis);
                mor_params.Add(mor_end_dat_par);
                ////////////////////////////////////////////////////////////////////////////////////////
                mor_rp_form.rep_crst.ParameterFieldInfo = mor_params;
                mor_rp_form.rep_crst.ReportSource       = p_mor_rp;

                mor_rp_form.ShowDialog();
            }
            catch (Exception ff)
            {
                MessageBox.Show(ff.Message + " طباعة تقرير حسابات مورد");
            }
        }