Skip to Content
avatar image
Former Member

How to use subreport to display report header when main report is empty?

I'm creating several reports for our company. And we would like to keep the headers of the reports consistent across all of the reports. I've created a subreport with the correct format for the header and inserted into the main report's Page header section, and use parameters to pass in the report name and such. However, whenever the main report returns an empty set of data, the subreport doesn't gets displayed.

Is there anyway to get around this problem?

Thanks.

Xuan Su

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 22, 2008 at 04:14 PM

    Since the subreport is linked with the main report parameters if the parameters are empty then the subreport will not return any headers. Check whether the parameters are linked to subreport database fields. If so uncheck the subreport database fields and just pass the parameter values from main report to subreport without linkung to subreport DB fields. After passing the parameters check whether the parameter value is null or not using the function isnull(). if it is null then use some constant string like "Empty" else use parameter field value.

    Regards,

    Raghavendra

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 22, 2008 at 04:15 PM

    Try below Steps:

    1. In the main Report, Right click on the subreport >> Go to 'Format Subreportu2026' >>In subreport tab, Uncheck the option u2018Suppress Blank Subreportu2019

    2. In Main Report, Go to u2018Fileu2019 menu option >> Report Optionsu2026 >> Uncheck the option u2018Suppress Printing If No Recordsu2019

    Regards,

    Alpana

    Add comment
    10|10000 characters needed characters exceeded