How to use array

roshiniroshini Member Posts: 122
Hello Experts...

How to use array in Navision. As I want to store comments for a docuement in a array and want to display in a report. Can any expert can explin how to use ??

Answers

  • SavatageSavatage Member Posts: 7,142
    Info on Arrays can be found in the Application Designers Guide on your product cd or download it here:
    http://www.microsoft.com/downloads/deta ... laylang=en

    A Post Example can be found here:
    viewtopic.php?f=23&t=27443

    Sales Order Comment Array Example We Use In Our Picking Ticket Report
    Savatage wrote:
    you add the sales comment line as a dataitem link to the sales header
    OnPreDataItem()
    FOR i := 1 TO 10 DO
      CommentText[i] := '';
    i:= 0;
    
    OnAfterGetRecord()
    i := i + 1;
    CommentText[i] :=
      '******************************************************************************************************************';
    IF (STRLEN(Comment) < STRLEN(CommentText[i])) THEN
      CommentText[i] := Comment + COPYSTR(CommentText[i],1,(STRLEN(CommentText[i]) - STRLEN(Comment)))
    ELSE
      CommentText[i] := Comment;
    

    View Sections , create pageloop header
    OnPreSection()
    IF CommentText[1] = '' THEN
      CurrReport.SHOWOUTPUT := FALSE;
    
    on the next section
    OnPreSection()
    IF CommentText[2] = '' THEN
      CurrReport.SHOWOUTPUT := FALSE;
    etc 
    etc.
    
  • roshiniroshini Member Posts: 122
    Hi Savatage,

    Thanks you very much.
    As I got clear idea about comment lines handling in reports.

    Thanks a lot for your details explaination.!!
    My problem solved.
Sign In or Register to comment.