![]() |
Report on ALL Referrers? |
Post Reply ![]() |
Author | |||
TrekLightGear ![]() Newbie ![]() Joined: 24-April-2007 Location: Boulder, CO Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() Posted: 09-February-2011 at 1:36pm |
||
Does anyone know of an easy way to run a report showing all referrers selected during checkout during a specific time period?
Most other reports in the report center have the option of 'All' but for some reason the Referrer reporting requires you to run an individual report for each option and it makes much more sense to be able to see all referrers chosen during a given time period for comparison. On a side note, being able to see this data in a pie chart form (like the sales data) would be a great way to see which Referrals are the most effective. Two pie charts would probably be best - one showing the breakdown by # of referrals and the other showing it by sales totals. |
|||
Seth Haber
|
|||
![]() |
|||
Brett ![]() Groupie ![]() ![]() Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
![]() ![]() ![]() ![]() ![]() |
||
Try these two files and let me know if they fix your problem. It adds an "All Referrers" option to the dropdown, and if it is chosen then the resulting report behaves a bit differently, reporting all referrers in order instead of just one. No guarantees it will work, since I don't have any orders tied to referrers to verify it against. Also, I'm not sure if these files have been modified aside from this change, so run a compare against them before overwriting your files.srcOrdByDate_RefsalesReport.zip
Basically I modified srcOrdByDate.asp to change the dropdown for referrers to this:
...so that adds a new option for all referrers, with value 0 Then, in RefsalesReport, I added a couple if statements to change the database queries:
and a new variable:
I believe these will accomplish what you want, but no guarantees! |
|||
![]() |
|||
TrekLightGear ![]() Newbie ![]() Joined: 24-April-2007 Location: Boulder, CO Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
||
Thanks for the quick reply Brett. I'm swamped at the moment but I'll compare the files and test out the new code as soon as I get a chance. I'll let you know how it goes - I sincerely appreciate the help!
|
|||
Seth Haber
|
|||
![]() |
|||
TrekLightGear ![]() Newbie ![]() Joined: 24-April-2007 Location: Boulder, CO Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
||
Hi Brett -
Just wanted to let you know I finally had a chance to merge the code and it looks like it's working successfully! The only weird glitch I noticed is that above each section/referral code in the report it's displaying the SQL code: SELECT orders.idorder,orders.idcustomer,orders.total,orders.shipmentDetails,orders.paymentDetails,orders.taxAmount,orders.discountDetails,orders.orderDate,orders.processDate,orders.shipDate,orders.ord_VAT FROM Orders INNER JOIN customers ON (orders.idcustomer=customers.idcustomer) WHERE (orders.IDRefer =1 OR customers.IDRefer =1) AND ((orders.orderStatus>2 AND orders.orderStatus<5) OR (orders.orderStatus>6 AND orders.orderStatus<9) OR (orders.orderStatus=10 OR orders.orderStatus=12)) AND orders.orderDate >='1/1/2011' AND orders.orderDate <='2/24/2011' ORDER BY orders.orderDate DESC; Any idea what's causing that to display in the report? Many thanks for your help!!! |
|||
Seth Haber
|
|||
![]() |
|||
Brett ![]() Groupie ![]() ![]() Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
![]() ![]() ![]() ![]() ![]() |
||
Hey TrekLight,
I'm glad the solution I posted works for you :) The glitch you noticed is from some testing code I had in there that I forgot to remove. Go to line 163 of RefsalesReport.asp and remove lines 163 through 167:
Then you shouldn't get the query displaying on your reports any more. *edit* Here's the updated file in case you don't want to get into the code: RefsalesReport_new.zip Edited by Brett - 24-February-2011 at 2:14pm |
|||
![]() |
|||
TrekLightGear ![]() Newbie ![]() Joined: 24-April-2007 Location: Boulder, CO Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
||
That did it, thanks again Brett!
|
|||
Seth Haber
|
|||
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |