Access Filter Dates in Custom Report

Jun 27, 2005 3 Replies

Hello Everyone,



I'm trying to modify a detailed sales report by customer at a small retail health-food store to include a visit frequency field (we use this report to create our mailing lists from our customer database).



Currently the only way I have been able to figure out how to implement it is with something like this: Title = "Freq Last 30" Formula = "Customer.TotalVisits / 30"



The problem with this is that you then have to make sure you grab exactly the last 30 days when you define the date filter of the report for the report to be accurate.



What I'm wondering is if there is some way to access the dates that are inputted into the date filter by the user ... so far I haven't found a way to do this. E.g. the formula would then be something like: Formula = "Customer.TotalVisits / (dateFilter.End - dateFilter.Start) or Formula = "Customer.TotalVisits / dateFilter.Difference or something similar.



Any ideas?



~Andrew Reinartz Wayne & Mary's Nutrition Center



Thanks Glenn, now I'm starting down the right path (really not sure what I was thinking before).

Now my question is, the groupmethodCount way gives me the # of transactions in a specific period of time, but is there any other way to arrive at that same information so that I could incorporate it into a column's formula? I can always just manually divide the Totals Sales from that column of the detailed sales report by this grouped value, but I'm trying to make this as seemless as possible.

Also, is there anywhere for me to find the information on what different groupbyMethod's are available etc.? So far can't find it in the knowledge base, and unfortunately the ms partner who did our install were completely inept and so I'm working here over the summer doing some repair work and am basically learning the syntax just from analyzing other report files/receipts/this newsgroup. I've done some of the basic receipt/report tweaks just fine, but some of these types of things would be easier with a little more documentation, if it's available to me that is.

Thanks again,

~Andrew Re> No, you can't access the filter values in the column definition. Try adding

Got it partially.

I scrapped the search by frequency part of it ... really not as usefull anyways as I originally thought it might be. Then I just modified the "Misc

- Tender Summary" Report instead, which gave me both per-transaction results, as well as then just using a totals column with groupmethodAvg to get the average sale by customer (another issue I was having).

I still can't search by that average sale, however, e.g. searching for the customers whose average sale is above $25 say.

Our ms partner doesn't even customize reports at all, and unfortunately there is no one else in our immediate vicinity, which is why I'm having to do this.

Thanks again,

~Andrew

No, you can't access the filter values in the column definition. Try adding a field for Customer.ID and give it a group method of groupmethodCount. Now set your date filter and group by customer account number - your new column will show a count of all records for that account number - note that if you start with the Detailed Sales Report this will be a count of LINE ITEMS, not a count of TRANSACTIONS.

Dividing number of visits by the number of days in the report as you are trying to do isn't really giving you a meaningful number - TotalVisits is the number of visits since the customer was created - not the number of visits within the date range - so over time, it looks like everyone is visiting more frequently.

I think number of transactions in the date range is a more useful number than visits per day anyway. You can still see who has been most active over the filter period.

Good Luck!

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required