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!

Crystal chart problem

Status
Not open for further replies.

problemman1

Technical User
Jun 2, 2010
9
KW
Hi all

i need help badlyCry
i need to create a simple chart where the x axis shud show the names of the months and y axis the value for each month..
i have a table in oracle from which im selecting 5 rows(which are the values for 5 months)..now i need to display these 5 values in the data axis...
for jan=0.5,feb=3.5,mar = -7.4 ,apr = -2.5324234, may = -18.34342
how can i achieve this...if these values where under one name like for eg 'VALUES' it wud have been easy...but now all these 5 values are with 5 difffernt header names....Kindly help me...any doubts do not hesitate to ask.....
 
Hi,
What is the structure of the Oracle table?
Is it 2 columns, Month and Value?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi,

It seems the structure is ID,Jan,Feb,Mar...

Use the UNION operator as shown below and you will get the result set as ID,Month,Value.

SELECT ID,Month,Value
FROM (
SELECT ID,Month='January',Value= Jan FROM table WHERE ID=selectedID
UNION
SELECT ID,Month='February',Value= Feb FROM table WHERE ID=selectedID
UNION
SELECT ID,Month='March',Value= Mar FROM table WHERE ID=selectedID
-- You got the idea

) AA


You have to use the Command option (or a stored procedure) to use this script with Crystal.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top