?
Solved

Group Footer Variable

Posted on 2011-09-09
2
Medium Priority
?
252 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 35

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Integration Management Part 2
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

839 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