Example #1
0
    private MemoryStream PrintVoucher(string billNo)
    {
        XtraReport rpt = new XtraReport();

        rpt.LoadLayout(Server.MapPath(@"~\ReportFreightSea\repx\Account\Voucher.repx"));
        DataSet set = AccountFreightPrint.PrintVoucher(billNo);


        DevExpress.XtraReports.UI.GroupFooterBand groupFooter1 = rpt.Report.Bands["GroupFooter1"] as DevExpress.XtraReports.UI.GroupFooterBand;
        DevExpress.XtraReports.UI.XRSubreport     subReport1   = new XRSubreport();
        subReport1.Name = "groupFooter1";
        groupFooter1.Controls.Add(subReport1);
        XtraReport rpt1 = new XtraReport();

        rpt1.LoadLayout(Server.MapPath(@"~\ReportFreightSea\repx\Account\Voucher_detail.repx"));
        subReport1.ReportSource = rpt1;
        rpt1.DataSource         = set;

        DevExpress.XtraReports.UI.GroupFooterBand groupFooter2 = rpt.Report.Bands["GroupFooter2"] as DevExpress.XtraReports.UI.GroupFooterBand;
        DevExpress.XtraReports.UI.XRSubreport     subReport2   = new XRSubreport();
        subReport2.Name = "groupFooter2";
        groupFooter2.Controls.Add(subReport2);
        XtraReport rpt2 = new XtraReport();

        rpt2.LoadLayout(Server.MapPath(@"~\ReportFreightSea\repx\Account\Voucher_detail.repx"));
        subReport2.ReportSource = rpt2;
        rpt2.DataSource         = set;

        System.IO.MemoryStream str = new MemoryStream();
        rpt.ExportToPdf(str);

        return(str);
    }
    private XtraReport ShowInvoiceA4(string billNo)
    {
        XtraReport rpt = new XtraReport();

        rpt.LoadLayout(Server.MapPath(@"~\ReportFreightSea\repx\Account\InvoiceOne.repx"));
        rpt.DataSource = AccountFreightPrint.PrintInvoice2(billNo, D.Text("select DocType from XaArInvoice Where DocNo='" + billNo + "'"));
        rpt.CreateDocument();
        return(rpt);
    }
Example #3
0
    private MemoryStream PrintDrNoteA4(string billNo)
    {
        XtraReport rpt = new XtraReport();

        rpt.LoadLayout(Server.MapPath(@"~\ReportFreightSea\repx\Account\Invoice_A4.repx"));
        rpt.DataSource = AccountFreightPrint.PrintInvoice(billNo, "DN");
        System.IO.MemoryStream str = new MemoryStream();
        rpt.ExportToPdf(str);

        return(str);
    }
Example #4
0
    private MemoryStream PrintInvoiceA4(string billNo)
    {
        XtraReport rpt = new XtraReport();

        rpt.LoadLayout(Server.MapPath(@"~\ReportFreightSea\repx\Account\InvoiceOne.repx"));
        rpt.DataSource = AccountFreightPrint.PrintInvoice2(billNo, D.Text("select DocType from XaArInvoice Where DocNo='" + billNo + "'"));
        System.IO.MemoryStream str = new MemoryStream();
        rpt.ExportToPdf(str);

        return(str);
    }