Topic Options
#1828 - 01/04/02 03:54 AM QR65 - Better formula for dates etc
Anonymous
Unregistered


Hi,

Apologies for my shopping list!

1)I'm running a QR that has 12 consecutive date ranges (months) from current backwards.The formula I am using for the current month is "if (Date+365-(30*12)in Current Fiscal Period then qty sold else 0". 12 is substituted by 11 etc for prior months. Am I missing a simpler way?

2)Also I would like the relative month name printed as header. The formula I have works but is quite a mouthful. Can you make any suggestions?

3)Can I build in more than 1 selectable range when running a report i.e. a customer and an item range?

4)Lastly (phew!) when details are suppressed and I suppress zero values, can I also suppess a subtotal line completely if all the values are zero for that line?

Thank you for a very helpful forum.

Kind regards,

Martin


Top
#1829 - 01/04/02 05:53 PM Re: QR65 - Better formula for dates etc
Softrak Support Offline

Adagio Action Team

Registered: 03/09/99
Posts: 11549
Loc: Vancouver, BC Canada
Hello Martin,

1. Your formula is very good. For similar sample reports, I use a formula that calculates the period. For example, I have a formula named Col:
(Year(Print Date)-Year(Date))*12 + Month(Print Date)-Month(Date)

The detail formulas for each column reference this Col. For example, for Last month, the formula is:
if Formula:Col = 1 then Amount else 0

2. My formula for the Date Heading is also complicated but rolls nicely through Year End. I format it to limit the printout to Month and Year. This is my formula for Last Month:

if (Month(Print Date)>1) then Date(Year(Print Date),Month(Print Date)-1,1) else
Date(Year(Print Date)-1,Month(Print Date)+12-1,1)

3. Yes, you can have more than one range in your selection formula. For example, you could use Runtime Value (from Special Data) to set a Date range and an Item range. For example:
Date <= Runtime Value and Item <= Runtime Value

4. Yes, you can suppress fields from printing and no, you cannot suppress lines. You can create formulas so that the values in the subtotal on print if the subtotal is greater than 0. Unfortunately, QRDOS does not have the feature to suppress blank lines. This feature is in QRW.

Happy New Year!


Top


Moderator:  Christa_Meissner 
Who's Online
3 registered (Carol Wojick, 2 invisible), 59 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
1865 Members
5 Forums
14467 Topics
70661 Posts

Max Online: 432 @ 01/20/25 10:17 PM
April
Su M Tu W Th F Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30