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

Posted on 2007-11-17
Last Modified: 2013-11-26
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


Question by:pasemeraro
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 101

Expert Comment

ID: 20306565
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.

LVL 101

Expert Comment

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


Author Comment

ID: 20312659
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 :)
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.


Author Comment

ID: 20313302
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.

Author Comment

ID: 20315146
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 :)
LVL 101

Expert Comment

ID: 20317651
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.


Author Comment

ID: 20320910
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.

LVL 101

Accepted Solution

mlmcc earned 500 total points
ID: 20325564
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.


Author Comment

ID: 20329891
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. :)

Expert Comment

ID: 20511473
Forced accept.

EE Admin

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question