Solved

Programatic access to the MaxDataAxisValue and MinDataAxisValue of the IGraphObject

Posted on 2003-11-14
5
1,048 Views
Last Modified: 2007-12-19
I'm writing a report with asp.net and c# that generates three seperate bar graphs from the same set of data.  I want to be able to find the largest value in the data set and programatically set the MinDataAxisValue of all the graphs to the same value, so that the relative size of the bars on each graph is the same.

I get access to the report object with this line

BIRGraphReport gr = new BIRGraphReport();

where BIRGraphReport refers to the BIRGraphReport.rpt file.

The problem is I can't find any access to the graph object in the report object.  In vs.net I look in the properties window for the graph and it says it is of type IGraphObject, but when I search for that object in the object browser, the browser can't find the class or interface.  Please help.
0
Comment
Question by:lloyd13
  • 2
5 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 9750122
Which version and edition of CR?

What references to CR are you including in the application.

To get what you want you will probably need to use the CRAXDDRT library or its equivalent for asp.  CRAXDDRT is the Crystal Reports ActiveX Designer Design and RunTime Library.  It exposes design time objects to the application at runtime.  Problem is you must pay for a license for each client.

mlmcc
0
 

Author Comment

by:lloyd13
ID: 9764475
I'm using the CR edition that comes with Visual Studio .NET.  In the About Microsoft Development Environment it just says  Crystal Reports for Visual Studio .NET

The references I have to CR are

CrystalDecisions.CrystalReports.Engine
CrystalDecisions.ReportSource
CrystalDecisions.Shared
CrystalDecisions.Web

is CRAXDDRT a library usable from a .net application?
0
 

Author Comment

by:lloyd13
ID: 9764983
I did a search for CRAXDDRT and found craxddrt20.dll in ..\Common Files\Crysal Decisions\1.0\bin

I included this a reference to my project and through the Object Browser I can see that it contains the class definision for GraphObject with implements the IGraphObject interface.  The IGraphObject interface has all the properties I need to modify the attributes of the chart.

I also found the reference to the graph in my BIRGraphReport object like so

gr.Section1.ReportObjects["Graph1"]

The problem now is that gr.Section1.ReportObjects["Graph1"] is a ChartObject in the CrystalDecisions.CrystalReports.Engine library and not a GraphObject.  When I try to cast it to a GraphObject I get a "Specified Cast Is Not Valid" exception.  So I'm closer but still not able to modify the properties of the graph.

0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11861506
PAQed, with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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 …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 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