Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pls help!

Status
Not open for further replies.

icekube88

Programmer
Nov 27, 2003
16
PH
I HAVE A TABLE AND THE RECORDS ARE STORED LIKE

CUSTNMBR JAN FEB MAR .... DEC YEAR
A0001 10 20 30 40 2004
A0001 20 20 10 40 2005

i want to display the record in crytal like

CUSTNMBR APR MAY .... DEC JAN FEB MAR
A0001 10 10 40 20 20 10

WHERE APRIL-MAY YEAR IS 2004 AND JAN - MAR YEAR IS 2005
any idea? pls. help!
 
no, im not familiar with cross tabs. can you show mw how
 
What version of Crystal are you using? I haven't tried cross tabs in earlier than 9, but if you are using 9 or 10 all you really need to know is that cross tabs show data in a tabular format. Just choose Insert-Cross Tab, and experiment a bit. That really is the bast way to do it. You select what you want as your rows, columns, what aggregate function you want to appear in the 'cells', you have a few extra formatting options and then just see what appears and modify if it's not quite as you want.
 
I don't think your data lends itself well to a crosstab. If you will be looking at a year's worth of data (or less), I would try a record selection formula like:

({table.year} = 2004 and
{table.month} in ["Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]) or
({table.year} = 2005 and
{table.month} in ["Jan","Feb","Mar"])

Your data will still be returned in two lines, so then you need to group on {table.custnmbr} and insert a maximum on the detail field for each month. Then drag the groupname into the group footer and suppress the details.

-LB
 
i agree to what youve said, ok ill try your suggestion hope it works tnx lbass
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top