×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Month to Date/Year to Date in same report

Month to Date/Year to Date in same report

Month to Date/Year to Date in same report

(OP)
I am using CR7 and have a table which details sales info by Doc ref. Each record shows Stock No, units sold, sales value and cost value.
Is there a way I can sumarize to show in one line the Stock No, Units Sold, Sales Value and Cost Value for Month to Date and Year to Date without having to create a sub report.

Thanks

Ralph

RE: Month to Date/Year to Date in same report

rmarcus: You will need to create running totals which in v7 I think you are restricted to using the RT() and ResetTotal() functions but I'm a bit rusty on those.

First create a Group by StockNo

Next create for each item you want to show(e.g. UnitsSold), formulas as follows:

MTDUnits
If SalesTranDate in PrintDate-(Day(PrintDate)-1) to PrintDate then UnitsSold

YTDUnits
If SalesTranDate in Date(Year(Printdate),1,1) to PrintDate then UnitsSold

etc.

Then use each formula as the basis for a running total placed on the GroupFooter for Stockno. and resetting to zero with a ResetTotal() formula placed in the GroupHeader for StockNo

That way your Group Footer line will read:
StockNo. RTMTDUnits RTMTDSales RTMTDCosts RTYTDUnits RTYTDSales RTYTDCosts or whatever sequence you want to put them in.

Hope this helps

David C. Monks
david.monks@chase-international.com
http://www.chase-international.com
Accredited Seagate Enterprise Partner

RE: Month to Date/Year to Date in same report

Another approach is to create two formula fields:

If {date} in yearToDate then {Units} else 0

and

If {date} in monthToDate then {Units} else 0

Group by product, and do subtotals of these formulas by product.

Ken Hamady
http://www.kenhamady.com/
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close