Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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
  • 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 :)
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  


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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

575 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