Jump to content
Software FX Community

Re: Help create gantt chart from SQL and ADO?


User (Legacy)
 Share

Recommended Posts

I think you forgot to tell the Chart to GET the data and have to tell it what to do with it.

frmMain.cCriticalTasks.GetExternalData CfxData

frmMain.cCriticalTasks.DataType(0) = CDT_VALUE

frmMain.cCriticalTasks.DataType(1) = CDT_VALUE

Check out GetExternalData and DataType

Steve

Dan Hickman <dhickman@mediaone.net> wrote in message news:bMJS5D2TAHA.1424@sfxserver.softwarefx.com...

> hello everyone :-),

> I have a database that contains Start and Finish Dates for a list of tasks.

> I would like to bind the ChartFx to a recordset like the following:

>

> Public Sub TaskCapDelayed()

> 'Create variables for ADO Connection and Resultset

> Dim RS As ADODB.Recordset

>

> 'Create variable to hold the Chart FX Default Data provider

> Dim CfxData As Object

>

> 'Open the connection

> Set RS = DataEnvironment1.Connection1.Execute("Select BaselineStart,

> BaselineFinish FROM tblTasks")

>

> 'Create Ado object from the Chart FX Resultset

> Set CfxData = CreateObject("CfxData.Ado")

>

> 'Assign the ADO resultset to the ChartFX Data Provider

> CfxData.ResultSet = RS

>

> With frmMain.cCriticalTasks

> ' Chart Type Settings

> .Gallery = GANTT

> 'Let Chart FX take information from the data provider

> .GetExternalData CfxData

> 'Add any other adjustments to the object here.

> '

> '

> End With

> ProcExit:

>

> RS.Close

>

> Set RS = Nothing

> Set CfxData = Nothing

> End Sub

>

>

> When I execute this sub, ChartFX says "No data Available". Can anyone help

> me on this one? Any directions would be wonderful.

>

> Thanks in advance,

> Daniel Hickman

>

>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...