We help IT Professionals succeed at work.

How to display in table format in Crystal Reports 8.5

pavan738
pavan738 asked
on
Medium Priority
242 Views
Last Modified: 2012-06-21
Actually  I have  a table Consumption which contains the fileds date,Volume.
Data for these fields are

 01/01/2000, 1000
 02/01/2000, 2000
03/01/2000, 3000
04/01/2000, 3000
05/01/2000, 3000
06/01/2000, 3000
01/01/2001 , 2000
02/01/2001,  4000


I can call the database and display the line items one by one. But i want is to display these in different fomat.The format is below.
                             (year)
Month                  2000        2001            2002   2003


jan                      1000         2000
feb                      2000         3000
march                  3000
april                     3000
may                     3000
june                    4000
july
august
september
october
november
december


Do any body explain me how to do this one.
Comment
Watch Question

Brian CroweDatabase Engineer
CERTIFIED EXPERT
Top Expert 2005

Commented:
You'll want to group by month.  Create a formula to calculate the month of the date value and group on that.

If the years are static then you can create separate formulas for each year

Formula: 2000

If Year({datefield]) = 2000 Then
   {datefield}
Else
   0

repeat for each year you want a column for

create summaries for each of these "year" formulas grouped by month and display those.
Or a simple cross tab query would give you this same results.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.