Dont want to show a groupheader

iqbalmad
iqbalmad Member Posts: 180
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

  • kine
    kine 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.
  • gala
    gala Member Posts: 17
    Try to set property "PrintOnlyIfDetail" for dataitem A
  • iqbalmad
    iqbalmad Member Posts: 180
    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??
  • NaviDev
    NaviDev 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....