D
doxeone
Hi all and thank you for reading,
I try to use OWC in a web page, the code which generate this is written
in LotusScript (a language similar of VBScript) in a Lotus Notes
application.
My code take data from a MSSQL Server and build graphic.
Here is my problem :
My code works great until i try to embed my object, i generate a
picture which is conform with my data after i embed my owc in the html
code. But it is not work, you can see my problem in the image linked
here :
http://pix.nofrag.com/b1/af/cced2bf00add5c2c62c9a09f274e.html
There is 4 iframe :
- top left : image generate by "exportPicture"
- top right : my data
- bottom left : owc generate with VBScript (printed in the code, but i
can't use this way too difficult)
- bottom right : owc generate in LotusScript, object is created but
don't show data.
Have you got any ideas to resolve this problem ?
Thanksa lot for answering
My code :
Sub Initialize
(..)
Dim ChartSpace1,c,cht,sc,serie,seriesName
Set ChartSpace1 = CreateObject("OWC11.ChartSpace.11")
With ChartSpace1
Set c = .Constants
.Clear
.Border.Color = c.chColorNone
Set cht = .Charts.Add()
Call getGraphType (queryDoc,cht,c)
' Titre du graphique
cht.HasTitle = True
cht.Title.font.Bold = True
cht.Title.Caption = queryDoc.qTitle(0)
' Légende du graphique
cht.HasLegend = True
'cht.Legend.LegendEntries(0).Visible = False
Dim rsArray
If Not result.eof Then
rsArray = result.GetRows()
nbTotal = Ubound(rsArray, 2) + 1
End If
Result.MoveFirst
Redim strCat(nbTotal-1)
Redim strVal(nbTotal*(Result.Fields.count-1)-1)
j=0
While Not result.Eof
For i=0 To Result.Fields.count-1
' catégorie
If i=0 Then
If Not Isnull(Result.Fields(i).value) Then strCat(j) =
Result.Fields(i).value
Else
' séries
strVal(((i-1)*nbTotal)+(j)) = Result.Fields(i).value
End If
Next
j=j+1
Result.MoveNext
Wend
cht.SetData c.chDimCategories,-1, strCat
Dim strvaltmp()
For i=0 To Result.Fields.count-2
Redim strvaltmp(nbTotal-1)
For j=0 To nbTotal-1
strvaltmp(j) = Cdbl(strVal((i*nbTotal)+(j)))
Next
Set serie = cht.SeriesCollection.Add()
serie.SetData c.chDimValues, c.chDataLiteral,strvaltmp
Next
filename = exportImage(queryDoc.graphType(0))
.ExportPicture filename,"gif","550","400"
.Refresh
End With
Print {Content-Type:text/html}
Print |<html>|
Print |<head>|
Print |<link rel='stylesheet' type='text/css' href='style.css'>|
Print |</head>|
Print |<body>|
Print |<p>|+ChartSpace1.Version+|</p>|
Print |<object id=ChartSpace1
classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>|
Print |</body>|
Print |</html>|
(...)
End Sub
'******************************************************************************************
I try to use OWC in a web page, the code which generate this is written
in LotusScript (a language similar of VBScript) in a Lotus Notes
application.
My code take data from a MSSQL Server and build graphic.
Here is my problem :
My code works great until i try to embed my object, i generate a
picture which is conform with my data after i embed my owc in the html
code. But it is not work, you can see my problem in the image linked
here :
http://pix.nofrag.com/b1/af/cced2bf00add5c2c62c9a09f274e.html
There is 4 iframe :
- top left : image generate by "exportPicture"
- top right : my data
- bottom left : owc generate with VBScript (printed in the code, but i
can't use this way too difficult)
- bottom right : owc generate in LotusScript, object is created but
don't show data.
Have you got any ideas to resolve this problem ?
Thanksa lot for answering
My code :
Sub Initialize
(..)
Dim ChartSpace1,c,cht,sc,serie,seriesName
Set ChartSpace1 = CreateObject("OWC11.ChartSpace.11")
With ChartSpace1
Set c = .Constants
.Clear
.Border.Color = c.chColorNone
Set cht = .Charts.Add()
Call getGraphType (queryDoc,cht,c)
' Titre du graphique
cht.HasTitle = True
cht.Title.font.Bold = True
cht.Title.Caption = queryDoc.qTitle(0)
' Légende du graphique
cht.HasLegend = True
'cht.Legend.LegendEntries(0).Visible = False
Dim rsArray
If Not result.eof Then
rsArray = result.GetRows()
nbTotal = Ubound(rsArray, 2) + 1
End If
Result.MoveFirst
Redim strCat(nbTotal-1)
Redim strVal(nbTotal*(Result.Fields.count-1)-1)
j=0
While Not result.Eof
For i=0 To Result.Fields.count-1
' catégorie
If i=0 Then
If Not Isnull(Result.Fields(i).value) Then strCat(j) =
Result.Fields(i).value
Else
' séries
strVal(((i-1)*nbTotal)+(j)) = Result.Fields(i).value
End If
Next
j=j+1
Result.MoveNext
Wend
cht.SetData c.chDimCategories,-1, strCat
Dim strvaltmp()
For i=0 To Result.Fields.count-2
Redim strvaltmp(nbTotal-1)
For j=0 To nbTotal-1
strvaltmp(j) = Cdbl(strVal((i*nbTotal)+(j)))
Next
Set serie = cht.SeriesCollection.Add()
serie.SetData c.chDimValues, c.chDataLiteral,strvaltmp
Next
filename = exportImage(queryDoc.graphType(0))
.ExportPicture filename,"gif","550","400"
.Refresh
End With
Print {Content-Type:text/html}
Print |<html>|
Print |<head>|
Print |<link rel='stylesheet' type='text/css' href='style.css'>|
Print |</head>|
Print |<body>|
Print |<p>|+ChartSpace1.Version+|</p>|
Print |<object id=ChartSpace1
classid=CLSID:0002E55D-0000-0000-C000-000000000046
style="width:100%;height:350"></object>|
Print |</body>|
Print |</html>|
(...)
End Sub
'******************************************************************************************