Crystal Reports: How to completely suppress main report page footer when subreport is displayed?

Hello :)

I am new to experts exchange and crystal reports - and appreciate your help! :)

I have reviewed the Crystal Reports solutions, but didn't find anything that (exactly) addresses my issue.

I am currently developing a VB.NET project using the 1.1 .NET runtime and Visual Studio 2003. I am using the built-in Crystal reports designer with VS 2003, and have created two "main" reports.

***The client issue: my client would like both "main reports" combined within one report viewer, so they can print both reports at once.

***The short questions: How do I completely hide the main report page footer when a sub-report is displayed? (The suppress option doesn't remove the space for the footer itself.) Or is there a better way to combine two "main reports" using one report viewer?


My solution so far: After reviewing the Crystal Reports documentation, it seems like the solution is to link both reports - essentially making one report a subreport to the other.

I placed the subreport in the "Report Footer" section of the main report, and linked the appropriate fields between both reports. So far, so good :)

The problem which keeps me up at night - and in large amounts of pain:

The main report contains a two page footers (where I conditionally suppress one or the other, depending on which page is being printed). I have not been able to hide the page footers completely when the subreport is displayed. (Unless of course, I suppress the main report page footer completely - which I do not want to do.) Meaning, the SPACE for the footer remains, even though I have suppressed the text. I suspect I need to specify "hide" somewhere, but haven't been able to find that option for a page footer.

Suppressing the page footer does NOT remove the space reserved for the footer. At least, I have been unsuccessful at trying to remove the extra space.

I've tried suppressing the footer, suppressing blank sections - just about every option that made sense - but I have yet to find the right one.

Any help would be appreciated. THANKS!

- Paul


Who is Participating?
mlmccConnect With a Mentor Commented:
If you need them in a viewer then as far as I know subreports is the only way.

You can have a tabbed form but that is essentially multiple viewers and you can't print them with a single click.

From an application you could print them all.

Have you tried choosing RESERVE MINIMUM SPACE option for the page footer.
This will reserve space for the tallest page footer.
You could have several page footers each 1 line tall and suppress the ones you need suppressed.

Using a subreport is really the only way I know to have 2 reports in a single viewer.

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

pasemeraroAuthor Commented:
Yes, I have tried that option. I assume I would want it unchecked because I don't want to reserve any space for the footer.

I tried it both checked and unchecked. Again, the space remains.

On my "main" report, each of the two footers is actually ten lines or so. It is a little bit larger than normal because it contains code descriptions. I don't think I can get away with having an additional one-line footer. But I think I see what you mean. I will try it. (I will try checking/unchecking the reserve minimum space option again.)

thanks for your help :)
pasemeraroAuthor Commented:
Adding the one-line footer, checking/unchecking the reserve minimum space option did not work.

I have an idea - create a master report, and then add my two "main" reports as sub-reports. The master report will not contain page footers or headers - leaving the two main reports to be viewed/printed the way they were meant to be.

I have another aggravating issue now - which just appeared:

I'm receiving a login prompt for my new Master Report (at runtime). I have been unable to log in, and don't understand why I'm getting this now. I might make thsi a separate question, because thsi login prompt issue plagues me from time to time.
pasemeraroAuthor Commented:
Using the master report as a template, and then setting my "main" reports as subreports also did not work.

The reason: Crystal changes the page footer sections into report footer sections once a given report is used as a subreport.

Meaning, instead of getting actual page footers, the footer is displayed as soon as the report details end. (No whitespace)

Am I missing soemthing basic here? Thanks :)
For minimum to work, all footers must be 1 line.  It selects the tallest footer as the minimum.

By definition subreports don't have page headers and footers.
I had seen the extra report header and footer but hadn't cnnected the two since I never had anything in the subreport page header or footer.

pasemeraroAuthor Commented:
But, as confirmed in this discussion, Subreports are the only option I'm given by Crystal Reports to link two reports within the same viewer. (Yes? :) )

I know the basic concept of a subreport, and I understand your point :) It's just that, given the choice, I wouldn't want to treat these reports as subreports at all.

The issue here is NOT subreports anyway - The issue is that I need to display two "main" reports within one viewer. :)

Are subreports really my only option to solve this issue? There isn't a way to add/link multiple reports to the same viewer?

The reason: My client needs me to find a way for them to print multiple reports by clicking print only once. These reports can have (or not have) page footers of any size.

I'd prefer to find an elegant solution using Crystal. But, being a novice and all, will most likely need to come up with some sort of hack solution to do this. I have some work-arounds in place, but the client will not like them.

If it must be said, I can't understand why the Crystal report viewer doesn't support this linking feature. (But again, I am a novice.) I do appreciate your help. I'm just trying to find a way out of this mess.

pasemeraroAuthor Commented:
Thanks for the reply!

Yes, writing a "smarter" print sequence seems like the way to go.

At this point, I am assuming that Crystal cannot support the "linking" of related "main" reports within one viewer - preserving full report formatting.

For viewing, my current solution is to provide radio option controls along with the viewer. Each radio button corresponds to one of the main reports. When the user clicks a radio button, the viewer's report source will be changed to the appropriate report - and then displayed to the user.

I could programmatically enhance the print sequence as well - but I need to ask the client what they want at this point.

Thanks for your help. :)
Forced accept.

EE Admin
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.