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

Chart with only Running Totals

Status
Not open for further replies.

Kim296

MIS
Aug 24, 2012
98
0
0
US
I'm new to crystal reporting and would appreciate any help on this topic. I am trying to use a bar or pie chart to display my running totals for demographic purposes.

Data Example:

Date Last Name First Name Age Race Sex Address City

Running Totals Example:

B/M 17 or younger
B/M 18- 35
B/M 36-55
B/M 56-75
B/M 75+
W/M 17 Or younger
W/M 18-35
etc........

What I can't figure out is how to use "only" the running totals in a chart. I can affix labels myself if needed. I've tried setting up a group, but it wants me to sort by a field (that pulls to many records/results). There are thousands of results in my data tables. I only want to summarize the results in a chart.

Can anyone point me in the right direction on where to start?
 
you need to first get the report to count these results then use the summary function.

so you could make a formula that says if b/mfield is < 17 then "less than 17" else
if b/,field is >75 then "75+" -you get the idea. from that you can build your group. in that group you can create a formula to count "true" and then insert s summary from that formula
 
Thank you for trying to help me, but I do not understand your solution.

I have created formula's with the specific criteria needed for each catagory that I mentioned above. I have created a table to display the results (which works perfectly). Now, I wanted to create a pie or bar graph for a better visual effect on this report. I have all of the formulas complete and working, but I can't figure out how to graph them using the chart function.

I figured out how to add a OLE Object and fill in my results to make a chart manually, but I am giving this template to the supervisors to keep a look at on different dates. They will not understand how to do it that way. That's why I'm trying to create a graph that will automatically update when you change the date criteria in the select expert.

Does this make sense because I would love to know how to create a pie chart using my formulated totals.
 
Can you explain why you are using running totals instead of the more usual summaries? A simple approach would be to create a formula like this:

{table.race}+"/"+{table.sex}+" "+
(
select {table.age}
case 0 to 17 : "00-17"
case 18 to 35 : "18-35"
case 36 to 55 : "36-55"
case 56 to 75 : "56-75"
case 76 - 110 : "76+"
)

Insert a group on this formula and insert a distinctcount on {table.PersonID} (or on first name plus last name, but ID would be better). Then insert an advanced chart with the formula as your "on change of" field, and distinctcount of PersonID as your summary field.

If you don't have the option of grouping like this in your main report, insert a subreport where you can do this, and place the chart in the subreport footer, and suppress other sections.

-LB
 
I will try this today and see if I can make it work; thank you for your help.

Originally, I wrote a formula to return 1 or 0 if the criteria matched, then I just used running total to count the results. It works great on the chart that I created and updates on date change, but I couldn't figure out how to visualize those results with a graph.

I will try using summaries today. Again, thank you for your response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top