Record is not getting Skipped in Excel
 
            
                
                    Stivan_dsouza21                
                
                    Member Posts: 218                
            
                        
            
                    Record is not getting Skipped in Excel:
Below is the Code written but its not getting skipped in excel
ledgerdim.RESET;
ledgerdim.SETRANGE(ledgerdim."Entry No.","G/L Entry"."Entry No.");
ledgerdim.SETRANGE(ledgerdim."Table ID",17);
IF vardimension<>'' THEN
ledgerdim.SETRANGE("Dimension Code",vardimension);
IF vardimensionvalue <> '' THEN
ledgerdim.SETRANGE("Dimension Value Code",vardimensionvalue);
IF NOT ledgerdim.FIND('-') THEN
CurrReport.SKIP;
So friends how can i do it
                Below is the Code written but its not getting skipped in excel
ledgerdim.RESET;
ledgerdim.SETRANGE(ledgerdim."Entry No.","G/L Entry"."Entry No.");
ledgerdim.SETRANGE(ledgerdim."Table ID",17);
IF vardimension<>'' THEN
ledgerdim.SETRANGE("Dimension Code",vardimension);
IF vardimensionvalue <> '' THEN
ledgerdim.SETRANGE("Dimension Value Code",vardimensionvalue);
IF NOT ledgerdim.FIND('-') THEN
CurrReport.SKIP;
So friends how can i do it
Thanks & Regards,
Stivan D'souza
Stivan D'souza
0                
            Comments
- 
            probably by using a different trigger. If you skip the record after it has been printed, then it won't work
 This however is just a shot in the dark, because the code looks fine0
- 
            it's hard to give answer without knowing the whole code and what you are trying to skip.
 what records do you want to skip ?Microsoft Certified IT Professional for Microsoft Dynamics NAV
 Just a happy frood who knows where his towel is0
- 
            CompInfo.GET;
 IF PrintToExcel THEN
 MakeExcelInfo;
 END;
 OnPostReport=BEGIN
 IF PrintToExcel THEN
 CreateExcelbook;
 END;
 DATAITEMS
 {
 { PROPERTIES
 {
 DataItemTable=Table15;
 DataItemTableView=SORTING(No.)
 ORDER(Ascending)
 WHERE(Account Type=FILTER(Posting));
 NewPagePerGroup=No;
 OnPreDataItem=BEGIN
 CurrReport.CREATETOTALS(TransDebits,TransCredits,"G/L Entry"."Debit Amount","G/L Entry"."Credit Amount");
 IF LocationCode <> '' THEN
 LocationFilter := 'Location Code: ' + LocationCode;
 END;
 OnAfterGetRecord=BEGIN
 recUsersetup.GET(USERID);
 IF ("G/L Account"."No."='72010010') OR ("G/L Account"."No."='72010020') OR ("G/L Account"."No."='72010030')
 OR ("G/L Account"."No."='72010040') OR ("G/L Account"."No."='72010050') OR ("G/L Account"."No."='72010060')
 OR ("G/L Account"."No."='72010070') OR ("G/L Account"."No."='72010080') THEN
 CurrReport.SKIP;
 END;
 ReqFilterFields=No.,Date Filter,Global Dimension 1 Filter,Global Dimension 2 Filter;
 GroupTotalFields=No.;
 }
 SECTIONS
 {
 { PROPERTIES
 {
 SectionType=Header;
 PrintOnEveryPage=Yes;
 SectionWidth=23806;
 SectionHeight=2522;
 OnPreSection=BEGIN
 varrecdimension.RESET;
 varrecdimension.SETRANGE(varrecdimension.Code,vardimension);
 IF varrecdimension.FIND('-') THEN;
 varrecDimensionvalue.RESET;
 varrecDimensionvalue.SETRANGE(varrecDimensionvalue.Code,vardimensionvalue);
 IF varrecDimensionvalue.FIND('-') THEN;
 IF (CurrReport.PAGENO = 1) OR (AccountChanged) THEN
 CurrReport.SHOWOUTPUT := FALSE
 ELSE
 CurrReport.SHOWOUTPUT := TRUE;
 END;
 }
 CONTROLS
 {
 { 1500072;TextBox ;20550;0 ;3150 ;423 ;HorzAlign=Right;
 SourceExpr=FORMAT(TODAY,0,4) }
 { 1500073;TextBox ;0 ;0 ;20400;423 ;FontSize=10;
 FontBold=Yes;
 SourceExpr=CompInfo.Name }
 { 1500074;TextBox ;23250;396 ;450 ;423 ;CaptionML=ENU=Page;
 SourceExpr=CurrReport.PAGENO }
 { 1500075;Label ;20700;396 ;750 ;423 ;ParentControl=1500074 }
 { 1500076;TextBox ;21450;846 ;2250 ;423 ;HorzAlign=Right;
 SourceExpr=USERID }
 { 1500077;TextBox ;0 ;450 ;21450;766 ;HorzAlign=Center;
 FontSize=10;
 FontBold=Yes;
 FontUnderline=No;
 SourceExpr=Name +' '+ 'Ledger' }
 { 1500078;TextBox ;0 ;1226 ;23700;423 ;FontSize=7;
 SourceExpr=GETFILTERS }
 { 1500016;TextBox ;0 ;1649 ;23700;423 ;FontSize=7;
 SourceExpr=LocationFilter }
 { 1000000018;TextBox;0 ;2037 ;23700;423 ;FontSize=7;
 SourceExpr= }
 }
 }
 { PROPERTIES
 {
 SectionType=Header;
 PrintOnEveryPage=Yes;
 SectionWidth=23806;
 SectionHeight=846;
 OnPreSection=BEGIN
 IF (CurrReport.PAGENO = 1) OR (AccountChanged) THEN
 CurrReport.SHOWOUTPUT := FALSE
 ELSE
 CurrReport.SHOWOUTPUT := TRUE;
 END;
 }
 }
 { PROPERTIES
 {
 SectionType=GroupHeader;
 SectionWidth=23806;
 SectionHeight=3016;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT :=
 (CurrReport.TOTALSCAUSEDBY = FIELDNO("No.")) AND ((CurrReport.PAGENO = 1) OR (AccountChanged));
 IF (AccountChanged) AND (CurrReport.SHOWOUTPUT) THEN BEGIN
 AccountChanged := FALSE;
 END;
 END;
 }
 }
 { PROPERTIES
 {
 SectionType=GroupHeader;
 SectionWidth=23806;
 SectionHeight=796;
 OnPreSection=BEGIN
 Opbln := 'Opening Balance As On'+ ' '+FORMAT(GETRANGEMIN("Date Filter"));
 CurrReport.SHOWOUTPUT :=
 CurrReport.TOTALSCAUSEDBY = FIELDNO("No.");
 IF CurrReport.TOTALSCAUSEDBY = FIELDNO("No.") THEN BEGIN
 OpeningDRBal := 0;
 OpeningCRBal := 0;
 GLEntry2.RESET;
 GLEntry2.SETCURRENTKEY("G/L Account No.","Business Unit Code","Global Dimension 1 Code",
 "Global Dimension 2 Code","Close Income Statement Dim. ID","Posting Date","Location Code");
 GLEntry2.SETRANGE("G/L Account No.","No.");
 GLEntry2.SETFILTER("Posting Date", '%1..%2', 0D,CLOSINGDATE(GETRANGEMIN("Date Filter")-1));
 IF "G/L Account".GETFILTER("Global Dimension 1 Filter") <> '' THEN
 GLEntry2.SETFILTER("Global Dimension 1 Code", "Global Dimension 1 Filter");
 IF "G/L Account".GETFILTER("Global Dimension 2 Filter") <> '' THEN
 GLEntry2.SETFILTER("Global Dimension 2 Code", "Global Dimension 2 Filter");
 IF LocationCode <> '' THEN
 GLEntry2.SETFILTER("Location Code",LocationCode);
 IF GLEntry2.FIND('-') THEN REPEAT
 ledgerdim.RESET;
 ledgerdim.SETRANGE(ledgerdim."Entry No.",GLEntry2."Entry No.");
 ledgerdim.SETRANGE(ledgerdim."Table ID",17);
 IF vardimension<>'' THEN
 ledgerdim.SETRANGE("Dimension Code",vardimension);
 IF vardimensionvalue <> '' THEN
 ledgerdim.SETRANGE("Dimension Value Code",vardimensionvalue);
 IF ledgerdim.FIND('-') THEN
 varopening:=varopening+GLEntry2.Amount;
 UNTIL GLEntry2.NEXT=0;
 IF varopening > 0 THEN
 OpeningDRBal := varopening;
 IF varopening < 0 THEN
 OpeningCRBal := -varopening;
 DrCrTextBalance:='';
 IF OpeningDRBal - OpeningCRBal > 0 THEN
 DrCrTextBalance := 'Dr';
 IF OpeningDRBal - OpeningCRBal < 0 THEN
 DrCrTextBalance := 'Cr';
 END;
 IF PrintToExcel THEN
 MakeExcelDatagroupHeader;
 END;
 }
 }
 { PROPERTIES
 {
 SectionType=GroupFooter;
 SectionWidth=23806;
 SectionHeight=689;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT := CurrReport.TOTALSCAUSEDBY = FIELDNO("No.");
 IF CurrReport.SHOWOUTPUT THEN BEGIN
 DrCrTextBalance := '';
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits > 0 THEN
 DrCrTextBalance := 'Dr';
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits < 0 THEN
 DrCrTextBalance := 'Cr';
 AccountChanged := TRUE;
 IF PrintToExcel THEN
 MakeExcelDataFooter;
 END;
 END;
 }
 }
 }
 }
 { PROPERTIES
 {
 DataItemIndent=1;
 DataItemTable=Table17;
 DataItemTableView=SORTING(Posting Date,Document No.)
 ORDER(Ascending)
 WHERE(Reversed=FILTER(No));
 OnPreDataItem=BEGIN
 IF LocationCode <> '' THEN
 SETFILTER("Location Code",LocationCode);
 GLEntry.RESET;
 GLEntry.SETCURRENTKEY("Transaction No.");
 END;
 OnAfterGetRecord=BEGIN
 ledgerdim.RESET;
 ledgerdim.SETRANGE(ledgerdim."Entry No.","G/L Entry"."Entry No.");
 ledgerdim.SETRANGE(ledgerdim."Table ID",17);
 IF vardimension<>'' THEN
 ledgerdim.SETRANGE("Dimension Code",vardimension);
 IF vardimensionvalue <> '' THEN
 ledgerdim.SETRANGE("Dimension Value Code",vardimensionvalue);
 IF NOT ledgerdim.FIND('-') THEN
 CurrReport.SKIP;
 StaffCode := '';
 DocumentDimension.RESET;
 DocumentDimension.SETRANGE(DocumentDimension."Table ID",17);
 DocumentDimension.SETRANGE(DocumentDimension."Entry No.","G/L Entry"."Entry No.");
 DocumentDimension.SETRANGE(DocumentDimension."Dimension Code",'Staff');
 IF DocumentDimension.FINDFIRST THEN
 StaffCode := DocumentDimension."Dimension Value Code";
 REPEAT
 StaffName := '';
 recDimensionvalue.RESET;
 recDimensionvalue.SETRANGE(recDimensionvalue."Dimension Code",'Staff');
 recDimensionvalue.SETRANGE(recDimensionvalue.Code,StaffCode);
 IF recDimensionvalue.FINDFIRST THEN
 StaffName := recDimensionvalue.Name;
 UNTIL DocumentDimension.NEXT = 0;
 ControlAccountName :='';
 GLEntry.SETRANGE("Transaction No.","Transaction No.");
 GLEntry.SETFILTER("Entry No.",'<>%1',"Entry No.");
 IF GLEntry.FINDFIRST THEN;
 DrCrText := '';
 ControlAccount := FALSE;
 OneEntryRecord := TRUE;
 IF GLEntry.COUNT>1 THEN
 OneEntryRecord := FALSE;
 GLAcc.GET("G/L Account No.");
 ControlAccount := FindControlAccount("Source Type","Entry No.","Source No.","G/L Account No.");
 IF ControlAccount THEN
 ControlAccountName := Daybook.FindGLAccName("Source Type","Entry No.","Source No.","G/L Account No.");
 IF "Source Type"="Source Type"::" " THEN BEGIN
 recGLEntry.RESET;
 recGLEntry.SETCURRENTKEY("Document No.","Posting Date",Amount);
 recGLEntry.SETRANGE("Document No.","Document No.");
 recGLEntry.SETRANGE("Source Type",recGLEntry."Source Type"::"Bank Account");
 IF recGLEntry.FIND('-') THEN BEGIN
 recBank.GET(recGLEntry."Source No.");
 ControlAccountName :=recBank.Name
 END;
 END;
 IF Amount>0 THEN
 TransDebits := TransDebits + Amount;
 IF Amount<0 THEN
 TransCredits := TransCredits - Amount;
 SourceDesc := '';
 IF "Source Code" <> '' THEN BEGIN
 SourceCode.GET("Source Code");
 SourceDesc := SourceCode.Description;
 END;
 PrintNarration := TRUE;
 IF "G/L Entry"."Source Code" = 'PURCHASES' THEN
 BEGIN
 PurchInvHeader.RESET;
 PurchInvHeader.SETRANGE(PurchInvHeader."No.","G/L Entry"."Document No.");
 IF PurchInvHeader.FINDFIRST THEN
 VendInvNo := PurchInvHeader."Vendor Invoice No.";
 END;
 IF ABS(OpeningDRBal) - ABS(OpeningCRBal) + ABS(TransDebits) - ABS(TransCredits) = 0 THEN BEGIN
 // CurrReport.SKIP;
 END;
 END;
 ReqFilterFields=Document No.;
 TotalFields=Debit Amount,Credit Amount;
 GroupTotalFields=Document No.,Entry No.;
 DataItemLink=G/L Account No.=FIELD(No.),
 Posting Date=FIELD(Date Filter),
 Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
 Global Dimension 2 Code=FIELD(Global Dimension 2 Filter);
 }
 SECTIONS
 {
 { PROPERTIES
 {
 SectionType=GroupHeader;
 SectionWidth=23806;
 SectionHeight=0;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT:=CurrReport.TOTALSCAUSEDBY="G/L Entry".FIELDNO("G/L Entry"."Document No.");
 //CurrReport.SHOWOUTPUT(FALSE);
 END;
 }
 { PROPERTIES
 {
 SectionType=Body;
 SectionWidth=23806;
 SectionHeight=423;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT(OneEntryRecord AND (ControlAccountName <> ''));
 AccountName := '';
 IF CurrReport.SHOWOUTPUT THEN BEGIN
 AccountName := Daybook.FindGLAccName(GLEntry."Source Type",GLEntry."Entry No.",GLEntry."Source No.",GLEntry."G/L Account No.");
 DrCrTextBalance := '';
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits > 0 THEN
 DrCrTextBalance := 'Dr';
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits < 0 THEN
 DrCrTextBalance := 'Cr';
 CurrReport.SHOWOUTPUT(FALSE);
 { IF PrintToExcel THEN
 MakeExcelDataBody; } //Paramita
 END;
 END;
 }
 }
 { PROPERTIES
 {
 SectionType=Body;
 SectionWidth=23806;
 SectionHeight=423;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT(OneEntryRecord AND (ControlAccountName = ''));
 AccountName := '';
 IF CurrReport.SHOWOUTPUT THEN BEGIN
 AccountName := Daybook.FindGLAccName(GLEntry."Source Type",GLEntry."Entry No.",GLEntry."Source No.",GLEntry."G/L Account No.");
 DrCrTextBalance := '';
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits > 0 THEN
 DrCrTextBalance := 'Dr';
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits < 0 THEN
 DrCrTextBalance := 'Cr';
 CurrReport.SHOWOUTPUT(FALSE);
 { IF PrintToExcel THEN
 MakeExcelDataBody5; }
 END;
 END;
 }
 }
 { PROPERTIES
 {
 SectionType=GroupFooter;
 SectionWidth=23806;
 SectionHeight=423;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT:=CurrReport.TOTALSCAUSEDBY="G/L Entry".FIELDNO("G/L Entry"."Document No.");
 // EBT Rakshita
 IF CurrReport.SHOWOUTPUT THEN BEGIN
 DrCrTextBalance := '';
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits > 0 THEN
 DrCrTextBalance := 'Dr';
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits < 0 THEN
 DrCrTextBalance := 'Cr';
 AccountChanged := TRUE;
 IF PrintToExcel THEN
 MakeExcelDataGroupFooter;
 END;
 IF PrintDetail THEN
 AccountName := Text16500;
 {
 // EBT Rakshita
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits = 0 THEN
 CurrReport.SHOWOUTPUT:=FALSE;
 }
 END;
 }
 }
 { PROPERTIES
 {
 SectionType=TransFooter;
 SectionWidth=23806;
 SectionHeight=50;
 OnPostSection=BEGIN
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits < 0 THEN
 CurrReport.SHOWOUTPUT(FALSE);
 END;
 }
 }
 }
 }
 { PROPERTIES
 {
 DataItemIndent=2;
 DataItemTable=Table2000000026;
 DataItemTableView=SORTING(Number);
 OnPreDataItem=BEGIN
 SETRANGE(Number,1,GLEntry.COUNT);
 FirstRecord := TRUE;
 IF GLEntry.COUNT = 1 THEN
 CurrReport.BREAK;
 END;
 OnAfterGetRecord=BEGIN
 DrCrText := '';
 IF Number>1 THEN BEGIN
 FirstRecord := FALSE;
 GLEntry.NEXT;
 END;
 END;
 }
 SECTIONS
 {
 { PROPERTIES
 {
 SectionType=Body;
 SectionWidth=23806;
 SectionHeight=451;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT(FirstRecord AND (ControlAccountName <> ''));
 IF CurrReport.SHOWOUTPUT THEN BEGIN
 DetailAmt := 0;
 IF PrintDetail THEN
 DetailAmt := GLEntry.Amount;
 IF DetailAmt > 0 THEN
 DrCrText := 'Dr';
 IF DetailAmt < 0 THEN
 DrCrText := 'Cr';
 {
 IF NOT PrintDetail THEN
 AccountName:=Text16500
 ELSE
 AccountName := Daybook.FindGLAccName(GLEntry."Source Type",GLEntry."Entry No.",GLEntry."Source No.",GLEntry."G/L Account No.")
 ;
 }
 DrCrTextBalance := '';
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits > 0 THEN
 DrCrTextBalance := 'Dr';
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits < 0 THEN
 DrCrTextBalance := 'Cr';
 CurrReport.SHOWOUTPUT(FALSE);
 { IF PrintToExcel THEN
 MakeExcelDataBody1;}
 END;
 END;
 }
 }
 { PROPERTIES
 {
 SectionType=Body;
 SectionWidth=23806;
 SectionHeight=432;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT(FirstRecord AND (ControlAccountName = '' ));
 IF CurrReport.SHOWOUTPUT THEN BEGIN
 DetailAmt := 0;
 IF PrintDetail THEN
 DetailAmt := GLEntry.Amount;
 IF DetailAmt > 0 THEN
 DrCrText := 'Dr';
 IF DetailAmt < 0 THEN
 DrCrText := 'Cr';
 IF NOT PrintDetail THEN
 AccountName:=Text16500
 ELSE
 AccountName := Daybook.FindGLAccName(GLEntry."Source Type",GLEntry."Entry No.",GLEntry."Source No.",GLEntry."G/L Account No.")
 ;
 DrCrTextBalance := '';
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits > 0 THEN
 DrCrTextBalance := 'Dr';
 IF OpeningDRBal - OpeningCRBal + TransDebits - TransCredits < 0 THEN
 DrCrTextBalance := 'Cr';
 CurrReport.SHOWOUTPUT(FALSE);
 { IF PrintToExcel THEN
 MakeExcelDataBody2; }
 END;
 END;
 }
 }
 { PROPERTIES
 {
 SectionType=Body;
 SectionWidth=23806;
 SectionHeight=423;
 OnPreSection=BEGIN
 //CurrReport.SHOWOUTPUT(PrintDetail AND (NOT FirstRecord)); //Commented by EBT STIVAN to display First Line (211011)
 CurrReport.SHOWOUTPUT(PrintDetail);
 IF CurrReport.SHOWOUTPUT THEN BEGIN
 IF GLEntry.Amount > 0 THEN
 DrCrText := 'Dr';
 IF GLEntry.Amount < 0 THEN
 DrCrText := 'Cr';
 AccountName := Daybook.FindGLAccName(GLEntry."Source Type",GLEntry."Entry No.",GLEntry."Source No.",GLEntry."G/L Account No.");
 IF PrintToExcel THEN
 MakeExcelDataBody3;
 END;
 END;
 }
 CONTROLS
 {
 { 1500042;TextBox ;6900 ;0 ;3600 ;423 ;HorzAlign=Left;
 FontSize=7;
 SourceExpr=AccountName }
 { 1500027;TextBox ;10650;0 ;1650 ;423 ;HorzAlign=Right;
 FontSize=7;
 SourceExpr=ABS(GLEntry.Amount) }
 { 1500056;TextBox ;12450;0 ;450 ;423 ;HorzAlign=Left;
 FontSize=7;
 FontBold=Yes;
 SourceExpr=DrCrText }
 }
 }
 { PROPERTIES
 {
 SectionType=Body;
 SectionWidth=23806;
 SectionHeight=0;
 }
 CONTROLS
 {
 }
 }
 }
 }
 { PROPERTIES
 {
 DataItemIndent=2;
 DataItemTable=Table16548;
 DataItemTableView=SORTING(Entry No.,Transaction No.,Line No.)
 ORDER(Ascending);
 OnPreDataItem=BEGIN
 IF NOT PrintLineNarration THEN
 CurrReport.BREAK;
 END;
 DataItemLink=Entry No.=FIELD(Entry No.);
 }
 SECTIONS
 {
 { PROPERTIES
 {
 SectionType=Body;
 SectionWidth=23806;
 SectionHeight=423;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT(Narration <> '');
 IF (Narration <> '') AND PrintToExcel THEN
 MakeExcelDataBody4;
 END;
 }
 }
 { PROPERTIES
 {
 DataItemIndent=2;
 DataItemTable=Table16548;
 DataItemTableView=SORTING(Entry No.,Transaction No.,Line No.)
 WHERE(Entry No.=FILTER(0));
 DataItemVarName=PostedNarration1;
 OnPreDataItem=BEGIN
 IF NOT PrintVchNarration THEN
 CurrReport.BREAK;
 GLEntry2.RESET;
 GLEntry2.SETCURRENTKEY("Posting Date","Source Code","Transaction No.");
 GLEntry2.SETRANGE("Posting Date","G/L Entry"."Posting Date");
 GLEntry2.SETRANGE("Source Code","G/L Entry"."Source Code");
 GLEntry2.SETRANGE("Transaction No.","G/L Entry"."Transaction No.");
 GLEntry2.FINDLAST;
 IF NOT (GLEntry2."Entry No." <> "G/L Entry"."Entry No.") THEN
 CurrReport.BREAK;
 END;
 DataItemLink=Document No.=FIELD(Document No.);
 }
 SECTIONS
 {
 { PROPERTIES
 {
 SectionType=Body;
 SectionWidth=23806;
 SectionHeight=423;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT(Narration <> '');
 IF PrintNarration THEN BEGIN
 CurrReport.SHOWOUTPUT(TRUE);
 IF (Narration <> '') AND PrintToExcel THEN
 MakeExcelDataBody6;
 END
 ELSE
 CurrReport.SHOWOUTPUT(FALSE);
 PrintNarration := FALSE;
 END;
 }
 }
 }
 { PROPERTIES
 {
 DataItemIndent=2;
 DataItemTable=Table43;
 DataItemTableView=SORTING(Document Type,No.,Line No.);
 OnAfterGetRecord=BEGIN
 IF NOT ("G/L Entry"."Source Code" = 'PURCHASES') THEN
 CurrReport.SKIP;
 END;
 DataItemLink=No.=FIELD(Document No.);
 }
 SECTIONS
 {
 { PROPERTIES
 {
 SectionType=Body;
 SectionWidth=23806;
 SectionHeight=423;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT(Comment <> '');
 IF PrintLineNarration THEN BEGIN
 CurrReport.SHOWOUTPUT(TRUE);
 IF (Comment <> '') AND PrintToExcel THEN
 MakeExcelDataBody7;
 END
 ELSE
 CurrReport.SHOWOUTPUT(FALSE);
 END;
 }
 }
 }
 REQUESTFORM
 {
 PROPERTIES
 {
 Width=7590;
 Height=4290;
 SaveControlInfo=No;
 InsertAllowed=No;
 DeleteAllowed=No;
 ModifyAllowed=No;
 SaveTableView=No;
 }
 { 1000000004;TextBox;3520 ;3300 ;2640 ;440 ;ValidateTableRelation=Yes;
 InPage=-1;
 CaptionML=ENU=Location Code;
 SourceExpr=vardimensionvalue;
 AutoCalcField=Yes;
 TableRelation="Dimension Value".Code;
 OnLookup=BEGIN
 IF vardimension='' THEN
 ERROR('Please select dimension');
 recDimensionvalue.RESET;
 recDimensionvalue.SETRANGE("Dimension Code",vardimension);
 IF recDimensionvalue.FIND('-') THEN
 IF FORM.RUNMODAL(0,recDimensionvalue)=ACTION::LookupOK THEN
 vardimensionvalue:=recDimensionvalue.Code;
 END;
 }
 { 1000000005;TextBox;3520 ;2750 ;2640 ;440 ;ValidateTableRelation=Yes;
 InPage=-1;
 SourceExpr=vardimension;
 AutoCalcField=No;
 TableRelation=Dimension }
 }
 }
 REQUESTPAGE
 {
 PROPERTIES
 {
 }
 }
 CODE
 {
 VAR
 CompInfo@1500022 : Record 79;
 GLAcc@1500001 : Record 15;
 GLEntry@1500000 : Record 17;
 GLEntry2@1500024 : Record 17;
 Daybook@1500009 : Report 16562;
 SourceCode@1500013 : Record 230;
 OpeningDRBal@1500003 : Decimal;
 OpeningCRBal@1500004 : Decimal;
 TransDebits@1500016 : Decimal;
 TransCredits@1500017 : Decimal;
 OneEntryRecord@1500002 : Boolean;
 FirstRecord@1500010 : Boolean;
 PrintDetail@1500006 : Boolean;
 PrintLineNarration@1500007 : Boolean;
 PrintVchNarration@1500008 : Boolean;
 DetailAmt@1500005 : Decimal;
 AccountName@1500011 : Text[100];
 ControlAccountName@1500023 : Text[100];
 ControlAccount@1500012 : Boolean;
 SourceDesc@1500014 : Text[50];
 DrCrText@1500021 : Text[2];
 DrCrTextBalance@1500019 : Text[2];
 LocationCode@1500018 : Code[20];
 LocationFilter@1500020 : Text[100];
 Text16500@1500015 : TextConst 'ENU=As per Details';
 AccountChanged@1500025 : Boolean;
 PrintNarration@1000000000 : Boolean;
 ExcelBuf@1000000001 : TEMPORARY Record 370;
 PrintToExcel@1000000002 : Boolean;
 Text000@1000000009 : TextConst 'ENU=Data';
 Text001@1000000008 : TextConst 'ENU=Cash Book';
 Text0004@1000000007 : TextConst 'ENU=Company Name';
 Text0005@1000000006 : TextConst 'ENU=Report No.';
 Text0006@1000000005 : TextConst 'ENU=Report Name';
 Text0007@1000000004 : TextConst 'ENU=USER Id';
 Text0008@1000000003 : TextConst 'ENU=Date';
 Opbln@1000000010 : Text[50];
 VendInvNo@1000000011 : Code[20];
 PurchInvHeader@1000000012 : Record 122;
 recGLEntry@1000000013 : Record 17;
 recBank@1000000014 : Record 270;
 vardimension@1000000015 : Code[20];
 vardimensionvalue@1000000016 : Code[120];
 ledgerdim@1000000017 : Record 355;
 varopening@1000000018 : Decimal;
 recDimensionvalue@1000000019 : Record 349;
 varrecdimension@1000000020 : Record 348;
 varrecDimensionvalue@1000000021 : Record 349;
 recUsersetup@1000000022 : Record 91;
 StaffCode@1000000025 : Code[10];
 StaffName@1000000024 : Text[50];
 DocumentDimension@1000000023 : Record 355;
 PROCEDURE FindControlAccount@1500000("Source Type"@1500000 : ' ,Customer,Vendor,Bank Account,Fixed Asset';"Entry No."@1500001 : Integer;"Source No."@1500002 : Code[20];"G/L Account No."@1500003 : Code[20]) : Boolean;
 VAR
 VendLedgEntry@1500005 : Record 25;
 CustLedgEntry@1500006 : Record 21;
 BankLedgEntry@1500010 : Record 271;
 FALedgEntry@1500012 : Record 5601;
 SubLedgerFound@1500004 : Boolean;
 BEGIN
 IF "Source Type" = "Source Type"::Vendor THEN BEGIN
 IF VendLedgEntry.GET("Entry No.") THEN
 SubLedgerFound := TRUE;
 END;
 IF "Source Type" = "Source Type"::Customer THEN BEGIN
 IF CustLedgEntry.GET("Entry No.") THEN
 SubLedgerFound := TRUE;
 END;
 IF "Source Type" = "Source Type"::"Bank Account" THEN
 IF BankLedgEntry.GET("Entry No.") THEN BEGIN
 SubLedgerFound := TRUE;
 END;
 IF "Source Type" = "Source Type"::"Fixed Asset" THEN BEGIN
 FALedgEntry.RESET;
 FALedgEntry.SETCURRENTKEY("G/L Entry No.");
 FALedgEntry.SETRANGE("G/L Entry No.","Entry No.");
 IF FALedgEntry.FINDFIRST THEN
 SubLedgerFound := TRUE;
 END;
 EXIT(SubLedgerFound);
 END;
 PROCEDURE MakeExcelInfo@1000000000();
 BEGIN
 ExcelBuf.SetUseInfoSheed;
 ExcelBuf.AddInfoColumn(FORMAT(Text0004),FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddInfoColumn(COMPANYNAME,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.NewRow;
 ExcelBuf.AddInfoColumn(FORMAT(Text0006),FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddInfoColumn('G/L Ledger Dimension wise',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.NewRow;
 ExcelBuf.AddInfoColumn(FORMAT(Text0005),FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddInfoColumn(REPORT::"G/L Ledger dimension wise",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.NewRow;
 ExcelBuf.AddInfoColumn(FORMAT(Text0007),FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddInfoColumn(USERID,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.NewRow;
 ExcelBuf.AddInfoColumn(FORMAT(Text0008),FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddInfoColumn(TODAY,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.ClearNewRow;
 MakeExcelDataHeader;
 END;
 PROCEDURE CreateExcelbook@1000000001();
 BEGIN
 ExcelBuf.CreateBook;
 ExcelBuf.CreateSheet(Text000,Text001,COMPANYNAME,USERID);
 ExcelBuf.GiveUserControl;
 ERROR('');
 END;
 PROCEDURE MakeExcelDataHeader@1000000002();
 BEGIN
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn(CompInfo.Name,FALSE,'',TRUE,FALSE,FALSE,'@');
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn("G/L Account".Name +' '+ 'Book',FALSE,'',TRUE,FALSE,FALSE,'@');
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn("G/L Account".GETFILTERS,FALSE,'',TRUE,FALSE,FALSE,'@');
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn(LocationCode,FALSE,'',TRUE,FALSE,FALSE,'@'); //Rakshita
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn('Posting Date',FALSE,'',TRUE,FALSE,TRUE,'@');
 ExcelBuf.AddColumn('Document No.',FALSE,'',TRUE,FALSE,TRUE,'@');
 ExcelBuf.AddColumn('Account Name',FALSE,'',TRUE,FALSE,TRUE,'@');
 ExcelBuf.AddColumn('Location Code',FALSE,'',TRUE,FALSE,TRUE,'@');
 ExcelBuf.AddColumn('Location Name',FALSE,'',TRUE,FALSE,TRUE,'@'); //EBT STIVAN
 ExcelBuf.AddColumn('Staff Code',FALSE,'',TRUE,FALSE,TRUE,'@'); //EBT STIVAN
 ExcelBuf.AddColumn('Staff Name',FALSE,'',TRUE,FALSE,TRUE,'@'); //EBT STIVAN
 ExcelBuf.AddColumn('Voucher Type',FALSE,'',TRUE,FALSE,TRUE,'@');
 ExcelBuf.AddColumn('Debit Amount',FALSE,'',TRUE,FALSE,TRUE,'@');
 ExcelBuf.AddColumn('Credit Amount',FALSE,'',TRUE,FALSE,TRUE,'@');
 ExcelBuf.AddColumn('Balance',FALSE,'',TRUE,FALSE,TRUE,'@');
 END;
 PROCEDURE MakeExcelDatagroupHeader@1000000003();
 BEGIN
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(Opbln,FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(OpeningDRBal,FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(OpeningCRBal,FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(ABS(OpeningDRBal-OpeningCRBal),FALSE,'',TRUE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(DrCrTextBalance,FALSE,'',FALSE,FALSE,FALSE,'');
 END;
 PROCEDURE MakeExcelDataBody@1000000004();
 BEGIN
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn("G/L Entry"."Posting Date",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Document No.",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(ControlAccountName,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Location Code",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(SourceDesc,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Debit Amount",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Credit Amount",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(ABS(OpeningDRBal-OpeningCRBal+TransDebits-TransCredits),FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(DrCrTextBalance,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(AccountName,FALSE,'',FALSE,FALSE,FALSE,'');
 END;
 PROCEDURE MakeExcelDataBody5@1000000009();
 BEGIN
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn("G/L Entry"."Posting Date",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Document No.",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(AccountName,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Location Code",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(SourceDesc,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Debit Amount",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Credit Amount",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(ABS(OpeningDRBal-OpeningCRBal+TransDebits-TransCredits),FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(DrCrTextBalance,FALSE,'',FALSE,FALSE,FALSE,'');
 END;
 PROCEDURE MakeExcelDataBody1@1000000005();
 BEGIN
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn("G/L Entry"."Posting Date",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Document No.",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(AccountName,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(ABS(DetailAmt),FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(DrCrText,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Location Code",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(SourceDesc,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Debit Amount",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Credit Amount",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(ABS(OpeningDRBal-OpeningCRBal+TransDebits-TransCredits),FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(DrCrTextBalance,FALSE,'',FALSE,FALSE,FALSE,'');
 END;
 PROCEDURE MakeExcelDataBody2@1000000006();
 BEGIN
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn("G/L Entry"."Posting Date",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Document No.",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(AccountName,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(ABS(DetailAmt),FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(DrCrText,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Location Code",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(SourceDesc,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Debit Amount",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("G/L Entry"."Credit Amount",FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(ABS(OpeningDRBal-OpeningCRBal+TransDebits-TransCredits),FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(DrCrTextBalance,FALSE,'',FALSE,FALSE,FALSE,'');
 END;
 PROCEDURE MakeExcelDataBody3@1000000007();
 BEGIN
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(AccountName,FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(ABS(GLEntry.Amount),FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(DrCrText,FALSE,'',FALSE,FALSE,FALSE,'');
 END;
 PROCEDURE MakeExcelDataBody4@1000000008();
 BEGIN
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("Posted Narration".Narration,FALSE,'',FALSE,FALSE,FALSE,'');
 END;
 PROCEDURE MakeExcelDataBody6@1000000017();
 BEGIN
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn(PostedNarration1.Narration,FALSE,'',FALSE,FALSE,FALSE,'');
 END;
 PROCEDURE MakeExcelDataBody7@1000000012();
 BEGIN
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn('',FALSE,'',FALSE,FALSE,FALSE,'');
 ExcelBuf.AddColumn("Purch. Comment Line".Comment,FALSE,'',FALSE,FALSE,FALSE,'');
 END;
 PROCEDURE MakeExcelDataGroupFooter@1000000011();
 BEGIN
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');}
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn("G/L Entry"."Posting Date",FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn("G/L Entry"."Document No.",FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn(AccountName,FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn("G/L Entry"."Global Dimension 2 Code",FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn("G/L Entry"."Location Code",FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn(StaffCode,FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn(StaffName,FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn(SourceDesc,FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn("G/L Entry"."Debit Amount",FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn("G/L Entry"."Credit Amount",FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn(ABS(OpeningDRBal-OpeningCRBal+TransDebits-TransCredits),FALSE,'',TRUE,FALSE,TRUE,'');
 END;
 PROCEDURE MakeExcelDataFooter@1000000010();
 BEGIN
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('Closing Balance',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn(OpeningDRBal+"G/L Entry"."Debit Amount",FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn(OpeningCRBal+"G/L Entry"."Credit Amount",FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn(ABS(OpeningDRBal-OpeningCRBal+TransDebits-TransCredits),FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn(DrCrTextBalance,FALSE,'',FALSE,FALSE,FALSE,'');
 END;
 PROCEDURE Makeexcelopeningbal@1000000013();
 BEGIN
 ExcelBuf.NewRow;
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('Opening Balance',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn('',FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn(OpeningDRBal,FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn(OpeningCRBal,FALSE,'',TRUE,FALSE,TRUE,'');
 ExcelBuf.AddColumn(ABS(OpeningDRBal-OpeningCRBal),FALSE,'',TRUE,FALSE,TRUE,'');
 END;
 BEGIN
 END.
 }
 RDLDATA
 {
 }
 }Thanks & Regards,
 Stivan D'souza0
- 
            Its geeting Skipped at Report level but not on Excel levelThanks & Regards,
 Stivan D'souza0
- 
            The code is placed in a sectiontrigger
 place it in a dataitemtrigger (onaftergetrecord) and the records should be skipped.
 Actually refrain from coding in sections, because when you move up to nav 2009 and beyond, no sectiontriggers are at your disposal0
- 
            SOG its placed on G/L Entry - OnAfterGetRecord trigger only
 ledgerdim.RESET;
 ledgerdim.SETRANGE(ledgerdim."Entry No.","G/L Entry"."Entry No.");
 ledgerdim.SETRANGE(ledgerdim."Table ID",17);
 IF vardimension<>'' THEN
 ledgerdim.SETRANGE("Dimension Code",vardimension);
 IF vardimensionvalue <> '' THEN
 ledgerdim.SETRANGE("Dimension Value Code",vardimensionvalue);
 IF NOT ledgerdim.FIND('-') THEN
 CurrReport.SKIP;Thanks & Regards,
 Stivan D'souza0
- 
            Can anybdy suggest Some toher way how to skip the record in excel.Thanks & Regards,
 Stivan D'souza0
- 
            It is hard to understand the problem by reading your code. You can paste the txt of object file or send it as fob here and code can be checked within NAV.
 But first of all, have you tried debugger? You should go step by step and understand why it doesn't skip in the place you are expecting? Maybe it's skipping and there is a indentation problem or it's not skipping because it doesn't meet your conditions. There are many possibilities...Ufuk Asci
 Pargesoft0
- 
            Hi all,
 I have same problem with Detail Trial Balance report in export to excel. I found culprit to be below code which is in onaftergetrecord pageCounter DataItem
 CurrReport.PRINTONLYIFDETAIL := ExcludeBalanceOnly OR (StartBalance = 0);
 I have tried a lot but it was in vain. I am attaching report as .txt file.
 Import(W1) and run report for G/L accounts 2310..2340
 2325 is appearing in the excel but not in the reports
 I am not able to attach file and I pasted code in image comment still it is not visible. Can body help on this. so that I can send object or paste code. It is not allowing to paste because it is exceeding 65000 characters
 thanks in advance0
- 
            PRINTONLYIFDETAIL does not skip. You may need coding.Ufuk Asci
 Pargesoft0
- 
            In Standard(W1) , detailed trail balance , Pagecounter onaftergetrecord trigger , there is following code
 CurrReport.PRINTONLYIFDETAIL := ExcludeBalanceOnly OR (StartBalance = 0);
 if we comment above line and run report(W1) for G/L Accounts 2310..2340
 you will find 2325 in the report preview , if you remove comment the 2325, you will not able to find 2325 in report preview.
 But in the above both cases(comment and uncommented Cases) you will find 2325 in excel
 so I have changed Logic there to
 Showout:=ExcludeBalanceOnly OR (StartBalance = 0);
 CurrReport.PRINTONLYIFDETAIL := Showout;
 IF Showout THEN BEGIN
 //Export to Excel Code
 but above code also didn't work0
- 
            Have you debugged?Ufuk Asci
 Pargesoft0
- 
            I tried to analyse be keeping messages but didn't get the break through. Below is the object in .txt format
 OBJECT Report 60014 Detail Trial Balanceo
 {
 OBJECT-PROPERTIES
 {
 Date=16-08-12;
 Time=22:11:00;
 Modified=Yes;
 Version List=NAVW16.00.01;
 }
 PROPERTIES
 {
 CaptionML=ENU=Detail Trial Balance;
 OnPreReport=BEGIN
 GLFilter := "G/L Account".GETFILTERS;
 GLDateFilter := "G/L Account".GETFILTER("Date Filter");
 END;
 OnPostReport=BEGIN
 IF PrintToExcel THEN BEGIN
 TempExcelBuffer.CreateBook;
 TempExcelBuffer.CreateSheet('Createsheet','Trail Balance',COMPANYNAME,USERID);
 TempExcelBuffer.GiveUserControl;
 END;
 END;
 }
 DATAITEMS
 {
 { PROPERTIES
 {
 DataItemTable=Table15;
 DataItemTableView=WHERE(Account Type=CONST(Posting));
 PrintOnlyIfDetail=Yes;
 OnPreDataItem=BEGIN
 IF ISSERVICETIER THEN
 PageGroupNo := 1;
 CurrReport.NEWPAGEPERRECORD := PrintOnlyOnePerPage;
 END;
 OnAfterGetRecord=BEGIN
 StartBalance := 0;
 IF GLDateFilter <> '' THEN
 IF GETRANGEMIN("Date Filter") <> 0D THEN BEGIN
 SETRANGE("Date Filter",0D,CLOSINGDATE(GETRANGEMIN("Date Filter") - 1));
 CALCFIELDS("Net Change");
 StartBalance := "Net Change";
 SETFILTER("Date Filter",GLDateFilter);
 END;
 IF ISSERVICETIER THEN BEGIN
 IF PrintOnlyOnePerPage THEN BEGIN
 GLEntryPage.RESET;
 GLEntryPage.SETRANGE("G/L Account No.", "G/L Account"."No.");
 IF CurrReport.PRINTONLYIFDETAIL AND GLEntryPage.FIND('-') THEN
 PageGroupNo := PageGroupNo + 1;
 END;
 END;
 END;
 ReqFilterFields=No.,Search Name,Income/Balance,Debit/Credit,Date Filter;
 }
 SECTIONS
 {
 { PROPERTIES
 {
 SectionType=Header;
 PrintOnEveryPage=Yes;
 SectionWidth=18450;
 SectionHeight=1692;
 }
 CONTROLS
 {
 { 1 ;Label ;0 ;0 ;7500 ;423 ;FontSize=8;
 FontBold=Yes;
 CaptionML=ENU=Detail Trial Balance;
 DataSetFieldName=Detail_Trial_BalanceCaption }
 { 2 ;TextBox ;15000;0 ;3150 ;423 ;HorzAlign=Right;
 SourceExpr=FORMAT(TODAY,0,4);
 DataSetFieldName=FORMAT_TODAY_0_4_ }
 { 3 ;TextBox ;0 ;423 ;7500 ;423 ;SourceExpr=STRSUBSTNO(Text000,GLDateFilter);
 DataSetFieldName=STRSUBSTNO_Text000_GLDateFilter_ }
 { 4 ;Label ;16950;423 ;750 ;423 ;ParentControl=5;
 DataSetFieldName=CurrReport_PAGENOCaption }
 { 5 ;TextBox ;17700;423 ;450 ;423 ;CaptionML=ENU=Page;
 SourceExpr=CurrReport.PAGENO;
 DataSetFieldName=CurrReport_PAGENO }
 { 6 ;TextBox ;0 ;846 ;7500 ;423 ;SourceExpr=COMPANYNAME;
 DataSetFieldName=COMPANYNAME }
 { 7 ;TextBox ;15900;846 ;2250 ;423 ;HorzAlign=Right;
 SourceExpr=USERID;
 DataSetFieldName=USERID }
 }
 }
 { PROPERTIES
 {
 SectionType=Header;
 PrintOnEveryPage=Yes;
 SectionWidth=18450;
 SectionHeight=423;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT((CurrReport.PAGENO = 1) AND NOT ExcludeBalanceOnly);
 END;
 }
 CONTROLS
 {
 { 8 ;Label ;0 ;0 ;12000;423 ;CaptionML=ENU=This also includes G/L accounts that only have a balance.;
 DataSetFieldName=This_also_includes_G_L_accounts_that_only_have_a_balance_Caption }
 { 49 ;TextBox ;18000;0 ;150 ;423 ;Name=ExcludeBalanceOnly;
 Visible=No;
 ForeColor=65535;
 SourceExpr=ExcludeBalanceOnly;
 DataSetFieldName=ExcludeBalanceOnly }
 { 53 ;TextBox ;17000;0 ;150 ;423 ;Name=PrintOnlyOnePerPage;
 Visible=No;
 ForeColor=65535;
 SourceExpr=PrintOnlyOnePerPage;
 DataSetFieldName=PrintOnlyOnePerPage }
 { 54 ;TextBox ;17150;0 ;150 ;423 ;Name=PrintReversedEntries;
 Visible=No;
 ForeColor=65535;
 SourceExpr=PrintReversedEntries;
 DataSetFieldName=PrintReversedEntries }
 { 50 ;TextBox ;16850;0 ;150 ;423 ;Name=PageGroupNo;
 Visible=No;
 ForeColor=65535;
 SourceExpr=PageGroupNo;
 DataSetFieldName=PageGroupNo }
 }
 }
 { PROPERTIES
 {
 SectionType=Header;
 PrintOnEveryPage=Yes;
 SectionWidth=18450;
 SectionHeight=423;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT((CurrReport.PAGENO = 1) AND PrintClosingEntries);
 END;
 }
 CONTROLS
 {
 { 9 ;Label ;0 ;0 ;12000;423 ;CaptionML=ENU=This report also includes closing entries within the period.;
 DataSetFieldName=This_report_also_includes_closing_entries_within_the_period_Caption }
 { 51 ;TextBox ;18000;0 ;150 ;423 ;Name=PrintClosingEntries;
 Visible=No;
 ForeColor=65535;
 SourceExpr=PrintClosingEntries;
 DataSetFieldName=PrintClosingEntries }
 }
 }
 { PROPERTIES
 {
 SectionType=Header;
 SectionWidth=18450;
 SectionHeight=423;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT((CurrReport.PAGENO = 1) AND PrintOnlyCorrections);
 END;
 }
 CONTROLS
 {
 { 47 ;Label ;0 ;0 ;12000;423 ;CaptionML=ENU=Only corrections are included.;
 DataSetFieldName=Only_corrections_are_included_Caption }
 { 52 ;TextBox ;18000;0 ;150 ;423 ;Name=PrintOnlyCorrections;
 Visible=No;
 ForeColor=65535;
 SourceExpr=PrintOnlyCorrections;
 DataSetFieldName=PrintOnlyCorrections }
 }
 }
 { PROPERTIES
 {
 SectionType=Header;
 PrintOnEveryPage=Yes;
 SectionWidth=18450;
 SectionHeight=423;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT((CurrReport.PAGENO = 1) AND (GLFilter <> ''));
 END;
 }
 CONTROLS
 {
 { 10 ;TextBox ;0 ;0 ;18000;423 ;SourceExpr="G/L Account".TABLECAPTION + ': ' + GLFilter;
 DataSetFieldName=G_L_Account__TABLECAPTION__________GLFilter }
 { 48 ;TextBox ;18000;0 ;150 ;423 ;Name=GLFilter;
 Visible=No;
 ForeColor=65535;
 SourceExpr=GLFilter;
 DataSetFieldName=GLFilter }
 }
 }
 { PROPERTIES
 {
 SectionType=Header;
 PrintOnEveryPage=Yes;
 SectionWidth=18450;
 SectionHeight=423;
 OnPreSection=BEGIN
 CurrReport.SHOWOUTPUT(
 (CurrReport.PAGENO = 1) AND
 (PrintClosingEntries OR (GLFilter <> '') OR NOT ExcludeBalanceOnly));
 END;
 }
 CONTROLS
 {
 }
 }
 { PROPERTIES
 {
 SectionType=Header;
 PrintOnEveryPage=Yes;
 SectionWidth=18450;
 SectionHeight=1692;
 OnPreSection=BEGIN
 rowno+=1;
 EnterCell(rowno,1,'Posting Date',TRUE,TRUE,TRUE);
 EnterCell(rowno,2,'Document No',TRUE,TRUE,TRUE);
 EnterCell(rowno,3,'Description',TRUE,TRUE,TRUE);
 EnterCell(rowno,4,'Vat amount',TRUE,TRUE,TRUE);
 EnterCell(rowno,5,'Debit amount',TRUE,TRUE,TRUE);
 EnterCell(rowno,6,'Credit amount',TRUE,TRUE,TRUE);
 EnterCell(rowno,7,'Balance',TRUE,TRUE,TRUE);
 EnterCell(rowno,8,'Entry No',TRUE,TRUE,TRUE);
 END;
 }
 CONTROLS
 {
 { 11 ;Label ;9750 ;0 ;3750 ;423 ;FontBold=Yes;
 CaptionML=ENU=Net Change;
 DataSetFieldName=Net_ChangeCaption }
 { 12 ;TextBox ;9750 ;423 ;3750 ;423 ;FontBold=Yes;
 LeaderDots=Yes;
 SourceExpr='';
 DataSetFieldName=EmptyString }
 { 13 ;Label ;0 ;846 ;1350 ;423 ;ParentControl=29;
 FontBold=Yes;
 DataSetFieldName=G_L_Entry__Posting_Date_Caption }
 { 14 ;Label ;1500 ;846 ;1500 ;423 ;ParentControl=30;
 FontBold=Yes;
 DataSetFieldName=G_L_Entry__Document_No__Caption }
 { 15 ;Label ;3150 ;846 ;4500 ;423 ;ParentControl=31;
 FontBold=Yes;
 DataSetFieldName=G_L_Entry_DescriptionCaption }
 { 16 ;Label ;7800 ;846 ;1800 ;423 ;ParentControl=32;
 HorzAlign=Right;
 FontBold=Yes;
 DataSetFieldName=G_L_Entry__VAT_Amount__Control32Caption }
 { 17 ;Label ;9750 ;846 ;1800 ;423 ;ParentControl=33;
 HorzAlign=Right;
 FontBold=Yes;
 DataSetFieldName=G_L_Entry__Debit_Amount__Control33Caption }
 { 18 ;Label ;11700;846 ;1800 ;423 ;ParentControl=34;
 HorzAlign=Right;
 FontBold=Yes;
 DataSetFieldName=G_L_Entry__Credit_Amount__Control34Caption }
 { 19 ;Label ;13650;846 ;1800 ;423 ;ParentControl=35;
 HorzAlign=Right;
 FontBold=Yes;
 DataSetFieldName=GLBalanceCaption }
 { 20 ;Label ;15600;846 ;1200 ;423 ;ParentControl=36;
 HorzAlign=Right;
 FontBold=Yes;
 DataSetFieldName=G_L_Entry__Entry_No__Caption }
 }
 }
 }
 }
 { PROPERTIES
 {
 DataItemIndent=1;
 DataItemTable=Table2000000026;
 DataItemTableView=SORTING(Number)
 WHERE(Number=CONST(1));
 DataItemVarName=PageCounter;
 OnAfterGetRecord=BEGIN
 Showout:=ExcludeBalanceOnly OR (StartBalance = 0);
 CurrReport.PRINTONLYIFDETAIL := Showout;
 IF Showout THEN BEGIN
 rowno+=1;
 EnterCell(rowno,2,FORMAT("G/L Account"."No."),FALSE,FALSE,FALSE);
 EnterCell(rowno,3,FORMAT("G/L Account".Name),FALSE,FALSE,FALSE);
 EnterCell(rowno,7,FORMAT(StartBalance),FALSE,FALSE,FALSE);
 END;
 END;
 }
 SECTIONS
 {
 { PROPERTIES
 {
 SectionType=Body;
 SectionWidth=18450;
 SectionHeight=423;
 }
 CONTROLS
 {
 { 21 ;TextBox ;0 ;0 ;1500 ;423 ;FontBold=Yes;
 SourceExpr="G/L Account"."No.";
 DataSetFieldName=G_L_Account___No__ }
 { 22 ;TextBox ;1650 ;0 ;4500 ;423 ;FontBold=Yes;
 SourceExpr="G/L Account".Name;
 DataSetFieldName=G_L_Account__Name }
 { 23 ;TextBox ;13650;0 ;1800 ;423 ;SourceExpr=StartBalance;
 AutoFormatType=1;
 DataSetFieldName=StartBalance }
 }
 }
 }
 }
 { PROPERTIES
 {
 DataItemIndent=2;
 DataItemTable=Table17;
 DataItemTableView=SORTING(G/L Account No.,Posting Date);
 OnPreDataItem=BEGIN
 GLBalance := StartBalance;
 CurrReport.CREATETOTALS(Amount,"Debit Amount","Credit Amount","VAT Amount");
 END;
 OnAfterGetRecord=BEGIN
 IF PrintOnlyCorrections THEN
 IF NOT (("Debit Amount" < 0) OR ("Credit Amount" < 0)) THEN
 CurrReport.SKIP;
 IF NOT PrintReversedEntries AND Reversed THEN
 CurrReport.SKIP;
 IF ISSERVICETIER THEN BEGIN
 GLBalance := GLBalance + Amount;
 IF ("Posting Date" = CLOSINGDATE("Posting Date")) AND
 NOT PrintClosingEntries
 THEN BEGIN
 "Debit Amount" := 0;
 "Credit Amount" := 0;
 END;
 IF ("Posting Date" = CLOSINGDATE("Posting Date")) THEN
 ClosingEntry := TRUE
 ELSE
 ClosingEntry := FALSE;
 END;
 END;
 DataItemLinkReference=G/L Account;
 DataItemLink=G/L Account No.=FIELD(No.),
 Posting Date=FIELD(Date Filter),
 Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
 Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
 Business Unit Code=FIELD(Business Unit Filter);
 }
 SECTIONS
 {
 { PROPERTIES
 {
 SectionType=TransHeader;
 SectionWidth=18450;
 SectionHeight=846;
 }
 CONTROLS
 {
 { 24 ;Label ;3150 ;0 ;4500 ;423 ;ParentControl=25;
 LeaderDots=Yes;
 DataSetFieldName=G_L_Entry__VAT_Amount_Caption }
 { 25 ;TextBox ;7800 ;0 ;1800 ;423 ;CaptionML=ENU=Continued;
 SourceExpr="VAT Amount";
 DataSetFieldName=G_L_Entry__VAT_Amount_ }
 { 26 ;TextBox ;9750 ;0 ;1800 ;423 ;BlankZero=Yes;
 SourceExpr="Debit Amount";
 DataSetFieldName=G_L_Entry__Debit_Amount_ }
 { 27 ;TextBox ;11700;0 ;1800 ;423 ;BlankZero=Yes;
 SourceExpr="Credit Amount";
 DataSetFieldName=G_L_Entry__Credit_Amount_ }
 { 28 ;TextBox ;13650;0 ;1800 ;423 ;SourceExpr=StartBalance + Amount;
 AutoFormatType=1;
 DataSetFieldName=StartBalance___Amount }
 }
 }
 { PROPERTIES
 {
 SectionType=Body;
 SectionWidth=18450;
 SectionHeight=423;
 OnPostSection=BEGIN
 GLBalance := GLBalance + Amount;
 IF ("Posting Date" = CLOSINGDATE("Posting Date")) AND
 NOT PrintClosingEntries
 THEN BEGIN
 CurrReport.SHOWOUTPUT := FALSE;
 "Debit Amount" := 0;
 "Credit Amount" := 0;
 END;
 IF CurrReport.SHOWOUTPUT THEN BEGIN
 rowno+=1;
 EnterCell(rowno,1,FORMAT("Posting Date"),FALSE,FALSE,FALSE);
 EnterCell(rowno,2,FORMAT("Document No."),FALSE,FALSE,FALSE);
 EnterCell(rowno,3,FORMAT(Description),FALSE,FALSE,FALSE);
 EnterCell(rowno,4,FORMAT("VAT Amount"),FALSE,FALSE,FALSE);
 EnterCell(rowno,5,FORMAT("Debit Amount"),FALSE,FALSE,FALSE);
 EnterCell(rowno,6,FORMAT("Credit Amount"),FALSE,FALSE,FALSE);
 EnterCell(rowno,7,FORMAT(GLBalance),FALSE,FALSE,FALSE);
 EnterCell(rowno,8,FORMAT("Entry No."),FALSE,FALSE,FALSE);
 END;
 END;
 }
 CONTROLS
 {
 { 29 ;TextBox ;0 ;0 ;1350 ;423 ;SourceExpr="Posting Date";
 DataSetFieldName=G_L_Entry__Posting_Date_ }
 { 30 ;TextBox ;1500 ;0 ;1500 ;423 ;SourceExpr="Document No.";
 DataSetFieldName=G_L_Entry__Document_No__ }
 { 31 ;TextBox ;3150 ;0 ;4500 ;423 ;SourceExpr=Description;
 DataSetFieldName=G_L_Entry_Description }
 { 32 ;TextBox ;7800 ;0 ;1800 ;423 ;SourceExpr="VAT Amount";
 DataSetFieldName=G_L_Entry__VAT_Amount__Control32 }
 { 33 ;TextBox ;9750 ;0 ;1800 ;423 ;CaptionML=ENU=Debit;
 BlankZero=Yes;
 SourceExpr="Debit Amount";
 DataSetFieldName=G_L_Entry__Debit_Amount__Control33 }
 { 34 ;TextBox ;11700;0 ;1800 ;423 ;CaptionML=ENU=Credit;
 BlankZero=Yes;
 SourceExpr="Credit Amount";
 DataSetFieldName=G_L_Entry__Credit_Amount__Control34 }
 { 35 ;TextBox ;13650;0 ;1800 ;423 ;CaptionML=ENU=Balance;
 SourceExpr=GLBalance;
 AutoFormatType=1;
 DataSetFieldName=GLBalance }
 { 36 ;TextBox ;15600;0 ;1200 ;423 ;SourceExpr="Entry No.";
 DataSetFieldName=G_L_Entry__Entry_No__ }
 { 55 ;TextBox ;18000;0 ;150 ;423 ;Visible=No;
 ForeColor=65535;
 SourceExpr=ClosingEntry;
 DataSetFieldName=ClosingEntry }
 { 56 ;TextBox ;17850;0 ;150 ;423 ;Name=GLEntryReversed;
 Visible=No;
 ForeColor=65535;
 SourceExpr="G/L Entry".Reversed;
 DataSetFieldName=GLEntryReversed }
 }
 }
 { PROPERTIES
 {
 SectionType=TransFooter;
 SectionWidth=18450;
 SectionHeight=846;
 }
 CONTROLS
 {
 { 37 ;Label ;3150 ;423 ;4500 ;423 ;ParentControl=38;
 LeaderDots=Yes;
 DataSetFieldName=G_L_Entry__VAT_Amount__Control38Caption }
 { 38 ;TextBox ;7800 ;423 ;1800 ;423 ;CaptionML=ENU=Continued;
 SourceExpr="VAT Amount";
 DataSetFieldName=G_L_Entry__VAT_Amount__Control38 }
 { 39 ;TextBox ;9750 ;423 ;1800 ;423 ;BlankZero=Yes;
 SourceExpr="Debit Amount";
 DataSetFieldName=G_L_Entry__Debit_Amount__Control39 }
 { 40 ;TextBox ;11700;423 ;1800 ;423 ;BlankZero=Yes;
 SourceExpr="Credit Amount";
 DataSetFieldName=G_L_Entry__Credit_Amount__Control40 }
 { 41 ;TextBox ;13650;423 ;1800 ;423 ;SourceExpr=StartBalance + Amount;
 AutoFormatType=1;
 DataSetFieldName=StartBalance___Amount_Control41 }
 }
 }
 }
 }
 { PROPERTIES
 {
 DataItemIndent=2;
 DataItemTable=Table2000000026;
 DataItemTableView=SORTING(Number)
 WHERE(Number=CONST(1));
 OnAfterGetRecord=BEGIN
 IF ("G/L Entry"."Debit Amount" = 0) AND
 ("G/L Entry"."Credit Amount" = 0) AND
 ((StartBalance = 0) OR ExcludeBalanceOnly)
 THEN
 CurrReport.SKIP;
 END;
 }
 SECTIONS
 {
 { PROPERTIES
 {
 SectionType=Body;
 SectionWidth=18450;
 SectionHeight=1269;
 OnPreSection=BEGIN
 rowno+=1;
 EnterCell(rowno,2,FORMAT("G/L Account".Name),TRUE,TRUE,TRUE);
 EnterCell(rowno,4,FORMAT("G/L Entry"."VAT Amount"),TRUE,TRUE,TRUE);
 EnterCell(rowno,5,FORMAT("G/L Entry"."Debit Amount"),TRUE,TRUE,TRUE);
 EnterCell(rowno,6,FORMAT("G/L Entry"."Credit Amount"),TRUE,TRUE,TRUE);
 EnterCell(rowno,7,FORMAT(StartBalance + "G/L Entry".Amount),TRUE,TRUE,TRUE);
 END;
 }
 CONTROLS
 {
 { 42 ;TextBox ;1650 ;0 ;4500 ;423 ;FontBold=Yes;
 SourceExpr="G/L Account".Name;
 DataSetFieldName=G_L_Account__Name_Control42 }
 { 46 ;TextBox ;7800 ;0 ;1800 ;423 ;FontBold=Yes;
 SourceExpr="G/L Entry"."VAT Amount";
 DataSetFieldName=G_L_Entry___VAT_Amount_ }
 { 43 ;TextBox ;9750 ;0 ;1800 ;423 ;FontBold=Yes;
 BlankZero=Yes;
 SourceExpr="G/L Entry"."Debit Amount";
 DataSetFieldName=G_L_Entry___Debit_Amount_ }
 { 44 ;TextBox ;11700;0 ;1800 ;423 ;FontBold=Yes;
 BlankZero=Yes;
 SourceExpr="G/L Entry"."Credit Amount";
 DataSetFieldName=G_L_Entry___Credit_Amount_ }
 { 45 ;TextBox ;13650;0 ;1800 ;423 ;FontBold=Yes;
 SourceExpr=StartBalance + "G/L Entry".Amount;
 AutoFormatType=1;
 DataSetFieldName=StartBalance____G_L_Entry__Amount }
 }
 }
 }
 }
 }
 REQUESTFORM
 {
 PROPERTIES
 {
 Width=4730;
 Height=4730;
 SaveValues=Yes;
 }
 CONTROLS
 {
 { 1 ;CheckBox ;3410 ;0 ;440 ;440 ;InPage=-1;
 ShowCaption=No;
 CaptionML=ENU=New Page per G/L Acc.;
 SourceExpr=PrintOnlyOnePerPage }
 { 21 ;Label ;0 ;0 ;3300 ;440 ;ParentControl=1 }
 { 2 ;CheckBox ;3410 ;990 ;440 ;440 ;InPage=-1;
 ShowCaption=No;
 CaptionML=ENU=Exclude G/L Accs. That Have a Balance Only;
 SourceExpr=ExcludeBalanceOnly }
 { 22 ;Label ;0 ;550 ;3300 ;880 ;ParentControl=2;
 VertAlign=Bottom;
 MultiLine=Yes }
 { 3 ;CheckBox ;3410 ;1980 ;440 ;440 ;InPage=-1;
 ShowCaption=No;
 CaptionML=ENU=Include Closing Entries Within the Period;
 SourceExpr=PrintClosingEntries }
 { 23 ;Label ;0 ;1540 ;3300 ;880 ;ParentControl=3;
 VertAlign=Bottom;
 MultiLine=Yes }
 { 4 ;CheckBox ;3410 ;3080 ;440 ;440 ;InPage=-1;
 ShowCaption=No;
 CaptionML=ENU=Print Corrections Only;
 SourceExpr=PrintOnlyCorrections }
 { 5 ;Label ;0 ;3080 ;3300 ;440 ;ParentControl=4 }
 { 6 ;CheckBox ;3410 ;2530 ;440 ;440 ;InPage=-1;
 ShowCaption=No;
 CaptionML=ENU=Include Reversed Entries;
 SourceExpr=PrintReversedEntries }
 { 7 ;Label ;0 ;2530 ;3300 ;440 ;ParentControl=6 }
 { 1102156000;CheckBox;3300;3850 ;440 ;440 ;ShowCaption=No;
 SourceExpr=PrintToExcel }
 { 1102156001;Label ;0 ;3740 ;2860 ;440 ;ParentControl=1102156000 }
 }
 }
 REQUESTPAGE
 {
 PROPERTIES
 {
 SaveValues=Yes;
 }
 CONTROLS
 {
 { 1900000001;0;Container;
 ContainerType=ContentArea }
 { 1900000002;1;Group ;
 CaptionML=ENU=Options }
 { 1 ;2 ;Field ;
 CaptionML=ENU=New Page per G/L Acc.;
 SourceExpr=PrintOnlyOnePerPage }
 { 2 ;2 ;Field ;
 CaptionML=ENU=Exclude G/L Accs. That Have a Balance Only;
 SourceExpr=ExcludeBalanceOnly;
 MultiLine=Yes }
 { 3 ;2 ;Field ;
 CaptionML=ENU=Include Closing Entries Within the Period;
 SourceExpr=PrintClosingEntries;
 MultiLine=Yes }
 { 6 ;2 ;Field ;
 CaptionML=ENU=Include Reversed Entries;
 SourceExpr=PrintReversedEntries }
 { 4 ;2 ;Field ;
 CaptionML=ENU=Print Corrections Only;
 SourceExpr=PrintOnlyCorrections }
 }
 }
 CODE
 {
 VAR
 Text000@1000 : TextConst 'ENU=Period: %1';
 GLDateFilter@1001 : Text[30];
 GLFilter@1002 : Text[250];
 GLBalance@1003 : Decimal;
 StartBalance@1004 : Decimal;
 PrintOnlyOnePerPage@1005 : Boolean;
 ExcludeBalanceOnly@1006 : Boolean;
 PrintClosingEntries@1007 : Boolean;
 PrintOnlyCorrections@1008 : Boolean;
 PrintReversedEntries@1009 : Boolean;
 PageGroupNo@1010 : Integer;
 GLEntryPage@1011 : Record 17;
 ClosingEntry@1012 : Boolean;
 PrintToExcel@1102156000 : Boolean;
 TempExcelBuffer@1102156001 : TEMPORARY Record 370;
 rowno@1102156002 : Integer;
 Showout@1102156003 : Boolean;
 PROCEDURE EnterCell@1102156001(RowNo@1102156005 : Integer;ColumnNo@1102156004 : Integer;CellValue@1102156003 : Text[250];Bold@1102156002 : Boolean;Italic@1102156001 : Boolean;UnderLine@1102156000 : Boolean);
 BEGIN
 TempExcelBuffer.INIT;
 TempExcelBuffer.VALIDATE("Row No.",RowNo);
 TempExcelBuffer.VALIDATE("Column No.",ColumnNo);
 TempExcelBuffer."Cell Value as Text" := CellValue;
 TempExcelBuffer.Formula := '';
 TempExcelBuffer.Bold := Bold;
 TempExcelBuffer.Italic := Italic;
 TempExcelBuffer.Underline := UnderLine;
 TempExcelBuffer.INSERT;
 END;
 BEGIN
 END.
 }
 RDLDATA
 {
 <?xml version="1.0" encoding="utf-8"?>
 <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
 <Body>
 <Height>5.922cm</Height>
 </Body>
 <BottomMargin>2cm</BottomMargin>
 <Code>Public Function BlankZero(ByVal Value As Decimal)
 if Value = 0 then
 Return ""
 end if
 Return Value
 End Function
 Public Function BlankPos(ByVal Value As Decimal)
 if Value > 0 then
 Return ""
 end if
 Return Value
 End Function
 Public Function BlankZeroAndPos(ByVal Value As Decimal)
 if Value >= 0 then
 Return ""
 end if
 Return Value
 End Function
 Public Function BlankNeg(ByVal Value As Decimal)
 if Value < 0 then
 Return ""
 end if
 Return Value
 End Function
 Public Function BlankNegAndZero(ByVal Value As Decimal)
 if Value <= 0 then
 Return ""
 end if
 Return Value
 End Function
 </Code>
 <DataSets>
 <DataSet Name="DataSet_Result">
 <Fields>
 <Field Name="Detail_Trial_BalanceCaption">
 <DataField>Detail_Trial_BalanceCaption</DataField>
 </Field>
 <Field Name="FORMAT_TODAY_0_4_">
 <DataField>FORMAT_TODAY_0_4_</DataField>
 </Field>
 <Field Name="STRSUBSTNO_Text000_GLDateFilter_">
 <DataField>STRSUBSTNO_Text000_GLDateFilter_</DataField>
 </Field>
 <Field Name="CurrReport_PAGENOCaption">
 <DataField>CurrReport_PAGENOCaption</DataField>
 </Field>
 <Field Name="CurrReport_PAGENO">
 <DataField>CurrReport_PAGENO</DataField>
 </Field>
 <Field Name="COMPANYNAME">
 <DataField>COMPANYNAME</DataField>
 </Field>
 <Field Name="USERID">
 <DataField>USERID</DataField>
 </Field>
 <Field Name="This_also_includes_G_L_accounts_that_only_have_a_balance_Caption">
 <DataField>This_also_includes_G_L_accounts_that_only_have_a_balance_Caption</DataField>
 </Field>
 <Field Name="ExcludeBalanceOnly">
 <DataField>ExcludeBalanceOnly</DataField>
 </Field>
 <Field Name="PrintOnlyOnePerPage">
 <DataField>PrintOnlyOnePerPage</DataField>
 </Field>
 <Field Name="PrintReversedEntries">
 <DataField>PrintReversedEntries</DataField>
 </Field>
 <Field Name="PageGroupNo">
 <DataField>PageGroupNo</DataField>
 </Field>
 <Field Name="This_report_also_includes_closing_entries_within_the_period_Caption">
 <DataField>This_report_also_includes_closing_entries_within_the_period_Caption</DataField>
 </Field>
 <Field Name="PrintClosingEntries">
 <DataField>PrintClosingEntries</DataField>
 </Field>
 <Field Name="Only_corrections_are_included_Caption">
 <DataField>Only_corrections_are_included_Caption</DataField>
 </Field>
 <Field Name="PrintOnlyCorrections">
 <DataField>PrintOnlyCorrections</DataField>
 </Field>
 <Field Name="G_L_Account__TABLECAPTION__________GLFilter">
 <DataField>G_L_Account__TABLECAPTION__________GLFilter</DataField>
 </Field>
 <Field Name="GLFilter">
 <DataField>GLFilter</DataField>
 </Field>
 <Field Name="Net_ChangeCaption">
 <DataField>Net_ChangeCaption</DataField>
 </Field>
 <Field Name="EmptyString">
 <DataField>EmptyString</DataField>
 </Field>
 <Field Name="G_L_Entry__Posting_Date_Caption">
 <DataField>G_L_Entry__Posting_Date_Caption</DataField>
 </Field>
 <Field Name="G_L_Entry__Document_No__Caption">
 <DataField>G_L_Entry__Document_No__Caption</DataField>
 </Field>
 <Field Name="G_L_Entry_DescriptionCaption">
 <DataField>G_L_Entry_DescriptionCaption</DataField>
 </Field>
 <Field Name="G_L_Entry__VAT_Amount__Control32Caption">
 <DataField>G_L_Entry__VAT_Amount__Control32Caption</DataField>
 </Field>
 <Field Name="G_L_Entry__Debit_Amount__Control33Caption">
 <DataField>G_L_Entry__Debit_Amount__Control33Caption</DataField>
 </Field>
 <Field Name="G_L_Entry__Credit_Amount__Control34Caption">
 <DataField>G_L_Entry__Credit_Amount__Control34Caption</DataField>
 </Field>
 <Field Name="GLBalanceCaption">
 <DataField>GLBalanceCaption</DataField>
 </Field>
 <Field Name="G_L_Entry__Entry_No__Caption">
 <DataField>G_L_Entry__Entry_No__Caption</DataField>
 </Field>
 <Field Name="G_L_Account_No_">
 <DataField>G_L_Account_No_</DataField>
 </Field>
 <Field Name="G_L_Account_Date_Filter">
 <DataField>G_L_Account_Date_Filter</DataField>
 </Field>
 <Field Name="G_L_Account_Global_Dimension_1_Filter">
 <DataField>G_L_Account_Global_Dimension_1_Filter</DataField>
 </Field>
 <Field Name="G_L_Account_Global_Dimension_2_Filter">
 <DataField>G_L_Account_Global_Dimension_2_Filter</DataField>
 </Field>
 <Field Name="G_L_Account_Business_Unit_Filter">
 <DataField>G_L_Account_Business_Unit_Filter</DataField>
 </Field>
 <Field Name="G_L_Account___No__">
 <DataField>G_L_Account___No__</DataField>
 </Field>
 <Field Name="G_L_Account__Name">
 <DataField>G_L_Account__Name</DataField>
 </Field>
 <Field Name="StartBalance">
 <DataField>StartBalance</DataField>
 </Field>
 <Field Name="StartBalanceFormat">
 <DataField>StartBalanceFormat</DataField>
 </Field>
 <Field Name="G_L_Entry__VAT_Amount_Caption">
 <DataField>G_L_Entry__VAT_Amount_Caption</DataField>
 </Field>
 <Field Name="G_L_Entry__VAT_Amount_">
 <DataField>G_L_Entry__VAT_Amount_</DataField>
 </Field>
 <Field Name="G_L_Entry__VAT_Amount_Format">
 <DataField>G_L_Entry__VAT_Amount_Format</DataField>
 </Field>
 <Field Name="G_L_Entry__Debit_Amount_">
 <DataField>G_L_Entry__Debit_Amount_</DataField>
 </Field>
 <Field Name="G_L_Entry__Debit_Amount_Format">
 <DataField>G_L_Entry__Debit_Amount_Format</DataField>
 </Field>
 <Field Name="G_L_Entry__Credit_Amount_">
 <DataField>G_L_Entry__Credit_Amount_</DataField>
 </Field>
 <Field Name="G_L_Entry__Credit_Amount_Format">
 <DataField>G_L_Entry__Credit_Amount_Format</DataField>
 </Field>
 <Field Name="StartBalance___Amount">
 <DataField>StartBalance___Amount</DataField>
 </Field>
 <Field Name="StartBalance___AmountFormat">
 <DataField>StartBalance___AmountFormat</DataField>
 </Field>
 <Field Name="G_L_Entry__Posting_Date_">
 <DataField>G_L_Entry__Posting_Date_</DataField>
 </Field>
 <Field Name="G_L_Entry__Document_No__">
 <DataField>G_L_Entry__Document_No__</DataField>
 </Field>
 <Field Name="G_L_Entry_Description">
 <DataField>G_L_Entry_Description</DataField>
 </Field>
 <Field Name="G_L_Entry__VAT_Amount__Control32Format">
 <DataField>G_L_Entry__VAT_Amount__Control32Format</DataField>
 </Field>
 <Field Name="G_L_Entry__Debit_Amount__Control33Format">
 <DataField>G_L_Entry__Debit_Amount__Control33Format</DataField>
 </Field>
 <Field Name="G_L_Entry__Credit_Amount__Control34Format">
 <DataField>G_L_Entry__Credit_Amount__Control34Format</DataField>
 </Field>
 <Field Name="GLBalance">
 <DataField>GLBalance</DataField>
 </Field>
 <Field Name="GLBalanceFormat">
 <DataField>GLBalanceFormat</DataField>
 </Field>
 <Field Name="G_L_Entry__Entry_No__">
 <DataField>G_L_Entry__Entry_No__</DataField>
 </Field>
 <Field Name="ClosingEntry">
 <DataField>ClosingEntry</DataField>
 </Field>
 <Field Name="GLEntryReversed">
 <DataField>GLEntryReversed</DataField>
 </Field>
 <Field Name="G_L_Entry__VAT_Amount__Control38Caption">
 <DataField>G_L_Entry__VAT_Amount__Control38Caption</DataField>
 </Field>
 <Field Name="G_L_Entry__VAT_Amount__Control38Format">
 <DataField>G_L_Entry__VAT_Amount__Control38Format</DataField>
 </Field>
 <Field Name="G_L_Entry__Debit_Amount__Control39Format">
 <DataField>G_L_Entry__Debit_Amount__Control39Format</DataField>
 </Field>
 <Field Name="G_L_Entry__Credit_Amount__Control40Format">
 <DataField>G_L_Entry__Credit_Amount__Control40Format</DataField>
 </Field>
 <Field Name="StartBalance___Amount_Control41Format">
 <DataField>StartBalance___Amount_Control41Format</DataField>
 </Field>
 <Field Name="G_L_Entry_G_L_Account_No_">
 <DataField>G_L_Entry_G_L_Account_No_</DataField>
 </Field>
 <Field Name="G_L_Entry_Global_Dimension_1_Code">
 <DataField>G_L_Entry_Global_Dimension_1_Code</DataField>
 </Field>
 <Field Name="G_L_Entry_Global_Dimension_2_Code">
 <DataField>G_L_Entry_Global_Dimension_2_Code</DataField>
 </Field>
 <Field Name="G_L_Entry_Business_Unit_Code">
 <DataField>G_L_Entry_Business_Unit_Code</DataField>
 </Field>
 <Field Name="G_L_Account__Name_Control42">
 <DataField>G_L_Account__Name_Control42</DataField>
 </Field>
 <Field Name="G_L_Entry___VAT_Amount_">
 <DataField>G_L_Entry___VAT_Amount_</DataField>
 </Field>
 <Field Name="G_L_Entry___VAT_Amount_Format">
 <DataField>G_L_Entry___VAT_Amount_Format</DataField>
 </Field>
 <Field Name="G_L_Entry___Debit_Amount_">
 <DataField>G_L_Entry___Debit_Amount_</DataField>
 </Field>
 <Field Name="G_L_Entry___Debit_Amount_Format">
 <DataField>G_L_Entry___Debit_Amount_Format</DataField>
 </Field>
 <Field Name="G_L_Entry___Credit_Amount_">
 <DataField>G_L_Entry___Credit_Amount_</DataField>
 </Field>
 <Field Name="G_L_Entry___Credit_Amount_Format">
 <DataField>G_L_Entry___Credit_Amount_Format</DataField>
 </Field>
 <Field Name="StartBalance____G_L_Entry__Amount">
 <DataField>StartBalance____G_L_Entry__Amount</DataField>
 </Field>
 <Field Name="StartBalance____G_L_Entry__AmountFormat">
 <DataField>StartBalance____G_L_Entry__AmountFormat</DataField>
 </Field>
 </Fields>
 <Query>
 <CommandText />
 <DataSourceName>DummyDataSource</DataSourceName>
 </Query>
 <rd:DataSetInfo>
 <rd:DataSetName>DataSet</rd:DataSetName>
 <rd:TableName>Result</rd:TableName>
 </rd:DataSetInfo>
 </DataSet>
 </DataSets>
 <DataSources>
 <DataSource Name="DummyDataSource">
 <ConnectionProperties>
 <ConnectString />
 <DataProvider>SQL</DataProvider>
 </ConnectionProperties>
 <rd:DataSourceID>c396a512-e01c-4416-83e6-146281d0d75b</rd:DataSourceID>
 </DataSource>
 </DataSources>
 <InteractiveHeight>11in</InteractiveHeight>
 <InteractiveWidth>8.5in</InteractiveWidth>
 <Language>=User!Language</Language>
 <LeftMargin>1.5cm</LeftMargin>
 <PageHeight>29.7cm</PageHeight>
 <PageWidth>21cm</PageWidth>
 <TopMargin>2cm</TopMargin>
 <Width>18.15cm</Width>
 <rd:DrawGrid>true</rd:DrawGrid>
 <rd:ReportID>62e8f68c-8a67-4807-9608-4433fc5e1619</rd:ReportID>
 <rd:SnapToGrid>true</rd:SnapToGrid>
 </Report>
 END_OF_RDLDatA
 }
 }0
- 
            I couldn't import the object. You have to put text into a code tag. Otherwise the file may be corrupted.
 As far as I can see in your code: you have to add a CurrReport.SKIP when your showout variable is false. You do not need to assign it to PrintOnlyIfDetail property. You can replace this part as:Showout:=ExcludeBalanceOnly OR (StartBalance = 0); IF Showout THEN BEGIN rowno+=1; EnterCell(rowno,2,FORMAT("G/L Account"."No."),FALSE,FALSE,FALSE); EnterCell(rowno,3,FORMAT("G/L Account".Name),FALSE,FALSE,FALSE); EnterCell(rowno,7,FORMAT(StartBalance),FALSE,FALSE,FALSE); END ELSE CurrReport.Skip;Ufuk Asci
 Pargesoft0
- 
            tried above suggestion but not workedOBJECT Report 60014 Detail Trial Balanceo { OBJECT-PROPERTIES { Date=17-08-12; Time=04:47:54; Modified=Yes; Version List=NAVW16.00.01; } PROPERTIES { CaptionML=ENU=Detail Trial Balance; OnPreReport=BEGIN GLFilter := "G/L Account".GETFILTERS; GLDateFilter := "G/L Account".GETFILTER("Date Filter"); END; OnPostReport=BEGIN IF PrintToExcel THEN BEGIN TempExcelBuffer.CreateBook; TempExcelBuffer.CreateSheet('Createsheet','Trail Balance',COMPANYNAME,USERID); TempExcelBuffer.GiveUserControl; END; END; } DATAITEMS { { PROPERTIES { DataItemTable=Table15; DataItemTableView=WHERE(Account Type=CONST(Posting)); PrintOnlyIfDetail=Yes; OnPreDataItem=BEGIN IF ISSERVICETIER THEN PageGroupNo := 1; CurrReport.NEWPAGEPERRECORD := PrintOnlyOnePerPage; END; OnAfterGetRecord=BEGIN StartBalance := 0; IF GLDateFilter <> '' THEN IF GETRANGEMIN("Date Filter") <> 0D THEN BEGIN SETRANGE("Date Filter",0D,CLOSINGDATE(GETRANGEMIN("Date Filter") - 1)); CALCFIELDS("Net Change"); StartBalance := "Net Change"; SETFILTER("Date Filter",GLDateFilter); END; IF ISSERVICETIER THEN BEGIN IF PrintOnlyOnePerPage THEN BEGIN GLEntryPage.RESET; GLEntryPage.SETRANGE("G/L Account No.", "G/L Account"."No."); IF CurrReport.PRINTONLYIFDETAIL AND GLEntryPage.FIND('-') THEN PageGroupNo := PageGroupNo + 1; END; END; END; ReqFilterFields=No.,Search Name,Income/Balance,Debit/Credit,Date Filter; } SECTIONS { { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18450; SectionHeight=1692; } CONTROLS { { 1 ;Label ;0 ;0 ;7500 ;423 ;FontSize=8; FontBold=Yes; CaptionML=ENU=Detail Trial Balance; DataSetFieldName=Detail_Trial_BalanceCaption } { 2 ;TextBox ;15000;0 ;3150 ;423 ;HorzAlign=Right; SourceExpr=FORMAT(TODAY,0,4); DataSetFieldName=FORMAT_TODAY_0_4_ } { 3 ;TextBox ;0 ;423 ;7500 ;423 ;SourceExpr=STRSUBSTNO(Text000,GLDateFilter); DataSetFieldName=STRSUBSTNO_Text000_GLDateFilter_ } { 4 ;Label ;16950;423 ;750 ;423 ;ParentControl=5; DataSetFieldName=CurrReport_PAGENOCaption } { 5 ;TextBox ;17700;423 ;450 ;423 ;CaptionML=ENU=Page; SourceExpr=CurrReport.PAGENO; DataSetFieldName=CurrReport_PAGENO } { 6 ;TextBox ;0 ;846 ;7500 ;423 ;SourceExpr=COMPANYNAME; DataSetFieldName=COMPANYNAME } { 7 ;TextBox ;15900;846 ;2250 ;423 ;HorzAlign=Right; SourceExpr=USERID; DataSetFieldName=USERID } } } { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18450; SectionHeight=423; OnPreSection=BEGIN CurrReport.SHOWOUTPUT((CurrReport.PAGENO = 1) AND NOT ExcludeBalanceOnly); END; } CONTROLS { { 8 ;Label ;0 ;0 ;12000;423 ;CaptionML=ENU=This also includes G/L accounts that only have a balance.; DataSetFieldName=This_also_includes_G_L_accounts_that_only_have_a_balance_Caption } { 49 ;TextBox ;18000;0 ;150 ;423 ;Name=ExcludeBalanceOnly; Visible=No; ForeColor=65535; SourceExpr=ExcludeBalanceOnly; DataSetFieldName=ExcludeBalanceOnly } { 53 ;TextBox ;17000;0 ;150 ;423 ;Name=PrintOnlyOnePerPage; Visible=No; ForeColor=65535; SourceExpr=PrintOnlyOnePerPage; DataSetFieldName=PrintOnlyOnePerPage } { 54 ;TextBox ;17150;0 ;150 ;423 ;Name=PrintReversedEntries; Visible=No; ForeColor=65535; SourceExpr=PrintReversedEntries; DataSetFieldName=PrintReversedEntries } { 50 ;TextBox ;16850;0 ;150 ;423 ;Name=PageGroupNo; Visible=No; ForeColor=65535; SourceExpr=PageGroupNo; DataSetFieldName=PageGroupNo } } } { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18450; SectionHeight=423; OnPreSection=BEGIN CurrReport.SHOWOUTPUT((CurrReport.PAGENO = 1) AND PrintClosingEntries); END; } CONTROLS { { 9 ;Label ;0 ;0 ;12000;423 ;CaptionML=ENU=This report also includes closing entries within the period.; DataSetFieldName=This_report_also_includes_closing_entries_within_the_period_Caption } { 51 ;TextBox ;18000;0 ;150 ;423 ;Name=PrintClosingEntries; Visible=No; ForeColor=65535; SourceExpr=PrintClosingEntries; DataSetFieldName=PrintClosingEntries } } } { PROPERTIES { SectionType=Header; SectionWidth=18450; SectionHeight=423; OnPreSection=BEGIN CurrReport.SHOWOUTPUT((CurrReport.PAGENO = 1) AND PrintOnlyCorrections); END; } CONTROLS { { 47 ;Label ;0 ;0 ;12000;423 ;CaptionML=ENU=Only corrections are included.; DataSetFieldName=Only_corrections_are_included_Caption } { 52 ;TextBox ;18000;0 ;150 ;423 ;Name=PrintOnlyCorrections; Visible=No; ForeColor=65535; SourceExpr=PrintOnlyCorrections; DataSetFieldName=PrintOnlyCorrections } } } { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18450; SectionHeight=423; OnPreSection=BEGIN CurrReport.SHOWOUTPUT((CurrReport.PAGENO = 1) AND (GLFilter <> '')); END; } CONTROLS { { 10 ;TextBox ;0 ;0 ;18000;423 ;SourceExpr="G/L Account".TABLECAPTION + ': ' + GLFilter; DataSetFieldName=G_L_Account__TABLECAPTION__________GLFilter } { 48 ;TextBox ;18000;0 ;150 ;423 ;Name=GLFilter; Visible=No; ForeColor=65535; SourceExpr=GLFilter; DataSetFieldName=GLFilter } } } { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18450; SectionHeight=423; OnPreSection=BEGIN CurrReport.SHOWOUTPUT( (CurrReport.PAGENO = 1) AND (PrintClosingEntries OR (GLFilter <> '') OR NOT ExcludeBalanceOnly)); END; } CONTROLS { } } { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18450; SectionHeight=1692; OnPreSection=BEGIN rowno+=1; EnterCell(rowno,1,'Posting Date',TRUE,TRUE,TRUE); EnterCell(rowno,2,'Document No',TRUE,TRUE,TRUE); EnterCell(rowno,3,'Description',TRUE,TRUE,TRUE); EnterCell(rowno,4,'Vat amount',TRUE,TRUE,TRUE); EnterCell(rowno,5,'Debit amount',TRUE,TRUE,TRUE); EnterCell(rowno,6,'Credit amount',TRUE,TRUE,TRUE); EnterCell(rowno,7,'Balance',TRUE,TRUE,TRUE); EnterCell(rowno,8,'Entry No',TRUE,TRUE,TRUE); END; } CONTROLS { { 11 ;Label ;9750 ;0 ;3750 ;423 ;FontBold=Yes; CaptionML=ENU=Net Change; DataSetFieldName=Net_ChangeCaption } { 12 ;TextBox ;9750 ;423 ;3750 ;423 ;FontBold=Yes; LeaderDots=Yes; SourceExpr=''; DataSetFieldName=EmptyString } { 13 ;Label ;0 ;846 ;1350 ;423 ;ParentControl=29; FontBold=Yes; DataSetFieldName=G_L_Entry__Posting_Date_Caption } { 14 ;Label ;1500 ;846 ;1500 ;423 ;ParentControl=30; FontBold=Yes; DataSetFieldName=G_L_Entry__Document_No__Caption } { 15 ;Label ;3150 ;846 ;4500 ;423 ;ParentControl=31; FontBold=Yes; DataSetFieldName=G_L_Entry_DescriptionCaption } { 16 ;Label ;7800 ;846 ;1800 ;423 ;ParentControl=32; HorzAlign=Right; FontBold=Yes; DataSetFieldName=G_L_Entry__VAT_Amount__Control32Caption } { 17 ;Label ;9750 ;846 ;1800 ;423 ;ParentControl=33; HorzAlign=Right; FontBold=Yes; DataSetFieldName=G_L_Entry__Debit_Amount__Control33Caption } { 18 ;Label ;11700;846 ;1800 ;423 ;ParentControl=34; HorzAlign=Right; FontBold=Yes; DataSetFieldName=G_L_Entry__Credit_Amount__Control34Caption } { 19 ;Label ;13650;846 ;1800 ;423 ;ParentControl=35; HorzAlign=Right; FontBold=Yes; DataSetFieldName=GLBalanceCaption } { 20 ;Label ;15600;846 ;1200 ;423 ;ParentControl=36; HorzAlign=Right; FontBold=Yes; DataSetFieldName=G_L_Entry__Entry_No__Caption } } } } } { PROPERTIES { DataItemIndent=1; DataItemTable=Table2000000026; DataItemTableView=SORTING(Number) WHERE(Number=CONST(1)); DataItemVarName=PageCounter; OnAfterGetRecord=BEGIN Showout:=ExcludeBalanceOnly OR (StartBalance = 0); CurrReport.PRINTONLYIFDETAIL := Showout; IF Showout THEN BEGIN rowno+=1; EnterCell(rowno,2,FORMAT("G/L Account"."No."),FALSE,FALSE,FALSE); EnterCell(rowno,3,FORMAT("G/L Account".Name),FALSE,FALSE,FALSE); EnterCell(rowno,7,FORMAT(StartBalance),FALSE,FALSE,FALSE); END ELSE CurrReport.SKIP; END; } SECTIONS { { PROPERTIES { SectionType=Body; SectionWidth=18450; SectionHeight=423; } CONTROLS { { 21 ;TextBox ;0 ;0 ;1500 ;423 ;FontBold=Yes; SourceExpr="G/L Account"."No."; DataSetFieldName=G_L_Account___No__ } { 22 ;TextBox ;1650 ;0 ;4500 ;423 ;FontBold=Yes; SourceExpr="G/L Account".Name; DataSetFieldName=G_L_Account__Name } { 23 ;TextBox ;13650;0 ;1800 ;423 ;SourceExpr=StartBalance; AutoFormatType=1; DataSetFieldName=StartBalance } } } } } { PROPERTIES { DataItemIndent=2; DataItemTable=Table17; DataItemTableView=SORTING(G/L Account No.,Posting Date); OnPreDataItem=BEGIN GLBalance := StartBalance; CurrReport.CREATETOTALS(Amount,"Debit Amount","Credit Amount","VAT Amount"); END; OnAfterGetRecord=BEGIN IF PrintOnlyCorrections THEN IF NOT (("Debit Amount" < 0) OR ("Credit Amount" < 0)) THEN CurrReport.SKIP; IF NOT PrintReversedEntries AND Reversed THEN CurrReport.SKIP; IF ISSERVICETIER THEN BEGIN GLBalance := GLBalance + Amount; IF ("Posting Date" = CLOSINGDATE("Posting Date")) AND NOT PrintClosingEntries THEN BEGIN "Debit Amount" := 0; "Credit Amount" := 0; END; IF ("Posting Date" = CLOSINGDATE("Posting Date")) THEN ClosingEntry := TRUE ELSE ClosingEntry := FALSE; END; END; DataItemLinkReference=G/L Account; DataItemLink=G/L Account No.=FIELD(No.), Posting Date=FIELD(Date Filter), Global Dimension 1 Code=FIELD(Global Dimension 1 Filter), Global Dimension 2 Code=FIELD(Global Dimension 2 Filter), Business Unit Code=FIELD(Business Unit Filter); } SECTIONS { { PROPERTIES { SectionType=TransHeader; SectionWidth=18450; SectionHeight=846; } CONTROLS { { 24 ;Label ;3150 ;0 ;4500 ;423 ;ParentControl=25; LeaderDots=Yes; DataSetFieldName=G_L_Entry__VAT_Amount_Caption } { 25 ;TextBox ;7800 ;0 ;1800 ;423 ;CaptionML=ENU=Continued; SourceExpr="VAT Amount"; DataSetFieldName=G_L_Entry__VAT_Amount_ } { 26 ;TextBox ;9750 ;0 ;1800 ;423 ;BlankZero=Yes; SourceExpr="Debit Amount"; DataSetFieldName=G_L_Entry__Debit_Amount_ } { 27 ;TextBox ;11700;0 ;1800 ;423 ;BlankZero=Yes; SourceExpr="Credit Amount"; DataSetFieldName=G_L_Entry__Credit_Amount_ } { 28 ;TextBox ;13650;0 ;1800 ;423 ;SourceExpr=StartBalance + Amount; AutoFormatType=1; DataSetFieldName=StartBalance___Amount } } } { PROPERTIES { SectionType=Body; SectionWidth=18450; SectionHeight=423; OnPostSection=BEGIN GLBalance := GLBalance + Amount; IF ("Posting Date" = CLOSINGDATE("Posting Date")) AND NOT PrintClosingEntries THEN BEGIN CurrReport.SHOWOUTPUT := FALSE; "Debit Amount" := 0; "Credit Amount" := 0; END; IF CurrReport.SHOWOUTPUT THEN BEGIN rowno+=1; EnterCell(rowno,1,FORMAT("Posting Date"),FALSE,FALSE,FALSE); EnterCell(rowno,2,FORMAT("Document No."),FALSE,FALSE,FALSE); EnterCell(rowno,3,FORMAT(Description),FALSE,FALSE,FALSE); EnterCell(rowno,4,FORMAT("VAT Amount"),FALSE,FALSE,FALSE); EnterCell(rowno,5,FORMAT("Debit Amount"),FALSE,FALSE,FALSE); EnterCell(rowno,6,FORMAT("Credit Amount"),FALSE,FALSE,FALSE); EnterCell(rowno,7,FORMAT(GLBalance),FALSE,FALSE,FALSE); EnterCell(rowno,8,FORMAT("Entry No."),FALSE,FALSE,FALSE); END; END; } CONTROLS { { 29 ;TextBox ;0 ;0 ;1350 ;423 ;SourceExpr="Posting Date"; DataSetFieldName=G_L_Entry__Posting_Date_ } { 30 ;TextBox ;1500 ;0 ;1500 ;423 ;SourceExpr="Document No."; DataSetFieldName=G_L_Entry__Document_No__ } { 31 ;TextBox ;3150 ;0 ;4500 ;423 ;SourceExpr=Description; DataSetFieldName=G_L_Entry_Description } { 32 ;TextBox ;7800 ;0 ;1800 ;423 ;SourceExpr="VAT Amount"; DataSetFieldName=G_L_Entry__VAT_Amount__Control32 } { 33 ;TextBox ;9750 ;0 ;1800 ;423 ;CaptionML=ENU=Debit; BlankZero=Yes; SourceExpr="Debit Amount"; DataSetFieldName=G_L_Entry__Debit_Amount__Control33 } { 34 ;TextBox ;11700;0 ;1800 ;423 ;CaptionML=ENU=Credit; BlankZero=Yes; SourceExpr="Credit Amount"; DataSetFieldName=G_L_Entry__Credit_Amount__Control34 } { 35 ;TextBox ;13650;0 ;1800 ;423 ;CaptionML=ENU=Balance; SourceExpr=GLBalance; AutoFormatType=1; DataSetFieldName=GLBalance } { 36 ;TextBox ;15600;0 ;1200 ;423 ;SourceExpr="Entry No."; DataSetFieldName=G_L_Entry__Entry_No__ } { 55 ;TextBox ;18000;0 ;150 ;423 ;Visible=No; ForeColor=65535; SourceExpr=ClosingEntry; DataSetFieldName=ClosingEntry } { 56 ;TextBox ;17850;0 ;150 ;423 ;Name=GLEntryReversed; Visible=No; ForeColor=65535; SourceExpr="G/L Entry".Reversed; DataSetFieldName=GLEntryReversed } } } { PROPERTIES { SectionType=TransFooter; SectionWidth=18450; SectionHeight=846; } CONTROLS { { 37 ;Label ;3150 ;423 ;4500 ;423 ;ParentControl=38; LeaderDots=Yes; DataSetFieldName=G_L_Entry__VAT_Amount__Control38Caption } { 38 ;TextBox ;7800 ;423 ;1800 ;423 ;CaptionML=ENU=Continued; SourceExpr="VAT Amount"; DataSetFieldName=G_L_Entry__VAT_Amount__Control38 } { 39 ;TextBox ;9750 ;423 ;1800 ;423 ;BlankZero=Yes; SourceExpr="Debit Amount"; DataSetFieldName=G_L_Entry__Debit_Amount__Control39 } { 40 ;TextBox ;11700;423 ;1800 ;423 ;BlankZero=Yes; SourceExpr="Credit Amount"; DataSetFieldName=G_L_Entry__Credit_Amount__Control40 } { 41 ;TextBox ;13650;423 ;1800 ;423 ;SourceExpr=StartBalance + Amount; AutoFormatType=1; DataSetFieldName=StartBalance___Amount_Control41 } } } } } { PROPERTIES { DataItemIndent=2; DataItemTable=Table2000000026; DataItemTableView=SORTING(Number) WHERE(Number=CONST(1)); OnAfterGetRecord=BEGIN IF ("G/L Entry"."Debit Amount" = 0) AND ("G/L Entry"."Credit Amount" = 0) AND ((StartBalance = 0) OR ExcludeBalanceOnly) THEN CurrReport.SKIP; END; } SECTIONS { { PROPERTIES { SectionType=Body; SectionWidth=18450; SectionHeight=1269; OnPreSection=BEGIN rowno+=1; EnterCell(rowno,2,FORMAT("G/L Account".Name),TRUE,TRUE,TRUE); EnterCell(rowno,4,FORMAT("G/L Entry"."VAT Amount"),TRUE,TRUE,TRUE); EnterCell(rowno,5,FORMAT("G/L Entry"."Debit Amount"),TRUE,TRUE,TRUE); EnterCell(rowno,6,FORMAT("G/L Entry"."Credit Amount"),TRUE,TRUE,TRUE); EnterCell(rowno,7,FORMAT(StartBalance + "G/L Entry".Amount),TRUE,TRUE,TRUE); END; } CONTROLS { { 42 ;TextBox ;1650 ;0 ;4500 ;423 ;FontBold=Yes; SourceExpr="G/L Account".Name; DataSetFieldName=G_L_Account__Name_Control42 } { 46 ;TextBox ;7800 ;0 ;1800 ;423 ;FontBold=Yes; SourceExpr="G/L Entry"."VAT Amount"; DataSetFieldName=G_L_Entry___VAT_Amount_ } { 43 ;TextBox ;9750 ;0 ;1800 ;423 ;FontBold=Yes; BlankZero=Yes; SourceExpr="G/L Entry"."Debit Amount"; DataSetFieldName=G_L_Entry___Debit_Amount_ } { 44 ;TextBox ;11700;0 ;1800 ;423 ;FontBold=Yes; BlankZero=Yes; SourceExpr="G/L Entry"."Credit Amount"; DataSetFieldName=G_L_Entry___Credit_Amount_ } { 45 ;TextBox ;13650;0 ;1800 ;423 ;FontBold=Yes; SourceExpr=StartBalance + "G/L Entry".Amount; AutoFormatType=1; DataSetFieldName=StartBalance____G_L_Entry__Amount } } } } } } REQUESTFORM { PROPERTIES { Width=4730; Height=4730; SaveValues=Yes; } CONTROLS { { 1 ;CheckBox ;3410 ;0 ;440 ;440 ;InPage=-1; ShowCaption=No; CaptionML=ENU=New Page per G/L Acc.; SourceExpr=PrintOnlyOnePerPage } { 21 ;Label ;0 ;0 ;3300 ;440 ;ParentControl=1 } { 2 ;CheckBox ;3410 ;990 ;440 ;440 ;InPage=-1; ShowCaption=No; CaptionML=ENU=Exclude G/L Accs. That Have a Balance Only; SourceExpr=ExcludeBalanceOnly } { 22 ;Label ;0 ;550 ;3300 ;880 ;ParentControl=2; VertAlign=Bottom; MultiLine=Yes } { 3 ;CheckBox ;3410 ;1980 ;440 ;440 ;InPage=-1; ShowCaption=No; CaptionML=ENU=Include Closing Entries Within the Period; SourceExpr=PrintClosingEntries } { 23 ;Label ;0 ;1540 ;3300 ;880 ;ParentControl=3; VertAlign=Bottom; MultiLine=Yes } { 4 ;CheckBox ;3410 ;3080 ;440 ;440 ;InPage=-1; ShowCaption=No; CaptionML=ENU=Print Corrections Only; SourceExpr=PrintOnlyCorrections } { 5 ;Label ;0 ;3080 ;3300 ;440 ;ParentControl=4 } { 6 ;CheckBox ;3410 ;2530 ;440 ;440 ;InPage=-1; ShowCaption=No; CaptionML=ENU=Include Reversed Entries; SourceExpr=PrintReversedEntries } { 7 ;Label ;0 ;2530 ;3300 ;440 ;ParentControl=6 } { 1102156000;CheckBox;3300;3850 ;440 ;440 ;ShowCaption=No; SourceExpr=PrintToExcel } { 1102156001;Label ;0 ;3740 ;2860 ;440 ;ParentControl=1102156000 } } } REQUESTPAGE { PROPERTIES { SaveValues=Yes; } CONTROLS { { 1900000001;0;Container; ContainerType=ContentArea } { 1900000002;1;Group ; CaptionML=ENU=Options } { 1 ;2 ;Field ; CaptionML=ENU=New Page per G/L Acc.; SourceExpr=PrintOnlyOnePerPage } { 2 ;2 ;Field ; CaptionML=ENU=Exclude G/L Accs. That Have a Balance Only; SourceExpr=ExcludeBalanceOnly; MultiLine=Yes } { 3 ;2 ;Field ; CaptionML=ENU=Include Closing Entries Within the Period; SourceExpr=PrintClosingEntries; MultiLine=Yes } { 6 ;2 ;Field ; CaptionML=ENU=Include Reversed Entries; SourceExpr=PrintReversedEntries } { 4 ;2 ;Field ; CaptionML=ENU=Print Corrections Only; SourceExpr=PrintOnlyCorrections } } } CODE { VAR Text000@1000 : TextConst 'ENU=Period: %1'; GLDateFilter@1001 : Text[30]; GLFilter@1002 : Text[250]; GLBalance@1003 : Decimal; StartBalance@1004 : Decimal; PrintOnlyOnePerPage@1005 : Boolean; ExcludeBalanceOnly@1006 : Boolean; PrintClosingEntries@1007 : Boolean; PrintOnlyCorrections@1008 : Boolean; PrintReversedEntries@1009 : Boolean; PageGroupNo@1010 : Integer; GLEntryPage@1011 : Record 17; ClosingEntry@1012 : Boolean; PrintToExcel@1102156000 : Boolean; TempExcelBuffer@1102156001 : TEMPORARY Record 370; rowno@1102156002 : Integer; Showout@1102156003 : Boolean; PROCEDURE EnterCell@1102156001(RowNo@1102156005 : Integer;ColumnNo@1102156004 : Integer;CellValue@1102156003 : Text[250];Bold@1102156002 : Boolean;Italic@1102156001 : Boolean;UnderLine@1102156000 : Boolean); BEGIN TempExcelBuffer.INIT; TempExcelBuffer.VALIDATE("Row No.",RowNo); TempExcelBuffer.VALIDATE("Column No.",ColumnNo); TempExcelBuffer."Cell Value as Text" := CellValue; TempExcelBuffer.Formula := ''; TempExcelBuffer.Bold := Bold; TempExcelBuffer.Italic := Italic; TempExcelBuffer.Underline := UnderLine; TempExcelBuffer.INSERT; END; BEGIN END. } RDLDATA { <?xml version="1.0" encoding="utf-8"?> <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> <Body> <Height>5.922cm</Height> </Body> <BottomMargin>2cm</BottomMargin> <Code>Public Function BlankZero(ByVal Value As Decimal) if Value = 0 then Return "" end if Return Value End Function Public Function BlankPos(ByVal Value As Decimal) if Value > 0 then Return "" end if Return Value End Function Public Function BlankZeroAndPos(ByVal Value As Decimal) if Value >= 0 then Return "" end if Return Value End Function Public Function BlankNeg(ByVal Value As Decimal) if Value < 0 then Return "" end if Return Value End Function Public Function BlankNegAndZero(ByVal Value As Decimal) if Value <= 0 then Return "" end if Return Value End Function </Code> <DataSets> <DataSet Name="DataSet_Result"> <Fields> <Field Name="Detail_Trial_BalanceCaption"> <DataField>Detail_Trial_BalanceCaption</DataField> </Field> <Field Name="FORMAT_TODAY_0_4_"> <DataField>FORMAT_TODAY_0_4_</DataField> </Field> <Field Name="STRSUBSTNO_Text000_GLDateFilter_"> <DataField>STRSUBSTNO_Text000_GLDateFilter_</DataField> </Field> <Field Name="CurrReport_PAGENOCaption"> <DataField>CurrReport_PAGENOCaption</DataField> </Field> <Field Name="CurrReport_PAGENO"> <DataField>CurrReport_PAGENO</DataField> </Field> <Field Name="COMPANYNAME"> <DataField>COMPANYNAME</DataField> </Field> <Field Name="USERID"> <DataField>USERID</DataField> </Field> <Field Name="This_also_includes_G_L_accounts_that_only_have_a_balance_Caption"> <DataField>This_also_includes_G_L_accounts_that_only_have_a_balance_Caption</DataField> </Field> <Field Name="ExcludeBalanceOnly"> <DataField>ExcludeBalanceOnly</DataField> </Field> <Field Name="PrintOnlyOnePerPage"> <DataField>PrintOnlyOnePerPage</DataField> </Field> <Field Name="PrintReversedEntries"> <DataField>PrintReversedEntries</DataField> </Field> <Field Name="PageGroupNo"> <DataField>PageGroupNo</DataField> </Field> <Field Name="This_report_also_includes_closing_entries_within_the_period_Caption"> <DataField>This_report_also_includes_closing_entries_within_the_period_Caption</DataField> </Field> <Field Name="PrintClosingEntries"> <DataField>PrintClosingEntries</DataField> </Field> <Field Name="Only_corrections_are_included_Caption"> <DataField>Only_corrections_are_included_Caption</DataField> </Field> <Field Name="PrintOnlyCorrections"> <DataField>PrintOnlyCorrections</DataField> </Field> <Field Name="G_L_Account__TABLECAPTION__________GLFilter"> <DataField>G_L_Account__TABLECAPTION__________GLFilter</DataField> </Field> <Field Name="GLFilter"> <DataField>GLFilter</DataField> </Field> <Field Name="Net_ChangeCaption"> <DataField>Net_ChangeCaption</DataField> </Field> <Field Name="EmptyString"> <DataField>EmptyString</DataField> </Field> <Field Name="G_L_Entry__Posting_Date_Caption"> <DataField>G_L_Entry__Posting_Date_Caption</DataField> </Field> <Field Name="G_L_Entry__Document_No__Caption"> <DataField>G_L_Entry__Document_No__Caption</DataField> </Field> <Field Name="G_L_Entry_DescriptionCaption"> <DataField>G_L_Entry_DescriptionCaption</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount__Control32Caption"> <DataField>G_L_Entry__VAT_Amount__Control32Caption</DataField> </Field> <Field Name="G_L_Entry__Debit_Amount__Control33Caption"> <DataField>G_L_Entry__Debit_Amount__Control33Caption</DataField> </Field> <Field Name="G_L_Entry__Credit_Amount__Control34Caption"> <DataField>G_L_Entry__Credit_Amount__Control34Caption</DataField> </Field> <Field Name="GLBalanceCaption"> <DataField>GLBalanceCaption</DataField> </Field> <Field Name="G_L_Entry__Entry_No__Caption"> <DataField>G_L_Entry__Entry_No__Caption</DataField> </Field> <Field Name="G_L_Account_No_"> <DataField>G_L_Account_No_</DataField> </Field> <Field Name="G_L_Account_Date_Filter"> <DataField>G_L_Account_Date_Filter</DataField> </Field> <Field Name="G_L_Account_Global_Dimension_1_Filter"> <DataField>G_L_Account_Global_Dimension_1_Filter</DataField> </Field> <Field Name="G_L_Account_Global_Dimension_2_Filter"> <DataField>G_L_Account_Global_Dimension_2_Filter</DataField> </Field> <Field Name="G_L_Account_Business_Unit_Filter"> <DataField>G_L_Account_Business_Unit_Filter</DataField> </Field> <Field Name="G_L_Account___No__"> <DataField>G_L_Account___No__</DataField> </Field> <Field Name="G_L_Account__Name"> <DataField>G_L_Account__Name</DataField> </Field> <Field Name="StartBalance"> <DataField>StartBalance</DataField> </Field> <Field Name="StartBalanceFormat"> <DataField>StartBalanceFormat</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount_Caption"> <DataField>G_L_Entry__VAT_Amount_Caption</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount_"> <DataField>G_L_Entry__VAT_Amount_</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount_Format"> <DataField>G_L_Entry__VAT_Amount_Format</DataField> </Field> <Field Name="G_L_Entry__Debit_Amount_"> <DataField>G_L_Entry__Debit_Amount_</DataField> </Field> <Field Name="G_L_Entry__Debit_Amount_Format"> <DataField>G_L_Entry__Debit_Amount_Format</DataField> </Field> <Field Name="G_L_Entry__Credit_Amount_"> <DataField>G_L_Entry__Credit_Amount_</DataField> </Field> <Field Name="G_L_Entry__Credit_Amount_Format"> <DataField>G_L_Entry__Credit_Amount_Format</DataField> </Field> <Field Name="StartBalance___Amount"> <DataField>StartBalance___Amount</DataField> </Field> <Field Name="StartBalance___AmountFormat"> <DataField>StartBalance___AmountFormat</DataField> </Field> <Field Name="G_L_Entry__Posting_Date_"> <DataField>G_L_Entry__Posting_Date_</DataField> </Field> <Field Name="G_L_Entry__Document_No__"> <DataField>G_L_Entry__Document_No__</DataField> </Field> <Field Name="G_L_Entry_Description"> <DataField>G_L_Entry_Description</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount__Control32Format"> <DataField>G_L_Entry__VAT_Amount__Control32Format</DataField> </Field> <Field Name="G_L_Entry__Debit_Amount__Control33Format"> <DataField>G_L_Entry__Debit_Amount__Control33Format</DataField> </Field> <Field Name="G_L_Entry__Credit_Amount__Control34Format"> <DataField>G_L_Entry__Credit_Amount__Control34Format</DataField> </Field> <Field Name="GLBalance"> <DataField>GLBalance</DataField> </Field> <Field Name="GLBalanceFormat"> <DataField>GLBalanceFormat</DataField> </Field> <Field Name="G_L_Entry__Entry_No__"> <DataField>G_L_Entry__Entry_No__</DataField> </Field> <Field Name="ClosingEntry"> <DataField>ClosingEntry</DataField> </Field> <Field Name="GLEntryReversed"> <DataField>GLEntryReversed</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount__Control38Caption"> <DataField>G_L_Entry__VAT_Amount__Control38Caption</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount__Control38Format"> <DataField>G_L_Entry__VAT_Amount__Control38Format</DataField> </Field> <Field Name="G_L_Entry__Debit_Amount__Control39Format"> <DataField>G_L_Entry__Debit_Amount__Control39Format</DataField> </Field> <Field Name="G_L_Entry__Credit_Amount__Control40Format"> <DataField>G_L_Entry__Credit_Amount__Control40Format</DataField> </Field> <Field Name="StartBalance___Amount_Control41Format"> <DataField>StartBalance___Amount_Control41Format</DataField> </Field> <Field Name="G_L_Entry_G_L_Account_No_"> <DataField>G_L_Entry_G_L_Account_No_</DataField> </Field> <Field Name="G_L_Entry_Global_Dimension_1_Code"> <DataField>G_L_Entry_Global_Dimension_1_Code</DataField> </Field> <Field Name="G_L_Entry_Global_Dimension_2_Code"> <DataField>G_L_Entry_Global_Dimension_2_Code</DataField> </Field> <Field Name="G_L_Entry_Business_Unit_Code"> <DataField>G_L_Entry_Business_Unit_Code</DataField> </Field> <Field Name="G_L_Account__Name_Control42"> <DataField>G_L_Account__Name_Control42</DataField> </Field> <Field Name="G_L_Entry___VAT_Amount_"> <DataField>G_L_Entry___VAT_Amount_</DataField> </Field> <Field Name="G_L_Entry___VAT_Amount_Format"> <DataField>G_L_Entry___VAT_Amount_Format</DataField> </Field> <Field Name="G_L_Entry___Debit_Amount_"> <DataField>G_L_Entry___Debit_Amount_</DataField> </Field> <Field Name="G_L_Entry___Debit_Amount_Format"> <DataField>G_L_Entry___Debit_Amount_Format</DataField> </Field> <Field Name="G_L_Entry___Credit_Amount_"> <DataField>G_L_Entry___Credit_Amount_</DataField> </Field> <Field Name="G_L_Entry___Credit_Amount_Format"> <DataField>G_L_Entry___Credit_Amount_Format</DataField> </Field> <Field Name="StartBalance____G_L_Entry__Amount"> <DataField>StartBalance____G_L_Entry__Amount</DataField> </Field> <Field Name="StartBalance____G_L_Entry__AmountFormat"> <DataField>StartBalance____G_L_Entry__AmountFormat</DataField> </Field> </Fields> <Query> <CommandText /> <DataSourceName>DummyDataSource</DataSourceName> </Query> <rd:DataSetInfo> <rd:DataSetName>DataSet</rd:DataSetName> <rd:TableName>Result</rd:TableName> </rd:DataSetInfo> </DataSet> </DataSets> <DataSources> <DataSource Name="DummyDataSource"> <ConnectionProperties> <ConnectString /> <DataProvider>SQL</DataProvider> </ConnectionProperties> <rd:DataSourceID>c396a512-e01c-4416-83e6-146281d0d75b</rd:DataSourceID> </DataSource> </DataSources> <InteractiveHeight>11in</InteractiveHeight> <InteractiveWidth>8.5in</InteractiveWidth> <Language>=User!Language</Language> <LeftMargin>1.5cm</LeftMargin> <PageHeight>29.7cm</PageHeight> <PageWidth>21cm</PageWidth> <TopMargin>2cm</TopMargin> <Width>18.15cm</Width> <rd:DrawGrid>true</rd:DrawGrid> <rd:ReportID>62e8f68c-8a67-4807-9608-4433fc5e1619</rd:ReportID> <rd:SnapToGrid>true</rd:SnapToGrid> </Report> END_OF_RDLDatA } }0
- 
            You haven't replaced printonlyifdetail property with a filter set. This is the problem.OBJECT Report 60014 Detail Trial Balanceo { OBJECT-PROPERTIES { Date=17.08.12; Time=10:09:57; Modified=Yes; Version List=NAVW16.00.01; } PROPERTIES { CaptionML=ENU=Detail Trial Balance; OnPreReport=BEGIN GLFilter := "G/L Account".GETFILTERS; GLDateFilter := "G/L Account".GETFILTER("Date Filter"); END; OnPostReport=BEGIN IF PrintToExcel THEN BEGIN TempExcelBuffer.CreateBook; TempExcelBuffer.CreateSheet('Createsheet','Trail Balance',COMPANYNAME,USERID); TempExcelBuffer.GiveUserControl; END; END; } DATAITEMS { { PROPERTIES { DataItemTable=Table15; DataItemTableView=WHERE(Account Type=CONST(Posting)); PrintOnlyIfDetail=Yes; OnPreDataItem=BEGIN IF ISSERVICETIER THEN PageGroupNo := 1; CurrReport.NEWPAGEPERRECORD := PrintOnlyOnePerPage; END; OnAfterGetRecord=BEGIN SetLinkFilter; StartBalance := 0; IF GLDateFilter <> '' THEN IF GETRANGEMIN("Date Filter") <> 0D THEN BEGIN SETRANGE("Date Filter",0D,CLOSINGDATE(GETRANGEMIN("Date Filter") - 1)); CALCFIELDS("Net Change"); StartBalance := "Net Change"; SETFILTER("Date Filter",GLDateFilter); END; IF ISSERVICETIER THEN BEGIN IF PrintOnlyOnePerPage THEN BEGIN GLEntryPage.RESET; GLEntryPage.SETRANGE("G/L Account No.", "G/L Account"."No."); IF CurrReport.PRINTONLYIFDETAIL AND GLEntryPage.FIND('-') THEN PageGroupNo := PageGroupNo + 1; END; END; END; ReqFilterFields=No.,Search Name,Income/Balance,Debit/Credit,Date Filter; } SECTIONS { { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18450; SectionHeight=1692; } CONTROLS { { 1 ;Label ;0 ;0 ;7500 ;423 ;FontSize=8; FontBold=Yes; CaptionML=ENU=Detail Trial Balance; DataSetFieldName=Detail_Trial_BalanceCaption } { 2 ;TextBox ;15000;0 ;3150 ;423 ;HorzAlign=Right; SourceExpr=FORMAT(TODAY,0,4); DataSetFieldName=FORMAT_TODAY_0_4_ } { 3 ;TextBox ;0 ;423 ;7500 ;423 ;SourceExpr=STRSUBSTNO(Text000,GLDateFilter); DataSetFieldName=STRSUBSTNO_Text000_GLDateFilter_ } { 4 ;Label ;16950;423 ;750 ;423 ;ParentControl=5; DataSetFieldName=CurrReport_PAGENOCaption } { 5 ;TextBox ;17700;423 ;450 ;423 ;CaptionML=ENU=Page; SourceExpr=CurrReport.PAGENO; DataSetFieldName=CurrReport_PAGENO } { 6 ;TextBox ;0 ;846 ;7500 ;423 ;SourceExpr=COMPANYNAME; DataSetFieldName=COMPANYNAME } { 7 ;TextBox ;15900;846 ;2250 ;423 ;HorzAlign=Right; SourceExpr=USERID; DataSetFieldName=USERID } } } { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18450; SectionHeight=423; OnPreSection=BEGIN CurrReport.SHOWOUTPUT((CurrReport.PAGENO = 1) AND NOT ExcludeBalanceOnly); END; } CONTROLS { { 8 ;Label ;0 ;0 ;12000;423 ;CaptionML=ENU=This also includes G/L accounts that only have a balance.; DataSetFieldName=This_also_includes_G_L_accounts_that_only_have_a_balance_Caption } { 49 ;TextBox ;18000;0 ;150 ;423 ;Name=ExcludeBalanceOnly; Visible=No; ForeColor=65535; SourceExpr=ExcludeBalanceOnly; DataSetFieldName=ExcludeBalanceOnly } { 53 ;TextBox ;17000;0 ;150 ;423 ;Name=PrintOnlyOnePerPage; Visible=No; ForeColor=65535; SourceExpr=PrintOnlyOnePerPage; DataSetFieldName=PrintOnlyOnePerPage } { 54 ;TextBox ;17150;0 ;150 ;423 ;Name=PrintReversedEntries; Visible=No; ForeColor=65535; SourceExpr=PrintReversedEntries; DataSetFieldName=PrintReversedEntries } { 50 ;TextBox ;16850;0 ;150 ;423 ;Name=PageGroupNo; Visible=No; ForeColor=65535; SourceExpr=PageGroupNo; DataSetFieldName=PageGroupNo } } } { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18450; SectionHeight=423; OnPreSection=BEGIN CurrReport.SHOWOUTPUT((CurrReport.PAGENO = 1) AND PrintClosingEntries); END; } CONTROLS { { 9 ;Label ;0 ;0 ;12000;423 ;CaptionML=ENU=This report also includes closing entries within the period.; DataSetFieldName=This_report_also_includes_closing_entries_within_the_period_Caption } { 51 ;TextBox ;18000;0 ;150 ;423 ;Name=PrintClosingEntries; Visible=No; ForeColor=65535; SourceExpr=PrintClosingEntries; DataSetFieldName=PrintClosingEntries } } } { PROPERTIES { SectionType=Header; SectionWidth=18450; SectionHeight=423; OnPreSection=BEGIN CurrReport.SHOWOUTPUT((CurrReport.PAGENO = 1) AND PrintOnlyCorrections); END; } CONTROLS { { 47 ;Label ;0 ;0 ;12000;423 ;CaptionML=ENU=Only corrections are included.; DataSetFieldName=Only_corrections_are_included_Caption } { 52 ;TextBox ;18000;0 ;150 ;423 ;Name=PrintOnlyCorrections; Visible=No; ForeColor=65535; SourceExpr=PrintOnlyCorrections; DataSetFieldName=PrintOnlyCorrections } } } { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18450; SectionHeight=423; OnPreSection=BEGIN CurrReport.SHOWOUTPUT((CurrReport.PAGENO = 1) AND (GLFilter <> '')); END; } CONTROLS { { 10 ;TextBox ;0 ;0 ;18000;423 ;SourceExpr="G/L Account".TABLECAPTION + ': ' + GLFilter; DataSetFieldName=G_L_Account__TABLECAPTION__________GLFilter } { 48 ;TextBox ;18000;0 ;150 ;423 ;Name=GLFilter; Visible=No; ForeColor=65535; SourceExpr=GLFilter; DataSetFieldName=GLFilter } } } { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18450; SectionHeight=423; OnPreSection=BEGIN CurrReport.SHOWOUTPUT( (CurrReport.PAGENO = 1) AND (PrintClosingEntries OR (GLFilter <> '') OR NOT ExcludeBalanceOnly)); END; } CONTROLS { } } { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18450; SectionHeight=1692; OnPreSection=BEGIN rowno+=1; EnterCell(rowno,1,'Posting Date',TRUE,TRUE,TRUE); EnterCell(rowno,2,'Document No',TRUE,TRUE,TRUE); EnterCell(rowno,3,'Description',TRUE,TRUE,TRUE); EnterCell(rowno,4,'Vat amount',TRUE,TRUE,TRUE); EnterCell(rowno,5,'Debit amount',TRUE,TRUE,TRUE); EnterCell(rowno,6,'Credit amount',TRUE,TRUE,TRUE); EnterCell(rowno,7,'Balance',TRUE,TRUE,TRUE); EnterCell(rowno,8,'Entry No',TRUE,TRUE,TRUE); END; } CONTROLS { { 11 ;Label ;9750 ;0 ;3750 ;423 ;FontBold=Yes; CaptionML=ENU=Net Change; DataSetFieldName=Net_ChangeCaption } { 12 ;TextBox ;9750 ;423 ;3750 ;423 ;FontBold=Yes; LeaderDots=Yes; SourceExpr=''; DataSetFieldName=EmptyString } { 13 ;Label ;0 ;846 ;1350 ;423 ;ParentControl=29; FontBold=Yes; DataSetFieldName=G_L_Entry__Posting_Date_Caption } { 14 ;Label ;1500 ;846 ;1500 ;423 ;ParentControl=30; FontBold=Yes; DataSetFieldName=G_L_Entry__Document_No__Caption } { 15 ;Label ;3150 ;846 ;4500 ;423 ;ParentControl=31; FontBold=Yes; DataSetFieldName=G_L_Entry_DescriptionCaption } { 16 ;Label ;7800 ;846 ;1800 ;423 ;ParentControl=32; HorzAlign=Right; FontBold=Yes; DataSetFieldName=G_L_Entry__VAT_Amount__Control32Caption } { 17 ;Label ;9750 ;846 ;1800 ;423 ;ParentControl=33; HorzAlign=Right; FontBold=Yes; DataSetFieldName=G_L_Entry__Debit_Amount__Control33Caption } { 18 ;Label ;11700;846 ;1800 ;423 ;ParentControl=34; HorzAlign=Right; FontBold=Yes; DataSetFieldName=G_L_Entry__Credit_Amount__Control34Caption } { 19 ;Label ;13650;846 ;1800 ;423 ;ParentControl=35; HorzAlign=Right; FontBold=Yes; DataSetFieldName=GLBalanceCaption } { 20 ;Label ;15600;846 ;1200 ;423 ;ParentControl=36; HorzAlign=Right; FontBold=Yes; DataSetFieldName=G_L_Entry__Entry_No__Caption } } } } } { PROPERTIES { DataItemIndent=1; DataItemTable=Table2000000026; DataItemTableView=SORTING(Number) WHERE(Number=CONST(1)); DataItemVarName=PageCounter; OnAfterGetRecord=BEGIN Showout:=ExcludeBalanceOnly OR (StartBalance = 0); IF NOT Showout THEN CurrReport.SKIP; END; } SECTIONS { { PROPERTIES { SectionType=Body; SectionWidth=18450; SectionHeight=423; OnPreSection=BEGIN IF CurrReport.SHOWOUTPUT AND PrintToExcel THEN BEGIN rowno+=1; EnterCell(rowno,2,FORMAT("G/L Account"."No."),FALSE,FALSE,FALSE); EnterCell(rowno,3,FORMAT("G/L Account".Name),FALSE,FALSE,FALSE); EnterCell(rowno,7,FORMAT(StartBalance),FALSE,FALSE,FALSE); END; END; } CONTROLS { { 21 ;TextBox ;0 ;0 ;1500 ;423 ;FontBold=Yes; SourceExpr="G/L Account"."No."; DataSetFieldName=G_L_Account___No__ } { 22 ;TextBox ;1650 ;0 ;4500 ;423 ;FontBold=Yes; SourceExpr="G/L Account".Name; DataSetFieldName=G_L_Account__Name } { 23 ;TextBox ;13650;0 ;1800 ;423 ;SourceExpr=StartBalance; AutoFormatType=1; DataSetFieldName=StartBalance } } } } } { PROPERTIES { DataItemIndent=2; DataItemTable=Table17; DataItemTableView=SORTING(G/L Account No.,Posting Date); OnPreDataItem=BEGIN SetLinkFilter; GLBalance := StartBalance; CurrReport.CREATETOTALS(Amount,"Debit Amount","Credit Amount","VAT Amount"); END; OnAfterGetRecord=BEGIN IF PrintOnlyCorrections THEN IF NOT (("Debit Amount" < 0) OR ("Credit Amount" < 0)) THEN CurrReport.SKIP; IF NOT PrintReversedEntries AND Reversed THEN CurrReport.SKIP; IF ISSERVICETIER THEN BEGIN GLBalance := GLBalance + Amount; IF ("Posting Date" = CLOSINGDATE("Posting Date")) AND NOT PrintClosingEntries THEN BEGIN "Debit Amount" := 0; "Credit Amount" := 0; END; IF ("Posting Date" = CLOSINGDATE("Posting Date")) THEN ClosingEntry := TRUE ELSE ClosingEntry := FALSE; END; END; DataItemLinkReference=G/L Account; } SECTIONS { { PROPERTIES { SectionType=TransHeader; SectionWidth=18450; SectionHeight=846; } CONTROLS { { 24 ;Label ;3150 ;0 ;4500 ;423 ;ParentControl=25; LeaderDots=Yes; DataSetFieldName=G_L_Entry__VAT_Amount_Caption } { 25 ;TextBox ;7800 ;0 ;1800 ;423 ;CaptionML=ENU=Continued; SourceExpr="VAT Amount"; DataSetFieldName=G_L_Entry__VAT_Amount_ } { 26 ;TextBox ;9750 ;0 ;1800 ;423 ;BlankZero=Yes; SourceExpr="Debit Amount"; DataSetFieldName=G_L_Entry__Debit_Amount_ } { 27 ;TextBox ;11700;0 ;1800 ;423 ;BlankZero=Yes; SourceExpr="Credit Amount"; DataSetFieldName=G_L_Entry__Credit_Amount_ } { 28 ;TextBox ;13650;0 ;1800 ;423 ;SourceExpr=StartBalance + Amount; AutoFormatType=1; DataSetFieldName=StartBalance___Amount } } } { PROPERTIES { SectionType=Body; SectionWidth=18450; SectionHeight=423; OnPostSection=BEGIN GLBalance := GLBalance + Amount; IF ("Posting Date" = CLOSINGDATE("Posting Date")) AND NOT PrintClosingEntries THEN BEGIN CurrReport.SHOWOUTPUT := FALSE; "Debit Amount" := 0; "Credit Amount" := 0; END; IF CurrReport.SHOWOUTPUT THEN BEGIN rowno+=1; EnterCell(rowno,1,FORMAT("Posting Date"),FALSE,FALSE,FALSE); EnterCell(rowno,2,FORMAT("Document No."),FALSE,FALSE,FALSE); EnterCell(rowno,3,FORMAT(Description),FALSE,FALSE,FALSE); EnterCell(rowno,4,FORMAT("VAT Amount"),FALSE,FALSE,FALSE); EnterCell(rowno,5,FORMAT("Debit Amount"),FALSE,FALSE,FALSE); EnterCell(rowno,6,FORMAT("Credit Amount"),FALSE,FALSE,FALSE); EnterCell(rowno,7,FORMAT(GLBalance),FALSE,FALSE,FALSE); EnterCell(rowno,8,FORMAT("Entry No."),FALSE,FALSE,FALSE); END; END; } CONTROLS { { 29 ;TextBox ;0 ;0 ;1350 ;423 ;SourceExpr="Posting Date"; DataSetFieldName=G_L_Entry__Posting_Date_ } { 30 ;TextBox ;1500 ;0 ;1500 ;423 ;SourceExpr="Document No."; DataSetFieldName=G_L_Entry__Document_No__ } { 31 ;TextBox ;3150 ;0 ;4500 ;423 ;SourceExpr=Description; DataSetFieldName=G_L_Entry_Description } { 32 ;TextBox ;7800 ;0 ;1800 ;423 ;SourceExpr="VAT Amount"; DataSetFieldName=G_L_Entry__VAT_Amount__Control32 } { 33 ;TextBox ;9750 ;0 ;1800 ;423 ;CaptionML=ENU=Debit; BlankZero=Yes; SourceExpr="Debit Amount"; DataSetFieldName=G_L_Entry__Debit_Amount__Control33 } { 34 ;TextBox ;11700;0 ;1800 ;423 ;CaptionML=ENU=Credit; BlankZero=Yes; SourceExpr="Credit Amount"; DataSetFieldName=G_L_Entry__Credit_Amount__Control34 } { 35 ;TextBox ;13650;0 ;1800 ;423 ;CaptionML=ENU=Balance; SourceExpr=GLBalance; AutoFormatType=1; DataSetFieldName=GLBalance } { 36 ;TextBox ;15600;0 ;1200 ;423 ;SourceExpr="Entry No."; DataSetFieldName=G_L_Entry__Entry_No__ } { 55 ;TextBox ;18000;0 ;150 ;423 ;Visible=No; ForeColor=65535; SourceExpr=ClosingEntry; DataSetFieldName=ClosingEntry } { 56 ;TextBox ;17850;0 ;150 ;423 ;Name=GLEntryReversed; Visible=No; ForeColor=65535; SourceExpr="G/L Entry".Reversed; DataSetFieldName=GLEntryReversed } } } { PROPERTIES { SectionType=TransFooter; SectionWidth=18450; SectionHeight=846; } CONTROLS { { 37 ;Label ;3150 ;423 ;4500 ;423 ;ParentControl=38; LeaderDots=Yes; DataSetFieldName=G_L_Entry__VAT_Amount__Control38Caption } { 38 ;TextBox ;7800 ;423 ;1800 ;423 ;CaptionML=ENU=Continued; SourceExpr="VAT Amount"; DataSetFieldName=G_L_Entry__VAT_Amount__Control38 } { 39 ;TextBox ;9750 ;423 ;1800 ;423 ;BlankZero=Yes; SourceExpr="Debit Amount"; DataSetFieldName=G_L_Entry__Debit_Amount__Control39 } { 40 ;TextBox ;11700;423 ;1800 ;423 ;BlankZero=Yes; SourceExpr="Credit Amount"; DataSetFieldName=G_L_Entry__Credit_Amount__Control40 } { 41 ;TextBox ;13650;423 ;1800 ;423 ;SourceExpr=StartBalance + Amount; AutoFormatType=1; DataSetFieldName=StartBalance___Amount_Control41 } } } } } { PROPERTIES { DataItemIndent=2; DataItemTable=Table2000000026; DataItemTableView=SORTING(Number) WHERE(Number=CONST(1)); OnAfterGetRecord=BEGIN IF ("G/L Entry"."Debit Amount" = 0) AND ("G/L Entry"."Credit Amount" = 0) AND ((StartBalance = 0) OR ExcludeBalanceOnly) THEN CurrReport.SKIP; END; } SECTIONS { { PROPERTIES { SectionType=Body; SectionWidth=18450; SectionHeight=1269; OnPreSection=BEGIN rowno+=1; EnterCell(rowno,2,FORMAT("G/L Account".Name),TRUE,TRUE,TRUE); EnterCell(rowno,4,FORMAT("G/L Entry"."VAT Amount"),TRUE,TRUE,TRUE); EnterCell(rowno,5,FORMAT("G/L Entry"."Debit Amount"),TRUE,TRUE,TRUE); EnterCell(rowno,6,FORMAT("G/L Entry"."Credit Amount"),TRUE,TRUE,TRUE); EnterCell(rowno,7,FORMAT(StartBalance + "G/L Entry".Amount),TRUE,TRUE,TRUE); END; } CONTROLS { { 42 ;TextBox ;1650 ;0 ;4500 ;423 ;FontBold=Yes; SourceExpr="G/L Account".Name; DataSetFieldName=G_L_Account__Name_Control42 } { 46 ;TextBox ;7800 ;0 ;1800 ;423 ;FontBold=Yes; SourceExpr="G/L Entry"."VAT Amount"; DataSetFieldName=G_L_Entry___VAT_Amount_ } { 43 ;TextBox ;9750 ;0 ;1800 ;423 ;FontBold=Yes; BlankZero=Yes; SourceExpr="G/L Entry"."Debit Amount"; DataSetFieldName=G_L_Entry___Debit_Amount_ } { 44 ;TextBox ;11700;0 ;1800 ;423 ;FontBold=Yes; BlankZero=Yes; SourceExpr="G/L Entry"."Credit Amount"; DataSetFieldName=G_L_Entry___Credit_Amount_ } { 45 ;TextBox ;13650;0 ;1800 ;423 ;FontBold=Yes; SourceExpr=StartBalance + "G/L Entry".Amount; AutoFormatType=1; DataSetFieldName=StartBalance____G_L_Entry__Amount } } } } } } REQUESTFORM { PROPERTIES { Width=4730; Height=4730; SaveValues=Yes; } CONTROLS { { 1 ;CheckBox ;3410 ;0 ;440 ;440 ;InPage=-1; ShowCaption=No; CaptionML=ENU=New Page per G/L Acc.; SourceExpr=PrintOnlyOnePerPage } { 21 ;Label ;0 ;0 ;3300 ;440 ;ParentControl=1 } { 2 ;CheckBox ;3410 ;990 ;440 ;440 ;InPage=-1; ShowCaption=No; CaptionML=ENU=Exclude G/L Accs. That Have a Balance Only; SourceExpr=ExcludeBalanceOnly } { 22 ;Label ;0 ;550 ;3300 ;880 ;ParentControl=2; VertAlign=Bottom; MultiLine=Yes } { 3 ;CheckBox ;3410 ;1980 ;440 ;440 ;InPage=-1; ShowCaption=No; CaptionML=ENU=Include Closing Entries Within the Period; SourceExpr=PrintClosingEntries } { 23 ;Label ;0 ;1540 ;3300 ;880 ;ParentControl=3; VertAlign=Bottom; MultiLine=Yes } { 4 ;CheckBox ;3410 ;3080 ;440 ;440 ;InPage=-1; ShowCaption=No; CaptionML=ENU=Print Corrections Only; SourceExpr=PrintOnlyCorrections } { 5 ;Label ;0 ;3080 ;3300 ;440 ;ParentControl=4 } { 6 ;CheckBox ;3410 ;2530 ;440 ;440 ;InPage=-1; ShowCaption=No; CaptionML=ENU=Include Reversed Entries; SourceExpr=PrintReversedEntries } { 7 ;Label ;0 ;2530 ;3300 ;440 ;ParentControl=6 } { 1102156000;CheckBox;3300;3850 ;440 ;440 ;ShowCaption=No; SourceExpr=PrintToExcel } { 1102156001;Label ;0 ;3740 ;2860 ;440 ;ParentControl=1102156000 } } } REQUESTPAGE { PROPERTIES { SaveValues=Yes; } CONTROLS { { 1900000001;0;Container; ContainerType=ContentArea } { 1900000002;1;Group ; CaptionML=ENU=Options } { 1 ;2 ;Field ; CaptionML=ENU=New Page per G/L Acc.; SourceExpr=PrintOnlyOnePerPage } { 2 ;2 ;Field ; CaptionML=ENU=Exclude G/L Accs. That Have a Balance Only; SourceExpr=ExcludeBalanceOnly; MultiLine=Yes } { 3 ;2 ;Field ; CaptionML=ENU=Include Closing Entries Within the Period; SourceExpr=PrintClosingEntries; MultiLine=Yes } { 6 ;2 ;Field ; CaptionML=ENU=Include Reversed Entries; SourceExpr=PrintReversedEntries } { 4 ;2 ;Field ; CaptionML=ENU=Print Corrections Only; SourceExpr=PrintOnlyCorrections } } } CODE { VAR Text000@1000 : TextConst 'ENU=Period: %1'; GLDateFilter@1001 : Text[30]; GLFilter@1002 : Text[250]; GLBalance@1003 : Decimal; StartBalance@1004 : Decimal; PrintOnlyOnePerPage@1005 : Boolean; ExcludeBalanceOnly@1006 : Boolean; PrintClosingEntries@1007 : Boolean; PrintOnlyCorrections@1008 : Boolean; PrintReversedEntries@1009 : Boolean; PageGroupNo@1010 : Integer; GLEntryPage@1011 : Record 17; ClosingEntry@1012 : Boolean; PrintToExcel@1102156000 : Boolean; TempExcelBuffer@1102156001 : TEMPORARY Record 370; rowno@1102156002 : Integer; Showout@1102156003 : Boolean; PROCEDURE EnterCell@1102156001(RowNo@1102156005 : Integer;ColumnNo@1102156004 : Integer;CellValue@1102156003 : Text[250];Bold@1102156002 : Boolean;Italic@1102156001 : Boolean;UnderLine@1102156000 : Boolean); BEGIN TempExcelBuffer.INIT; TempExcelBuffer.VALIDATE("Row No.",RowNo); TempExcelBuffer.VALIDATE("Column No.",ColumnNo); TempExcelBuffer."Cell Value as Text" := CellValue; TempExcelBuffer.Formula := ''; TempExcelBuffer.Bold := Bold; TempExcelBuffer.Italic := Italic; TempExcelBuffer.Underline := UnderLine; TempExcelBuffer.INSERT; END; PROCEDURE SetLinkFilter@1103301000(); BEGIN "G/L Entry".RESET; "G/L Entry".SETRANGE("G/L Account No.", "G/L Account"."No."); IF "G/L Account".GETFILTER("Date Filter") <> '' THEN "G/L Entry".SETFILTER("Posting Date", "G/L Account".GETFILTER("Date Filter")); IF "G/L Account".GETFILTER("Global Dimension 1 Filter") <> '' THEN "G/L Entry".SETRANGE("Global Dimension 1 Code", "G/L Account"."Global Dimension 1 Filter"); IF "G/L Account".GETFILTER("Global Dimension 2 Filter") <> '' THEN "G/L Entry".SETRANGE("Global Dimension 2 Code", "G/L Account"."Global Dimension 2 Filter"); IF "G/L Account".GETFILTER("Business Unit Filter") <> '' THEN "G/L Entry".SETRANGE("Business Unit Code","G/L Account"."Business Unit Filter"); IF "G/L Entry".ISEMPTY THEN CurrReport.SKIP; END; BEGIN END. } RDLDATA { <?xml version="1.0" encoding="utf-8"?> <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> <Body> <Height>5.922cm</Height> </Body> <BottomMargin>2cm</BottomMargin> <Code>Public Function BlankZero(ByVal Value As Decimal) if Value = 0 then Return "" end if Return Value End Function Public Function BlankPos(ByVal Value As Decimal) if Value > 0 then Return "" end if Return Value End Function Public Function BlankZeroAndPos(ByVal Value As Decimal) if Value >= 0 then Return "" end if Return Value End Function Public Function BlankNeg(ByVal Value As Decimal) if Value < 0 then Return "" end if Return Value End Function Public Function BlankNegAndZero(ByVal Value As Decimal) if Value <= 0 then Return "" end if Return Value End Function </Code> <DataSets> <DataSet Name="DataSet_Result"> <Fields> <Field Name="Detail_Trial_BalanceCaption"> <DataField>Detail_Trial_BalanceCaption</DataField> </Field> <Field Name="FORMAT_TODAY_0_4_"> <DataField>FORMAT_TODAY_0_4_</DataField> </Field> <Field Name="STRSUBSTNO_Text000_GLDateFilter_"> <DataField>STRSUBSTNO_Text000_GLDateFilter_</DataField> </Field> <Field Name="CurrReport_PAGENOCaption"> <DataField>CurrReport_PAGENOCaption</DataField> </Field> <Field Name="CurrReport_PAGENO"> <DataField>CurrReport_PAGENO</DataField> </Field> <Field Name="COMPANYNAME"> <DataField>COMPANYNAME</DataField> </Field> <Field Name="USERID"> <DataField>USERID</DataField> </Field> <Field Name="This_also_includes_G_L_accounts_that_only_have_a_balance_Caption"> <DataField>This_also_includes_G_L_accounts_that_only_have_a_balance_Caption</DataField> </Field> <Field Name="ExcludeBalanceOnly"> <DataField>ExcludeBalanceOnly</DataField> </Field> <Field Name="PrintOnlyOnePerPage"> <DataField>PrintOnlyOnePerPage</DataField> </Field> <Field Name="PrintReversedEntries"> <DataField>PrintReversedEntries</DataField> </Field> <Field Name="PageGroupNo"> <DataField>PageGroupNo</DataField> </Field> <Field Name="This_report_also_includes_closing_entries_within_the_period_Caption"> <DataField>This_report_also_includes_closing_entries_within_the_period_Caption</DataField> </Field> <Field Name="PrintClosingEntries"> <DataField>PrintClosingEntries</DataField> </Field> <Field Name="Only_corrections_are_included_Caption"> <DataField>Only_corrections_are_included_Caption</DataField> </Field> <Field Name="PrintOnlyCorrections"> <DataField>PrintOnlyCorrections</DataField> </Field> <Field Name="G_L_Account__TABLECAPTION__________GLFilter"> <DataField>G_L_Account__TABLECAPTION__________GLFilter</DataField> </Field> <Field Name="GLFilter"> <DataField>GLFilter</DataField> </Field> <Field Name="Net_ChangeCaption"> <DataField>Net_ChangeCaption</DataField> </Field> <Field Name="EmptyString"> <DataField>EmptyString</DataField> </Field> <Field Name="G_L_Entry__Posting_Date_Caption"> <DataField>G_L_Entry__Posting_Date_Caption</DataField> </Field> <Field Name="G_L_Entry__Document_No__Caption"> <DataField>G_L_Entry__Document_No__Caption</DataField> </Field> <Field Name="G_L_Entry_DescriptionCaption"> <DataField>G_L_Entry_DescriptionCaption</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount__Control32Caption"> <DataField>G_L_Entry__VAT_Amount__Control32Caption</DataField> </Field> <Field Name="G_L_Entry__Debit_Amount__Control33Caption"> <DataField>G_L_Entry__Debit_Amount__Control33Caption</DataField> </Field> <Field Name="G_L_Entry__Credit_Amount__Control34Caption"> <DataField>G_L_Entry__Credit_Amount__Control34Caption</DataField> </Field> <Field Name="GLBalanceCaption"> <DataField>GLBalanceCaption</DataField> </Field> <Field Name="G_L_Entry__Entry_No__Caption"> <DataField>G_L_Entry__Entry_No__Caption</DataField> </Field> <Field Name="G_L_Account_No_"> <DataField>G_L_Account_No_</DataField> </Field> <Field Name="G_L_Account_Date_Filter"> <DataField>G_L_Account_Date_Filter</DataField> </Field> <Field Name="G_L_Account_Global_Dimension_1_Filter"> <DataField>G_L_Account_Global_Dimension_1_Filter</DataField> </Field> <Field Name="G_L_Account_Global_Dimension_2_Filter"> <DataField>G_L_Account_Global_Dimension_2_Filter</DataField> </Field> <Field Name="G_L_Account_Business_Unit_Filter"> <DataField>G_L_Account_Business_Unit_Filter</DataField> </Field> <Field Name="G_L_Account___No__"> <DataField>G_L_Account___No__</DataField> </Field> <Field Name="G_L_Account__Name"> <DataField>G_L_Account__Name</DataField> </Field> <Field Name="StartBalance"> <DataField>StartBalance</DataField> </Field> <Field Name="StartBalanceFormat"> <DataField>StartBalanceFormat</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount_Caption"> <DataField>G_L_Entry__VAT_Amount_Caption</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount_"> <DataField>G_L_Entry__VAT_Amount_</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount_Format"> <DataField>G_L_Entry__VAT_Amount_Format</DataField> </Field> <Field Name="G_L_Entry__Debit_Amount_"> <DataField>G_L_Entry__Debit_Amount_</DataField> </Field> <Field Name="G_L_Entry__Debit_Amount_Format"> <DataField>G_L_Entry__Debit_Amount_Format</DataField> </Field> <Field Name="G_L_Entry__Credit_Amount_"> <DataField>G_L_Entry__Credit_Amount_</DataField> </Field> <Field Name="G_L_Entry__Credit_Amount_Format"> <DataField>G_L_Entry__Credit_Amount_Format</DataField> </Field> <Field Name="StartBalance___Amount"> <DataField>StartBalance___Amount</DataField> </Field> <Field Name="StartBalance___AmountFormat"> <DataField>StartBalance___AmountFormat</DataField> </Field> <Field Name="G_L_Entry__Posting_Date_"> <DataField>G_L_Entry__Posting_Date_</DataField> </Field> <Field Name="G_L_Entry__Document_No__"> <DataField>G_L_Entry__Document_No__</DataField> </Field> <Field Name="G_L_Entry_Description"> <DataField>G_L_Entry_Description</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount__Control32Format"> <DataField>G_L_Entry__VAT_Amount__Control32Format</DataField> </Field> <Field Name="G_L_Entry__Debit_Amount__Control33Format"> <DataField>G_L_Entry__Debit_Amount__Control33Format</DataField> </Field> <Field Name="G_L_Entry__Credit_Amount__Control34Format"> <DataField>G_L_Entry__Credit_Amount__Control34Format</DataField> </Field> <Field Name="GLBalance"> <DataField>GLBalance</DataField> </Field> <Field Name="GLBalanceFormat"> <DataField>GLBalanceFormat</DataField> </Field> <Field Name="G_L_Entry__Entry_No__"> <DataField>G_L_Entry__Entry_No__</DataField> </Field> <Field Name="ClosingEntry"> <DataField>ClosingEntry</DataField> </Field> <Field Name="GLEntryReversed"> <DataField>GLEntryReversed</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount__Control38Caption"> <DataField>G_L_Entry__VAT_Amount__Control38Caption</DataField> </Field> <Field Name="G_L_Entry__VAT_Amount__Control38Format"> <DataField>G_L_Entry__VAT_Amount__Control38Format</DataField> </Field> <Field Name="G_L_Entry__Debit_Amount__Control39Format"> <DataField>G_L_Entry__Debit_Amount__Control39Format</DataField> </Field> <Field Name="G_L_Entry__Credit_Amount__Control40Format"> <DataField>G_L_Entry__Credit_Amount__Control40Format</DataField> </Field> <Field Name="StartBalance___Amount_Control41Format"> <DataField>StartBalance___Amount_Control41Format</DataField> </Field> <Field Name="G_L_Entry_G_L_Account_No_"> <DataField>G_L_Entry_G_L_Account_No_</DataField> </Field> <Field Name="G_L_Entry_Global_Dimension_1_Code"> <DataField>G_L_Entry_Global_Dimension_1_Code</DataField> </Field> <Field Name="G_L_Entry_Global_Dimension_2_Code"> <DataField>G_L_Entry_Global_Dimension_2_Code</DataField> </Field> <Field Name="G_L_Entry_Business_Unit_Code"> <DataField>G_L_Entry_Business_Unit_Code</DataField> </Field> <Field Name="G_L_Account__Name_Control42"> <DataField>G_L_Account__Name_Control42</DataField> </Field> <Field Name="G_L_Entry___VAT_Amount_"> <DataField>G_L_Entry___VAT_Amount_</DataField> </Field> <Field Name="G_L_Entry___VAT_Amount_Format"> <DataField>G_L_Entry___VAT_Amount_Format</DataField> </Field> <Field Name="G_L_Entry___Debit_Amount_"> <DataField>G_L_Entry___Debit_Amount_</DataField> </Field> <Field Name="G_L_Entry___Debit_Amount_Format"> <DataField>G_L_Entry___Debit_Amount_Format</DataField> </Field> <Field Name="G_L_Entry___Credit_Amount_"> <DataField>G_L_Entry___Credit_Amount_</DataField> </Field> <Field Name="G_L_Entry___Credit_Amount_Format"> <DataField>G_L_Entry___Credit_Amount_Format</DataField> </Field> <Field Name="StartBalance____G_L_Entry__Amount"> <DataField>StartBalance____G_L_Entry__Amount</DataField> </Field> <Field Name="StartBalance____G_L_Entry__AmountFormat"> <DataField>StartBalance____G_L_Entry__AmountFormat</DataField> </Field> </Fields> <Query> <CommandText /> <DataSourceName>DummyDataSource</DataSourceName> </Query> <rd:DataSetInfo> <rd:DataSetName>DataSet</rd:DataSetName> <rd:TableName>Result</rd:TableName> </rd:DataSetInfo> </DataSet> </DataSets> <DataSources> <DataSource Name="DummyDataSource"> <ConnectionProperties> <ConnectString /> <DataProvider>SQL</DataProvider> </ConnectionProperties> <rd:DataSourceID>c396a512-e01c-4416-83e6-146281d0d75b</rd:DataSourceID> </DataSource> </DataSources> <InteractiveHeight>11in</InteractiveHeight> <InteractiveWidth>8.5in</InteractiveWidth> <Language>=User!Language</Language> <LeftMargin>1.5cm</LeftMargin> <PageHeight>29.7cm</PageHeight> <PageWidth>21cm</PageWidth> <TopMargin>2cm</TopMargin> <Width>18.15cm</Width> <rd:DrawGrid>true</rd:DrawGrid> <rd:ReportID>62e8f68c-8a67-4807-9608-4433fc5e1619</rd:ReportID> <rd:SnapToGrid>true</rd:SnapToGrid> </Report> END_OF_RDLDatA } }Ufuk Asci
 Pargesoft0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 323 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions



