Quantcast
Channel: VBForums - Reporting
Viewing all articles
Browse latest Browse all 594

Sum by Date

$
0
0
I am relatively new to Crystal however I am pretty far along on what I want to achieve. I have created several formulas and have them working properly. I am currently trying to have several sums based on several different time periods for a field.

So I have a formula to get the value for the field based off of a input date when the report is ran. Then I made several formulas (one for the first day of each month and one for the last day of each month) so I could have the ranges auto populate based off of those fields.

Here is a look at structure for 11 months back range

@11BackBeg Gives first day of the month
Code:

Local DateTimeVar d := {TimeRecord.ActualDateTime};
DateSerial(Year(d), Month(d) - 0 - 11, 1)

@11BackEnd Gives last day of the month
Code:

Local DateTimeVar d := {TimeRecord.ActualDateTime};
DateSerial(Year(d), Month(d) - 0 - 10, 0)

@11Back Time puts them into a usable formula
Code:

{TimeRecord.OwnedBy} = {?AS Team Member} and
{@ActualDate} in {@11BackBeg} to {@11BackEnd}

Now I need to display the proper info using @11Back Time
I know I need to use Sum but I am unsure how to incorporate the @11Back Time into it.
Code:

Sum ({@F AdminTime}, {TimeRecord.OwnedBy})
Suggestions?

Viewing all articles
Browse latest Browse all 594

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>