I have simple stock item report. There are StockItemName, Parent, Category, Alias and price level rate. I want to print selected stock items. My report: [#Menu: Gateway of Tally] Add : Key Item : Barcode Print : T : Display : BarcodePrint [Report: BarcodePrint] Title : "From Group Print" Variable : StockGroupName Variable : IsStockReport, IsCategoryReport, StockItemName, SV Stock Item Set : IsItemReport : No Set : IsStockReport : Yes Set : IsCategoryReport : No Set : IsGodownReport : No Set : StockGroupName : $$SysNamerimary Set : StockCategoryName : $$SysNamerimary Set : StockItemName : "" Form : BarcodePrint [Form: BarcodePrint] Part : TitlePart, BarcodePrintPart Width : 100 % page Height : 100 % page Button : PrintButton, SelectAllItems, SelectStockGroup, FindStk, PrintSelected Background : @@SV_STOCKSUMMARY [Part: TitlePart] Line : TitleLine Space Left : 1 Space Top : 5 [Line: TitleLine] Use : BodyLine Local : Field : Particular : Set as : "Particular" Local : Field : Particular : Style : Normal Bold Local : Field : Group : Set as : "Group" Local : Field : Group : Style : Normal Italic Local : Field : Barcode : Set as : "Barcode" Local : Field : Barcode : Style : Normal Italic Local : Field : Category : Set as : "Category" Local : Field : Category : Style : Normal Italic Local : Field : SellingPrice : Info : "Selling Price" Local : Field : SellingPrice : Style : Normal Italic Border : Column Titles [Part: BarcodePrintPart] Lines : BodyLine Repeat : BodyLine : MyCollection Scroll : Vertical Space Left : 1 Common Borders : Yes [Line: BodyLine] Fields : Particular, Right Field : Barcode, Category, Group, SellingPrice [Field: Particular] Use : Name Field Set as : $Name Width : 80 mms Border : Thin Left Right [Field: Barcode] Use : Name Field Set as : $$Alias Border : Thin Left Align : Center [Field: Category] Use : NameField Set as : $Category Width : 30 mms Border : Thin Left Align : Center [Field: Group] Use : NameField Set as : $Parent Width : 30 mms Border : Thin Left Right Align : Center [Field: SellingPrice] Use : Rate Price Field Set as : $FullPriceList[Last, $PriceLevel='Qoratosh'].PriceLevelList[].Rate Width : 30 mms Align : Center Border : Thin Right Format : "Show Base Symbol, Forex" ;;----------------------Collections------------------------ [Collection: MyCollection] Use : Alias Collection Option : Smp Stock Items6 : ##StockGroupName = $$SysNamerimary Option : Smp Stock Group6 : ##StockGroupName != $$SysNamerimary Option : Smp Stock6 : ##StockItemName != "" [!Collection: Smp Stock Items6] Type : Stock Item Fetch : Name, AliasName, GodownName Format : $AliasName,20 Compute : IName : $Name Compute : PName : $GodownName Compute : ClosingBalance: $ClosingBalance [!Collection: Smp Stock Group6] Type : Stock Item Fetch : Name, AliasName, GodownName Format : $AliasName,20 Compute : IName : $Name Compute : PName : $GodownName Compute : ClosingBalance: $ClosingBalance Child Of : ##StockGroupName [!Collection: Smp Stock6] Type : Stock Item Fetch : Name, AliasName, GodownName Format : $AliasName,20 Compute : IName : $Name Compute : PName : $GodownName Compute : ClosingBalance: $ClosingBalance Filter : SGRP6 [System: Formula] SGRP6 : $Name = ##StockItemName ;;----------------------Buttons------------------------ [Button: SelectStockGroup] Key : F5 Action : Modify Variable : StockGroupName Title : $$LocaleString:"Select Stock Group" [Button: FindStk] Key : F6 Action : Modify Variable : Stock Item Name Title : $$LocaleString:"Select Stock Item" [Button : SelectAllItems] Key : Ctrl+A Action : Select All Title : "Select All" [Button: PrintSelected] Key : F7 Action : Print Report : Stock Item6 Title : "Print" Mode : Display Scope : Selected ;;------------------------------------Print Report---------------------------- [Report: Stock Item6] Title : "Stock Item Description Print " Object : Stock Item Form : Stock Item6 [Form: Stock Item6] Parts : PricePrint Space Left : 6 Space Top : 5 [Part: PricePrint] Space Top : 1.25 Lines : ParentLine, Particular, SpaceLine1, Barcode, StdPrice, SpaceLine2, MediaLine [Line: ParentLine] Field : ParentField [Field: ParentField] Set as : $Parent Width : 101.6 mms Align : Center Style : NameStyle [Line: Particular] Field : StockName Space Bottom: 1 [Field: StockName] Use : Name Field Set as : $StockItemName Width : 101.6 mms Align : Center Style : NameStyle [Line: SpaceLine1] Field : Simple Field [Line: StdPrice] Field : StdPriceField [Field: StdPriceField] Use : Rate Price Field Set as : $$InputString:$StandardPrice+"$" Width : 101.6 mms Align : Center Format : "No Symbol, Forex, Decimals:0" Style : RateStyle Type : String [Line: SpaceLine2] Field : Simple Field [Line: Barcode] Field : BarcodeField [Field: BarcodeField] Style : AliasStyle Set as : "*"+$$Alias+"*" Align : Center Width : 101.6 mms [Line: MediaLine] Field : MediaField [Field: MediaField] Set as : "MEDIA" Width : 101.6 mms Align : Center Style : MediaStyle Space Left : 10 Space Right : 10 [Style: MediaStyle] Font : Gentona Book Height : 30 Bold : Yes [Function: InputString] Parameter : InputString : String Variable : Input Temp : String Variable : Input Count : Number Variable : OutputString : String 10 : Set : Input Temp : "" 20 : FOR TOKEN : Input TokenVar : ##InputString : "," 30 : Set : Input Temp : ##InputTemp + $$String:##InputTokenVar + " " 40 : END FOR 50 : SET : Input Count : $$StringLength:##InputTemp-7 60 : SET : OutputString : $$StringPart:##InputTemp:0##InputCount-1) 70 : RETURN : ##OutputString ;;------------------------------Styles------------------------------------------ [Style: NameStyle] Height : 14 Bold : No Font : DINPro-Medium [Style: RateStyle] Height : 36 Font : DINPro-Black [Style: SumStyle] Height : 22 Font : DINPro-Black [Style: DescriptionPrint] Font : Times New Roman Height : 12 [Style: AliasStyle] Font : C39HRP24DHTT Height : 50
Hi ! 1. Remove action from PrintSelected button and add action as follows [Button : PrintSelected] Action : Print : Selected StockItem Print 2. Create a print report in the name of Selected Stockitem Print. 3. Create a collection as follows [Collection : PrintSelected] Data Source : Report : Selected ;;Fetch : UDF Values 4. Add above collection in "Selected Stock Item Print" level and check it.
Thank you. It is working. my code: [Button: PrintSelected] Key : F7 Action : Print Report : Stock Item6 Title : "Print" Mode : Display Scope : Selected Lines ;;------------------------------------Print Report---------------------------- [Report: Stock Item6] Add : Collection : PrintSelectedItems Object : Stock Item [Collection: PrintSelectedItems] Data Source : Report : Selected Fetch : Inventory Entries.*, StockItemName, Parent [Form: Stock Item6] Parts : PricePrint ........................................