ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Fixed report layout

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fixed report layout

    Hello,
    I'm trying to create print file that ends up in spool.
    The problem is that if the field or constant is eq *blank, it is not 'displayed'. The next line field's value can be seen in that line instead.

    For example:
    When the report is generated the constant from line 2 is ignored.
    Moreover if ZBA7TX is *BLANK, the ZBBETX value appears in line 2 instead of 4. What I want is to display ZBA7TX in line 3 (leave empty line if *blank) and ZBBETX in line 4.

    PHP Code:
    A          R ZAPAGHDR                  TEXT('Standard report header')      
     *.........................................................................
     * 
    Screen title                                                            
    A                                  1 43
    'Print test'                        
    A            ZAUSR         10      1 81TEXT('*USER')                       
    A                                  1 92DATE                                
    A                                      EDTWRD
    ('  /  /  ')                  
    A                                  1101TIME                                
    A                                      EDTWRD
    ('0 :  :  ')                  
    A                                  1110'Page'                              
    A                                  1116PAGNBR                              
    A                                      EDTCDE
    (3)                           
     *.........................................................................
     * 
    Fields from top of page format                                          
    A                                  2  2
    '  '                     
     
    FUN Part no Alpha                                            
    A            ZBA7TX        17      3  2TEXT
    ('FUN Part no Alpha')
     * 
    Name                                                         
    A            ZBBETX        25      4  2TEXT
    ('Name')             
     * 
    Name                                                         
    A                                  4 30
    'Text' 

    I tried to define line number for each field as well as using SPACEA, SPACEB etc. but with no result.

    Is there any way to keep the fixed report layout?
    Maybe it's not a DDS but compiler option that allows to keep blanks on report?

  • #2
    Re: Fixed report layout

    Just an empiric shot.
    Try using x'80' or any unprintable char instead of blank.
    Philippe

    Comment


    • #3
      Re: Fixed report layout

      Hi rafi:

      Are you sure the space is not there? Have you printed the report?

      If you are viewing the report using wrksplf option 5 ........

      The completely blank lines are not displayed.

      Start at the top of the report and at the control option key in +1 and watch the page/line number incriment.

      I just ran a test against your print file layout and the page/line went from 1/1 to 1/3.

      Best of Luck
      GLS
      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

      Comment


      • #4
        Re: Fixed report layout

        You are right GLS400, the lines increment. I haven't noticed that before. But the problem is that the report will not be printed.
        It is to be copied into PC (using iSeries Navigator - drag & drop). When I do this it looks just the same as spool when viewed with option 5 - the empty lines are missing...
        Is there any way to display those blanks with option 5 WRKSPLF or cause them to appear in file on PC?

        Regards,
        Rafi

        Comment


        • #5
          Re: Fixed report layout

          Reprint it again to file

          Add a generic text printer to windows and you have all the building block to create the output in PC fixed format.

          Create a windows printer that is "Generic / text" and outputs to a file.

          Now create a printer session using client access.
          use the option to "Transform print data to ASCII on the iSeries"
          for the Printer Model use *NONE

          When this process an as/400 file it creates the standard text file with all blank lines and page brakes in the correct place.

          Comment


          • #6
            Re: Fixed report layout

            Marc_d, Your solution is a little bit complicated but it works. Thanks for help.

            Comment


            • #7
              Re: Fixed report layout

              There's a free utility at the following link that you can use to convert a spooled file to a IFS stream file.

              It uses the host print transform API, but it's already been written for you:


              SPL2STMF Converts OS/400 spooled file(SCS/AFP) to PC stream file(text/PCL/TIFF/etc.).

              Comment

              Working...
              X