HELP PLEASE modifying chart properties at runtime
From: JSE (john_at_nospam.ca)
Date: 11/30/04
- Next message: Paul: "set zoom with rep page load"
- Previous message: Brian Bischof: "Re: Crystal Preview (.show) is very slow"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 30 Nov 2004 23:57:35 GMT
Hello everyone. I have a problem involving changing some of the attributes
of a bar chart from our VB application. The problem areaa has ?? marks at
the beginning of the lines.
We first would like to change the height of our bar chart based on the
intHeight value passed to this routine. The existing routine changes the
database assigned to this report and to it's subreports. That part I have
muddled through. But I'm not sure how to tackle the chart object. The bar
chart is in the subreport header. I think once I can reference the chart
object, the properties will fall into place.
We also need to be able to set the min. data axis value, the max. data axis
value, and the data interval for the bar chart... all at runtime. Business
Objects has inferred that we can do this with CR9 RDC and do not need to go
to V10 or RAS to do it. My problem is how!!
We would certainly appreciate some help if you are familiar with this sort
of thing. Thank you very much in advance.
Cheers.
John Edgar
----------------------------------------------------------------------------
----
PUBLIC SUB
Screen.MousePointer = vbHourglass
Dim report1 As New CrystalReport9a
CRViewer93.ReportSource = report1
....
ReLocateDatabase report1, intHeight, intMinDataValue, intMaxDataValue,
intInterval
....
CRViewer93.Refresh
CRViewer93.ViewReport
Screen.MousePointer = vbDefault
Set report1 = Nothing
....
END SUB
PRIVATE SUB RELOCATEDATABASE(crxReport As craxdrt.Report, intHeight As
Integer, intMinDataValue as integer, intMaxDataValue as integer, intInterval
as integer)
Dim crGraphObj As craxdrt.GraphObject
Dim crxDatabaseTable As craxdrt.DatabaseTable
Dim crxGraphType As craxdrt.CRGraphType
Dim crObject As Object
Dim crxSubReport As craxdrt.Report
Dim crxSubDatabaseTable As craxdrt.DatabaseTable
Dim crxSubSection As craxdrt.Section
Dim crxSubObject As Object
'relocate databases for all main report files
For Each crxDatabaseTable In crxReport.Database.Tables
crxDatabaseTable.ConnectionProperties.Item("Database Name") =
gMdbPath_3
Next
'relocate data bases for all subreport files
For Each crxSection In crxReport.Sections
For Each crObject In crxSection.ReportObjects
If crObject.Kind = crSubreportObject Then
Set crxSubReport =
crxReport.OpenSubreport(crObject.SubreportName)
'relocate all databases
For Each crxSubDatabaseTable In crxSubReport.Database.Tables
crxSubDatabaseTable.ConnectionProperties.Item("Database
Name") = gMdbPath_3
Next
-----------------------------------------------------------------
***** Am I on the right track here?
'resize chart
?? For Each crxChartType In crxsubreport. ?????????????
?? crGraphObj = crxSubReport.Sections(0).ReportObjects.Item(0)
?? crGraphObj.Height = intHeight
Next
'set min data axis value
'set max date axis value
'set interval value
-----------------------------------------------------------------
End If
Next
Next
END SUB
- Next message: Paul: "set zoom with rep page load"
- Previous message: Brian Bischof: "Re: Crystal Preview (.show) is very slow"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|