SAP Knowledge Base Article - Public

1197468 - Is it possible to programmatically alter rystal Reports charts using .NET SDK

Symptom

Is it possible to change the line colors in a line chart or the bar colors in a bar chart at run time using Visual Studio .NET?

Cause

The chart analyzer is a third party tool that Crystal is licensed to use in the designer. That means in the Crystal Designer you have a lot of chart functionality, but at runtime the chart exists as part of the report object and the analyzer is not present. That means you have a few formatting options but no creation functionality.

Resolution

Using the Crystal reports SDK for .Net it is not possible to change the line colors in a line chart or the bar colors in a bar chart at run time or any other feature about the chart.

The .Net sdk provides minimal ability for accessing chart objects. Using Chart Object you can only set properties such as Height, Width, Border, etc., at runtime and retrieve information about the Chart Object in a report.


Use multiple Sections and Charts in your report and conditionaly suppress each section.

Keywords

 line colors chart bar run time Visual Studio .NET , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , How To

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio ; SAP Crystal Reports, version for Visual Studio .NET 2008