Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptFeeSlipNew rpt = new rptFeeSlipNew();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
        public void GetDuplicateFessHP()
        {
            DataSet ds = Connection.GetDataSet("GetRecPrint " + school.CurrentSessionCode + "," + txtfeeno.Text.Trim());

            try
            {
                bool b = Convert.ToBoolean(Connection.GetExecuteScalar("Select DualSlipType From tbl_FeeHeads"));
                if (b)
                {
                    ds.WriteXmlSchema(@"" + Connection.GetAccessPathId() + @"Barcodes\a\rptFeeReceiptNew.xsd");
                    rptFeeSlipNew cr = new rptFeeSlipNew();
                    cr.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
                    cr.PrintOptions.PaperSize        = CrystalDecisions.Shared.PaperSize.PaperLetter;
                    cr.SetDataSource(ds);
                    ShowAllReports s = new ShowAllReports();
                    s.crystalReportViewer1.ReportSource = cr;
                    //cr.SetParameterValue("Title", "FEE RECEIPT");
                    s.Show();
                }
                else
                {
                    ds.WriteXmlSchema(@"" + Connection.GetAccessPathId() + @"Barcodes\a\rptFeeReceiptSingleNew.xsd");
                    rptFeeSlipSingleNew cr = new rptFeeSlipSingleNew();
                    cr.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
                    //cr.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperLetter;
                    cr.SetDataSource(ds);
                    ShowAllReports s = new ShowAllReports();
                    // System.Drawing.Printing.PaperSize pr = new System.Drawing.Printing.PaperSize("Atul", 4, 6);
                    Size sz = new Size(4, 6);
                    s.crystalReportViewer1.ReportSource = cr;
                    cr.PrintOptions.PaperSize           = CrystalDecisions.Shared.PaperSize.PaperEnvelopePersonal;
                    s.Show();
                }
            }
            catch { }
        }