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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress Fields in Chart

Status
Not open for further replies.

krios

Programmer
Jul 6, 2005
4
US
[Crystal Reports 9]
I currently have a chart that shows the quarterly strategy allocation of a portfolio. If I want to run the report for second quarter allocations, how would I suppress the percentages for certain quarters, even though i have data for all 4 quarters?

For example, say my data is as follows:
Strategy 1: Q1-20%, Q2-10%, Q3-40% Q4-30%
Strategy 2: Q1-30%, Q2-15%, Q3-15% Q4-40%
Strategy 3: Q1-25%, Q2-15%, Q3-30% Q4-30%

There is a bar for each quarter per strategy (I've grouped by strategy). Each percentage is calculated in a formula and then the chart just pulls that number.

Is there a way, based on the date the report is run that I could suppress the data for particular quarters? More specifically, if I run the report in May I would only want to see the data for first quarter since the second quarter is not complete. And if I were to run the report in August I would only want data in the chart to show up for the first two quarters.

If it's not possible to suppress the fields that way, then is there a way to suppress 0% values in the chart?

Any suggestions or help would be greatly appreciated!!

Thanks,
Karina


 
Why not use your record selection formula to limit the chart data? You could use a formula like:

if datepart("q",currentdate) > 1 then
datepart("q",{table.date}) < datepart("q",currentdate) and
year({table.date}) = year(currentdate) else
year({table.date}) = year(currentdate)-1

This assumes that your quarters are based on the calendar year.

-LB
 
Thanks for the suggestion!

allocationGraph.jpg" alt="Image hosted by Photobucket.com


This is a screenshot of my graph. Hopefully, this might help clarify what I was trying to ask.

My data is grouped by strategy. I use a formula so that only quarterly allocation percentages are calculated if the period end date of the report is greater than or equal to the quarter end date. So, again, if I were to run the report in July, I would only calculate and display data for the first two quarters. The fields for the other two would be left blank. I guess what I'm wanting to know is how would I be able to have a graph that shows values for only the first two quarterly allocations if the report is run for the second quarter and not leave the blank space for the 3rd & 4th quarters?


Thanks again,
Karina
 
You have not explained why you cannot use the record selection formula as I suggested to accomplish this.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top