Jump to content

more help needed...


This topic is 7113 days old. Please don't post here. Open a new topic instead.

Recommended Posts

In reference to the following solution given to me to help create totals of financial records for the previous week, month and year:

---------------

Fields:

Key_Week = Get( CurrentDate ) >= d_Date and Get( CurrentDate ) - 7 <= d_Date

Key_Month = Get( CurrentDate ) >= d_Date and Date( Month( Get( CurrentDate ) ) - 1 ; Day( Get( CurrentDate ) ) ; Year( Get( CurrentDate ) ) ) <= d_Date

Key_Year = Get( CurrentDate ) >= d_Date and Date( Month( Get( CurrentDate ) ) ; Day( Get( CurrentDate ) ) ; Year( Get( CurrentDate ) ) - 1 ) <= d_Date

These calculations will return a boolean value to match a Key_1 constant field.

Table Occurances:

Job_System_Week - Key_Week = Key_1 AND Contact_# = Contact_#

Job_System_Month - Key_Month = Key_1 AND Contact_# = Contact_#

Job_System_Year - Key_Year = Key_1 AND Contact_# = Contact_#

Totals:

Sum( Job_System_Week::Total_Sale )

Sum( Job_System_Month::Total_Sale )

Sum( Job_System_Year::Total_Sale )

This may not be the best solution because the Sum( ) funsction creates an unstored result, which requires a recalculation each time it is viewed.

------------

This is helpful thank you, but I am still not able to list the correct records to this effect. How do I omit records that are prior to the week, month and year? Can anyone offer me a solution?

Link to comment
Share on other sites

This topic is 7113 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.