Reportkonverter von ForNAV und IDYN

15. Januar 2016 11:54

Hat jemand einen Vergleich zwischen den beiden Konvertern. Habe selbst den ForNAV getestet: Inhalte und Layout passen (fast) perfekt! Allerdings habe ich (als Nicht-Entwickler) gesehen, dass der sich in einem Report sehr oft einklinkt. Ist das beim idyn auch so (von idyn gibt es seit Dez. 2015 eine neue Version). Grüße, Thomas

Re: Reportkonverter von ForNAV und IDYN

20. Januar 2016 12:40

Hallo Thommes,

was meinst Du genau mit einklinken?

Gruß

Michael

Re: Reportkonverter von ForNAV und IDYN

20. Januar 2016 12:52

MichaelK hat geschrieben:Hallo Thommes,

was meinst Du genau mit einklinken?

Gruß

Michael

Hallo Michael,
wenn Du in dem nachstehenden Code nach "ForNAV" suchst, findest Du die Stellen, die ich als "einklinken" bezeichne.
Habe zwischenzeitlich beide etwas testen können: bei beiden Konvertern kann man die damit erzeugten / konvertierten Reports nicht mehr mit Visual Studio anpassen, sondern muss den herstellereigenen Designer verwenden. Wobei hier beide Designer einen intuitiv und gut bedienbaren Eindruck machen. Wie das dann bei zukünftigen Updates ist, kann ich leider nicht sagen.
Grüße, Thomas

Code:
===Code START===
OBJECT Report 50000 VK Lieferschein
{
  OBJECT-PROPERTIES
  {
    Date=;
    Time=;
    Version List=
  }
  PROPERTIES
  {
    OnPreReport=BEGIN
                  PaymentSetup.GET;
                  ;IF NOT ReportForNav.Pre THEN CurrReport.QUIT;
                END;
    OnInitReport=BEGIN
                   ReportForNav:= ReportForNav.Report(CurrReport.OBJECTID,CurrReport.LANGUAGE,SERIALNUMBER,'',GUIALLOWED); ReportForNav.Init; 
                 END;
    OnPostReport=BEGIN
                   ReportForNav.Post;
                 END;
    
  }
  DATASET
  {
    { 1;   ;DataItem;                   ;
               DataItemTable=Table110;
               DataItemTableView=SORTING(No.);
               ReqFilterHeadingML=DEU=Geb. Verkaufslieferung;
               OnPreDataItem=BEGIN
                               Firmendaten.GET;
                               FormatAdr.Company(FirmaAdr,Firmendaten);
                               ;ReportForNav.PreDataItem('SalesShipmentHeader');
                             END;
               OnAfterGetRecord=BEGIN
                                  IF "Salesperson Code" = '' THEN BEGIN
                                    VerkEinkPerson.INIT;
                                    Verk„uferText := '';
                                  END ELSE BEGIN
                                    VerkEinkPerson.GET("Salesperson Code");
                                    Verk„uferText := 'Verk„ufer';
                                  END;
                                  IF "Your Reference" = '' THEN
                                    ReferenzText := ''
                                  ELSE
                                    ReferenzText := FIELDNAME("Your Reference");
                                  FormatAdr.SalesShptShipTo(LieferAnAdr,"Sales Shipment Header");
                                  FormatAdr.SalesShptBillTo(DebAdr,"Sales Shipment Header");
                                  DebAdrZeigen := "Bill-to Customer No." <> "Sell-to Customer No.";
                                  FOR i := 1 TO ARRAYLEN(DebAdr) DO
                                    IF DebAdr[i] <> LieferAnAdr[i] THEN
                                      DebAdrZeigen := TRUE;
                                  ;ReportForNav.WriteDataItem('SalesShipmentHeader',CurrReport.LANGUAGE);
                                END;
               ReqFilterFields=No.,Sell-to Customer No.,No. Printed;
               OnPostDataItem=BEGIN
                                ReportForNav.PostDataItem('SalesShipmentHeader');
                              END;
                }
    { 2; 1 ;DataItem; KopieSchleife                  ;
               DataItemTable=Table2000000026;
               DataItemTableView=SORTING(Number);
               OnPreDataItem=BEGIN
                               AnzSchleifen := 1 + ABS(AnzKopien);
                               KopieText := '';
                               SETRANGE(Number,1,AnzSchleifen);
                               ;ReportForNav.PreDataItem('KopieSchleife');
                             END;
               OnAfterGetRecord=BEGIN
                                  IF Number > 1 THEN
                                    KopieText := 'KOPIE';
                                  ReportForNav.PageNo := 1;
                                  ;ReportForNav.WriteDataItem('KopieSchleife',CurrReport.LANGUAGE);
                                END;
               OnPostDataItem=BEGIN
                                ReportForNav.PostDataItem('KopieSchleife');
                                IF NOT CurrReport.PREVIEW THEN
                                  LiefDruckZ„hler.RUN("Sales Shipment Header");
                              END;
                }
    { 3; 2 ;DataItem; SeiteSchleife                  ;
               DataItemTable=Table2000000026;
               DataItemTableView=SORTING(Number) WHERE(Number=CONST(1));
               OnPreDataItem=BEGIN
                               ReportForNav.PreDataItem('SeiteSchleife');
                             END;
               OnAfterGetRecord=BEGIN
                                  ReportForNav.WriteDataItem('SeiteSchleife',CurrReport.LANGUAGE);
                                END;
               OnPostDataItem=BEGIN
                                ReportForNav.PostDataItem('SeiteSchleife');
                              END;
                }
    { 4; 3 ;DataItem;                   ;
               DataItemTable=Table111;
               DataItemTableView=SORTING(Document No.,Line No.);
               OnPreDataItem=BEGIN
                               MehrZeilen := FIND('+');
                               WHILE MehrZeilen AND (Description = '') AND ("No." = '') AND (Quantity = 0) DO
                                 MehrZeilen := NEXT(-1) <> 0;
                               IF NOT MehrZeilen THEN
                                 CurrReport.BREAK;
                               SETRANGE("Line No.",0,"Line No.");
                               ;ReportForNav.PreDataItem('SalesShipmentLine');
                             END;
               DataItemLinkReference=Sales Shipment Header;
               DataItemLink=Document No.=FIELD(No.);
               OnAfterGetRecord=BEGIN
                                  ReportForNav.WriteDataItem('SalesShipmentLine',CurrReport.LANGUAGE);
                                END;
               OnPostDataItem=BEGIN
                                ReportForNav.PostDataItem('SalesShipmentLine');
                              END;
                }
    { 5; 3 ;DataItem; Total                  ;
               DataItemTable=Table2000000026;
               DataItemTableView=SORTING(Number) WHERE(Number=CONST(1));
               OnPreDataItem=BEGIN
                               ReportForNav.PreDataItem('Total');
                             END;
               OnAfterGetRecord=BEGIN
                                  ReportForNav.WriteDataItem('Total',CurrReport.LANGUAGE);
                                END;
               OnPostDataItem=BEGIN
                                ReportForNav.PostDataItem('Total');
                              END;
                }
    { 6; 3 ;DataItem; Total2                  ;
               DataItemTable=Table2000000026;
               DataItemTableView=SORTING(Number) WHERE(Number=CONST(1));
               OnPreDataItem=BEGIN
                               IF NOT DebAdrZeigen THEN
                                 CurrReport.BREAK;
                               ;ReportForNav.PreDataItem('Total2');
                             END;
               OnAfterGetRecord=BEGIN
                                  ReportForNav.WriteDataItem('Total2',CurrReport.LANGUAGE);
                                END;
               OnPostDataItem=BEGIN
                                ReportForNav.PostDataItem('Total2');
                              END;
                }
    { 7;   ;DataItem; ReportForNavOutputInteger                  ;
               DataItemTable=Table2000000026;
               DataItemTableView=SORTING(Number)
                                 WHERE(Number=FILTER(1..));
               OnPreDataItem=BEGIN
                               ReportForNav.FlushOutput();
                             END;
               OnAfterGetRecord=BEGIN
                                  IF NOT ReportForNavOutput.GET(Number) THEN
                                    CurrReport.BREAK;
                                  ReportForNavOutput.CALCFIELDS(Blob);
                                END;
                }
    { 8   ;1   ;Column  ;ReportForNavPicture             ;
               SourceExpr=ReportForNavOutput.Blob; }

  }

  REQUESTPAGE
  {
    PROPERTIES
    {
      SaveValues=Yes;
      
    }
    CONTROLS
    {
      { 1900000001;0;Container;
                 ContainerType=ContentArea;
                  }
      { 1900000002;1;Group;
                 CaptionML=ENU=Options;
                  }
      { 1;2;Field;
                 CaptionML=DEU=Anzahl Kopien;
                 SourceExpr=AnzKopien;
                  }
      
    }
  }
  
  
  CODE
  {
    VAR
      VerkEinkPerson@1119436000 : Record 13;
      Firmendaten@1119436001 : Record 79;
      PaymentSetup@1000000000 : Record 5001901;
      LiefDruckZ„hler@1119436002 : Codeunit 314;
      DebAdr@1119436003 : ARRAY [8] OF Text[50];
      LieferAnAdr@1119436004 : ARRAY [8] OF Text[50];
      FirmaAdr@1119436005 : ARRAY [8] OF Text[50];
      Verk„uferText@1119436006 : Text[20];
      ReferenzText@1119436007 : Text[30];
      MehrZeilen@1119436008 : Boolean;
      AnzKopien@1119436009 : Integer;
      AnzSchleifen@1119436010 : Integer;
      KopieText@1119436011 : Text[30];
      DebAdrZeigen@1119436012 : Boolean;
      i@1119436013 : Integer;
      FormatAdr@1119436014 : Codeunit 365;
      ReportForNav@5000 : DotNet "'ForNav.Reports, Version=1.0.6.0, Culture=neutral, PublicKeyToken=5284c1af2984feb0'.ForNav.Report" WITHEVENTS;
      ReportForNavClient@5003 : DotNet "'ForNav.Reports, Version=1.0.6.0, Culture=neutral, PublicKeyToken=5284c1af2984feb0'.ForNav.Report" RUNONCLIENT;
      ReportForNavDialog@5001: Dialog;
      ReportForNavOutput@5002 : TEMPORARY Record 99008535;
    EVENT ReportForNav@5000::OnNewPage@5001(InStream : DotNet "'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.IO.MemoryStream");
    VAR
      OutStream : OutStream;
    BEGIN
      ReportForNavOutput."1" := ReportForNavOutput."1" + 1; // "1" = "Primary Key" 
      ReportForNavOutput.Blob.CREATEOUTSTREAM(OutStream);
      COPYSTREAM(OutStream,InStream);
      ReportForNavOutput.INSERT;
    END;

    EVENT ReportForNav@5000::OnInit@5002();
    BEGIN
      ReportForNav.Definition := 'zkUAAM1c627jNhb+v8C+gyAgOwng2KLubuMWuThNMI7jjZ3MYovCkG06UUeWXFlOk77a/thH2ldYUheHkilSVJzLAJmMZUn8vsPDw4+Hh/O///z36OenhSc9wnDlBn5HBk1FlqA/DWauf9+R19H80JZ//unvfzv6VxQ6N3AZhNGq5zwH62gIQ9fx3L9gKL38827zIr2p' +
                                 'Ng38ths478jod99ZwI6cvuI8CPvOoyydBn4UBt7oeYm+O4OP3adlCFerJtFa8/aS+Kg2pJLbHnGTDSlFIHWkDEJDOl170TqE6JoP1+gRryEN1hPPnX6Fz6PgO8R3z6ypY0NbVay5DnUFAT5zV0vPeU5wd0N/FUmH0t1XqefCOWpk+gBdX5ZyjNFDS7cjq4aOeRNM7wgD' +
                                 'N01sluvJ73Aa9YOObCgKbu7chd7sG5wgYz66U3gbeh35IYqWP7RaZ11FObzsG+Cw17z3gonjNefrxQ+2otuts2ffWbjTVf/4zlZa12dO5LROg8XS8Z/3v3zbO9X2jnWMNYTunqrENL4cZOhufTfqyCPoRw+r6/nxlet57gJGMJSlKye8d/0VIqMZDQkZ0dDQXypCirxB' +
                                 'ko66TxH0MadV/BldSV45CIMlDCMXrqRt0q3k2Vbh4aMTx59t3nMZwQVI3AZkbjN0PLgaPrjLBcJ6AZ0ZhphznsTOmD5+Hr9QlnrwEXrJW+CfA+ceDmB4A6dBOOvIUbiGqLvS+0fOxEMviX8BoBS+uHPhnwjD9c3osv/Lfj9oxgb849z1kKkwGjRYrnrIgbu3nV/gpImZ' +
                                 'f3fW85UXu8ravyfuj/sZ2RW9pjGEnncYBchBV1GwQCMJX0Q/0iB0/QjO5NQmBRMVzaRmZvoaLF04nD540J1DIQNl1wdOiCx8OSsxOc+Od05IRUKzs6okf1STbe71YgLDA5ngTjFH0STaxnOgG+3KJCWkNqQLbb2etPTtonvTTT91Tq/7w9E+OCjYotQeRZvoVPpJ1ybk' +
                                 'ExrJFUAGswvo3j9E5x3Z1k3SRrGfXvtdNIE8Y8dI/YECBEFJG6fBLEI1qFBH8Ck6CZ4ynLmLObi9YOpEKLyce4GDApwKGoZiNRHyIZqkMAtbbehqEznJOWqlIx/j+ashAWUZNaRV9Iy66yTwZkkXDWEUj9m0j0c3w9uT4ah/PSYngsE0AuhHHVOGzbgfjGPXGWURsIS8' +
                                 'mpA3hcmrDPLAsIwCfWDaKf2LIPzr2HPvUZC+wT1cMEh7GXFsELs8Jj8+v765Oh6Nk1kgQTfGLtEPOKy1hLUlzFpnsFYaCre3AZ1d0q3H/vEMjwEmdD2BbgtDN5nQE7CvRq9y0BsJ+rYwepuJ3tYrjDQ+eo2D3kwlgiIeKhQmfqCazfYOCOgcAlZKAIgTYI13RMBsYyn6' +
                                 'agIGh4CdElDFCRhMAioATWMHBEwOgXZKQKMS6DkT6OXhx5dU9uA1NZ0Ar1paCv7UWeL7sE78FQvFr2t/Bn1/vUC678du/7ZDisDfcqG5B+fUyMwkB5SUHX3aZ04nFmsyRYwKHDWwPZ0kmEVJV5p9kGi+cn38YPY0mmCpcpVtoGyRIS42NLb/WqDdBC/mAVlMRMuCKDXP' +
                                 'SRAh5GiZhZambs/1M+XE73aeQMlbAr96fH7Z7Z2dHg9Gl9f9MXc+BqkMAeI6RGMNDewmecsAxQICptm1Jc7gahq6sYPyTJJqFCAuUjTWWAKaqhW9xVBTk2xrs48w0j/Xjh+50TPPQqkUAuJaSGPJCWC0zaLXIPX6cU6DUybB/Ao6q3UIeUZJFRYQl1gae4I0tKa9gwnS' +
                                 '4hFIRZYqLrJMtjpX2ybRpfUZ2DwGqcpSxVUWK8ZjwPlJ8IXCq9dU8XIqXkyeuyHywpkTQX98igYhdXU5CFY8I6RKTaUrteGDs4R5E8SXWJELLVJMg1ilAMvUM+VMx3LUYqz/j1oxzrIERjojqRo1H4gHafXMjkpNdvEzNwAAmZWyOQuma4wmzuFhSFKSKMweQZe+32C/' +
                                 'hf40YyBlFKRMsZB3d2TynZ04DCXZR7qBy3JAL36QmpGuCE+C2TOZBsKfcwuNTRIo8fOXLNCFs7r2ByEcwmkUJ3zLk0AxFk4iaAtvDYHW5ggRJS9CKMGnZJwSomF7qigfhxz/Z4+BjUGycUBXZrQO1PgdqL59B9bI7bDW6B/TgYU+EBc6OitHGUtBJScDE04nnuN//zcM' +
                                 'gzJFQyOZqbZaDFOxq4qrFp2diERSTqEkIasQysmuNxl4aoUcpUbXQbSBp/MHnvbmA08TVz06W3kquWVtyaq/SocWl+xio08TzznpLEH6oRElcy56GorJiaVRP1FESReHmngqSmdlFD55RNEqbB1odG1DiygGP6Lobx9RxJNCOnsd8VkiSg2NwkpcfIqIUkOjsITzJ4wo' +
                                 '4hrFYCnLTx5R9JKVdfnKD41vb73wqywLseQeButwCnF5Vc4JE7aJhbEZd+iz5BjEAplE8JJ7fGn+DE7dhePtyqHI4YLVK9n8P/5YB9GPuFelYC6l/ZpcrGKQ2u5AOjiWY9uY+kFzG8dpMIOvjYvYD8v8pVwm54yoZ6NuFES4n6rmZTSBvMym4iZt4x0rbWK+8XijmrB8' +
                                 '5s/1qpEzEl3MUq2k17aS+kFmqhJ5quczTKoISrYDNgmpnakdnS4KynaGDfa2YK6sw9SU7Y1hvEV6A6cP/tq/lxxfOp7hMlfuLsa7JJ10upigdZLF76S3TzrpNaQBS6lqGqkM1Lb+Gq164r56D7vYP4b4Ho3BrmR4YasB413YjnsT751SOQY9NUJzZ5vqzppmN3Vi9tqZ' +
                                 '4xriuQ2DXZGlUKJOtWXIhF0Et+WD4ikMg7XgKI2Z1dEziuC2XEI8PWGyS8lypXB10DOK4DboU01hiO+SmKyEdLEQrg58RgncBn66R26IJxZMkTK4OvAZBXAb+OkOuSGePjA5e/y5Irg68Bnlbxv46fa4UaOElZ3WyZco1IHPKE7YwE83tg3xud5kh8x8fUId+IzKhFdm' +
                                 'EHe03jcV2tKSui+dfJWuOfFsXjy0Un01ugPlk6uVB2Sjt/4MztHydibKjCzx2efRPHhDjUPOR6ZaTMhgv/oV/FYtHcOZu8m5w9SoLakCLVUsNsdlQZSWNIGWKhaGmwa1JV2gpYoV3KZJbckQaKliqTWOuZSWTIGWKtZE4/BIackSaIlbXJYWKJttalO2QFOlsZafz9pO' +
                                 'qZaFV0ZoJcOqVQirL4Vd+1/IE0PSHpD21C8NqWrc3cSfhpScJkImOSiJfu9ybomMwxYoZx2npxDdL43kjNA+eUaomZwROqjFpP7po9zJo0KcJcoLKwZb/pEhMtpaWnl71UIu/5APGXMtvby9aoGXfyyHjLyWUd5etfDLP0VDxl/LLG+vWhDmH3oho7BllbdXLRTzz6iQ' +
                                 'sdiy6wk12uni6kLtlccsciHeatdVaXizolyjsSVZ3ZMQudMhtrJr6MRGWS3Y3GMLuVMcdm2BXIY/22arBZ59nCB32MJW38ZpqBt6tchUOAuQOxxhMwJ/NWXFr93PHTywGZG/mr7il9rnDgrYRrkM2AONRPAQVe1NXNVeXQINglXk+vcYZ77fxGTDbgrsy7QlbUtlW1MW' +
                                 '78rfQX778s1Ri/G/sPz0fw==';
      
    END;
    
    EVENT ReportForNav@5000::OnPost@5010();
    BEGIN
    
    END;

    EVENT ReportForNav@5000::OnWriteDataItemControl@5008(DataItemId : Text; SectionId : Text; ControlId : Text; DataSetFieldName : Text); 
    BEGIN
      CASE DataSetFieldName OF
        // SalesShipmentHeader 
        // KopieSchleife 
        // SeiteSchleife 
        'STRSUBSTNO_LieferscheinPct1Pct2_SalesShipmentHeader_No_KopieT':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,STRSUBSTNO('Lieferschein %1 %2', "Sales Shipment Header"."No.", KopieText),'Text');
        'STRSUBSTNO_SeitePct1_FORMAT_ReportForNav_PageNo':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,STRSUBSTNO('Seite %1',FORMAT(ReportForNav.PageNo)),'Text');
        'LieferAnAdr1':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,LieferAnAdr[1],'Text');
        'LieferAnAdr2':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,LieferAnAdr[2],'Text');
        'LieferAnAdr3':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,LieferAnAdr[3],'Text');
        'LieferAnAdr4':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,LieferAnAdr[4],'Text');
        'LieferAnAdr5':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,LieferAnAdr[5],'Text');
        'LieferAnAdr6':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,LieferAnAdr[6],'Text');
        'SellMinustoCustomerNo_SalesShipmentHeader':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,FORMAT("Sales Shipment Header"."Sell-to Customer No.",0),'Code');
        '_SalesShipmentLine_FIELDCAPTION_No':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,"Sales Shipment Line".FIELDCAPTION("No."));
        '_SalesShipmentLine_FIELDCAPTION_Description':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,"Sales Shipment Line".FIELDCAPTION(Description));
        '_SalesShipmentLine_FIELDCAPTION_Quantity':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,"Sales Shipment Line".FIELDCAPTION(Quantity));
        '_SalesShipmentLine_FIELDCAPTION_UnitofMeasure':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,"Sales Shipment Line".FIELDCAPTION("Unit of Measure"));
        'LieferAnAdr7':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,LieferAnAdr[7],'Text');
        'LieferAnAdr8':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,LieferAnAdr[8],'Text');
        'STRSUBSTNO_Pct1_Pct2_Firmendaten_City_SalesShipmentHeader_Pos':  WITH SeiteSchleife DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,STRSUBSTNO('%1, %2', Firmendaten.City, "Sales Shipment Header"."Posting Date"),'Text');
        // SalesShipmentLine 
        'Description_SalesShipmentLine':  WITH "Sales Shipment Line" DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,Description,'Text');
        'Quantity_SalesShipmentLine':  WITH "Sales Shipment Line" DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,FORMAT(Quantity,0,'<Sign><Integer Thousand><Decimals>'),'Decimal');
        'UnitofMeasure_SalesShipmentLine':  WITH "Sales Shipment Line" DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,"Unit of Measure",'Text');
        'No_SalesShipmentLine':  WITH "Sales Shipment Line" DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,FORMAT("No.",0),'Code');
        // Total 
        // Total2 
        'BillMinustoCustomerNo_SalesShipmentHeader':  WITH Total2 DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,FORMAT("Sales Shipment Header"."Bill-to Customer No.",0),'Code');
        'BillMinustoCustomerNo_SalesShipmentHeader_Lbl':  WITH Total2 DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,"Sales Shipment Header".FIELDCAPTION("Bill-to Customer No."));
        'DebAdr1':  WITH Total2 DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,DebAdr[1],'Text');
        'DebAdr2':  WITH Total2 DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,DebAdr[2],'Text');
        'DebAdr3':  WITH Total2 DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,DebAdr[3],'Text');
        'DebAdr4':  WITH Total2 DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,DebAdr[4],'Text');
        'DebAdr5':  WITH Total2 DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,DebAdr[5],'Text');
        'DebAdr6':  WITH Total2 DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,DebAdr[6],'Text');
        'DebAdr7':  WITH Total2 DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,DebAdr[7],'Text');
        'DebAdr8':  WITH Total2 DO ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,DebAdr[8],'Text');
      
      END;
    END;

    EVENT ReportForNav@5000::OnWrite@5003(DataItemId : Text;SectionId : Text); 
    BEGIN
      CASE DataItemId OF
        'SalesShipmentLine': CASE SectionId OF
          'Body2': OnPreSectionSalesShipmentLine_Body2("Sales Shipment Line");
          'Body3': OnPreSectionSalesShipmentLine_Body3("Sales Shipment Line");
          'Body4': OnPreSectionSalesShipmentLine_Body4("Sales Shipment Line");
          'Body5': OnPreSectionSalesShipmentLine_Body5("Sales Shipment Line");
        END;
        'Total2': CASE SectionId OF
          'Body7': OnPreSectionTotal2_Body7(Total2);
        END;
      END;
    END;
    
    EVENT ReportForNav@5000::OnWriteFieldControl@5011(DataItemId : Text;SectionId : Text;ControlId : Text;FieldNo : Integer;FormatStr : Text;Caption : Boolean);
    VAR
        RecRef@1001 : RecordRef;
        FieldRef@1007 : FieldRef;
    BEGIN
      CASE DataItemId OF
        'SalesShipmentHeader': RecRef.GETTABLE("Sales Shipment Header");
        'KopieSchleife': RecRef.GETTABLE(KopieSchleife);
        'SeiteSchleife': RecRef.GETTABLE(SeiteSchleife);
        'SalesShipmentLine': RecRef.GETTABLE("Sales Shipment Line");
        'Total': RecRef.GETTABLE(Total);
        'Total2': RecRef.GETTABLE(Total2);
      END;
      FieldRef := RecRef.FIELD(FieldNo);
      IF Caption THEN
        ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,FieldRef.CAPTION,'Text')
      ELSE
        ReportForNav.WriteTextBox(DataItemId,SectionId,ControlId,FORMAT(FieldRef.VALUE,0,FormatStr),FORMAT(FieldRef.TYPE))
    END;
    

    EVENT ReportForNav@5000::OnCheckForNavClientVersion@5007();
    VAR
      Process : DotNet "'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Diagnostics.Process" RUNONCLIENT;
      PathObj : DotNet "'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.IO.Path" RUNONCLIENT;
      FileName : Text[255];
      FileVersionInfo : DotNet "'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Diagnostics.FileVersionInfo" RUNONCLIENT; 
      FileMgmt : Codeunit 419;
    BEGIN
      FileName := PathObj.GetTempPath() + 'Microsoft Dynamics NAV\Add-Ins\' + 
      FileVersionInfo.GetVersionInfo(Process.GetCurrentProcess().MainModule.FileName).FileVersion +
      '\ReportsForNAV_' + ReportForNav.MyAssemblyVersion +
      '\' + ReportForNav.MyAssemblyName + '.dll';
      IF FileMgmt.ClientFileExists(FileName) THEN BEGIN
        IF FileVersionInfo.GetVersionInfo(FileName).FileVersion <> ReportForNav.MyFileVersion THEN BEGIN
          FileMgmt.DeleteClientFile(FileName);
        END;
      END;
      ReportForNavClient := ReportForNavClient.Report(ReportForNav.Definition); 
      IF ReportForNav.MyFileVersion <> ReportForNavClient.MyFileVersion THEN 
        ERROR('You have version %1 of the Reports ForNAV assembly here:\\%2\\Please close your NAV client and update it to version %3.',
        ReportForNavClient.MyFileVersion, ReportForNavClient.MyFileName, ReportForNav.MyFileVersion);
    END;
    
    EVENT ReportForNav@5000::OnSelectPrinter@5006();
    BEGIN
        ReportForNavClient:= ReportForNavClient.Report(ReportForNav.Definition); 
        ReportForNav.PrinterSettings.PageSettings := ReportForNavClient.SelectPrinter(ReportForNav.PrinterSettings.PrinterName,ReportForNav.PrinterSettings.ShowPrinterDialog);
    END;
    
    EVENT ReportForNav@5000::OnPrint@5005(InStream : DotNet "'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.IO.Stream");
    VAR
        ClientFileName : Text[255];
    BEGIN
        DOWNLOADFROMSTREAM(InStream, '', '<TEMP>', '', ClientFileName);
        ReportForNavClient.Print(ClientFileName); 
    END;
    

    EVENT ReportForNav@5000::OnView@5008(ClientFileName : Text; Parameters : Text; ServerFileName : Text);
    VAR
      ServerFile : File;
      ServerInStream : InStream;
    BEGIN
      ServerFile.OPEN(ServerFileName);
      ServerFile.CREATEINSTREAM(ServerInStream);
      DOWNLOADFROMSTREAM(ServerInStream,'','','',ClientFileName);
    END;
    
    EVENT ReportForNav@5000::OnMessage@5009(Operation : Text;Parameter : Text;ParameterNo : Integer);
    BEGIN
      CASE Operation OF
        'Open'    : ReportForNavDialog.OPEN(Parameter);
        'Update'  : ReportForNavDialog.UPDATE(ParameterNo,Parameter);
        'Close'   : ReportForNavDialog.CLOSE();
        'Message' : MESSAGE(Parameter);
        'Error'   : ERROR(Parameter);
      END;
    END;

    LOCAL PROCEDURE OnPreSectionSalesShipmentLine_Body2@5026(VAR SalesShipmentLine : Record 111);
    BEGIN
      WITH "Sales Shipment Line" DO BEGIN
        ReportForNav.ShowOutput(Type = 0);
      END;
    END;
    
    LOCAL PROCEDURE OnPreSectionSalesShipmentLine_Body3@5027(VAR SalesShipmentLine : Record 111);
    BEGIN
      WITH "Sales Shipment Line" DO BEGIN
        ReportForNav.ShowOutput((Type = Type::"G/L Account") AND (Quantity <>0));
      END;
    END;
    
    LOCAL PROCEDURE OnPreSectionSalesShipmentLine_Body4@5028(VAR SalesShipmentLine : Record 111);
    BEGIN
      WITH "Sales Shipment Line" DO BEGIN
        ReportForNav.ShowOutput((Type = Type::Item) AND (Quantity <>0));
      END;
    END;
    
    LOCAL PROCEDURE OnPreSectionSalesShipmentLine_Body5@5029(VAR SalesShipmentLine : Record 111);
    BEGIN
      WITH "Sales Shipment Line" DO BEGIN
        ReportForNav.ShowOutput((Type = Type::Resource) AND (Quantity <> 0));
      END;
    END;
    
    LOCAL PROCEDURE OnPreSectionTotal2_Body7@5030(VAR Total2 : Record 2000000026);
    BEGIN
      WITH Total2 DO BEGIN
        ReportForNav.ShowOutput :=
          "Sales Shipment Header"."Bill-to Customer No." <> "Sales Shipment Header"."Sell-to Customer No.";
      END;
    END;
    
    BEGIN
    {
      +---------------------------------------------------------------------------------------------------------------------------+
      |                                                                  |
      +-------+--------+----------+-----------------+--------------------------------------------------------------------+--------+
      |Version| Datum  |Entwickler| |Beschreibung                                                        |getestet|
      |-------+--------+----------+-----------------+--------------------------------------------------------------------+--------|
      |||        | |       |        |
      +-------+--------+----------+-----------------+--------------------------------------------------------------------+--------+
    }
    END.
  }
  RDLDATA
  {
    <?xml version="1.0" encoding="utf-8"?>
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition">
  <AutoRefresh>0</AutoRefresh>
  <DataSources>
    <DataSource Name="DataSource">
      <ConnectionProperties>
        <DataProvider>SQL</DataProvider>
        <ConnectString />
      </ConnectionProperties>
      <rd:DataSourceID>33ecec17-aea5-4060-a794-56a6183cda9a</rd:DataSourceID>
    </DataSource>
  </DataSources>
  <DataSets>
    <DataSet Name="DataSet_Result">
      <Query>
        <DataSourceName>DataSource</DataSourceName>
        <CommandText />
      </Query>
      <Fields>
        <Field Name="ReportForNavPicture">
          <DataField>ReportForNavPicture</DataField>
        </Field>
      </Fields>
      <DataSetInfo xmlns="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
        <DataSetName>DataSet</DataSetName>
        <SchemaPath>Report.xsd</SchemaPath>
        <TableName>Result</TableName>
      </DataSetInfo>
    </DataSet>
  </DataSets>
  <Body>
    <ReportItems>
      <Tablix Name="Tablix1">
        <TablixBody>
          <TablixColumns>
            <TablixColumn>
              <Width>8.27in</Width>
            </TablixColumn>
          </TablixColumns>
          <TablixRows>
            <TablixRow>
              <Height>11.69in</Height>
              <TablixCells>
                <TablixCell>
                  <CellContents>
                    <Image Name="Page">
                      <Source>Database</Source>
                      <Value>=Fields!ReportForNavPicture.Value</Value>
                      <MIMEType>image/png</MIMEType>
                      <Sizing>FitProportional</Sizing>
                      <Style>
                        <Border>
                          <Style>None</Style>
                        </Border>
                      </Style>
                    </Image>
                    <rd:Selected>true</rd:Selected>
                  </CellContents>
                </TablixCell>
              </TablixCells>
            </TablixRow>
          </TablixRows>
        </TablixBody>
        <TablixColumnHierarchy>
          <TablixMembers>
            <TablixMember />
          </TablixMembers>
        </TablixColumnHierarchy>
        <TablixRowHierarchy>
          <TablixMembers>
            <TablixMember>
              <Group Name="Details" />
            </TablixMember>
          </TablixMembers>
        </TablixRowHierarchy>
        <DataSetName>DataSet_Result</DataSetName>
        <Height>11.69in</Height>
        <Width>8.27in</Width>
        <Style>
          <Border>
            <Style>None</Style>
          </Border>
        </Style>
      </Tablix>
    </ReportItems>
    <Height>11.69in</Height>
    <Style />
  </Body>
  <Width>8.27in</Width>
  <Page>
    <PageHeight>11.69in</PageHeight>
    <PageWidth>8.27in</PageWidth>
    <Style />
  </Page>
  <rd:ReportID>0eeb6585-38ae-40f1-885b-8d50088d51b4</rd:ReportID>
</Report>
    END_OF_RDLDATA
  }
}
===Code ENDE===
Zuletzt geändert von Natalie am 20. Januar 2016 13:37, insgesamt 1-mal geändert.
Grund: Code-Tags für eine bessere Lesbarkeit hinzugefügt

Re: Reportkonverter von ForNAV und IDYN

20. Januar 2016 13:02

Hallo Thommes,

das ist ganz normal. ForNAV nutzt für das Reporting nicht RDLC sondern etwas eigenes. Deshalb kann es auch nicht mit Visual Studio bearbeitet werden.
IDYN hat geht ebenfalls eigene Wege. Sie nutzen ebenfalls einen eigenen Designer.

Falls die Entwicklung von ForNAV eingestellt wird, dann hast Du ein Problem.

Das ist aber auch so, wenn NAV eingestellt wird. :lol:

Gruß

Michael

Re: Reportkonverter von ForNAV und IDYN

20. Januar 2016 13:05

...und wenn idyn den Support dazu einstellt ebenso. NAV wird es doch hoffentlich noch seeeeehr lange geben :-D