Weird report problem

Cem_KaraerCem_Karaer Member Posts: 281
Hello,

There is a report that runs for 20 seconds in one client machine but runs for 30 minutes! in another client machine and chokes all network resources. Hardware configurations of the clients are nearly the same. IPs of the client machines were swapped, but no change happened. Slow client is 32-bit vista, fast client is 64-bit win7. What can be the problem? Thanks in advance.
Cem Karaer @ Pargesoft
Dynamics NAV Developer since 2005

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    cemkaraer wrote:
    Hello,

    There is a report that runs for 20 seconds in one client machine but runs for 30 minutes! in another client machine and chokes all network resources. Hardware configurations of the clients are nearly the same. IPs of the client machines were swapped, but no change happened. Slow client is 32-bit vista, fast client is 64-bit win7. What can be the problem? Thanks in advance.

    Without posting any information how can we help.

    Please describe whats going on.
    David Singleton
  • jannestigjannestig Member Posts: 1,000
    Vista is crap upgrade pc to win 7 :D
  • Cem_KaraerCem_Karaer Member Posts: 281
    You are right.

    Here is the code of report:
    OBJECT Report 50045 ˜ndirilecek KDV (Parge)
    {
      OBJECT-PROPERTIES
      {
        Date=13.11.09;
        Time=13:54:32;
        Modified=Yes;
        Version List=Parge;
      }
      PROPERTIES
      {
        OnPreReport=BEGIN
                      IF ExportExcel THEN BEGIN
                        ExcelBuff.RESET;
                        ExcelBuff.DELETEALL;
                      END;
                    END;
    
        OnPostReport=BEGIN
                       IF ExportExcel THEN BEGIN
                         ExcelBuff.CreateBook;
                         ExcelBuff.CreateSheet(CurrReport.OBJECTID(TRUE),CurrReport.OBJECTID(TRUE),COMPANYNAME,USERID);
                         ExcelBuff.GiveUserControl;
                       END;
                     END;
    
        Orientation=Landscape;
      }
      DATAITEMS
      {
        { PROPERTIES
          {
            DataItemTable=Table254;
            DataItemTableView=SORTING(Document No.,Posting Date);
            OnAfterGetRecord=BEGIN
                               Skipped := FALSE;
    
                               IF NOT (("VAT Entry"."Document Type" = "VAT Entry"."Document Type"::Invoice) OR
                                      ("VAT Entry"."Document Type" = "VAT Entry"."Document Type"::"Credit Memo")) THEN BEGIN
                                 Skipped := TRUE;
                                 CurrReport.SKIP;
                               END;
    
                               IF (("VAT Entry"."Document Type" = "VAT Entry"."Document Type"::Invoice)
                                    AND ("VAT Entry".Type = "VAT Entry".Type::Sale)) OR
                                  (("VAT Entry"."Document Type" = "VAT Entry"."Document Type"::"Credit Memo")
                                    AND ("VAT Entry".Type = "VAT Entry".Type::Purchase)) THEN BEGIN
                                 Skipped := TRUE;
                                 CurrReport.SKIP;
                               END;
    
                               IF STRPOS("VAT Entry"."VAT Bus. Posting Group",'IPTAL') <> 0 THEN BEGIN
                                 Skipped := TRUE;
                                 CurrReport.SKIP;
                               END;
    
                               TotalQty := 0;
                               UoM := '';
                               ItemDesc := '';
                               CustVendName := '';
                               CustVendTaxAreaCode := '';
                               CustVendTaxRegNo := '';
    
                               IF "VAT Entry".Type = "VAT Entry".Type::Purchase THEN
                                 IF Vendor.GET("VAT Entry"."Bill-to/Pay-to No.") THEN BEGIN
                                   CustVendName := Vendor.Name;
                                   CustVendTaxAreaCode := Vendor."Tax Area Code";
                                   CustVendTaxRegNo := Vendor."Tax Registration No.";
                                 END;
    
                               IF "VAT Entry".Type = "VAT Entry".Type::Sale THEN
                                 IF Customer.GET("VAT Entry"."Bill-to/Pay-to No.") THEN BEGIN
                                   CustVendName := Customer.Name;
                                   CustVendTaxAreaCode := Customer."Tax Area Code";
                                   CustVendTaxRegNo := Customer."Tax Registration No.";
                                 END;
                             END;
    
            ReqFilterFields=Posting Date;
            TotalFields=Base,Amount;
            GroupTotalFields=Document No.;
          }
          SECTIONS
          {
            { PROPERTIES
              {
                SectionType=Header;
                PrintOnEveryPage=Yes;
                SectionWidth=21300;
                SectionHeight=846;
                OnPreSection=BEGIN
                               IF ExportExcel AND (CurrReport.PAGENO = 1) AND CurrReport.SHOWOUTPUT THEN BEGIN
                                 RowNo += 1;
                                 ColNo := 1;EnterCell(RowNo,ColNo,'ADI/šNVANI',TRUE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,'VERG˜ DA˜RES˜',TRUE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,'HESAP NO',TRUE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,'C˜NS˜',TRUE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,'M˜KTARI',TRUE,'');
                                 ColNo += 2;EnterCell(RowNo,ColNo,'TAR˜H',TRUE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,'NOSU',TRUE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,'TUTARI',TRUE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,'KDV',TRUE,'');
                               END;
                             END;
    
              }
              CONTROLS
              {
                { 1000000001;Label  ;0    ;0    ;3900 ;846  ;ParentControl=1000000000;
                                                             VertAlign=Bottom;
                                                             FontBold=Yes;
                                                             MultiLine=Yes;
                                                             CaptionML=TRK=ADI/šNVANI }
                { 1000000003;Label  ;4050 ;0    ;1950 ;846  ;ParentControl=1000000002;
                                                             VertAlign=Bottom;
                                                             FontBold=Yes;
                                                             MultiLine=Yes;
                                                             CaptionML=TRK=VERG˜ DA˜RES˜ }
                { 1000000005;Label  ;6150 ;0    ;2100 ;846  ;ParentControl=1000000004;
                                                             VertAlign=Bottom;
                                                             FontBold=Yes;
                                                             MultiLine=Yes;
                                                             CaptionML=TRK=HESAP NO }
                { 1000000007;Label  ;8400 ;0    ;4650 ;846  ;ParentControl=1000000006;
                                                             VertAlign=Bottom;
                                                             FontBold=Yes;
                                                             MultiLine=Yes;
                                                             CaptionML=TRK=C˜NS˜ }
                { 1000000009;Label  ;13200;0    ;1050 ;846  ;ParentControl=1000000008;
                                                             VertAlign=Bottom;
                                                             FontBold=Yes;
                                                             MultiLine=Yes;
                                                             CaptionML=TRK=M˜KTARI }
                { 1000000012;Label  ;15300;0    ;1200 ;846  ;ParentControl=1000000011;
                                                             HorzAlign=Right;
                                                             VertAlign=Bottom;
                                                             FontBold=Yes;
                                                             MultiLine=Yes;
                                                             CaptionML=TRK=TAR˜H }
                { 1000000014;Label  ;16650;0    ;1500 ;846  ;ParentControl=1000000013;
                                                             VertAlign=Bottom;
                                                             FontBold=Yes;
                                                             MultiLine=Yes;
                                                             CaptionML=TRK=NO'SU }
                { 1000000016;Label  ;18300;0    ;1500 ;846  ;ParentControl=1000000015;
                                                             HorzAlign=Right;
                                                             VertAlign=Bottom;
                                                             FontBold=Yes;
                                                             MultiLine=Yes;
                                                             CaptionML=TRK=TUTARI }
                { 1000000018;Label  ;19950;0    ;1350 ;846  ;ParentControl=1000000017;
                                                             HorzAlign=Right;
                                                             VertAlign=Bottom;
                                                             FontBold=Yes;
                                                             MultiLine=Yes;
                                                             CaptionML=TRK=KDV }
              }
               }
            { PROPERTIES
              {
                SectionType=GroupFooter;
                SectionWidth=21300;
                SectionHeight=423;
                OnPreSection=BEGIN
                               CurrReport.SHOWOUTPUT := CurrReport.TOTALSCAUSEDBY = FIELDNO("Document No.");
    
                               IF NOT Skipped THEN BEGIN
    
                               IF "VAT Entry"."Document Type" = "VAT Entry"."Document Type"::Invoice THEN BEGIN
                                 PurchInvLine.RESET;
                                 PurchInvLine.SETCURRENTKEY("Document No.",Type);
                                 PurchInvLine.SETRANGE("Document No.","VAT Entry"."Document No.");
                                 PurchInvLine.SETRANGE(Type,PurchInvLine.Type::Item);
                                 TotalQty := PurchInvLine.Quantity;
                                 IF PurchInvLine.FINDFIRST THEN BEGIN
                                   PurchInvLine.CALCSUMS(Quantity);
                                   TotalQty := PurchInvLine.Quantity;
                                   UoM := PurchInvLine."Unit of Measure Code";
                                   ItemDesc := PurchInvLine.Description;
                                 END ELSE BEGIN
                                   PurchInvLine.SETRANGE(Type,PurchInvLine.Type::"Charge (Item)");
                                   IF PurchInvLine.FINDFIRST THEN BEGIN
                                     ValueEntry.RESET;
                                     ValueEntry.SETRANGE("Document No.",PurchInvLine."Document No.");
                                     IF ValueEntry.FINDFIRST THEN BEGIN
                                       TotalQty := ValueEntry."Valued Quantity";
                                       IF Item.GET(ValueEntry."Item No.") THEN BEGIN
                                         ItemDesc := Item.Description;
                                         UoM := Item."Base Unit of Measure";
                                       END;
                                     END;
                                   END;
                                 END;
                               END ELSE BEGIN
                                 PurchCrMemoLine.RESET;
                                 PurchCrMemoLine.SETCURRENTKEY("Document No.",Type);
                                 PurchCrMemoLine.SETRANGE("Document No.","VAT Entry"."Document No.");
                                 PurchCrMemoLine.SETRANGE(Type,PurchCrMemoLine.Type::Item);
                                 IF PurchCrMemoLine.FINDFIRST THEN
                                   PurchCrMemoLine.CALCSUMS(Quantity);
                                   TotalQty := PurchCrMemoLine.Quantity;
                                 UoM := PurchCrMemoLine."Unit of Measure Code";
                                 ItemDesc := PurchCrMemoLine.Description;
                               END;
    
                               CurrReport.SHOWOUTPUT := CurrReport.SHOWOUTPUT AND
                                  (ABS("VAT Entry".Base) > Threshold);
    
                               IF ExportExcel AND CurrReport.SHOWOUTPUT THEN BEGIN
                                 RowNo += 1;
                                 ColNo := 1;EnterCell(RowNo,ColNo,CustVendName,FALSE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,CustVendTaxAreaCode,FALSE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,CustVendTaxRegNo,FALSE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,ItemDesc,FALSE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,FORMAT(TotalQty),FALSE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,UoM,FALSE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,FORMAT("Posting Date"),FALSE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,"External Document No.",FALSE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,FORMAT(Base),FALSE,'');
                                 ColNo += 1;EnterCell(RowNo,ColNo,FORMAT(Amount),FALSE,'');
                               END;
    
                               END ELSE
                                 CurrReport.SHOWOUTPUT(FALSE);
                             END;
    
              }
              CONTROLS
              {
                { 1000000000;TextBox;0    ;0    ;3900 ;423  ;SourceExpr=CustVendName }
                { 1000000002;TextBox;4050 ;0    ;1950 ;423  ;SourceExpr=CustVendTaxAreaCode }
                { 1000000004;TextBox;6150 ;0    ;2100 ;423  ;SourceExpr=CustVendTaxRegNo }
                { 1000000006;TextBox;8400 ;0    ;4650 ;423  ;SourceExpr=ItemDesc }
                { 1000000008;TextBox;13200;0    ;1050 ;423  ;SourceExpr=TotalQty }
                { 1000000010;TextBox;14400;0    ;750  ;423  ;SourceExpr=UoM }
                { 1000000011;TextBox;15300;0    ;1200 ;423  ;SourceExpr="Posting Date" }
                { 1000000013;TextBox;16650;0    ;1500 ;423  ;SourceExpr="External Document No." }
                { 1000000015;TextBox;18300;0    ;1500 ;423  ;SourceExpr=Base }
                { 1000000017;TextBox;19950;0    ;1350 ;423  ;SourceExpr=Amount }
              }
               }
          }
           }
      }
      REQUESTFORM
      {
        PROPERTIES
        {
          Width=9020;
          Height=3410;
        }
        CONTROLS
        {
          { 1000000000;TextBox;3410 ;0    ;1700 ;440  ;CaptionML=TRK=Snr;
                                                       SourceExpr=Threshold }
          { 1000000001;Label  ;0    ;0    ;3300 ;440  ;ParentControl=1000000000 }
          { 1000000004;CheckBox;3410;550  ;440  ;440  ;ShowCaption=No;
                                                       CaptionML=TRK=Excel'e G”nder;
                                                       SourceExpr=ExportExcel }
          { 1000000005;Label  ;0    ;550  ;3300 ;440  ;ParentControl=1000000004 }
        }
      }
      CODE
      {
        VAR
          PurchInvLine@1000000000 : Record 123;
          PurchCrMemoLine@1000000001 : Record 125;
          Vendor@1000000002 : Record 23;
          TotalQty@1000000003 : Decimal;
          UoM@1000000004 : Code[10];
          Threshold@1000000005 : Decimal;
          ItemDesc@1000000006 : Text[100];
          RowNo@1000000008 : Integer;
          ColNo@1000000009 : Integer;
          ExportExcel@1000000010 : Boolean;
          ValueEntry@1000000011 : Record 5802;
          Item@1000000012 : Record 27;
          Customer@1000000013 : Record 18;
          CustVendName@1000000014 : Text[50];
          CustVendTaxAreaCode@1000000015 : Code[20];
          CustVendTaxRegNo@1000000016 : Code[20];
          Skipped@1000000017 : Boolean;
          ExcelBuff@1000000007 : Record 370;
    
        PROCEDURE EnterCell@1000000008(aRow@1000000000 : Integer;aCol@1000000001 : Integer;aValue@1000000002 : Text[250];aBold@1000000003 : Boolean;aFormat@1000000004 : Text[30]);
        BEGIN
          ExcelBuff.INIT;
          ExcelBuff.VALIDATE("Row No.",aRow);
          ExcelBuff.VALIDATE("Column No.",aCol);
          ExcelBuff.VALIDATE("Cell Value as Text",aValue);
          ExcelBuff.VALIDATE(Bold,aBold);
          ExcelBuff.VALIDATE(NumberFormat,aFormat);
          ExcelBuff.INSERT;
        END;
    
        BEGIN
        END.
      }
    }
    

    First image belongs to fast client. Second belongs to slow one.
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
  • jannestigjannestig Member Posts: 1,000
    By the looks of your Report its Export to Excel. Anayslsi by dimensions perhaps?

    IS this a customised report or a standard?

    This could be the amount of data being exported by different users, or the versions of office on each as well.

    Run another export with the same filters from same DB and tell us the difference.
  • Cem_KaraerCem_Karaer Member Posts: 281
    The client with the following configuration also experiences the same problem. I'm sorry for the local language configuration information.
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
  • Cem_KaraerCem_Karaer Member Posts: 281
    jannestig wrote:
    By the looks of your Report its Export to Excel. Anayslsi by dimensions perhaps?

    IS this a customised report or a standard?

    This could be the amount of data being exported by different users, or the versions of office on each as well.

    Run another export with the same filters from same DB and tell us the difference.

    The report is a customized report for legislative purposes. The slow machine and the fast machine gave absolutely the same filters; so amount of data is the same. I disabled the Excel-export feature, re-compiled and re-run the report in two clients with no change at all; the slow one was slow again, the fast one was fast.
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
  • Cem_KaraerCem_Karaer Member Posts: 281
    We found the reason. The Vista patched (4.03) set-up had been installed to the slow client. The fast client's installation was normal installation and then patches were applied. Re-installing Navision with older installation and then applying the patches solved the problem.
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
Sign In or Register to comment.