Jump to content
Software FX Community

Exception occurred


Recommended Posts

I'm using object ChartFX.WebServer to generat a chart to display at the client. This has been working for quite some time but with a few occations.

There are a couple of users that get Exception occurred on a specific computer. Same user on other computer with same IE-version works fine and other user om same computer doesn't work.

 What could be the cause of this? Any tips on what at the client could effect the chartgeneration at serverside???



Link to comment
Share on other sites

The problem is that I cant reproduce it either. It's only a client in our network that get this error on a specific computer. Since the image is generated at serverside this seems quite odd. As I stated earlier, same user and same input data works on one computer but not on another.

 Some of the code:

' -------- Produce graph  --------

'Find max

For i = 0 to 11

For l = 3 to 5

If a(5,l,i)> cMaxValue then cMaxValue = a(5,l,i)



If cNumberOfSegments > 0 and fCompute then


For i = 0 to 4

If aEarned(i)=1 then

ReDim Preserve aSerier(iSerier)


iSerier = iSerier+1

End If


iMonths = 12

set chart=nothing

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

Chart.OpenDataEx COD_VALUES,iSerier+2,iMonths

For k = 0 to iSerier-1

chart.ThisSerie = k

For i = 0 to iMonths-1

chart.Value(i) = aBonus(aSerier(k),3,i)



'Grafdata: Linjer

chart.ThisSerie = iSerier+0

For i = 0 to 11

chart.Value(i) = a(5,4,i)


chart.ThisSerie = iSerier+1

For i = 0 to 11

chart.Value(i) = a(5,5,i)


Chart.CloseData COD_VALUES

For i = 0 to iSerier-1

chart.Series(i).Gallery = BAR

chart.Series(i).Stacked = True


chart.Series(iSerier+0).Gallery = LINES

chart.Series(iSerier+0).MarkerShape = MK_CIRCLE

chart.Series(iSerier+0).MarkerSize = 2

chart.Series(iSerier+1).Gallery = LINES

chart.Series(iSerier+1).MarkerShape = MK_CIRCLE

chart.Series(iSerier+1).MarkerSize = 2

chart.Chart3D = False

'Format X-axis

with chart.Axis(AXIS_X)

.TickMark = TS_NONE

.Label(0) = "Jan"

.Label(1) = "Feb"

.Label(2) = "Mar"

.Label(3) = "Apr"

.Label(4) = "Maj"

.Label(5) = "Jun"

.Label(6) = "Jul"

.Label(7) = "Aug"

.Label(8) = "Sep"

.Label(9) = "Okt"

.Label(10) = "Nov"

.Label(11) = "Dec"

end with

'Format Y-axis

with chart.Axis(AXIS_Y)

.TickMark = False

.Max = cMaxValue

.Grid = True

.GridStyle = CHART_DOT

.GridWidth = 2

.Decimals = 0

end with


chart.OpenDataEx COD_COLORS,iSerier+2,0

For i = 0 to iSerier-1

chart.Series(i).Color = RGB(aBase(aSerier(i),9),aBase(aSerier(i),10),aBase(aSerier(i),11))


chart.Series(iSerier).Color = RGB(150,150,150)

chart.Series(iSerier+1).Color = RGB(0,0,0)

chart.CloseData COD_COLORS

'General formattings

chart.RGBBk = RGB(255,255,255)

chart.OpenDataEx COD_CONSTANTS,1,0

chart.ConstantLine(0).Value = 0

chart.CloseData COD_CONSTANTS

chart.TopGap = 15

chart.BottomGap = 30

chart.RightGap = 15

chart.LeftGap = 50

'Check if any data can be displayed

For i = 0 to 11

fReached = fReached or a(5,3,i)>= 0.1 or a(5,4,i) >= 0.1 or a(5,5,i) >= 0.1


End If

On Error Resume Next

Response.Write( chart.getHTMLtag(200,150,"image") )

If err.number > 0 Then


End If

On Error GoTo 0


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.

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.

  • Create New...