Print Selected Voucher Number

Discussion in 'Free Source Codes' started by ajayagrawal, Apr 9, 2024.

    
  1. ajayagrawal

    ajayagrawal New Member


    I would like to Print Voucher Numbers (Selected) in my report as title like:
    "Consolidated Report for selected voucher numbers: 1, 4, 5, 9"

    [#Form:Daybook]
    Button:print Selected

    [Button: Print Selected]
    Key : Alt + S
    Action : Print Report : My SalesSummary
    Title : "Item Wise Sales Summary"

    [Report: My SalesSummary]
    Form: My SalesSummary
    Fetch Collection : PrintSelectedItems

    [Collection : MySalesItems]
    Source Collection : PrintSelectedItems
    Walk : Inventory Entries
    By : StockItemName : $StockItemName
    Aggr Compute : SalesQty : Sum : $ActualQty
    Keep Source : ().

    [Collection: PrintSelectedItems]
    Data Source : Report : Selected
    Fetch : MasterId, VoucherNumber, VoucherTypeName
    Fetch : InventoryEntries.*
    Fetch : AllInventoryEntries.StockitemName, AllInventoryEntries.ActualQty
    Fetch : LedgerEntries.*
    Option : RefreshColl : Yes

    [!Collection : RefreshColl]

    [#Collection: Daybook Vouchers of Company]
    Fetch : AllInventoryEntries.StockItemName, AllInventoryEntries.BilledQty, AllInventoryEntries.ActualQty
    Fetch : AllInventoryEntries.ItemDSPName
    Fetch : VoucherNumber

    [#Collection : Specific Vouchers of Company]
    Fetch : AllInventoryEntries.StockItemName, AllInventoryEntries.BilledQty, AllInventoryEntries.ActualQty
    Fetch : AllInventoryEntries.ItemDSPName
    Fetch : VoucherNumber

    [#Collection : Filtered Vouchers of Company]
    Fetch : AllInventoryEntries.StockItemName, AllInventoryEntries.BilledQty, AllInventoryEntries.ActualQty
    Fetch : AllInventoryEntries.ItemDSPName

    [#Collection : Vouchers of Company]
    Fetch : AllInventoryEntries.StockItemName, AllInventoryEntries.BilledQty, AllInventoryEntries.ActualQty
    Fetch : AllInventoryEntries.ItemDSPName
    Fetch : VoucherNumber

    [Form :My SalesSummary]
    #Part : DSP AccTitles,MyReportTitle,My SalesSummaryTL,My SalesSummary
    Part : MyReportTitle,My SalesSummaryTL,My SalesSummary
    Page Break : DSP ClPageBreak, CyDSPOpPageBreak
    Full Width : No
    Space Top : If $$InPrintMode Then 0.2 Else 0 inches
    Space Bottom : If $$InPrintMode Then 0.25 Else 0 inches
    Space Left : If $$InPrintMode Then 0.25 Else 0 inches
    Space Right : If $$InPrintMode Then 0.25 Else 0 inches
    Button : F2Change Period
    Background : @@SV_DAYBOOK

    [Part : CyDSPOpPageBreak]
    Parts : DSP OpCompanyName,DSP Op ReportTitle,My SalesSummaryTL
    Vertical: Yes

    [Part : MyReportTitle]
    Line :MyReportTitle

    [Line :MyReportTitle]
    Field : Simple Field
    Local : Field : Simple Field : Set As : $DSPVCHnumber
    Local : Field : Simple Field : Style : Normal Bold

    [Part : My SalesSummaryTL]
    Line : My SalesSummaryTL
    Border : Column Titles

    [Line : My SalesSummaryTL]
    Use : My SalesSummary
    Local : Field : Default : Type : string
    Local : Field : My SalesSummaryItem : Set As : "Particulars"
    Local : Field : MyItemsSalesQty: Set As : "Quantity"
    Local : Field : MyItemsBlankAvl : Set As : "Available"
    Local : Field : MyItemsCLStk : Set As : "Stock"
    Local :Field : Default : Style : Small Bold

    [Part :My SalesSummary]
    Lines : My SalesSummary
    BottomLines:My SalesSummaryTotal
    Repeat : My SalesSummary :MySalesItems
    Scroll : Vertical
    Float : Yes
    Total : MyItemsSalesQty


    [Line :My SalesSummary]
    Field : MyItemsCLStk, My SalesSummaryItem
    Right Field : MyItemsSalesQty,MyItemsBlankAvl
    Border : Thin Left Right
    Border : Thin Bottom

    [Field : My SalesSummaryItem]
    Use : Name Field
    Set As : $StockitemName
    Width : 60% Screen
    Style : Normal
    Border : Thin Left right

    [Field : MyItemsSalesQty]
    Use : Qty Primary Field
    Style : Normal
    Set As : $SalesQty
    Border : Thinbox
    Width : 7

    [Field : MyItemsBlankAvl]
    Set as : ""
    Style : Normal
    Border : Thinbox
    Width : 7

    [Field : MyItemsCLStk]
    Set as : $StkClBalance:StockItem:$StockItemName + $SalesQty
    Style : Normal
    Border : Thinbox
    Width : 7
    Align : Right

    [Line : My SalesSummaryTotal]
    Use : My SalesSummary
    Local : Field : My SalesSummaryItem : Set As : "Total"
    Local : Field : MyItemsSalesQty: Set As : $$Total:MyItemsSalesQty
    Local :Field : Default : Style : Small Bold
    Border : Thin Top Bottom
     


Share This Page