KarenPRuskin
asked on
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.
ASKER
Sorry!
CrystalFormulaProblem.doc
CrystalFormulaProblem.doc
The pictures appear to be from different reports.
Can you upload the report file (RPT)
mlmcc
Can you upload the report file (RPT)
mlmcc
ASKER
You can't SHARE information with a subreport using GLOBAL variables. You need to declare them as SHARED
mlmcc
V4-CPRSetupSheetKR-1-.rpt
mlmcc
V4-CPRSetupSheetKR-1-.rpt
ASKER
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.
ASKER
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
CrystalFormulaProblem.doc
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
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
ASKER
I've compared this to my code and it's identical to yours.
It's version 7.
It's version 7.
Can you upload it with saved data?
mlmcc
mlmcc
ASKER
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.
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
How you go about suppressing this section will depend on the version of CR you are using
ASKER
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
CPRSetupSheet.pdf
CrystalFormulaProblem.doc
Could you upload the report with saved data.
mlmcc
mlmcc
ASKER
Sorry, I thought I'd already done this. Attached is the report with saved data.
V4-CPRSetupSheetKR.rpt
V4-CPRSetupSheetKR.rpt
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
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
ASKER
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.
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
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
He is using CR7
mlmcc
mlmcc
ASKER
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
MessageSavingWithData.doc
V4-CPRSetupSheetKR.rpt
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
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
ASKER
"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??
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
FWIW, in CR 10, that's not a problem. I commonly suppress formulas that set variables and the variables still get set.
James
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.
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.
The Detail_myCostTotal is in the subreport
mlmcc
mlmcc
Try this
Run the report
Move to page the last page to ensure all subreports are run
Do you see the value?
mlmcc
Run the report
Move to page the last page to ensure all subreports are run
Do you see the value?
mlmcc
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
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?
Horrible typing on my part
Run the report
Got to the last page to see if the value is there
mlmcc
Run the report
Got to the last page to see if the value is there
mlmcc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
ReportFooter.doc
mlmcc