Jump to content
Software FX Community

Problems with Gantt Charts


User (Legacy)

Recommended Posts

I am trying to produce Gantt Charts with Chart FX IE2000. No luck yet.

I always get this error.

Error Type:

(0xFFFFFFFE)

/EngineeringProjects/GanttChart/webgantt.asp, line 26

My code looks like that, maybe somebody can give me a hand...

<%@ Language=VBScript %>

<HTML>

<HEAD>

</HEAD>

<BODY>

<%

Set ChartFX1 = Server.CreateObject("ChartFX.WebServer")

With ChartFX1

.Gallery = GANTT

.Chart3D = False ' 3D won't look overlapped

.Cluster = True ' All segments in the same line

end with

Today = Now()

'First set the Min and Max for the Y Axis

ChartFX1.Axis(AXIS_Y).Min = Today

ChartFX1.Axis(AXIS_Y).Max = Today + 120 '3 months

'Then we can use the ValueEX and IniValueEX for the Gantt Chart. Let's

suppose it has 3 bars

ChartFX1.OpenDataEX COD_VALUES,1,3

ChartFX1.OpenDataEX COD_INIVALUES,1,3

ChartFX1.IniValueEX(0,0) = Today

ChartFX1.ValueEX(0,0) = Today +10

ChartFX1.IniValueEX(0,1) = Today + 30

ChartFX1.ValueEX(0,1) = Today + 80

ChartFX1.IniValueEX(0,2) = Today+90

ChartFX1.ValueEX(0,2) = Today+110

ChartFX1.CloseData COD_VALUES

ChartFX1.CloseData COD_INIVALUES

%>

<%= ChartFX1.GetHtmlTag(300,300,"Auto","Chart1") %>

</BODY>

</HTML>

Link to comment
Share on other sites

The problem is that you have not included the file "/Include/CfxIE.inc" that

contains the constants COD_VALUES and COD_INIVALUES.

Add the following line towards the beginning of the file (assuming that you

installed ChartFX using default values):

<!-- #include virtual="/Include/CfxIE.inc" -->

Also, to help prevent this in the future, I would suggest adding the

following line at the beginning of your file:

<% Option Explicit %>

This line forces variable declaration and will generate an error if a

variable is used but not defined. It will help troubleshoot situations like

these where you thought you were openning the COD_VALUES and COD_INIVALUES

but actually, since those values were undefined, you weren't openning

anything and getting a wierd error. Once you include this line, make sure

and "Dim" every variable that you will use EXCEPT THOSE VARIABLES ALREADY

DEFINED. For example, you will need to Dim "ChartFX1" and "Today" (your

variables), but not COD_VALUES and COD_INIVALUES (already defined in the

included file CfxIE.inc).

Hope this helps. If you have any additional questions, feel free to ask.

Chris

"Kurt Siegl" <siegl@hotmail.com> wrote in message

news:yYWoFuZuBHA.1412@webserver1.softwarefx.com...

> I am trying to produce Gantt Charts with Chart FX IE2000. No luck yet.

>

> I always get this error.

>

> Error Type:

> (0xFFFFFFFE)

> /EngineeringProjects/GanttChart/webgantt.asp, line 26

>

>

> My code looks like that, maybe somebody can give me a hand...

>

> <%@ Language=VBScript %>

> <HTML>

> <HEAD>

> </HEAD>

> <BODY>

> <%

> Set ChartFX1 = Server.CreateObject("ChartFX.WebServer")

>

>

> With ChartFX1

> .Gallery = GANTT

> .Chart3D = False ' 3D won't look overlapped

> .Cluster = True ' All segments in the same line

> end with

>

> Today = Now()

>

> 'First set the Min and Max for the Y Axis

> ChartFX1.Axis(AXIS_Y).Min = Today

> ChartFX1.Axis(AXIS_Y).Max = Today + 120 '3 months

>

> 'Then we can use the ValueEX and IniValueEX for the Gantt Chart. Let's

> suppose it has 3 bars

> ChartFX1.OpenDataEX COD_VALUES,1,3

> ChartFX1.OpenDataEX COD_INIVALUES,1,3

>

> ChartFX1.IniValueEX(0,0) = Today

> ChartFX1.ValueEX(0,0) = Today +10

> ChartFX1.IniValueEX(0,1) = Today + 30

> ChartFX1.ValueEX(0,1) = Today + 80

> ChartFX1.IniValueEX(0,2) = Today+90

> ChartFX1.ValueEX(0,2) = Today+110

>

> ChartFX1.CloseData COD_VALUES

> ChartFX1.CloseData COD_INIVALUES

>

> %>

> <%= ChartFX1.GetHtmlTag(300,300,"Auto","Chart1") %>

> </BODY>

> </HTML>

>

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...