Dont want to show a groupheader

iqbalmadiqbalmad Member Posts: 179
Hi all,

suppose i have two data items A and B

I have a groupheader on dataitem A.
then i do some verifications in dataitem B.

Now if dataitem B does not produce any records, how do i prevent my report from printing groupheader of dataitem A.

thankx in advance

Comments

  • kinekine Member Posts: 12,562
    You can try to enable "PrintOnlyIfDetail" property on the dataitem A to skip all records which have nothing in nested dataitem B...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • galagala Member Posts: 17
    Try to set property "PrintOnlyIfDetail" for dataitem A
  • iqbalmadiqbalmad Member Posts: 179
    PrintOnlyIfDetails doesnt work.
    I think this is because in the dataitem B i have written some codes where it may happen it skips certain records in dataitem B.

    is there any other way??
  • NaviDevNaviDev Member Posts: 365
    iqbalmad wrote:
    Hi all,

    suppose i have two data items A and B

    I have a groupheader on dataitem A.
    then i do some verifications in dataitem B.

    Now if dataitem B does not produce any records, how do i prevent my report from printing groupheader of dataitem A.

    thankx in advance

    Declare another variable with the same record as DataItem B. Then in the OnPreSection trigger of Groupheader of Dataitem A. Process the same processing as DataItem B does using your new created variable. Now if variable does not produce any records. Then you can now use CurrReport.SHOWOUTPUT(variable.count <> 0);
    Navision noob....
Sign In or Register to comment.