Solved

Programatic access to the MaxDataAxisValue and MinDataAxisValue of the IGraphObject

Posted on 2003-11-14
5
1,067 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 101

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

635 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