Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


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

Posted on 2007-11-17
Medium Priority
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 :)
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.


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 2000 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

636 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