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

Report Footer not printing Summary Variable

I've searched this site but can't quite find an answer to why a formula that prints correctly in the Page Header does not print in the Page Footer.   This would be so simple in Access, but Crystal obviously has some little requirement that I'm missing.  This is a report that I've inherited from a previous employee.  See attached file.
0
KarenPRuskin
Asked:
KarenPRuskin
  • 14
  • 13
  • 4
  • +1
2 Solutions
 
mlmccCommented:
I don't see the attached file

mlmcc
0
 
KarenPRuskinAuthor Commented:
0
 
mlmccCommented:
The pictures appear to be from different reports.

Can you upload the report file (RPT)

mlmcc
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
KarenPRuskinAuthor Commented:
0
 
mlmccCommented:
You can't SHARE information with a subreport using GLOBAL variables.  You need to declare them as SHARED

mlmcc
V4-CPRSetupSheetKR-1-.rpt
0
 
KarenPRuskinAuthor Commented:
Unfortunately I can't open the report you submitted (revised report) - I get an error "Failed to open document" "Invalid report version" .  So I'll replace my GLOBAL variables with SHARED variables and let you know how it goes.  Thanks for your QUICk response!  I'm always impressed, as I'm located in New Zealand and most of the rest of the world is asleep right now.
0
 
KarenPRuskinAuthor Commented:
I modified the report, replacing GLOBAL with SHARED variables but get the same result, a 0 in the footer.  I've modified my original document with these screendumps so will re-attach it.
CrystalFormulaProblem.doc
0
 
mlmccCommented:
There are 3 formulas to change

Main report

RH_myCostTotal
WhilePrintingRecords;
Shared NumberVar myCostTotal;
""

TotalCost
WhilePrintingRecords;
Shared NumberVar myCostTotal;
myCostTotal

Codes subreport
Detail_myCostTotal
WhilePrintingRecords;
Shared NumberVar myCostTotal;
myCostTotal:=myCostTotal + sum({Job_Codes_Link.Cost});
myCostTotal

What version of Crystal do you have?
It must be CR8.5 or earlier

mlmcc
0
 
KarenPRuskinAuthor Commented:
I've compared this to my code and it's identical to yours.
It's version 7.
0
 
mlmccCommented:
Can you upload it with saved data?

mlmcc
0
 
KarenPRuskinAuthor Commented:
Sorry, quitting time for me.  I'll get back to you tomorrow - I can't believe how difficult this is, especially when the value is displayed correctly in the Detail B section.
0
 
GJParkerCommented:
In your screen dump document you say that you aren't displaying the summary value in the subreport, how are you hiding the calculation. You can't suppress teh deatisl b section as thsi will stop the subreport from running and give a 0 result in the footer.

How you go about suppressing this section will depend on the version of CR you are using
0
 
KarenPRuskinAuthor Commented:
I haven't suppressed Details B Section - and the expected value for this variable/formula field IS correct.  In the original report this section was suppressed so I thought that once I got this footer thing sorted I'd suppress it again.  But I'm OK if it's displayed.  I'll attach the report output and the screenshots again for each section where a formula is involved.
CPRSetupSheet.pdf
CrystalFormulaProblem.doc
0
 
mlmccCommented:
Could you upload the report with saved data.

mlmcc
0
 
KarenPRuskinAuthor Commented:
Sorry, I thought I'd already done this.  Attached is the report with saved data.
V4-CPRSetupSheetKR.rpt
0
 
mlmccCommented:
The PDF example seems to be from a different report.  It doesn't have the Corporate name or logo on it that the rpt file you uploaded includes.  

Also there is no saved data.  Are you sure you are running that report.  I don't see any reason wy it woldn't produce the expected output

mlmcc
0
 
KarenPRuskinAuthor Commented:
I had deleted the Corporate name and logo when I generated the PDF file just as it's a bit confidential/sensitive.  Yes, I am running that report!  I simply run it using Preview. It prompts me for a ProjectID parameter.
0
 
GJParkerCommented:
Ok heres a few questions

What version of CR are you using ?
When you enter a Project ID and run the report how many records are returned by the main report ?
can you upload the report with saved data, to do this run the report -> file menu -> save data with report ->save report and upload to EE

Your formulas look ok so there must be something in the data flow on teh report that is resetting the value of your variable to zero
0
 
mlmccCommented:
He is using CR7

mlmcc
0
 
KarenPRuskinAuthor Commented:
When I select the option to Save Data, an error is displayed, but I answer Yes and the resulting report file DOES have the data.  I'll attach both the error and the report file.
MessageSavingWithData.doc
V4-CPRSetupSheetKR.rpt
0
 
mlmccCommented:
It is showing correctly in this report.

mlmcc
ReportFooterIssue.doc
ReportFooterIssue.pdf
0
 
mlmccCommented:
If the issue is when you try to "suppress" the value in the subreport change the formula in the subreport to

WhilePrintingRecords;
Shared NumberVar myCostTotal;
myCostTotal:=myCostTotal + sum({Job_Codes_Link.Cost});
myCostTotal;
""

That will print an empty string but the value will be calculated.

mlmcc
reportfooterissue-suppressed-in-.pdf
0
 
KarenPRuskinAuthor Commented:
"It is showing correctly in this report".   I viewed your attachments and am amazed that the figure IS in the footer.  What then is my problem?  Simply the version of CR??
0
 
James0628Commented:
I've only used CR 10, but I think in some older versions of CR, if you have a formula that sets a variable and you put that formula on a report, but then suppress that field, the formula is not evaluated and the variable is not set.  So, instead of suppressing that field, you have to change the formula so that it doesn't produce any visible output (eg. by adding "" to the end of the formula).  It sounds like that may be what you've been running into.

 FWIW, in CR 10, that's not a problem.  I commonly suppress formulas that set variables and the variables still get set.

 James
0
 
GJParkerCommented:
I don't remember that being an issue in CR7 but it was over 10 years ago since I last used it so I could be wrong.

Another alternative is to remove the summary field  Sum ({Job_Codes_Link.Cost}) from the report footer and use your formula field Detail_myCostTotal to display the total instead.
0
 
mlmccCommented:
The Detail_myCostTotal is in the subreport

mlmcc
0
 
mlmccCommented:
Try this

Run the report
Move to page the last page to ensure all subreports are run
Do you see the value?

mlmcc
0
 
GJParkerCommented:
"Another alternative is to remove the summary field  Sum ({Job_Codes_Link.Cost}) from the report footer and use your formula field Detail_myCostTotal to display the total instead. "

yes this should be done in the subreport
0
 
KarenPRuskinAuthor Commented:
Hello all.  I don't quite understand this suggestions from mlmcc:
Run the report
Move to page the last page to ensure all subreports are run
Do you see the value?

And this suggestion from GJParker:
Another alternative is to remove the summary field  Sum ({Job_Codes_Link.Cost}) from the report footer and use your formula field Detail_myCostTotal to display the total instead.
That formula field is not available to be added in the Report Footer.  

After all this, I am assuming this is a version limitation - and as mentioned, this IS a very old version - 10 years!  So, thank you all for persevering and trying to assist.  I give up.  I'm going to suggest to our company that we upgrade to the latest version of Crystal.  Question:  would existing reports will need to be revised if we do upgrade?    Also, as this is an application run on various Citrix servers (6 servers), would each server need to be upgraded?
0
 
mlmccCommented:
Horrible typing on my part

Run the report
Got to the last page to see if the value is there

mlmcc
0
 
mlmccCommented:
Please try my suggestion.

I just ran the report you uploaded earlier on a machine with CR7.  I get 0 in the footer and it requests that I finish loading the data.  SInce I can't it doesn't work.

CR7 must be a little more sensitive or the data for the last page wasn't loaded so it doesn't have that value,

mlmcc
0
 
KarenPRuskinAuthor Commented:
Success!  I mucked around a bit and ended up moving the fields I had placed in the Report Footer to a Details section instead, then adding the TotalCost formula field to the Report Footer, but suppressing it.  The figure prints in the Details section perfectly, margins calculate and it all looks good!   Thank you all for persevering with this one over the last few days.  Much much appreciated.  I will remember this 'feature' for future CR7 enhancements!  I'll close this now and split the points.  Thanks again.
ReportFooter.doc
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 14
  • 13
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now