Subreports with no data leaves empty line

Hi,

I've read this topic " [topic="14582"]Subreports with no content still have height[/topic] ", but frankly, this doesn't work for me.

I've gone with subreports because 'detail data bands' ended up after child bands of the main data iterator. All my reports work with UserData components. The subreports work fine, except for leaving an empty line when there is no data.

I've tried using the Code page, OnBeforePrint event, to check if I can see if a dataset is EOF and make the child band that contains the subreport invisible, but that doesn't seem to work: you cannot use a dataset in code except for field values?

Got better ideas?

With regards,

Martijn Tonies

Comments

  • edited 9:39PM
    Hello,

    If you dont have to set every field on same height you can use below workaround :

    Set fields strech option on then change fields height 0. Same settings for bands too. If no data on subreports there should not be a blank.

    regards.

    Hi,

    I've read this topic " [topic="14582"]Subreports with no content still have height[/topic] ", but frankly, this doesn't work for me.

    I've gone with subreports because 'detail data bands' ended up after child bands of the main data iterator. All my reports work with UserData components. The subreports work fine, except for leaving an empty line when there is no data.

    I've tried using the Code page, OnBeforePrint event, to check if I can see if a dataset is EOF and make the child band that contains the subreport invisible, but that doesn't seem to work: you cannot use a dataset in code except for field values?

    Got better ideas?

    With regards,

    Martijn Tonies
  • edited 9:39PM
    Hi,

    I've set the Header band to 'Stretched = true' in the subreport as well as the MasterData band. Not all fields have a Stretched option (eg, checkbox). In the main report, I've set the Child band that contains the subreport to Stretched = True.

    All this does nothing.
    boakoms wrote: »
    Hello,

    If you dont have to set every field on same height you can use below workaround :

    Set fields strech option on then change fields height 0. Same settings for bands too. If no data on subreports there should not be a blank.

    regards.

    boakoms wrote: »
    Hi,

    I've read this topic " [topic="14582"]Subreports with no content still have height[/topic] ", but frankly, this doesn't work for me.

    I've gone with subreports because 'detail data bands' ended up after child bands of the main data iterator. All my reports work with UserData components. The subreports work fine, except for leaving an empty line when there is no data.

    I've tried using the Code page, OnBeforePrint event, to check if I can see if a dataset is EOF and make the child band that contains the subreport invisible, but that doesn't seem to work: you cannot use a dataset in code except for field values?

    Got better ideas?

    With regards,

    Martijn Tonies
  • edited 9:39PM
    Hello,

    I am sorry i forgot to tell you change the SubReport height to 0. If its empty there will be no blank, and if its not empty it works as it should be.

    Regards,
    boakoms.
    Hi,

    I've set the Header band to 'Stretched = true' in the subreport as well as the MasterData band. Not all fields have a Stretched option (eg, checkbox). In the main report, I've set the Child band that contains the subreport to Stretched = True.

    All this does nothing.
    Hello,

    If you dont have to set every field on same height you can use below workaround :

    Set fields strech option on then change fields height 0. Same settings for bands too. If no data on subreports there should not be a blank.

    regards.

    Hi,

    I've read this topic " [topic="14582"]Subreports with no content still have height[/topic] ", but frankly, this doesn't work for me.

    I've gone with subreports because 'detail data bands' ended up after child bands of the main data iterator. All my reports work with UserData components. The subreports work fine, except for leaving an empty line when there is no data.

    I've tried using the Code page, OnBeforePrint event, to check if I can see if a dataset is EOF and make the child band that contains the subreport invisible, but that doesn't seem to work: you cannot use a dataset in code except for field values?

    Got better ideas?

    With regards,

    Martijn Tonies
  • edited 9:39PM
    Thanks! That works.

    boakoms wrote: »
    Hello,

    I am sorry i forgot to tell you change the SubReport height to 0. If its empty there will be no blank, and if its not empty it works as it should be.

    Regards,
    boakoms.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.