public static void build() { ReportBuilder rptbuild = new ReportBuilder(); ReportType vReport = rptbuild.Report; BodyType vBody = vReport.Body; double x = 0, y = 0, wd = 0, ht = 0; vReport.Width.Value = RPT_WIDTH; vBody.Height.Value = RPT_HEIGHT; DataSetType dataSet = rptbuild.Report.DataSets[0]; ReportUtil.AddFields(dataSet.Fields, new string[] { PInvoice.COPIES , PInvoice.COMPANY_NAME , PInvoice.ADDRESS1 , PInvoice.ADDRESS2 , PInvoice.COMPANY_TIN , PInvoice.COMPANY_GST , PInvoice.SALES_TYPE , PInvoice.INVOICE_ID , PInvoice.INVOICE_NO , PInvoice.INVOICE_DATE , PInvoice.TRANSPORT , PInvoice.VEHICLE_NO , PInvoice.PLACE , PInvoice.PARTY_NAME , PInvoice.STREET1 , PInvoice.STREET2 , PInvoice.CITY , PInvoice.STATE , PInvoice.COUNTRY , PInvoice.PINCODE , PInvoice.GSTIN , PInvoice.SHIPPING_NAME , PInvoice.SHIPPING_STREET1 , PInvoice.SHIPPING_STREET2 , PInvoice.SHIPPING_CITY , PInvoice.SHIPPING_STATE , PInvoice.SHIPPING_COUNTRY , PInvoice.SHIPPING_PINCODE , PInvoice.SHIPPING_GSTIN , PInvoice.TOTAL_QTY , PInvoice.TOTAL_AREASQ , PInvoice.TAXABLE_VALUE , PInvoice.LBL_SGST , PInvoice.TOTAL_SGST , PInvoice.LBL_CGST , PInvoice.TOTAL_CGST , PInvoice.TOTAL_SUB , PInvoice.LEDGER , PInvoice.ADDITIONAL , PInvoice.ROUNDS , PInvoice.GSTTOTAL , PInvoice.GRANDTOTAL , PInvoice.AMOUNT_IN_WORDS , PInvoice.NOTES , PInvoice.ENTRY_BY }); x = 0; y = 0; wd = RPT_WIDTH; ht = RPT_HEIGHT; ListType Reportlist = ReportUtil.AddList("Reportlist", vBody.ReportItems, x, y, wd, ht); Reportlist.Grouping = new GroupingType("group_" + PInvoice.INVOICE_ID + ""); Reportlist.Grouping.GroupExpressions.Add("=Fields!" + PInvoice.INVOICE_ID + ".Value"); Reportlist.Grouping.GroupExpressions.Add("=Fields!" + PInvoice.COPIES + ".Value"); Reportlist.Grouping.PageBreakAtEnd = true; EmbeddedImageType myEmbeddedImage1 = ReportUtil.EmbedImage("Image1", Global.GetAbsolutePath("PRINTS\\sms_logo.png"), vReport); ImageType myImage1 = ReportUtil.AddImage("Image1", myEmbeddedImage1, Reportlist.ReportItems, 0.5, 0.4, 1.25, 1); myImage1.Sizing = SizingEnum.FitProportional; //.AutoSize //.Fit //.Clip x = 0; y = 0; wd = RPT_WIDTH; ht = RPT_HEIGHT; RectangleType rectWarper = ReportUtil.AddRectangle("rectWarper", Reportlist.ReportItems, x, y, wd, ht); rectWarper.Style.BorderStyle.Default = BorderStyleEnum.None; BuildDetail(rectWarper); rptbuild.SaveAs(PRINT_FOLDER + @"\P_Invoice.rdlc"); }
public static void Build() { ReportBuilder rptbuild = new ReportBuilder(); ReportType vReport = rptbuild.Report; BodyType vBody = vReport.Body; double x = 0, y = 0, wd = 0, ht = 0; vReport.Width.Value = RPT_WIDTH; vBody.Height.Value = RPT_HEIGHT; DataSetType dataSet = rptbuild.Report.DataSets[0]; ReportUtil.AddFields(dataSet.Fields, new string[] { PPurchase.COPIES , PPurchase.SALESTYPE , PPurchase.COMPANY_NAME , PPurchase.ADDRESS1 , PPurchase.ADDRESS2 , PPurchase.COMPANY_TIN , PPurchase.PURCHASE_ID , PPurchase.PURCHASE_NO , PPurchase.PURCHASE_DATE , PPurchase.PARTY_NAME , PPurchase.STREET1 , PPurchase.STREET2 , PPurchase.CITY , PPurchase.STATE , PPurchase.COUNTRY , PPurchase.PINCODE , PPurchase.GSTIN , PPurchase.TOTAL_QTY , PPurchase.TAXABLE_VALUE , PPurchase.LBL_CGST , PPurchase.LBL_SGST , PPurchase.TOTAL_CGST , PPurchase.TOTAL_SGST , PPurchase.TOTAL_IGST , PPurchase.TOTAL_CESS , PPurchase.TOTAL_SUB , PPurchase.LEDGER , PPurchase.ADDITIONAL , PPurchase.ROUNDS , PPurchase.GSTTOTAL , PPurchase.GRANDTOTAL , PPurchase.AMOUNT_IN_WORDS , PPurchase.NOTES , PPurchase.ENTRY_BY }); x = 0; y = 0; wd = RPT_WIDTH; ht = RPT_HEIGHT; ListType Reportlist = ReportUtil.AddList("Reportlist", vBody.ReportItems, x, y, wd, ht); Reportlist.Grouping = new GroupingType("group_" + PPurchase.PURCHASE_ID + ""); Reportlist.Grouping.GroupExpressions.Add("=Fields!" + PPurchase.PURCHASE_ID + ".Value"); Reportlist.Grouping.GroupExpressions.Add("=Fields!" + PPurchase.COPIES + ".Value"); Reportlist.Grouping.PageBreakAtEnd = true; if (Customise.PrintPurchaseWithLogo == true) { EmbeddedImageType myEmbeddedImage1 = ReportUtil.EmbedImage("Image1", Global.GetAbsolutePath("PRINTS\\" + Customise.Logo + ""), vReport); ImageType myImage1 = ReportUtil.AddImage("Image1", myEmbeddedImage1, Reportlist.ReportItems, 1.2, 0.4, 0.8, 0.8); myImage1.Sizing = SizingEnum.FitProportional; //.AutoSize //.Fit //.Clip } x = 0; y = 0; wd = RPT_WIDTH; ht = RPT_HEIGHT; RectangleType rectWarper = ReportUtil.AddRectangle("rectWarper", Reportlist.ReportItems, x, y, wd, ht); rectWarper.Style.BorderStyle.Default = BorderStyleEnum.None; BuildDetail(rectWarper); //ReportUtil.AttachRulers(Reportlist.ReportItems, RPT_WIDTH, RPT_HEIGHT); rptbuild.SaveAs(PRINT_FOLDER + @"\P_Purchase.rdlc"); }