Problems with DigitalDashboard and office 2003

D

DavidE

Hi,

I have a DigitalDashboard application that shows reports.
This application worked perfect till I installed office 2003(I had 2000
before).
I don't know how it related to office but when I try to browse to any file
in this application I get always the same error:
" A Runtime Error has occured. Do you wish to debug ?
Error : The object don't support this property or methods:
ChartSpace1.Clear "

Here is code of one file(asp file) in the application:
<%@ Language=VBScript %>
<%Response.Expires =0%>
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=windows-1255">
</head>
<BODY>
<FORM action="" method=post id=form1 name=form1>
<center>
<INPUT type="submit" value="בצע" name=submit1>
<INPUT id=text1 name="year" style="HEIGHT: 25px; WIDTH: 60px"
value=<%=Request.Form("year")%>>
:בחר שנה
</center></FORM>
<!--select name=shana>
<option>value=1</option>
<option>2</option>
<option>3</option>
</select-->


<script LANGUAGE="vbscript" RUNAT="Server">
Function GetOfficeRemindersData()
dim r,c
dim values
dim ssql
dim mm,dd,yy
dim t1(100),t2(100),t3(100),t4(100)

set c=server.createobject("adodb.connection")
c.open
"DSN=BANAM;UID=ban;PWD=ban;DBQ=lnx;DBA=W;APA=T;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;FRL=F;PFC=10;TLO=0;"
set r=server.createobject("adodb.recordset")
r.activeconnection=c
set r2=server.createobject("adodb.recordset")
r2.activeconnection=c
set r3=server.createobject("adodb.recordset")
r3.activeconnection=c

shana = right(date(),4)
if Request.Form("year") = "" then
yy=shana
else
yy=Request.Form("year")
if not(yy > 1990 and yy < 2999) then
yy=shana
end if
end if
' if yy > shana then
' yy = shana
' end if
mone=0
values=""
categories=""


'ssql ="SELECT BAN.YECHIDA.NAME_YECHIDA, BAN.YECHIDA.OWNER_YECHIDA,
Sum(BAN.AZMANOT1.TOT_BUTZA) AS Sum_TOT_BUTZA,
to_char(BAN.AZMANOT1.KABALADAT,'yyyy') AS year, Sum(BAN.AZMANOT1.TOTAZ) AS
Sum_TOTAZ , BAN.YECHIDA.PERSON_YECHIDA "
'ssql = ssql & "FROM BAN.AZMANOT1 ,BAN.YECHIDA where
BAN.AZMANOT1.OWNER_YECHIDA = BAN.YECHIDA.OWNER_YECHIDA "
'ssql = ssql & "GROUP BY BAN.YECHIDA.NAME_YECHIDA,
BAN.YECHIDA.OWNER_YECHIDA, to_char(BAN.AZMANOT1.KABALADAT,'yyyy') ,
BAN.YECHIDA.PERSON_YECHIDA "
'ssql = ssql & "HAVING (((to_char(BAN.AZMANOT1.KABALADAT,'yyyy'))=" &
yy & "))"
'r.open ssql
ssql ="SELECT BAN.YECHIDA.NAME_YECHIDA, BAN.YECHIDA.OWNER_YECHIDA,
to_char(BAN.AZMANOT1.KABALADAT,'yyyy') AS year , BAN.YECHIDA.PERSON_YECHIDA, "
ssql = ssql & "
Sum(decode((BAN.AZMANOT1.MATZAV),3,BAN.AZMANOT1.TOT_BUTZA,4,0,BAN.AZMANOT1.TOTAZ )) Sum_TOTAZ , "
ssql = ssql & "
Sum(decode((BAN.AZMANOT1.MATZAV),4,0,BAN.AZMANOT1.TOT_BUTZA)) Sum_TOT_BUTZA "
ssql = ssql & "FROM BAN.AZMANOT1 ,BAN.YECHIDA where
BAN.AZMANOT1.OWNER_YECHIDA = BAN.YECHIDA.OWNER_YECHIDA "
ssql = ssql & "GROUP BY BAN.YECHIDA.NAME_YECHIDA,
BAN.YECHIDA.OWNER_YECHIDA, to_char(BAN.AZMANOT1.KABALADAT,'yyyy') ,
BAN.YECHIDA.PERSON_YECHIDA "
ssql = ssql & "HAVING (((to_char(BAN.AZMANOT1.KABALADAT,'yyyy'))=" &
yy & "))"
r.open ssql

if not r.EOF then
do until r.eof
t1(r.fields("OWNER_YECHIDA")) = r.fields("NAME_YECHIDA") & "-" &
r.fields("PERSON_YECHIDA")
t2(r.fields("OWNER_YECHIDA")) = r.fields("Sum_TOTAZ")
t3(r.fields("OWNER_YECHIDA")) = r.fields("Sum_TOT_BUTZA")
r.MoveNext
loop
end if

ssql = "SELECT BAN.YECHIDA.NAME_YECHIDA,
BAN.CHESHBONIT.OWNER_YECHIDA, BAN.CHESHBONIT.SHANA, Sum(BAN.CHESHBONIT.SCHUM)
AS Sum_SCHUM, BAN.YECHIDA.PERSON_YECHIDA "
ssql = ssql & "FROM BAN.YECHIDA ,BAN.CHESHBONIT "
ssql = ssql & "where (((BAN.CHESHBONIT.SHANA)=" & yy & ")) and
BAN.YECHIDA.OWNER_YECHIDA = BAN.CHESHBONIT.OWNER_YECHIDA "
ssql = ssql & "GROUP BY BAN.YECHIDA.NAME_YECHIDA,
BAN.CHESHBONIT.OWNER_YECHIDA, BAN.CHESHBONIT.SHANA,
BAN.YECHIDA.PERSON_YECHIDA"
r2.Open ssql

if not r2.EOF then
do until r2.eof
t1(r2.fields("OWNER_YECHIDA")) = r2.fields("NAME_YECHIDA") & "-" &
r2.fields("PERSON_YECHIDA")
t4(r2.fields("OWNER_YECHIDA")) = r2.fields("Sum_SCHUM")
r2.MoveNext
loop
end if

ssql = "SELECT Max(BAN.YECHIDA.OWNER_YECHIDA) AS Max_OWNER_YECHIDA
FROM BAN.YECHIDA"
r3.open ssql
sum = r3.Fields("Max_OWNER_YECHIDA")
for i = 1 to sum
if t1(i) <> "" then
mone = mone + 1
values = values & "$" & t1(i) & "$" & t2(i) & "$" & t3(i) & "$"
& t4(i)
end if
next

values = Replace(values, """", "*")
values = Replace(values, "'", "%")
values=right(values,len(values)-1)
Session("banam3") = yy & "!" & mone & "!" & values
r.Close
set r = Nothing
r2.Close
set r2 = Nothing
r3.Close
set r3 = Nothing
c.Close
set c = Nothing

End Function

</script>

<script ID="ClientProceduresVBS" LANGUAGE="vbscript">
sub ChartFiling(s)
Dim Categories(40) 'strings parameters for chart
Dim i
Dim c 'chart constants collection
Dim PoliciesCount(40)
Dim PoliciesCount2(40)
Dim PoliciesCount3(40)

'msgbox s
if s = "" then exit sub
s = Replace(s, "*" , """")
s = Replace(s, "%" , "'")

yy = Mid(s, 1, InStr(s, "!") - 1)
s = Mid(s, InStr(s, "!") + 1)

mone = Mid(s, 1, InStr(s, "!") - 1)
s = Mid(s, InStr(s, "!") + 1)
'msgbox mone
mone = mone - 2
For i = 0 To mone
Categories(i) = Mid(s, 1, InStr(s, "$") - 1)
s = Mid(s, InStr(s, "$") + 1)
'msgbox Categories(i)
PoliciesCount(i) = Mid(s, 1, InStr(s, "$") - 1)
if PoliciesCount(i) = "" then
PoliciesCount(i) = 0
end if
if PoliciesCount(i) > 0 then
PoliciesCount(i) = PoliciesCount(i) \ 1000
end if
'msgbox PoliciesCount(i)
s = Mid(s, InStr(s, "$") + 1)

PoliciesCount2(i) = Mid(s, 1, InStr(s, "$") - 1)
if PoliciesCount2(i) = "" then
PoliciesCount2(i) = 0
end if

if PoliciesCount2(i) > 0 then
PoliciesCount2(i) = PoliciesCount2(i) \ 1000
end if
s = Mid(s, InStr(s, "$") + 1)
'msgbox PoliciesCount2(i)

PoliciesCount3(i) = Mid(s, 1, InStr(s, "$") - 1)
if PoliciesCount3(i) = "" then
PoliciesCount3(i) = 0
end if

if PoliciesCount3(i) > 0 then
PoliciesCount3(i) = PoliciesCount3(i) \ 1000
end if
s = Mid(s, InStr(s, "$") + 1)
'msgbox PoliciesCount3(i)
Next
'msgbox "after"
Categories(mone + 1) = Mid(s, 1, InStr(s, "$") - 1)
if Categories(mone + 1) = "" then
Categories(mone + 1) = 0
end if

s = Mid(s, InStr(s, "$") + 1)
PoliciesCount(mone + 1) = Mid(s, 1, InStr(s, "$") - 1)
if PoliciesCount(mone + 1) = "" then
PoliciesCount(mone + 1) = 0
end if
if PoliciesCount(mone + 1) > 0 then
PoliciesCount(mone + 1) = PoliciesCount(mone + 1) \ 1000
end if

s = Mid(s, InStr(s, "$") + 1)
PoliciesCount2(mone + 1) = Mid(s, 1, InStr(s, "$") - 1)
if PoliciesCount2(mone + 1) = "" then
PoliciesCount2(mone + 1) = 0
end if
if PoliciesCount2(mone + 1) > 0 then
PoliciesCount2(mone + 1) = PoliciesCount2(mone + 1) \ 1000
end if
s = Mid(s, InStr(s, "$") + 1)
PoliciesCount3(mone + 1) = s
if PoliciesCount3(mone + 1) = "" then
PoliciesCount3(mone + 1) = 0
end if
if PoliciesCount3(mone + 1) > 0 then
PoliciesCount3(mone + 1) = PoliciesCount3(mone + 1) \ 1000
end if
' msgbx "after"

ChartSpace1.Clear
ChartSpace1.Charts.Add

Set c=ChartSpace1.Constants
ChartSpace1.Charts(0).Type = 0

ChartSpace1.Charts(0).SeriesCollection.Add
ChartSpace1.Charts(0).SeriesCollection(0).Caption = "×¡×›×•× ×”×”×–×ž× ×”"
ChartSpace1.Charts(0).SeriesCollection(0).SetData c.chDimCategories,
c.chDataLiteral , Categories
ChartSpace1.Charts(0).SeriesCollection(0).SetData c.chDimValues,
c.chDataLiteral , PoliciesCount

ChartSpace1.Charts(0).SeriesCollection.Add
ChartSpace1.Charts(0).SeriesCollection(1).Caption = "בוצע"
ChartSpace1.Charts(0).SeriesCollection(1).SetData c.chDimCategories,
c.chDataLiteral , Categories
ChartSpace1.Charts(0).SeriesCollection(1).SetData c.chDimValues,
c.chDataLiteral , PoliciesCount2

ChartSpace1.Charts(0).SeriesCollection.Add
ChartSpace1.Charts(0).SeriesCollection(2).Caption = "חשבונית ×œ×œ× ×”×–×ž× ×”"
ChartSpace1.Charts(0).SeriesCollection(2).SetData c.chDimCategories,
c.chDataLiteral , Categories
ChartSpace1.Charts(0).SeriesCollection(2).SetData c.chDimValues,
c.chDataLiteral , PoliciesCount3


ChartSpace1.HasChartSpaceTitle = true
ChartSpace1.Charts(0).HasLegend = true
ChartSpace1.ChartSpaceTitle.font.color="blue"
ChartSpace1.ChartSpaceTitle.font.size=14
ChartSpace1.ChartSpaceTitle.font.bold=true
ChartSpace1.ChartSpaceTitle.Caption = "דו""ח התחייבות - ביצוע " &
yy & " (ב×לפי×)"
ChartSpace1.Charts(0).plotarea.interior.color="white"


Set dl =
ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection.Add
dl.HasPercentage = false
dl.Hasvalue = true
dl.font.size = 7
Set dl =
ChartSpace1.Charts(0).SeriesCollection(1).DataLabelsCollection.Add
dl.HasPercentage = false
dl.Hasvalue = true
dl.font.size = 7
Set dl =
ChartSpace1.Charts(0).SeriesCollection(2).DataLabelsCollection.Add
dl.HasPercentage = false
dl.Hasvalue = true
dl.font.size = 7
end sub
</script>

<%
'If Session("banam3") = "" Then
call GetOfficeRemindersData()
'end if
%>

<body onload="ChartFiling('<%=Session("banam3")%>')">
<!--<body onload="ChartFiling(<%=Session("mashabei_enosh")%>)">-->
<!--body
onload="ChartFiling('1068101.1908$291474.01$1008202.7326$533423.29$160284.618$31334.48$50554.88$17789.71$207889.5967$3586$80035.78$58173.25$31440.9677$150$13577$850$13043.8737$887027!9$×ב$x2$×—:×™$x4$x7$ד$×¢×›$x15$x25')"-->
<div>
<table align="left" border="1" width="100%" >
<OBJEC! id=ChartSpace1 style="WIDTH: 100%; HEIGHT: 350px"
classid=CLSID:0002E500-0000-0000-C000-000000000046><PARAM NAME="XMLData"
VALUE='<xml xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel">
<x:WebChart>
<x:OWCVersion>9.0.0.2710</x:OWCVersion>
<x:Width>20505</x:Width>
<x:Height>8202</x:Height>
<x:DataSource>
<x:Type>OSP</x:Type>
</x:DataSource>
</x:WebChart>
</xml>'><PARAM NAME="ScreenUpdating" VALUE="-1"></OBJECT>
</table>


</div>


</body>
</html>

If I erase the line "ChartSpace1.Clear" so I get the error for the next
line: ChartSpace1.Charts.Add and so on.
I tried the same link for an asp file in the applicaion in other cumuters.
Cumputers which have office 2000 it works perfect and others that have office
2003 gives the same error.

1.How can I solve this problem for office 2003 ?
2. Why I get this Error when use just the IE ?
3. Maby the problem is in this two lines because of the version:
classid=CLSID:0002E500-0000-0000-C000-000000000046
OWCVersion>9.0.0.2710</x:OWCVersion>
Where can I see my OWCVersion ?

Thanks

David
 
K

krishnanrajah

Dear david,

I am not sure if the problem is because of Office 2003 , but in you
code i find u have given as ChartSpace1.Clear , this has to b
ChartSpace1.Clear() , this would resolve u the script error u
recving.



regards
krishna
 
D

DavidE

Hi krishnanrajah,

Thanks for anwering. This is the solution:
In office 2000:classid=CLSID:0002E500-0000-0000-C000-000000000046
In office 2003:classid=CLSID:0002E55D-0000-0000-C000-000000000046

Now my problem is to identify the client office version.
Any suggestions ?

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top