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

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
        private void printoFaturen(int fletedaljeId)
        {
            FleteDaljePrint flPrint = new FleteDaljePrint();
            DataTable       tb      = conn.GETFleteDalje(fletedaljeId);

            flPrint.SetParameterValue("Nr", tb.Rows[0][0].ToString());

            flPrint.SetParameterValue("shitesi", tb.Rows[0][2].ToString() + " " + tb.Rows[0][3].ToString());

            flPrint.SetParameterValue("Sporteli", tb.Rows[0][1].ToString());

            flPrint.SetParameterValue("Data", tb.Rows[0][4].ToString());
            flPrint.SetParameterValue("@id", fletedaljeId);

            var dialog = new PrintDialog();

            CrRep cs = new CrRep();

            cs.crystalReportViewer1.ReportSource = flPrint;

            flPrint.PrintOptions.PrinterName = dialog.PrinterSettings.PrinterName;
            flPrint.PrintToPrinter(1, false, 0, 0);
            cs.Show();
        }