Crystal Report Problem

  • Thread starter Nadia Daems via .NET 247
  • Start date
N

Nadia Daems via .NET 247

I desingned a report with several subreports to use in my application. Normally each subreport have to start on a new page. I did this by making a diffrent section for each subreport and selecting the option "New page before" for each section.

When a subreport is blank, both the subreport and the section are suppressed but the new page isn't, so there are empty pages in my report.

Because the reportheaders of the subreports are suppressed, I tried to set the pagebreak before the groupheader of the subreports but this resulted in no pagebreak at all.

I also tried to use a shared variable on each subreport that is true when the report is blank so I could use a condition on the "New page before" option, but in the mainreport I never get the value of this variable.

Does anybody have any idea about how I can start each subreport on a new page without having empty pages when a section is suppressed?

Thanks
 
T

thomas wenning

Nadia Daems via .NET 247 said:
I desingned a report with several subreports to use in my application.
Normally each subreport have to start on a new page. I did this by making a
diffrent section for each subreport and selecting the option "New page
before" for each section.
When a subreport is blank, both the subreport and the section are
suppressed but the new page isn't, so there are empty pages in my report.
Because the reportheaders of the subreports are suppressed, I tried to set
the pagebreak before the groupheader of the subreports but this resulted in
no pagebreak at all.
I also tried to use a shared variable on each subreport that is true when
the report is blank so I could use a condition on the "New page before"
option, but in the mainreport I never get the value of this variable.
Does anybody have any idea about how I can start each subreport on a new
page without having empty pages when a section is suppressed?

Hi Nadia,

are you closing and opening the report between prints? If so, it might be
that the report doesn't get cleared out of memory. When the form closes, set
the report object to Nothing and call GC.Collect() to force garbage
collection.

Greeting

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top