Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Group Header in Crystal Reports

Posted on 2013-11-14
3
Medium Priority
?
388 Views
Last Modified: 2013-12-16
Hi Experts,

Sure this is an easy question... But I need a Group Header to show


Annual
YTD

I have no detail fields that specifically say Annual or YTD...I do have detail of {InvoiceSales}

How can I create a subtotal of {InvoiceSales} and show summary for either Annual or YTD..
0
Comment
Question by:Mikeyman_01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 39649434
I assume you have records where the date is outside the YTD or Annual.

BY annual do you mean in this year as in 2013

Try this

If {InvoiceSalesDateField} IN YearToDate then
    {INvoiceSalesAmountField}
Else
    0

You can summarize that for the YTD.  A similar formula can be used for the annual total

mlmcc
0
 

Author Comment

by:Mikeyman_01
ID: 39649696
Maybe I wasn't clear...not a big surprise..


I need the report to look like this... How do I Get the Group to be with the words Annual and YTD??

                                                             2011       2012       2013
GH1a Annual                                        999.99    1213.12   2132.12
GH1b YTD                                             899.99     1151.12   2132.12
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 39650194
So what you want is a report that looks at the last x years of data and shows

The annual totals for the past years with the annual and YTD for current tyear the same.
You also want to show YTD or the past years.

Are you able to get any of that data?

Have you considered a cross tab?

To get the years you can create formulas like

Y2011
If Year({InvoiceDate) = 2011 then
   {SalesField}

Y2012
If Year({InvoiceDate) = 2012 then
   {SalesField}

Y2013
If Year({InvoiceDate) = 2013 then
   {SalesField}


Similarly to get the YTDs
Last Year
If {InvoiceDate} IN LastYearToDate then
   {SalesField}

2yearagoYTD
If DateAdd("yyyy", 1, {InvoiceDate}) in LastYearToDate then
   {SalesField}

This YTD just use the year formula or
If {InvoiceDate} IN YearToDate then
   {SalesField}

You can then summarize those over the group

Do you want to be able to get a rolling X year look?
If so the formulas can be changed to be generic using the Year(CurrentYear)

mlmcc
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question