Dear Experts, We made one TDL. It works properly, only thing is while giving period it takes more time to open or load the reports. So pl. suggest how to open reports in less time. I try profiler but i am unable to use it any one tell me how to use profile in report Thanks in advance
[Report: STQueryCSknl] Use : DSP Template Form : STQueryCSknl Title : "Itemwise Breakup" PrintSet : Report Title : "Itemwise Breakup" Set : SVFromDate :$LastVoucherDate:Company:##SVCurrentCompany Set : SVToDate :$LastVoucherDate:Company:##SVCurrentCompany [Form: STQueryCsKnl] Use : DSP Template Parts : DB Title, STQueryCSknl Delete : Buttons : ExplodeFlag Delete : Bottom Buttons : DSPAutoColumns, BudgetAnalysis, ReportConfig Local: Line : DB Title : Local : Field : Name Field: Set as : "Itemwise Breakup" [Part: STQueryCSknl] Lines : STQueryCSknlT, STQueryCSknl Bottom Line:STQueryCSknlTotal Repeat : STQueryCSknl : SItemCollCSknl Scroll : Vertical Common Borders : Yes Total : ConsQtyCSknl,ConsQtyCSknl1,ConsQtyCSknlFAT,ConsQtyCSknlSNF,ProdQtyCSknl,OutwQtyCSknl,ConsQtyCSknlFATPROD,ConsQtyCSknlsnfPROD,ClosQtyCSknl, ClosQtyCSknl1,ClosQtyCSknlFAT,ClosQtyCSknlSNF,CLOSINGDIFFPrSum2 ;Total : ConsQtyCSknl,ConsQtyCSknl1,ConsQtyCSknlFAT,ConsQtyCSknlSNF,ProdQtyCSknl,OutwQtyCSknl,ConsQtyCSknlFATPROD,ConsQtyCSknlsnfPROD;,ClosQtyCSknl, ClosQtyCSknl1,ClosQtyCSknlFAT,ClosQtyCSknlSNF,CLOSINGDIFFPrSum2 [Line: STQueryCSknlT] Use : STQueryCSknl Local : Field : Default : Type : String Local : Field : Default : Align : Center Local : Field : Default : Lines : 0 Local : Field : ItemNameCSknl : Align : Left Local : Field : ItemNameCSknl : Set as: "Particulars" Local : Field : OpQtyCSknl : Set as: "Opening QTY Ltr" ;Local : Field : InQtyCSknl : Set as: "GRN Qty Ltr" Local : Field : ConsQtyCSknl : Set as: "STJournal Qty Ltr" ;Local : Field : ProdQtyCSknl : Set as: "Production Quantity" Local : Field : OutwQtyCSknl : Set as: "Outwards Quantity" Local : Field : ClosQtyCSknl : Set as: "Closing Qty Ltr" Local : Field : OpQtyCSknl1 : Set as: "Opening QTY KGS" ;Local : Field : InQtyCSknl1 : Set as: "GRN Qty Kgs" Local : Field : ConsQtyCSknl1 : Set as: "STJournal Qty Kgs" Local : Field : ProdQtyCSknl : Set as: "Production Quantity" Local : Field : OutwQtyCSknl : Set as: "Production Quantity2" Local : Field : ConsQtyCSknlFATPROD : Set as: "Production FAT" Local : Field : ConsQtyCSknlSNFPROD : Set as: "Production SNF" Local : Field : ClosQtyCSknl1 : Set as: "Closing Qty Kgs" ;Local : Field : InQtyCSknlSNF : Set as: "GRN Qty SNF" Local : Field : ConsQtyCSknlSNF : Set as: "STJournal Qty SNF" ;Local : Field : InQtyCSknlFAT : Set as: "GRN Qty FAT" Local : Field : ConsQtyCSknlFAT : Set as: "STJournal Qty FAT" Local : Field : ClosQtyCSknlSNF : Set as: "Closing Qty SNF" Local : Field : ClosQtyCSknlFAT : Set as: "Closing Qty FAT" Local : Field : CLOSINGDIFFPrSum2 : Set as: "Closing Diff" Border : Thin Top Bottom [Line: STQueryCSknl] Fields : ItemNameCSknl,ConsQtyCSknl + ,ConsQtyCSknl1,ConsQtyCSknlFAT,ConsQtyCSknlSNF,ProdQtyCSknl,OutwQtyCSknl,ConsQtyCSknlFATPROD,ConsQtyCSknlsnfPROD,ClosQtyCSknl, ClosQtyCSknl1,ClosQtyCSknlFAT,ClosQtyCSknlSNF,CLOSINGDIFFPrSum2 Repeat : ClosQtyCSknl Option : AlterOnEnter [Field: ItemNameCSknl] ;; Stock Item Name Use : Name Field Style : Normal Width : 30 Maximum : 30 Set As : $Name Fixed : Yes Option : AlterOnEnter Display : Stock Summary [Field: OpQtyCSknl] ;; Opening Qty Use : Qty Primary Field Style : Normal Format : "No Zero,no symbol" Set as : $P2ItOpQty Border : Thin Left Right Width : 13 Scroll : Yes Display : Stock Summary Invisible:yes ;secondary Qty [Field: OpQtyCSknl1] ;; Opening Qty Use : Qty Secondary Field Style : Normal Format : "no symbol,No Zero" Set as : $P2ItOpQty Border : Thin Right Width : 13 Scroll : Yes Display : Stock Summary Align : Right Invisible:yes [Field: InQtyCSknl] ;; RcptNote Qty Use : Qty Primary Field Set As : $P2rPurcQty ;Border : Thin Right Align : Right Format :"no symbol" [Field: InQtyCSknl1] ;; RcptNote Qty Use : Qty Secondary Field Set As : $P2rPurcQty Border : Thin Right Align : Right Format :"no symbol" [Field: InQtyCSknlSNF] ;; RcptNote Qty Use : Number FIELD Set As : $P2rSNFOutQty ;& $$number:"KGs" Border : Thin left Right Width : 2 CMS Align : Right Format : "NoZero,Decimals:4" [Field: InQtyCSknlFAT] ;; RcptNote Qty Use : NUMBER FIELD Set As : $P2rFATOutQty Border : Thin Right Width : 2 CMS Align : Right Format : "NoZero,Decimals:4" [Field: ConsQtyCSknl] ;; Consumption of Stock journal Use : InQtyCSknl Set As : $P2rTranOutQty Align : Right Format : "no symbol" Border : Thin Right [Field: ConsQtyCSknl1] ;; Consumption of Stock journal Use : InQtyCSknl1 Set As : $P2rTranOutQty Border : Thin Right Align : Right Format :"no symbol" [Field: ConsQtyCSknlSNF] ;; Consumption of Stock journal Use : NUMBER FIELD Set As: $P2rSNFInQty Border: Thin Right Width : 2 CMS Align : Right Format : "NoZero,Decimals:4" [Field: ConsQtyCSknlFAT] ;; Consumption of Stock journal Use : NUMBER FIELD Set As: $P2rFATInQty Border: Thin Right Width : 2 CMS Align : Right Border: thin right Format : "NoZero,Decimals:4" [Field: ProdQtyCSknl] ;; Production of Stock journal Use : InQtyCSknl Set As : $P2rTranInQty Border : Thin Right Width : 2 CMS Align : Right [Field: OutwQtyCSknl] ;; Sales Qty Use : InQtyCSknl1 Set As : $P2rTranInQty Border : Thin Right Width : 2 CMS Align : Right [Field: ConsQtyCSknlFATPROD] ;; Consumption of Stock journal Use : NUMBER FIELD Set As : $P2rFATCONQty Border : Thin Right Width : 2 CMS Align : Right Border : thin right Format : "NoZero,Decimals:4" [Field: ConsQtyCSknlSNFPROD] ;; Consumption of Stock journal Use : NUMBER FIELD Set As : $P2rSNFCONQty Border : Thin Right Width : 2 CMS Align : Right Border : thin right Format : "NoZero,Decimals:4" [Field: ClosQtyCSknl] ;; Closing Qty Use : InQtyCSknl Set As : $P2ItClQty Delete : Border Style : Normal Bold Align : Right Format : "no symbol" Border : thin Left right Invisible:yes [Field: ClosQtyCSknl1] ;; Closing Qty Use : InQtyCSknl1 Set As : $P2ItClQty ;Delete : Border Style : Normal Bold Align : Right Format : "no symbol" ;Border:thin right Border : thin Left right Invisible:yes [FIELD:ClosQtyCSknlSNF] use : number Field Set as : $P2rSNFcloseQty ;#InQtyCSknlFAT-#ConsQtyCSknlFAT Align : Right Border : thin left right Invisible:yes [Field:ClosQtyCSknlFAT] use : number Field set as : $P2rFATcloseQty Align : Right Border : thin right Invisible:yes [Field:closingdiffPrSum2] Use : number Field Set as #OpQtyCSknl+#ConsQtyCSknl)-#ProdQtyCSknl-#ClosQtyCSknl Invisible:yes ;;Total [Style:tot] Font:8 Bold:No [Line: STQueryCSknlTotal] ; Use : STQueryCSknl ; Local : Field : Default : Type : String ; Local : Field : Default : Align : Center ; Local : Field : Default : Lines : 0 ; Local : Field : ItemNameCSknl : Align : Left ; Local : Field : ItemNameCSknl : Set as: " T O T A L " ; Local : Field : OpQtyCSknl : Set as: $$Total:OpQtyCSknl ; Local : Field : ConsQtyCSknl : Format : "no symbol,No Zero" ; Local : Field : ConsQtyCSknl : Set as: $$Total:ConsQtyCSknl ; ;Local : Field : ProdQtyCSknl : Set as: "Production Quantity" ; ;Local : Field : OutwQtyCSknl : Set as: $$Total:OutwQtyCSknl ; Local : Field : ClosQtyCSknl : Set as: $$Total:ClosQtyCSknl ; Local : Field : OpQtyCSknl1 : Set as: $$Total:OpQtyCSknl1 ; ;Local : Field : InQtyCSknl1 : Set as: "GRN Qty Kgs" ; Local : Field : ConsQtyCSknl1 : Format : "no symbol,No Zero,Secondary" ; Local : Field : ConsQtyCSknl1 : Set as: $$Total:ConsQtyCSknl1 ; Local : Field : ProdQtyCSknl : Format : "no symbol,No Zero" ; Local : Field : ProdQtyCSknl : Set as: $$TotalrodQtyCSknl ; Local : Field : OutwQtyCSknl : Format : "no symbol,No Zero,Secondary" ; Local : Field : OutwQtyCSknl : Set as: $$Total:OutwQtyCSknl ; Local : Field : ConsQtyCSknlFATPROD : Set as: $$Total:ConsQtyCSknlFATPROD ; Local : Field : ConsQtyCSknlSNFPROD : Set as: $$Total:ConsQtyCSknlSNFPROD ; Local : Field : ClosQtyCSknl1 : Set as: $$Total:ClosQtyCSknl1 ; ;Local : Field : InQtyCSknlSNF : Set as: "GRN Qty SNF" ; Local : Field : ConsQtyCSknlSNF : Set as: $$Total:ConsQtyCSknlSNF ; ;Local : Field : InQtyCSknlFAT : Set as: "GRN Qty FAT" ; Local : Field : ConsQtyCSknlFAT : Set as: $$Total:ConsQtyCSknlFAT ; Local : Field : ClosQtyCSknlSNF : Set as: $$Total:ClosQtyCSknlSNF ; Local : Field : ClosQtyCSknlFAT : Set as: $$Total:ClosQtyCSknlFAT ; Local : Field : CLOSINGDIFFPrSum2 : Set as: $$Total:CLOSINGDIFFPrSum2 Border : Thin Top Bottom Fields : ItemNameCSknlTOT,ConsQtyCSknlTOT + ,ConsQtyCSknl1TOT,ConsQtyCSknlFATTOT,ConsQtyCSknlSNFTOT,ProdQtyCSknlTOT,OutwQtyCSknlTOT,ConsQtyCSknlFATPRODTOT,ConsQtyCSknlsnfPRODTOT,ClosQtyCSknlTOT, ClosQtyCSknl1TOT,ClosQtyCSknlFATTOT,ClosQtyCSknlSNFTOT,CLOSINGDIFFPrSum2TOT [Field: ItemNameCSknltot] ;; Stock Item Name Use : Name Field Style : Normal Width : 30 Maximum : 30 Set As : "T O T A L" Fixed : Yes [Field: OpQtyCSknltot] ;; Opening Qty Use : Qty Primary Field Style : Normal Format : "No Zero,no symbol,Decimals:4" Set as : $$Total:OpQtyCSknl Border : Thin Left Right Width : 13 Scroll : Yes Display : Stock Summary Invisible:yes ;secondary Qty [Field: OpQtyCSknl1TOT] ;; Opening Qty Use : Qty Secondary Field Style : Normal Format : "no symbol,No Zero,Decimals:4" Set as : $$Total:OpQtyCSknl1 Border : Thin Right Width : 13 Scroll : Yes Display : Stock Summary Align : Right Invisible:yes [Field: InQtyCSknlTOT] ;; RcptNote Qty Use : Qty Primary Field Set As : $$Total:InQtyCSknl ;Border : Thin Right Align : Right Format : "NoZero,Decimals:4" [Field: InQtyCSknl1TOT] ;; RcptNote Qty Use : Qty Secondary Field Set As : $$Total:InQtyCSknl1 Border : Thin Right Align : Right Format : "NoZero,Decimals:4" [Field: InQtyCSknlSNFTOT] ;; RcptNote Qty Use : Number FIELD Set As : $$Total:InQtyCSknlSNF Border : Thin left Right Width : 2 CMS Align : Right Format : "NoZero,Decimals:4" [Field: InQtyCSknlFATtot] ;; RcptNote Qty Use : NUMBER FIELD Set As : $$Total:InQtyCSknlFAT Border : Thin Right Width : 2 CMS Align : Right Format : "NoZero,Decimals:4" [Field: ConsQtyCSknltot] ;; Consumption of Stock journal Use : InQtyCSknl Set As : $$Total:ConsQtyCSknl Align : Right Format : "NoZero,Decimals:4" Border : Thin left Right [Field: ConsQtyCSknl1tot] ;; Consumption of Stock journal Use : InQtyCSknl1 Set As : $$Total:ConsQtyCSknl1 Border : Thin Right Align : Right Format : "NoZero,Decimals:4" [Field: ConsQtyCSknlSNFtot] ;; Consumption of Stock journal Use : NUMBER FIELD Set As: $$Total:ConsQtyCSknlSNF Border: Thin Right Width : 2 CMS Align : Right Format : "NoZero,Decimals:4" [Field: ConsQtyCSknlFATtot] ;; Consumption of Stock journal Use : NUMBER FIELD Set As: $$Total:ConsQtyCSknlFAT Border: Thin Right Width : 2 CMS Align : Right Border: thin right Format : "NoZero,Decimals:4" [Field: ProdQtyCSknltot] ;; Production of Stock journal Use : InQtyCSknl Set As : $$TotalrodQtyCSknl Border : Thin Right Width : 2 CMS Align : Right [Field: OutwQtyCSknltot] ;; Sales Qty Use : InQtyCSknl1 Set As : $$Total:OutwQtyCSknl Border : Thin Right Width : 2 CMS Align : Right [Field: ConsQtyCSknlFATPRODtot] ;; Consumption of Stock journal Use : NUMBER FIELD Set As : $$Total:ConsQtyCSknlFATPROD Border : Thin Right Width : 2 CMS Align : Right Border : thin right Format : "NoZero,Decimals:4" [Field: ConsQtyCSknlSNFPRODtot] ;; Consumption of Stock journal Use : NUMBER FIELD Set As : $$Total:ConsQtyCSknlSNFPROD Border : Thin Right Width : 2 CMS Align : Right Border : thin right Format : "NoZero,Decimals:4" [Field: ClosQtyCSknltot] ;; Closing Qty Use : InQtyCSknl Set As : $$Total:ClosQtyCSknl Delete : Border Style : Normal Bold Align : Right Format : "NoZero,Decimals:4" Border : thin Left right Invisible:yes [Field: ClosQtyCSknl1tot] ;; Closing Qty Use : InQtyCSknl1 Set As : $$Total:ClosQtyCSknl1 ;Delete : Border Style : Normal Bold Align : Right Format : "NoZero,Decimals:4" ;Border:thin right Border : thin Left right Invisible:yes [FIELD:ClosQtyCSknlSNFtot] use : number Field Set as : $$Total:ClosQtyCSknlSNF Align : Right Border : thin left right Invisible:yes [Field:ClosQtyCSknlFATtot] use : number Field set as : $$Total:ClosQtyCSknlFAT Align : Right Border : thin right Invisible:yes [Field:closingdiffPrSum2TOT] Use : number Field Set as :$$Total:closingdiffPrSum2 Invisible:yes ;; Collection Definition [Collection: Voucher CollectionCSknl] Type : Voucher Filter : voufilt ;Fetch:EICategory [Collection: SItemCollCSknl] Source Collection : Voucher CollectionCSknl Fetch : AllLedgerEntries.BankAllocations.* Walk : ALLInventoryEntries By : Name : $StockItemName ;; Grouping done by Stock Item Aggr Compute : P2rPurcQty : Sum : If @@CSknlPurcVr Then $BilledQty Else 0 Aggr Compute : P2rSaleQty : Sum : If @@CSknlSaleVr Then $BilledQty Else 0 Aggr Compute : P2rTranOutQty : Sum : If @@CSknlStockJrnlVr And NOT $$IsInwards:$BilledQty Then $BilledQty Else 0 Aggr Compute : P2rTranInQty : Sum : If @@CSknlStockJrnlVr And $$IsInwards:$BilledQty Then $BilledQty Else 0 Aggr Compute : P2rFATinQty : Sum : $stkFATKG Aggr Compute : P2rSNFinQty : SUM : $stkSNFKG Aggr Compute : P2rFATCONQty : SUM : $stkFATKG1 Aggr Compute : P2rSNFCONQty : SUM : $stkSNFKG1 Aggr Compute : P2rFATOutQty : SUM : $$CollectionField:$FatKGs:1:BatchAllocations Aggr Compute : P2rSNFOutQty : SUM : $$CollectionField:$SNFKGs:1:BatchAllocations Aggr Compute : P2rSNFcloseQty : SUM : $$CollectionField:$SNFKGs:1:BatchAllocations-$stkSNFKG Aggr Compute : P2rFATcloseQty : SUM : $$CollectionField:$FatKGs:1:BatchAllocations-$stkFatKG Compute : P2ItClQty : $StkClBalance:StockItem:$StockItemName Compute : P2ItOpQty : $StkOpBalance:StockItem:$StockItemName Sort : @@SortAlphaIncr : $Name ;; System Formula [System: Formula] CSknlPurc Vr : $VoucherTypeName="Milk GRN" ;$$IsRcptNote:$VoucherTypeName CSknlSale Vr : $$IsSales:$VoucherTypeName CSknlStock Jrnl Vr : $VoucherTypeName="Milk Issue" or $VoucherTypeName="Milk FG" ;and $EICategory=#STCategorywisefield ;$$IsStockJrnl:$VoucherTypeName voufilt $VoucherTypeName="Milk Issue" or $VoucherTypeName="Milk FG" and $EICategory=#STCategorywisefield)