Exemplo n.º 1
0
        private void raportDitorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            XhiroDitore flPrint = new XhiroDitore();

            flPrint.SetParameterValue("@idPerdorues", perdoruesID);
            flPrint.SetParameterValue("@_data", DateTime.Now.ToString("yyyy-M-d"));

            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();
        }