Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Adding a regression formula line to an xy scatter graph

Posted on 2004-03-26
4
Medium Priority
?
1,083 Views
Last Modified: 2011-10-03
How do I go about adding a formula line to an XY scatter graph in Crystal reports 9? I am able to add the two values to the chart, but cannot add the regression formula line. Please help. Thanks.
0
Comment
Question by:adrianbennett
  • 2
4 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 10687372
Unfortunately you can't because to the best of my knowledge Crystal supports trendlines only on line charts.

There is a workaround but it's very clumsy.  What you would need to do is to create a separate chart in a section above your scatter graph and then in the section expert check the "Overlay Following Section" option to put your trend chart over the top of the scatter chart.  You can either calculate and graph the trendline manually or create a line chart and insert the regression line then set the primary data lines to transparent (or to the backgroup color).

In order to achieve a clean result you'll need to make sure the xy scales and the total size of both charts are identical.  You'll want to set as much of the overlay chart to transparent as possible and it will still take lots of fine-tuning at 400% zoom to get the remaining lines to overlay each other cleanly.

If you absolutely must do this then the above method will work but IMHO the end result isn't worth the effort it takes.  I would look at other options for representing your data if that's at all possible.

Good luck.

frodoman
0
 

Author Comment

by:adrianbennett
ID: 10687406
Thanks. Some very strange omissions in Crystal reports IMHO.
0
 
LVL 42

Accepted Solution

by:
frodoman earned 500 total points
ID: 10687433
Yea, their graphing capabilities in particular are way overdue for some additional functionality.
0
 
LVL 6

Expert Comment

by:Dan Weingart
ID: 10810819
I agree that the graphing capabilities are due for some 'overhaul'... and I wrote a lot of the original code!

The big problem with Scatter Charts in Crystal is that the dataset is interpreted as "Many series, each with exactly one marker in it" when what you really want is "one series composed of many markers".  It is impossible to create a regrssion line of a series that has only 1 element.  However, once you can construct this second type, then it is easy to create a linear regression line:  Just go to ChartOptions->General Options and then to the TrendLine tab and select LinearRegression.

I would recommend you download the evaluation version of our CRChart product (which replaces the charting in Crystal Reports). If you use the @SWAP macro you will be able to construct the correct dataset and then add your regression line [Disclaimer: CRChart costs money. I work for the company that makes this product. There may be other solutions available that I am not aware of].

-Dan @ 3D
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Integration Management Part 2
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month15 days, 9 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question