Solved

Group Footer Variable

Posted on 2011-09-09
2
241 Views
Last Modified: 2012-08-14
OK Now I return the scrap amount in my details section. I need to return that total amount of scrap time in my group footer equation.

How can I just pass the value of my details running total to my footer?
0
Comment
Question by:cmdolcet
2 Comments
 

Accepted Solution

by:
cmdolcet earned 0 total points
ID: 36510366
Never mind I figured out my issue


Shared NumberVar scrapped_Time;
numberVar dur := scrapped_Time;
numberVar hrs;
numberVar min;
numberVar sec;
stringVar hhmmss;

hrs := Truncate(Truncate(dur/60)/60);
min := Remainder(Truncate(dur/60),60);
sec := Remainder(dur,60);

hhmmss := totext(hrs,"0") + ":" + totext(min,"00") + ":"+ totext(sec,"00");
0
 
LVL 34

Expert Comment

by:James0628
ID: 36515932
As you figured out, you just needed to use the scrapped_Time variable.  FWIW, you don't need the dur or hhmmss variables in that formula.  You could just use scrapped_time instead of dur, and you don't need to put the final string in a variable unless you want to use that string somewhere else.  So, you could have:

Shared NumberVar scrapped_Time;
numberVar hrs;
numberVar min;
numberVar sec;

hrs := Truncate(Truncate(scrapped_Time/60)/60);
min := Remainder(Truncate(scrapped_Time/60),60);
sec := Remainder(scrapped_Time,60);

totext(hrs,"0") + ":" + totext(min,"00") + ":"+ totext(sec,"00")


 And if you really want to cut down the formula as much as possible, you could eliminate all of the variables except for scrapped_Time:

Shared NumberVar scrapped_Time;

totext (Truncate (Truncate (scrapped_Time / 60) / 60), "0") + ":" +
 totext (Remainder (Truncate (scrapped_Time / 60), 60), "00") + ":"+
 totext (Remainder (scrapped_Time, 60), "00")


 As far as performance goes, I don't think it makes any difference which formula you use.  It's all about which version you (or anyone else that might look at this report) find easiest to read.  I was just presenting some alternatives, FYI.

 James
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

828 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