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
  • 5
  • 4
LVL 100

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 100

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 :)

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 :)
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

LVL 100

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 100

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now