• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2665
  • Last Modified:

Crystal Reports Printing Main Report Page Header And Footer In Subreport

Hello guys,
I am Trying to make an "International Consignment Note". It has to have one original and six copies. So I've made the main report and I've made 6 subsections in the report footer and in them the subreports. So far so good.
But the main report header and footers are being print in every subreport. I've managed to fix the header, by:
In the Page Header section I open formula box placed beside "suppress(no drill down)" and place the below formula

WhilePrintingRecords;
BooleanVar Supp

Then I make a formula field called supp with the following formula:

WhilePrintingRecords;
BooleanVar Supp := True

And place it in the report footer.

That worked fine, but if I do it on the main report page footer, the footer wont even show on the main report.
How do I suppress the main report page footer only in the subreports?

Please help I really need this.
0
IncognitoMan
Asked:
IncognitoMan
  • 9
  • 5
  • 4
3 Solutions
 
peter57rCommented:
Have you tried doing the same suppression in the page footer?
On the face of ot it should work the same way as the header.
0
 
IncognitoManAuthor Commented:
Yes I did. I put this formula in the formula button beside Suppress in the page footer section:

WhilePrintingRecords;
BooleanVar Supp

And the result is that the page footer doesn't print even on the main report. Yes it works for the subreports, but how do I make it print on the main report?
0
 
mlmccCommented:
Try it this way

IN the main report report header
WhilePrintingRecords;
BooleanVar Supp := False;
""

In the section with the first subreport add a formula
WhilePrintingRecords;
BooleanVar Supp;
Supp := True;
""

Suppress the page footer as
WhilePrintingRecords;
BooleanVar Supp;
Supp

mlmcc
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
IncognitoManAuthor Commented:
mlmcc,
when I enter the first formula in the header it gives me an error "Boolean is required here".
I don't save it, but I put the last formula in the page footer. The result is that it doesn't print in the main report and the other reports, but in the subreports it makes a blank space in the end of the pages with the size of the footer of the subreport.

If it'll be easier for you, I'll upload the report and you can change it by yourself. Would you like? I really need this one :).
0
 
mlmccCommented:
Sure, upload the report

mlmcc
0
 
IncognitoManAuthor Commented:
OK mlmcc,
here is the whole report. There is some bulgarian language in it.  tovarit.rpt
0
 
mlmccCommented:
Try this report

mlmcc
tovarit-Rev1.rpt
0
 
IncognitoManAuthor Commented:
Same thing man. On the main report there is no page footer and on the subreports there is blank space on the place where their page footer should be. The idea is the page footer needs to show only on the main report and on the subreports there must be space for their own page footers.
0
 
mlmccCommented:
In Crystal, subreports do not have page footers.

mlmcc
0
 
IncognitoManAuthor Commented:
No mlmcc, but I have used this solution to fake page headers and footers.
http://www.c-sharpcorner.com/UploadFile/mahesh/SubReportPH10062006160749PM/SubReportPH.aspx

Now my only problem is to suppress the main report page footer. I've successfully done it with the header, but with the footer ... I can't.
0
 
peter57rCommented:
I'm not sure whether you are hoping for more than can be done here.

Although you can suppress the contents of the page footer you cannot re-use the space that was allocated to it.
0
 
IncognitoManAuthor Commented:
peter57r, maybe that's true, but then why suppressing the page header leads to not showing the space allocated for it in the subreport, but as for the footer it doesn't work this way? I can't seem to find an answer to this question :).

You know what came into my mind? I will make the page footer size 0 points and create groups in the main report, that will act like a page footer, like I did on the subreports to mimic page header and footer functonality.  It works for now. My only question is how will all those things behave when there is data in it and the report has got records for more than one page. What do you thing guys?

0
 
peter57rCommented:
Theres no answer to that.  It's just the way Crystal Reports works.
0
 
IncognitoManAuthor Commented:
peter57r, I am seriously considering to change the reporting system. Will you tell me something, that works with VS 2010, is not expensive or is free and can do anything, but I won't have problems with printing copies of different document and ... I won't have the desire of breaking my computer?

PS. After I make the report and if my idea works and there is nothing else I have to ask in the process of making the report, I will give you the points :). If something else comes to you minds o how to make this "International Consignment Note", if you think there is a better way to make it, please share it with me :).
0
 
peter57rCommented:
My own view is that you will not find anything better than CR for general reporting from all data sources.
I don't know what database you're using.
You can look at SSRS for SQL Server and Oracle has its own well developed reporting application.

But all reporting applications have their strengths and weaknesses just as any other application development tool.  Nothing does everything.
0
 
IncognitoManAuthor Commented:
Guys I feel disgusting. The client just said he actually doesn't need it. I can't want prepayment from them cos, I'm new on our market and they've just wasted more than 5 days from my programmer time. I could have fixed so many bugs, so many new things ...

And guys sorry for wasting your time, it wasn't my fault. Thank you for the help and cooperation. It was nice talking to you  :).
0
 
IncognitoManAuthor Commented:
They helped, I thank them :).
0
 
mlmccCommented:
Crystal reserves space for the page footer when the page is started.  If you check, the page footer cannot grow.  Crystal doesn't reserve room for the page header so if it is suppressed there is no wasted space.

mlmcc
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

  • 9
  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now