sir i have created a report with collection containing Data Sourcearent Report: SELECTED LINES the report is running ok problem is with PRINTING of the report , if i comment Data Sourcearent Report: selected lines,it is displaying full report without filter selected lines and am able to print it, but unable to print collection data with filter data source arent report: selected lines, only title part and bottom part are printing plz guide
print report ? i fail to understand i understood one thing though is data fetched through the display report is not visible in printing,in both the reports parent and current I remember one of your post where you added print option later on to your report , just am failing to remember
Code: ;code: [#Menu: Gateway of TAlly] Add : Item : my purchases : Display : mypurchase [Report: mypurchase] Add: Form: mypurchase Variables : SV CurrentCompany, SV FromDate, SV ToDate Set : SV Sort Method : @@Default Set : SVFromDate : $$MonthStart:##SVCurrentDate-30 Set : SVToDate : $$MonthEnd:##SVCurrentDate Set : orderbyChqVar : "Full" Set : orderbyName : "" [Form: mypurchase] Part: mypurchase Height: 100 % screen Width: 100 % Screen Add: ButtonS: ChangePeriod, REMOVE SELECTED, LedgerwiseS1, LedgerwiseSclient, [Part: mypurchase] ;Main part contains data Add: Lines: mypurchase Column Titles, mypurchase Repeat: mypurchase : PQRorderbyVouchersColl Scroll : Vertical Common Border: YES Total:MyVCHValue,Myvchqty option : LedgerwiseS1 : ##Newchangecoll1 Not Contains "ALL ITEMS" option : AllLedger1 : ##Newchangecoll1 contains "ALL ITEMS" option : LedgerwiseCLIENT : ##NewchangecollCLIENT Not Contains "ALL ITEMS" option : AllLedgerCLIENT : ##NewchangecollCLIENT contains "ALL ITEMS" Bottom Lines:mypurchase TOT ;Option:ALTER ON ENTER: VOUCHER [Line:mypurchase Column Titles] ;Titles lines Use: mypurchase Local : Field : Default : Type : String Local : Field : Default : Style : Tiny Bold Local : Field : Default : Align : Centre Local: Field: MySNo : Info: "S No" Local: Field: Mydate : Info: "Date" Local: Field: MYVCHNo. : Info: "VCH No." Local: Field: MYPARTY : Info: "Party Name" Local: Field: MYCLIENT : Info: "Orderby" Local: Field: Mynewdisc : Info: "disc to be given" Local: Field: MyCOMM : Info: "Comm" Local: Field: MyVCHValue : Info: "Amount" Local: Field: Default : Color: blue Local: Field: Default : Style: Book Antiqua Italic Border: Column Titles [Line: my purchase] ;Main line Field:MySno, Mydate,MYVCHNo., MYPARTY,Myclient,Mynewdisc,MYCOMM Right Field: MyVCHValue ;Space Top: 0.50 ; Height: 1.5 Explode: MyExplode part : ($$KeyExplode or ##Explodeflag) Border: Double Sub Column Titles Remove if: NOT $$ISEMPTY:$REMARKSONE13 ;Option:ALTER ON ENTER [Line:mypurchase TOT] ;Titles lines Use: mypurchase Local : Field : Default : Type : String Local : Field : Default : Style : Tiny Bold Local : Field : Default : Align : Centre Local: Field: MySNo : Info: "" Local: Field: Mydate : Info: "" Local: Field: MYVCHNo. : Info: "" Local: Field: MYPARTY : Info: "Total" Local: Field: MYCLIENT : Info: "" Local: Field: Mynewdisc : Info: "" Local: Field: MyCOMM : Info: "" Local: Field: MyVCHValue : Set as: $$Total:MyVCHValue Local: Field: Default : Color: blue Local: Field: Default : Style: Book Antiqua Italic Border: Column Titles [Field:MYSno] Set as : $$Line Width : 3% PAGE Align : Center Border : Thin Left Right Skip: Yes Width:3% PAGE [Field: Mydate] Use: Short Date Field Set as: $Date Width:8% PAGE Alter: VOUCHER [Field: MYVCHNo.] Use: Name field Set as: $REFERENCE Width:15% PAGE Align: Center Border : Thin Left [Field: MYPARTY] Use: Name Field Set as: $partyLedgername Border : Thin Left Width:30% PAGE [Field: MYCLIENT] Use :Name Field Set as :$VCHorderbyName Border : Thin Left Width : 20% Screen Align : Left ;Style : Tiny ;Key : Create orderbyName Skip: Yes [Field: MYNEWDISC] Use :NUMBER Field Set as :$VCHorderbyName1 Border : Thin Left Width : 5% Screen Align : Left ;Style: Tiny ;Key : Create orderbyName Skip: Yes Set as : if NOT $$IsDr:$VCHorderbyName1 then $VCHorderbyName1 else 0 [Field: MYCOMM] Use :NUMBER Field Set as :$VCHorderbyName1 Border : Thin Left Width : 5% Screen Align : Left ;Style: Tiny ;Key : Create orderbyName Skip: Yes Set as : if $$IsDr:$VCHorderbyName1 then -$VCHorderbyName1 else 0 [Field: MyVCHValue] Use:Amount Field Set as: $Amount Border: THIN LEFT [system: Formulae] MYfilter : $Basicbuyeraddress [Collection: partyFilter] Type: Ledger Filter: Myfilter ;=============== During Sales Voucher Entry============= ;[#Form:Form: VCHBasic InvoiceMode] ;Add:Option:After:EI SalesLedInfo:HPorderbyName: $$IsPurchase:##SVVoucherType [#Part: EI CommonLedger] Option: HPorderbyName: $$IsPurchase:##SVVoucherType [!Part: HPorderbyName] Add: Line: HPorderbyName [Line: HPorderbyName] Add: Field: HPorderbyNameTitle Add: Field: VCHorderbyNamedr Add: Field: HPorderbyNameTitle1 Add: Field: VCHorderbyName1 [Field: HPorderbyNameTitle] Info : "party a/c: " Width: 10 ;;This is where the User will input the "orderby" ;Background: "Orchid2" [Field: VCHorderbyNamedr] Use : Name Field Storage : VCHorderbyName Set as : $VCHorderbyName Width : 25 Table : filterledgerCLIENT, not applicable Show Table: Always ;Background: "Orchid2" [Field: HPorderbyNameTitle1] Info : "Party disc" Width: 8 ;;This is where the User will input the "orderby" ;Background: "Orchid2" [Field: VCHorderbyName1] Use : NUMBER Field Storage : VCHorderbyName1 Width : 5 ;Background: "Orchid2" [System: UDF] VCHorderbyName:String:375 VCHorderbyName1:Number:390 [#Object:voucher] myvchorderbyname:$vchorderbyname myVCHorderbyName1:$VCHorderbyName1 [Button : REMOVE SELECTED] Title : "SHOW SELECTED" Key :F3 Action :Display:SELQREPORT ; Action :Call: selected12 Voucher Object Mode : Display Scope : Selected Lines ;Inactive : $$NumLinesInScope = 0 ;================================================================================================ ;===================================== Collections ================================================= [Collection: PQRorderbyVouchersColl] Type : Voucher Fetch : Date, VoucherNumber, VoucherTypeName,LedgerName,PartyLedgerName,VCHorderbyName,GrossProfit,GROSSREVENUE, LedgerEntries.*,inventoryentries Filter : MYpartyPURVouchers [System:UDF] prodert:Logical:1000 [System: Formula] MYpartyPURVouchers: $$IsPurchase:$VoucherTypeName ;;================================================= ;;====================================== ;;================================================= [Key: EnterToEditSEL] Key : ALT+E Title : $$LocaleString:"Explode" Type : BottomToolBarBtn3 Action : Explode ;FILTER FOR LEDGERWISE DISPLAY AS PER SUPPLIER [!Part: Ledgerwises1] Repeat : my purchase : Ledpurcoll [!Part : AllLedger1] Repeat : my purchase : purcoll [Collection : purcoll] Type : voucher Fetch : Date, VoucherNumber, VoucherTypeName,LedgerName,PartyLedgerName,VCHorderbyName,GrossProfit,GROSSREVENUE, LedgerEntries.*,inventoryentries Filter : PURvch [Collection : Ledpurcoll] Type : voucher Fetch : Date, VoucherNumber, VoucherTypeName,LedgerName,PartyLedgerName,VCHorderbyName,GrossProfit,GROSSREVENUE, LedgerEntries.*,inventoryentries Filter : ChkParty1 Sort : @@Default : $Date Filter : PURvch [System : Formula] ChkParty1 : $Ledgername = ##NewChangeColl1 LUVCrDrOnly1 : $$IsBelongsTo:$$GroupSundryDebtors PURvch : $$IsPurchase:$vouchertypename [Button: LedgerwiseS1] Key : F5 Action : Execute : LedgerwiseColl1 Title : $$LocaleString:"BY PARTY" [Report : LedgerwiseColl1 ] Form : NewChangeparty [Form : NewChangeparty] Part : NewChangeColl1 No Confirmation : Yes [Part : NewChangeColl1] Line: NewChangeColl1 [Line: NewChangeColl1] Field : Short Prompt, MyLedger1 Local : Field : Short Prompt : Info : $$LocaleString:"Select Ledger:" [Field: MyLedger1] Use : Name Field Table : MyLedger1 Modifies : NewChangeColl1 : Yes Show Table : Always Style : Small Always : Yes [Collection: filterledgerSUPPLIER] Type : Ledger ChildOf : $$GroupSundryCreditors BelongsTo : Yes Collection : All Items [Collection : MyLedger1] Collection : filterledgerSUPPLIER Collection : All Items [Variable : NewChangeColl1] Type : String Persistent : NO Volatile : NO [System : Variable] NewChangeColl1 : "All Items" ;FILTER FOR LEDGERWISE AS PER CUSTOMER [!Part: LedgerwiseCLIENT] Repeat : myPURCHASE : LedsalescollCLIENT,filterledgerCLIENT [!Part : AllLedgerCLIENT] Repeat : myPURCHASE : SalescollCLIENT [Collection : SALEScollCLIENT] Type : voucher Fetch : Date, VoucherNumber, VoucherTypeName,LedgerName,PartyLedgerName,VCHorderbyName,GrossProfit,GROSSREVENUE, LedgerEntries.*,inventoryentries Filter : PURvch [Collection : LedSALEScollCLIENT] Type : voucher Fetch : Date, VoucherNumber, VoucherTypeName,LedgerName,PartyLedgerName,VCHorderbyName,GrossProfit,GROSSREVENUE, LedgerEntries.*,inventoryentries Filter : ChkPartyCLIENT Sort : @@Default : $Date Filter : PURvch [System : Formula] ChkPartyCLIENT : $VCHorderbyName = ##NewChangeCollCLIENT [Button: LedgerwiseSCLIENT] Key : F6 Action : Execute : LedgerwiseCollCLIENT Title : $$LocaleString:"BY CLIENT" [Report : LedgerwiseCollCLIENT ] Form : NewChangeCollCLIENT [Form : NewChangeCollCLIENT] Part : NewChangeCollCLIENT No Confirmation : Yes [Part : NewChangeCollCLIENT] Line: NewChangeCollCLIENT [Line: NewChangeCollCLIENT] Field : Short Prompt, MyLedgerCLIENT Local : Field : Short Prompt : Info : $$LocaleString:"Select Ledger:" [Field: MyLedgerclient] Use : Name Field Table : MyLedgerCLIENT Modifies : NewChangeCollCLIENT : Yes Show Table : Always Style : Small Always : Yes [Collection: filterledgerCLIENT] Type : Ledger ChildOf : $$GroupSundryDebtors BelongsTo : Yes Collection : All Items [Collection : MyLedgerCLIENT] Collection : filterledgeRCLIENT Collection : All Items [Variable : NewChangeCollCLIENT] Type : String Persistent : NO Volatile : NO [System : Variable] NewChangeCollCLIENT : "All Items" ;; ; ;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;[#Menu: Gateway of TAlly] ; Add : Item : EXPLODE1 : Display : SELQEPORT [Report: SELQReport] ;Use : DSP Template Form : SELQReport Title : "Outward Sale Report" Set : SVFromDate : $$MonthStart:##SVCurrentDate-30 Set : SVToDate : $$MonthEnd:##SVCurrentDate [Form: SELQReport] ;Use : DSP Template Parts : SELQReport Height : 100% screen Width : 100% screen Delete : Buttons: ExplodeFlag Add: ButtonS: PRINT BUTTON/*orderbyfilter,/*show123,*/REMOVE SELECTED,POSTTOSALES, LedgerwiseS1, LedgerwiseSclient ;Delete:Page Break add:Page Break:pbSELQTitile [Line: SELQTitile] Field:SELQSno,/*SELQPartySalesMan,SELQPartyDate,SELQPartyVchNo,SELQPartyName,*/SELQNewdisc,SELQMycomm,SELQItemName,/*SELQHSNCode,SELQGSTRate,*/SELQQty,SELQUnit,/*SELQIGRate,*/SELQRate,SELQAmount,/*SELQIGAmount*/ Border :Thin Bottom Local : Field : Default : Type : String Local : Field : Default : Style : Tiny Bold Local : Field : Default : Align : Centre Local : Field : SELQSno : set as: $$LocaleString:"SRNo" Local : Field : SELQPartySalesMan : Set as: $$LocaleString:"CLIENT" Local : Field : SELQPartyDate : Set as: $$LocaleString:"DATE" Local : Field : SELQPartyVchNo : Set as: $$LocaleString:"VCH No" Local : Field : SELQPartyName : Set as: $$LocaleString:"PARTY NAME" Local : Field : SELQnewdisc : Set as: $$LocaleString:"DISC" Local : Field : SELQMycomm : Set as: $$LocaleString:"COMM" Local : Field : SELQItemName : Set as: $$LocaleString:"ITEM NAME" Local : Field : SELQHSNCode : Set as: $$LocaleString:"HSN CODE" Local : Field : SELQGSTRate : Set as: $$LocaleString:"GST RATE" Local : Field : SELQQty : Set as: $$LocaleString:"QTY" Local : Field : SELQUnit : Set as: $$LocaleString:"Unit" Local : Field : SELQIGRate : Set as: $$LocaleString:"IG RATE" Local : Field : SELQRate : Set as: $$LocaleString:"RATE" Local : Field : SELQAmount : Set as: $$LocaleString:"AMOUNT" Local : Field : SELQIGAmount : Set as: $$LocaleString:"IG AMOUNT" Border : Flush Totals [Line:SELQBody] Field:SELQSno,/*SELQPartySalesMan,SELQPartyDate,SELQPartyVchNo,SELQPartyName,*/SELQNewdisc,SELQMycomm,SELQItemName,/*SELQHSNCode,SELQGSTRate,*/SELQQty,SELQUnit,/*SELQIGRate,*/SELQRate,SELQAmount,/*SELQIGAmount*/ Border :Thin Bottom [Field:SELQSno] Set as : $$Line Width : 4% Screen Align : Center Border : Thin Left Right ;modifies:temp:yes [Field: SELQPartySalesMan] Use :Name field Set as :$SELQPartySalesMan Border : Thin Left Width : 10% Screen Align : Left [Field: SELQPartyDate] Set as : $SELQPartyDate Width : 6% Screen Align : Right ;Style : Tiny Border : Thin Left [Field: SELQPartyVchNo] Use : Name Field Set as : $SELQPartyVchNo Width : 7% Screen Align : Center ;Style : Tiny Border : Thin Left [Field: SELQPartyName] Use : Name Field Set as : $SELQPartyName Border : Thin Left Width : 20% Screen Align : Left ;Style : Tiny Variable: LedgerName Display : Ledger Vouchers [Field: SELQItemName] Use :Name Field Set as :$SELQItemName Border : Thin Left Width : 20% Screen Align : Left ;Style : Tiny ;modifies:listabitem[$$line]:yes [Field:SELQHSNCode] Use:Name Field Set as :$SELQHSNCode Border : Thin Left Width : 6% Screen Align : Right [Field:SELQGSTRate] Use:Number Field Set as :$SELQGSTRate Border : Thin Left Width : 4% Screen Align : Right [Field:SELQNewdisc] Use:NUMBER Field ;Set as :$SELQNewdisc Border : Thin Left Width : 4% Screen Align : Right Set as : if NOT $$IsDr:$SELQNewdisC then $SELQNewdisc else 0 ; modifies:listabDISC[$$line]:yes [Field:SELQMycomm] Use:NUMBER Field ;Set as :$SELQmycomm Border : Thin Left Width : 4% Screen Align : Right Set as : if $$IsDr:$SELQmycomm then -$SELQmycomm ELSE 0 [Field:SELQQty] use : Qty field width: 5% Screen Border:thin left align: right set as:$SELQQty Format: "No Symbol, Short Form, No Compact" ; modifies:listabqty[$$line]:yes [Field:SELQUnit] use : Number Field width: 3% Screen Border:thin left align: right set as:$SELQUnit Type : Rate : Unit Symbol Style : Small Bold Format: "No Symbol, Short Form, No Compact" [Field:SELQIGRate] Use : Rate Price Field ;Use: VCH RateIncl ;use : Number Field width: 4% Screen Border:thin left align: right set as:$SELQIGRate ;Type : Rate : Price ;Format: "No Symbol, Short Form, No Compact" [Field:SELQRate] Use:Number Field Set as :$SELQRate Border : Thin Left Width : 4% Screen Align : Right ;Format: "No Short Form, Compact" ;Style : Tiny ;Format : "no Symbol," + ##ShowForex ; modifies:listabrate[$$line]:yes [Field: SELQAmount] Use : Amount Field Set as : $SELQAmount Border : Thin Left Width : 5% Screen Align : Right ;Style : Tiny ;Format : "No Zero,DrCr,Symbol," + ##ShowForex ;modifies:listabamount[$$line]:yes [Field: SELQIGAmount] Use : Amount Field Set as : $SELQIGAmount Border : Thin Left Width : 5% Screen Align : Right ;Style : Tiny ;Format : "No Zero,DrCr,Symbol," + ##ShowForex [Line: SELQBody Total] Field:SELQSno,/*SELQPartySalesMan,SELQPartyDate,SELQPartyVchNo,SELQPartyName,*/SELQNewdisc,SELQMycomm,SELQItemName,/*SELQHSNCode,SELQGSTRate,*/SELQQty,SELQUnit,/*SELQIGRate,*/SELQRate,SELQAmount,/*SELQIGAmount*/ Border :Thin Bottom Local : Field : Default : Type : String Local : Field : Default : Style : Tiny Bold Local : Field : Default : Align : Centre Local : Field : SELQSno : Set as: "" Local : Field : SELQPartySalesMan: Set as: "" Local : Field : SELQPartyDate : Set as: "" Local : Field : SELQPartyVchNo : Set as: "" Local : Field : SELQPartyName : Set as: "" Local : Field : SELQPartyName : Align : Centre local : field : SELQnewdisc :set as: "" local : field : SELQmycomm :set as: "" local : field : SELQItemName :set as: "TOTAL" Local: Field: SELQItemName :COLOR: BLUE local : field : SELQHSNCode :set as: "" local : field : SELQGSTRate :set as: "" local : field : SELQQty :set as:"" local : field : SELQUnit :set as:"" Local : Field : SELQIncTaxRate : Set as: "" Local : Field : SELQRate : Set as: "" Local : Field : SELQAmount : Set as: $$Total:SELQAmount Local : Field : SELQAmount : Color: RED Local : Field : SELQIGAmount : Set as: $$Total:SELQIGAmount Local : Field : SELQIGAmount : Align:Right Border : Flush Totals ;============================== Filter =================================== [Button:SalesmanFilter1] Key : Alt+S Action : Execute : SalesmanFilter1 Title : Salesman Name [Report:SalesmanFilter1] Form : SalesmanFilter1 ;Set : SalesmanName : "" Set : SalesManChqVar : "Filter" [Form:SalesmanFilter1] Part : SalesmanFilter1 No Confirmation : Yes [Part:SalesmanFilter1] Line : SalesmanFilter1 [Line:SalesmanFilter1] Field : Medium Prompt,SalesmanFilter1 Local : Field : Medium Prompt : Set as : "Select Salesman Name: " [Field:SalesmanFilter1] Table : SalesmanNameCollection,EndOfList ShowTable : Always Use : Name Field Width : 20 Border : Thin Box Variable : SalesmanName Modifies : SalesmanName ;================================================================================================ ;===================================== Collections ================================================= [Part: SELQReport] Lines:SELQTitile,SELQBody BottomLines : SELQBody Total Repeat : SELQBody:Sales AllVoucher1 CommonBorder: Yes Scroll : Vertical Total:SELQAmount,SELQIGAmount [Collection: SELQSalesManVouchersColl] Type:Vouchers:VoucherType Child Of:$$VchTypePurchase Belongs To:Yes Fetch:myvchorderbyname,myvchorderbyname1, PARTYLEDGERNAME ;Filter : SELQSaleManVouchers ;Filter : SalesManFilter1 Data Source:Parent Report: SELECTED LINES [Collection:Sales AllVoucher1] Source Collection:SELQSalesManVouchersColl Walk:Inventory Entries Compute : SELQPartySalesMan :$...myvchorderbyname Compute : SELQPartyVchNo :$REFERENCE Compute : SELQPartyDate :$...Date Compute : SELQPartyName :$...PartyLedgerName Compute : SELQItemName :$StockItemName Compute : SELQHSNCode :$(Stockitem,$stockitem).GstDetails[Last].hsncode Compute : SELQGSTRate :$(Stockitem,$stockitem).GSTIGSTRate Compute : SELQQty :$BilledQuantity Compute : SELQNewdisc :$...myVCHorderbyName1 Compute : SELQMycomm :$...myVCHorderbyName1 Compute : SELQUnit :$Rate Compute : SELQIGRate :(100 + $(Stockitem,$stockitem).GSTIGSTRate)* $rate / 100 Compute : SELQRate :@@MYNEWRATE ;$Rate Compute : SELQAmount :@@MYNEWAMOUNT Compute : SELQIGAmount :$BilledQuantity * (100 + $(Stockitem,$stockitem).GSTIGSTRate)* $rate / 100 ;Sort:0:$SELQPartyName Walk: [System:UDF] Commission : Number : 1001 [System: Formula] ;SELQSaleManVouchers: $$IsSales:$VoucherTypeName OR $$IsDelNote:$VoucherTypeName SELQSaleManVouchers: $$IsSales:$VoucherTypeName SalesManWise : $VCHSalesmanName=@@SAlesManEOL SalesManFull : $VCHSalesmanName=$VCHSalesmanName SAlesManEOL : if $$IsEndOfList:##SalesManName then $VCHSalesmanName Else ##SalesManName SalesManFilter1 : if ##SalesManChqVar="Filter" Then @@SalesManWise Else @@SalesManFull MYNEWRATE :IF $...myVCHorderbyName1>0 THEN $RATE ELSE $RATE*((100-$...myVCHorderbyName1)/100) MYNEWAMOUNT:IF $...myVCHorderbyName1>0 THEN $BilledQuantity*$RATE *((100-$...myVCHorderbyName1)/100) ELSE $BilledQuantity*($RATE *(100-$...myVCHorderbyName1)/100) ;2;2
Problems in........[Collection:Sales AllVoucher1] ... All other things are okay....but cannot figure out what and why? Will check it later on. You can also try.
hope this will sort out . working for me [Collection:Sales AllVoucher1] Source Collection:SELQSalesManVouchersColl Walk:Inventory Entries By:stockitemname:$stockitemname ; add this line Compute : SELQPartySalesMan :$...myvchorderbyname Compute : SELQPartyVchNo :$REFERENCE Compute : SELQPartyDate :$...Date Compute : SELQPartyName :$...PartyLedgerName Compute : SELQItemName :$StockItemName Compute : SELQHSNCode :$(Stockitem,$stockitem).GstDetails[Last].hsncode Compute : SELQGSTRate :$(Stockitem,$stockitem).GSTIGSTRate Compute : SELQQty :$BilledQuantity Compute : SELQNewdisc :$...myVCHorderbyName1 Compute : SELQMycomm :$...myVCHorderbyName1 Compute : SELQUnit :$Rate Compute : SELQIGRate 100 + $(Stockitem,$stockitem).GSTIGSTRate)* $rate / 100 Compute : SELQRate @MYNEWRATE ;$Rate Compute : SELQAmount @MYNEWAMOUNT Compute : SELQIGAmount :$BilledQuantity * (100 + $(Stockitem,$stockitem).GSTIGSTRate)* $rate / 100 ;Sort:0:$SELQPartyName walk: ; remove this line
sorry sir , it's not working , in my case after editing codes as per your advice , only 1 item per item name is visible, whereas i have 10 lines of same stock item name and print preview is still same