Making a row invisible in a report

sabzamsabzam Member Posts: 1,149
Dear All,

What is the code to make a row invisible in a report. But this must not be permament therefore I can't simply choose no to visible in the properties of the column.

Comments

  • krikikriki Member, Moderator Posts: 9,110
    In the OnPreSection-trigger of the section, you can put some code to decide to show or not to show the section:
    CurrReport.SHOWOUTPUT(TRUE or FALSE);
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • sabzamsabzam Member Posts: 1,149
    Hi Kriki,

    By using that code you will be removing the whole section. I want to keep just one column in a section from printing
  • jan_jansenjan_jansen Member Posts: 12
    Just copy the whole section, en remove from the other section the columns that you don't want to show.
    Then in the first section, in the OnPreSection-trigger, you write
    CurrReport.SHOWOUTPUT(ShowColumn)
    and in the other section :
    CurrReport.SHOWOUTPUT(NOT ShowColumn)
    Where ShowColumn a variable is that you can change on the request form.

    Another option is to blank the fields before the got printed.
    IF NOT ShowColumn THEN BEGIN
    Column1 := ''
    Column2 := 0
    END;
  • kinekine Member Posts: 12,562
    sabzam wrote:
    Hi Kriki,

    By using that code you will be removing the whole section. I want to keep just one column in a section from printing

    but "subject" says "Making a row unvisible in a report" and in first post you are talking about row too... Do you want to hide one edit box or "row" (section for others) or something else? Make it clear please... 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • sabzamsabzam Member Posts: 1,149
    Sorry you have got a point. I want to make a column invisible but for a particular record which satisfies a certian criteria
  • kinekine Member Posts: 12,562
    It means one field on one section for selected record... (which will create the empty space in the "column").

    You can use more ways, all were mentioned by Jan Jansen (altering section or altering the value).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • sabzamsabzam Member Posts: 1,149
    Hi Everybody

    Thanks a lot for your help
Sign In or Register to comment.