How to assign property to change chart type dynamically?

My report needs to be stuffed with possible types of charts like Line, Bar, Pie and Stacked bar at runtime. How is this possible?
Who is Participating?
Dan WeingartConnect With a Mentor Author / CRChartCommented:
Please see the section in the CRChart manual titled "Using Crystal Reports Fields/Functions in CRChart Macros".
In a nutshell:
1) Create a formula in the CR formula wizard that will return an integer value. Use the table in the @GRAPHTYPE documentation to match up the value with the graphtypes you want.

2) Add this formula to the chart data section in CR's CHART EXPERT.
3) Add the line "@GRAPHTYPE P1" to the Footnote Title  (TITLE tab in ChartExpert dialog).

That should do it.


I am not sure what you are trying to do but I will at least write you an example how to change propertys from the code behind.

Textbox txt = (TextBox)Panel1.Findcontrol("Textbox1");
txt.Text = "testtest";

This might as well be not the thing you want to know, but at least I tryed:).

With kind regards,

Kevin Hendricks
Is this essentially the same question as your other one on the same line

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Dan WeingartAuthor / CRChartCommented:
As always, this is easily done with our CRChart third party add-in with the @GRAPHTYPE macro. But this product costs $$.
Thanks Dan.  DO you have any literature on your product available on the web site?  

Here is the link to the Three-D graphics site

YogeshupAuthor Commented:
Hi Dan,
We have purchased the licensed stand-alone Crystal Report 11.0 Developer edition and also installed the Release 2 upgrade.

To have the dynamic chart type population, we need to use the CRchart component. As per the installation guide, we have just replaced the "sscsdk80.dll" shipped with that component.

Please let us know how and where to call the @GRAPHTYPE macro.
Dan WeingartAuthor / CRChartCommented:
<Comment editted by mlmcc Zone Advisor>

The short answer is to read the chapter in the manual on how to pass runtime/printtime values to CRChart macros.

Dan WeingartAuthor / CRChartCommented:
Ok then I'm stumped. They are asking implementation details about our product. I thought it would be better to bring that discussion over to our board since it is no longer generally applicable to CR. How do you suggest I answer the question?
YogeshupAuthor Commented:
Hi Dan / Mlmcc,

There is no such topic "how to pass runtime/printtime values to CRChart macros" in the manual.

Please suggest how to utilise the @GRAPHTYPE macro with some sample code.
Forced accept.

EE Admin
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.