Crystal Reports formula function. Displaying values from Detail section in Page Header. Is Shared variable preferred vs some other formula?

What would be the best way to display a value while suppressing it in another section where it would normally show in Crystal Reports.

This image shows a column called contract amount. Currently showing a field called Approved Amount. $44,755. The value at the top....which is not correct. The value should be $505,000 which is displayed far below in the bottom of the column next to the Code on the right with "QU-00547". The record is in the details of another field.
Since I need to post the record $505,000 currently at the bottom of the details column (where the code next to it....starts with "QU") at the top. Where the $44,755 is currently.
total displays in details section when I need it as a total at the top of the column.
Since I have to suppress records that start with "QU" in the details section but display them at the top of the report next to the Contract Amount.....which is what is approved. Is the best solution a shared variable or something else and is there a more efficient formula over another. Since this is going to be repeated over many many contracts.? Examples welcomed.
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
Unless you are dealing with a subreport, a shared variable won't help.

Since you want to suppress the QU records anyway how about creating a formula

Left({ChangeOrderField},2)
Sort by that descending then sort by the ChangeOrderField Ascending to get the CO records in the correct order.

IN that way the value you want will be in the desired position first and can be displayed in the group header. The detail record can be suppressed

mlmcc
0
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
I wish that was an option. That order does not work for them. So I am going to have to force it back up to the page header section. Is there any way to do that? Is subreport the only way? I am wondering if performance will take a hit in the report with that solution and did not know if passing a variable around might do it...?
0
mlmccCommented:
Why won't the order work?
If the record is suppressed who is to know that it is at the top or the bottom.  The second sort will put them back in the correct order for the records being displayed.

What database are you using?
You might be able to use a correlated SQL Expression.

Another way to do this would be to join the table with the change orders to itself then select the QU record out of the second table
with a selection formula of {ChangeField} LIKE "QU*"

mlmcc
0
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
What I cannot show on this forum is the massive text section in the Page Header at the top of the page where lots of text logo and embedded fields are. Unless you are talking about two Details sections where one is suppresses everything that is not "QU" verses the next detail section where everything that is "QU" is suppressed. I could not for NDA reasons show the whole page as there are actual company contracts shown.

It is an oracle database.

So you are saying add another table with the data from the Change Order data {changefield} like "QU" is that what you mean.
0
mlmccCommented:
Since it is Oracle, the SQL Expression won't work.

Can you post the report with no data?

mlmcc
0
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
I can post the report but would need to keep it private. I assume I can do that? Also can I protect it in a way so only you can look at it? mlmcc?
0
mlmccCommented:
Not through the EE interface.

mlmcc
0
James0628Commented:
Will there be more than one QU record on a report?  If so, what do you want to show in the page header?  All of the QU records, or some kind of total?

 If there is just one QU record, then you could try creating a formula like this:

if {your field} like "QU*" then
  {field to show in page header}
else
  0


 Then you could use a formula like the following in the page header to display that figure:

Sum ({@formula created above})


 If you have more than one QU record and want to see the total for those records in the page header, the formulas above may handle that too.  It depends on exactly what you want to show in the page header (Do you also want to see each "QU" code?).

 James
0
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
I fixed it with a subreport. Not sure how I missed that easy solution. I guess I have been out of the Crystal Reports Game for too long. Back in and it is a confidence builder for me. I needed it. Thank you for your all the support.

Had a problem with my Hosting company and did not realize I was not getting emails from them. Looks like I got hacked and my identity compromised My bank even found fraud on my accounts. Multiple purchases I did not make. Sorry for the delays gentlemen. Fixing that problem so I can get emails again.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
Subreport was all I needed and to pass the records between reports with a shared variable.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.