Group total field on item no and location code in report

i have grouptotal field on item no and location code.

but it is not appeared correctly.

suppose:

barcode--------------------LOCATION----------quantity

100101-1-------------------OUTLET-------------1

100101-1-------------------CACHECABAT-----1


My report show only:

100101-1-------------------CACHECABAT-----1

Report output will be following because it’s group based on barcode and location code:

barcode--------------------LOCATION----------quantity

100101-1-------------------OUTLET-------------1

100101-1-------------------CACHECABAT-----1

help me.

OBJECT Report 50017 Adjustments
{
OBJECT-PROPERTIES
{
Date=18.01.12;
Time=14:48:15;
Modified=Yes;
Version List=Monir;
}
PROPERTIES
{
OnPreReport=BEGIN
//IF PrintToExcel THEN
// MakeExcelInfo;
END;

OnPostReport=BEGIN
//IF PrintToExcel THEN
// CreateExcelbook;
END;

}
DATAITEMS
{
{ PROPERTIES
{
DataItemTable=Table32;
DataItemTableView=SORTING(Item No.)
ORDER(Ascending)
WHERE(Item No.=FILTER(1…));
OnPreDataItem=BEGIN
IF( Barcode<>’’) THEN BEGIN
// Item.SETRANGE(Item.“No.”, Barcode) ;
“Item Ledger Entry”.SETRANGE(“Item Ledger Entry”.“Item No.”, Barcode);

END;
IF( DocumentNo<>’’) THEN BEGIN
“Item Ledger Entry”.SETRANGE(“Item Ledger Entry”.“Document No.”,DocumentNo) ;
END;
IF( Warehouse<>’’) THEN BEGIN
“Item Ledger Entry”.SETFILTER(“Item Ledger Entry”.“Location Code”, ‘=%1’, Warehouse) ;
// “Item Ledger Entry”.SETRANGE(“Item Ledger Entry”.“Location Code”, Warehouse) ;
END;

IF(( PositiveValue=TRUE) AND ( NegativeValue=FALSE)) THEN BEGIN
“Item Ledger Entry”.SETFILTER(“Entry Type”, ‘=%1’,“Item Ledger Entry”.“Entry Type”::“Positive Adjmt.”);

END;

IF (( PositiveValue=FALSE)AND ( NegativeValue=TRUE)) THEN BEGIN
“Item Ledger Entry”.SETFILTER(“Entry Type”, ‘=%1’,“Item Ledger Entry”.“Entry Type”::“Negative Adjmt.”);

END;

IF (( PositiveValue=TRUE)AND ( NegativeValue=TRUE)) THEN BEGIN

“Item Ledger Entry”.SETFILTER(“Entry Type”, ‘=%1|=%2’,“Item Ledger Entry”.“Entry Type”::“Positive Adjmt.”,
“Item Ledger Entry”.“Entry Type”::“Negative Adjmt.”);
END;

IF (( PositiveValue=FALSE)AND ( NegativeValue=FALSE)) THEN BEGIN

“Item Ledger Entry”.SETFILTER(“Entry Type”, ‘=%1|=%2’,“Item Ledger Entry”.“Entry Type”::“Positive Adjmt.”,
“Item Ledger Entry”.“Entry Type”::“Negative Adjmt.”);
END;

// IF (“Negative Adjmt.” =TRUE) THEN BEGIN

// END;

“Item Ledger Entry”.SETCURRENTKEY(“Item Ledger Entry”.“Item No.”);

“Item Ledger Entry”.ASCENDING(TRUE) ;

//window.OPEN(’@1@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@’,intProgress);
// timProgress := TIME;

Number := “Item Ledger Entry”.COUNT;
END;

OnAfterGetRecord=BEGIN
// ItemBarcode:=“Item Ledger Entry”.“Item No.”;

CLEAR( CurrentBarcode);
CLEAR( CurrentLocationCode);

CurrentBarcode:= “Item Ledger Entry”.“Item No.” ;
CurrentLocationCode:=“Item Ledger Entry”.“Location Code”;
END;

OnPostDataItem=BEGIN
// window.CLOSE;
END;

GroupTotalFields=Item No.,Location Code;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Header;
SectionWidth=23250;
SectionHeight=846;
}
CONTROLS
{
{ 1000000010;Label ;2100 ;0 ;2550 ;423 ;HorzAlign=Left;
CaptionML=ENU=Negative/Positive }
{ 1000000011;Label ;6300 ;0 ;2100 ;423 ;HorzAlign=Left;
CaptionML=ENU=Barcode }
{ 1000000013;Label ;11400;0 ;1950 ;423 ;HorzAlign=Left;
CaptionML=ENU=Warehouse }
{ 1000000014;Label ;15150;0 ;1800 ;423 ;HorzAlign=Left;
CaptionML=ENU=Cost }
}
}
{ PROPERTIES
{
SectionType=GroupFooter;
SectionWidth=23250;
SectionHeight=423;
OnPreSection=BEGIN
CurrReport.SHOWOUTPUT:=(PositiveValue=TRUE);
END;

}
CONTROLS
{
{ 1000000000;Label ;0 ;0 ;1500 ;423 ;HorzAlign=Left;
CaptionML=ENU=Pos. }
{ 1000000001;TextBox;1800 ;0 ;3150 ;423 ;HorzAlign=Left;
SourceExpr=+TotalPositiveQty }
{ 1000000002;TextBox;5850 ;0 ;3900 ;423 ;HorzAlign=Left;
SourceExpr=“Item Ledger Entry”.“Item No.” }
{ 1000000003;TextBox;11100;0 ;2700 ;423 ;HorzAlign=Left;
SourceExpr=“Item Ledger Entry”.“Location Code” }
{ 1000000005;TextBox;14550;0 ;3750 ;423 ;HorzAlign=Left;
SourceExpr=Unitcost }
}
}
{ PROPERTIES
{
SectionType=GroupFooter;
SectionWidth=23250;
SectionHeight=846;
OnPreSection=BEGIN
CurrReport.SHOWOUTPUT:=(NegativeValue=TRUE);
END;

}
CONTROLS
{
{ 1000000007;Label ;0 ;0 ;1500 ;423 ;HorzAlign=Left;
CaptionML=ENU=Neg. }
{ 1000000008;TextBox;1800 ;0 ;3150 ;423 ;HorzAlign=Left;
SourceExpr=+TotalNegativeQty }
{ 1000000016;TextBox;5700 ;0 ;4050 ;423 ;HorzAlign=Left;
SourceExpr=“Item Ledger Entry”.“Item No.” }
{ 1000000017;TextBox;11100;0 ;2700 ;423 ;HorzAlign=Left;
SourceExpr=“Item Ledger Entry”.“Location Code” }
{ 1000000018;TextBox;14550;0 ;3750 ;423 ;HorzAlign=Left;
SourceExpr=Unitcost }
}
}
}
}
{ PROPERTIES
{
DataItemIndent=1;
DataItemTable=Table2000000026;
DataItemTableView=SORTING(Number)
ORDER(Ascending)
WHERE(Number=CONST(1));
DataItemVarName=;
OnPreDataItem=BEGIN
IF (PositiveValue =TRUE) THEN BEGIN
// Item.SETRANGE(Item.“No.”, Barcode) ;

PositiveItemLedger.RESET;
PositiveItemLedger.SETRANGE( PositiveItemLedger.“Item No.”, “Item Ledger Entry”.“Item No.”);

IF( DocumentNo<>’’) THEN BEGIN
PositiveItemLedger.SETRANGE( PositiveItemLedger.“Document No.”,DocumentNo) ;
END;
IF( Warehouse<>’’) THEN BEGIN
PositiveItemLedger.SETFILTER( PositiveItemLedger.“Location Code”, ‘=%1’, Warehouse) ;
// “Item Ledger Entry”.SETRANGE(“Item Ledger Entry”.“Location Code”, Warehouse) ;
END ELSE BEGIN
PositiveItemLedger.SETFILTER( PositiveItemLedger.“Location Code”, ‘=%1’, “Item Ledger Entry”.“Location Code”) ;
END;

IF( PositiveValue=TRUE) THEN BEGIN
PositiveItemLedger.SETFILTER(“Entry Type”, ‘=%1’, PositiveItemLedger.“Entry Type”::“Positive Adjmt.”);

END;

PositiveItemLedger.SETCURRENTKEY( PositiveItemLedger.“Item No.”);

PositiveItemLedger.ASCENDING(TRUE) ;

“Value Entry”.SETRANGE(“Value Entry”.“Item No.”,“Item Ledger Entry”.“Item No.”);

IF( Warehouse<>’’) THEN BEGIN
“Value Entry”.SETFILTER( “Value Entry”.“Location Code”, ‘=%1’, Warehouse) ;

END ELSE BEGIN
“Value Entry”.SETFILTER(“Value Entry”.“Location Code”, ‘=%1’, “Item Ledger Entry”.“Location Code”) ;
END;

END ELSE BEGIN
CurrReport.BREAK;
END;
END;

OnAfterGetRecord=BEGIN

// IF (Positive =TRUE) THEN BEGIN