请高手指点~~!关于Office Web Components组件在使用中出现的问题~~~很急~!已经想了好多天~!找不到原因~!
第一个asp文件
<%@ Language=VBScript %>
<!-- #include file="../../common/asp_master.asp" -->
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY topMargin="0" leftMargin="0">
<!-- #include file="../../common/working.asp" -->
<div id="divMain" style="display:none" class="divMain" border="0">
<table id="tblMain" style="width:90%;height:90%" cellspacing=0 cellpadding=0 align=center>
<tr height="90%" align='left' valign='top'>
<td valign='top'>
<object id=PivotTable1 style="LEFT: 0px; WIDTH: 99%; TOP: 0px; HEIGHT: 88%" classid=CLSID:0002E552-0000-0000-C000-000000000046 VIEWASTEXT><PARAM NAME="XMLData" VALUE="<xml xmlns:x="urn:schemas-microsoft-com:office:excel">
<x:PivotTable1Table>
<x:OWCVersion>10.0.0.3409 </x:OWCVersion>
<x:DisplayScreenTips/>
<x:NoAutoFit/>
<x:Height>454</x:Height>
<x:Width>1032</x:Width>
<x:CubeProvider>msolap.2</x:CubeProvider>
<x:CacheDetails/>
<x:PivotTable1View>
<x:IsNotFiltered/>
</x:PivotTable1View>
</x:PivotTable1Table>
</xml>"></OBJECT>
<object id=MSODSC classid=CLSID:0002E553-0000-0000-C000-000000000046 VIEWASTEXT></object>
</td>
</tr>
</table>
</div>
</body>
</html>
<script language=vbscript>
Sub Window_OnLoad()
showresult
DisplayPivotTable1
End Sub
Function DisplayPivotTable1
Dim oView
PivotTable1.AutoFit = false
PivotTable1.AllowDetails = False
PivotTable1.DisplayToolbar = False
MSODSC.ConnectionString = "Provider=SQLOLEDB.1;Initial Catalog=center;Data Source=192.168.3.3;User Id =sa;Password="
MSODSC.RecordsetDefs.AddNew "GenStylDtlData.asp?i_strStyleNO="& "<%=Request("i_strStyleNO")%>" & "&i_strRegion=" & "<%=Request("i_strRegion")%>" & "&i_dtFromDate=" & "<%=Request("i_dtFromDate")%>" & "&i_dtToDate=" & "<%=Request("i_dtToDate")%>" & "&i_strShowBrands=" & "<%=Request("i_strShowBrands")%>",MSODSC.Constants.dscCommandFile,"DetailData"
Set PivotTable1.DataSource = MSODSC
PivotTable1.DataMember = "DetailData"
Set oView = PivotTable1.ActiveView
oView.RowAxis.InsertFieldSet oView.Fieldsets("crcolr")
oView.RowAxis.InsertFieldSet oView.Fieldsets("crsize")
oView.ColumnAxis.InsertFieldSet oView.Fieldsets("crldes")
oView.DataAxis.InsertTotal oView.AddTotal("销售数", oView.Fieldsets("crtqty").Fields(0), PivotTable1.Constants.plFunctionSum)
oView.Totals("销售数").NumberFormat = "#,##0"
oView.Fieldsets("crcolr").Fields(0).Expanded = False
oView.Fieldsets("crsize").Fields(0).Expanded = False
oView.Label.Caption = ""
oView.FilterAxis.Label.Visible = False
PivotTable1.ActiveView.RowAxis.FieldSets.Item(0).Caption = "Color"
PivotTable1.ActiveView.RowAxis.FieldSets.Item(0).Fields.Item(0).Caption="颜色"
PivotTable1.ActiveView.RowAxis.FieldSets.Item(1).Caption = "Size"
PivotTable1.ActiveView.RowAxis.FieldSets.Item(1).Fields.Item(0).Caption="尺码"
PivotTable1.ActiveView.ColumnAxis.FieldSets.Item(0).Caption = "Shop"
PivotTable1.ActiveView.ColumnAxis.FieldSets.Item(0).Fields.Item(0).Caption="Shop sale"
End Function
</script>
第二个GenStylDtlData.asp文件
<%@ Language=VBScript %>
<!-- #include file="../../common/exchange_data.asp" -->
<%
Dim rsXML,objXMLDom,f_strShowBrands,f_strRegion,f_strStyleNO,f_dtFromDate,f_dtToDate,f_strSql,objXSLT,strCleanXML
Server.ScriptTimeout = 60000
Const adPersistXML=1
'区域
f_strRegion = Request.QueryString("i_strRegion")
'款式
f_strStyleNO = Request.QueryString("i_strStyleNO")
'销售开始日
f_dtFromDate = Request.QueryString("i_dtFromDate")
'销售结束日
f_dtToDate = Request.QueryString("i_dtToDate")
'品牌
f_strShowBrands = Request.QueryString("i_strShowBrands")
set rsXML = exchange_data("c_integrative_analyse_bystyle_show_colorsizeqty '" & f_strRegion & "','" & f_strStyleNO & "','" & f_dtFromDate & "','" & f_dtToDate & "','" & f_strShowBrands & "'")
set objXMLDom = Server.CreateObject("MSXML2.DOMDocument.3.0")
rsXML.save objXMLDom,1
Response.Write objXMLDom.xml
%>
第二个asp文件中的存储过程c_integrative_analyse_bystyle_show_colorsizeqty有一字段的内容是中文的,现在的问题是:如果所有字段的内容没有中文,那就不会出现问题,如果其中有一个字段是中文的,所有字段的内容就无法显示出来。不知道是什么原因~~~郁闷中~!