want to print Dimension Name on G/L Entry GroupFooter

want to print Dimension Name on G/L Entry GroupFooter
In Case of Journal Voucher, Multiple lines JV with different dimension staff code
i want print staff name on g/l entry groupfooter

Below is the code written on G/l Entry - onaftergetrecord
DimensionValue := ‘’;
DocumentDimension.RESET;
DocumentDimension.SETRANGE(DocumentDimension.“Table ID”,17);
DocumentDimension.SETRANGE(DocumentDimension.“Entry No.”,“G/L Entry”.“Entry No.”);
DocumentDimension.SETRANGE(DocumentDimension.“Dimension Code”,‘D004’);
IF DocumentDimension.FINDSET THEN
REPEAT
DimensionValue := DocumentDimension.“Dimension Value Code”;

DimensionValueName := ‘’;
RecDimensionValue.RESET;
RecDimensionValue.SETRANGE(RecDimensionValue.“Dimension Code”,‘D004’);
RecDimensionValue.SETRANGE(RecDimensionValue.Code,DimensionValue);
IF RecDimensionValue.FINDFIRST THEN
DimensionValueName := RecDimensionValue.Name;
UNTIL DocumentDimension.NEXT = 0;

now in case of multiple lines JV, it picking Last dimension name and print it…

client wants to print the dimesion names after groupfooter

can somebody help me out…

There is a standard report avaliable, where you place a check mark in Print Dimension.