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!

Thickness of lines on a graph

Status
Not open for further replies.

cbruch

Programmer
Oct 30, 2002
20
US
I have a line graph which can have any number of lines, depending on the data. The lines are very faint, so is there a way to make all of the lines thicker automatically when the graph is produced, no matter how many there are? I know I can select each line separately and change the way it looks after I run the report, but that is not an option. I haven't been able to find a way to do this.
I am using Crystal 9.

 
Not sure if this will work. During report design, select the lines --> right-click --> Chart Options --> Selected Item

Then in the Line page, increase the thickness.

Please let me know if it works.
 
I did try that already. The problem is that the number of lines produced is dynamic and the report will be produced automatically and sent out to other people. I only have 3 lines right now, and I can change their individual thicknesses, but at any time there can be more and I can't have 3 lines showing up thick and the rest of the lines thin.
 
Shoot, then I have the same problem as you do, because I'm also in the process of creating a line chart with a dynamic number of lines.

I tried selecting the chart area and followed the same steps as above, thinking that would affect the lines globally, but oddly enough there was no change in line thickness.
 
I've run into this before too, but haven't found a good solution yet. The best I've come up with only works okay for me because I know that the chart has specific limitations. For example, I have a report that needs to be able to print up to 80 lines on a single page, but very seldom will it exceed 40.

So, I created a report and formatted the lines to be able to fit no more than 40 lines on a page and put that in the report header. Then I created a second report header, made a copy of the chart inside it and reformatted it for the maximum 80 lines.

Last, I created a formula to make a distinct count of the groups that are represented by the lines, and formatted each section to suppress itself by the appropriate greater or less than 40 criteria.

It's not exactly a pretty way to do it, but it works and looks great to the user. Plus it's pretty easy to do. The only real annoyance is that if you have to make any changes at all you have to do it in each copy of the chart.
 
Dakotah,
Thanks for the reply, but I am not exactly sure about what you are telling me to do. Sometimes you mention the graph and sometimes you mention a report and sections, so I am confused. Can you please be more specific? I do know that I would never have more than 40 lines on my graph, so that should simplify things.
 
Church;

Sorry for the confusion.

(1) Design a Crystal Report as normal, with the chart you want placed in the report header as normal. As you know that you will never exceed 40 lines of data, format the graph to best display all 40 lines.

(2) Right-click in the report header and then insert section below, so that you now have Report Header A (RH-a), which contains your original graph, and a new, blank, Report Header B (RH-b).

(3) Right-click and copy your graph, and paste a copy into RH-b.

(4) Format the graph in RH-b to best display 20 lines of data.

(5a) Now here's a part where I can't be more specific without fully knowing the details of your report. You need to create a formula that will tell you how many lines of data are going to be on the graph.

(5b) In the far left of the Design screen, right-click under RH-a and click Format Section. In the right-hand column of the Section Expert click the button to create a boolean expression to Suppress the section. The code will be something to the effect of &quot;linecounter < 21&quot;.

(5c) Do the same as (5b) for RH-b using the code &quot;linecounter > 20&quot;.

Done: If it all works right, if the graph contains 1-20 lines only RH-b should be displayed; and RH-a for 21-40 lines. Depending on specifics of the report and how it's reading and processing the data, you might need to move the charts down into Report Footers instead of the headers.

If you're still confused by any of this, let me know.

-Paul

phoerner@state.nd.us
 
Paul-
I understand now exactly what you are saying and I was able to do it. This is great for when the number of lines on the graph grows. I would still like to be able to change the thickness of those lines, and I don't see a way to do this. The graph looks OK on my screen, but the lines are very faint when I print the chart. Maybe I'll just tell people not to print it!
Thanks for all your help,
Carole
 
Carole;

You're most welcome. When you mention changing the thickness of the lines on the graph, do you mean as part of a formula depending on the total lines displayed? Or, to simply change the default thickness of the line?

If the latter, you need to go to the Preview screen, then right-click on the chart and choose the Chart Analyzer option. The lines can be changed statically there.

-Paul
 
Paul-
I would like to change the default thickness of the lines. In Crystal version 9 I don't have Chart Analyzer, but I can highlight each line and make the line thicker. This would be fine until more lines are generated. I think I would have to be constantly changing the graph and that would not be good.
Oh well!
 
Carole;

Ah, I'm still stuck on Crystal 8.0 myself. Can't you just set the lines to different thicknesses between the two reports? If you still think the line is too thin when there are 21 lines on the max40-line layout, you could go the route of adding a couple more charts into additional report headers. Say a total of four charts for 1-10 lines, 11-20 lines, 21-30 lines and 31-40 lines.

Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top