owc11 pivot table mdx query语法与ssas2008 mdx query语法不一样?
一些查询,比如:
mdx query1:
WITH MEMBER [Measures].x AS username SELECT [Measures].x ON 0 FROM [Cube Is]
mdx query2:
WITH MEMBER [Measures].x
AS
BIDataSecurity.GetDimensionSet(USERNAME, "publisher")
SELECT [Measures].x ON 0
FROM [Cube Is]
mdx query3:
select
[Order].[Publisher].[Publisher] on rows,
{[Order].[Date].&[2009-12-20T00:00:00]:[Order].[Date].&[2010-01-03T00:00:00]} on columns
from [Cube Is] where ([Measures].[Count - Order])
mdx query4:
select
[Order].[Publisher].[Publisher] on rows,
[Order].[Date].[Date] on columns
from [Cube Is] where ([Measures].[Count - Order])
上面这4个mdx查询在ssas2008的mdx查询里面均能正常查询,但是搬到owc11 pivot table里去后,只有第4个mdx query4有返回结果,别的均提示:
无明细数据,查询无法进行。数据提供程序不能提供进一步的错误信息。
HTML代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="owcdetail.aspx.cs" Inherits="Default4" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head id="Head1" runat="server" />
<body>
<OBJECT
id='pivotTable'
style="Z-INDEX: 0; POSITION: absolute; TOP: 40px; LEFT: 10px; HEIGHT: 600px;
WIDTH:800px;"
height='600'
width='800'
classid='clsid:0002E55A-0000-0000-C000-000000000046'>
</OBJECT>
<script language="javascript" type="text/javascript">
pvt = document.all.pivotTable;
var pvtusername='<%=return_username%>';
var pvtpassword='<%=return_password%>';
var hostname='http://。。。。/olap/msmdpump.dll';
var catalogname='all_as';
//var mdxquery1='select [Order].[Publisher].[Publisher] on rows,[Order].[Date].[Date] on columns from [Cube Is] where ([Measures].[Count - Order])'
//var mdxquery2='WITH MEMBER [Measures].x AS username SELECT [Measures].x ON 0 FROM [Cube Is]';
//time_area={[Order].[Date].&[2009-12-20T00:00:00]:[Order].[Date].&[2010-01-03T00:00:00]}
var mdxquery3='select ([Order].[Publisher].[Publisher],[Order].[Item].[Item]) on rows, [Measures].[Count - Order] on columns from [Cube Is] where (<%=time_area%>)';
pvt.ConnectionString='Provider=MSOLAP.3;Persist Security Info=True;User ID='+ pvtusername +';Password='+ pvtpassword +';Initial Catalog=all_as;Data Source=http://。。。。/olap/msmdpump.dll;MDX Compatibility=1;Safety Options=2;MDX Missing Member Mode=Error'
pvt.DataMember=catalogname;
pvt.DisplayFieldList = true
pvt.CommandText = mdxquery;
pvtconstants = pvt.Constants;
//设定透视表的属性
pvt.AutoFit = true;
pvt.DisplayToolbar = true;
pvt.DisplayExpandIndicator = true;
pvt.DisplayAlerts = true;
pvt.DisplayBranding = true;
pvt.DisplayDesignTimeUI = true;
pvt.DisplayFieldList = true;
pvt.DisplayOfficeLogo = false;
pvt.DisplayPropertyToolbox = false;
pvt.DisplayScreenTips = true;
pvt.ActiveView.TitleBar.Visible = true;
pvt.ActiveView.TitleBar.Caption = "<%=Title%>";
pvt.ActiveView.TitleBar.Font.Name = "arial";
pvt.ActiveView.TitleBar.Font.Size = 10;
pvt.ActiveView.TotalBackColor = "#FFFFFF";
pvt.ActiveView.TotalFont.Name = "arial";
pvt.ActiveView.TotalFont.Size = 8;
pvt.ActiveView.FieldLabelFont.Name = "arial";
pvt.ActiveView.FieldLabelFont.Size = 8;
pvt.ActiveView.HeaderFont.Name = "arial";
pvt.ActiveView.HeaderFont.Size = 8;
pvt.ActiveView.PropertyCaptionFont.Name = "arial";
pvt.ActiveView.PropertyCaptionFont.Size = 8;
pvt.ActiveView.PropertyValueFont.Name = "arial";
pvt.ActiveView.PropertyValueFont.Size = 8;
pvt.ActiveView.ExpandMembers = pvtconstants.plExpandNever;
pvt.ActiveView.ExpandDetails = pvtconstants.plExpandNever;
//设定字段的字体,字号,颜色等
for(var i = 0; i <= pvt.ActiveView.FieldSets.Count - 1; i++)
{
pvt.ActiveView.FieldSets(i).Fields(0).DetailFont.Name = "arial";
pvt.ActiveView.FieldSets(i).Fields(0).DetailFont.Size = 8;
pvt.ActiveView.FieldSets(i).Fields(0).DetailBackColor = "#EBF3FD";
pvt.ActiveView.FieldSets(i).Fields(0).GroupedFont.Name = "arial";
pvt.ActiveView.FieldSets(i).Fields(0).GroupedFont.Name = "arial";
pvt.ActiveView.FieldSets(i).Fields(0).GroupedFont.Size = 8;
pvt.ActiveView.FieldSets(i).Fields(0).GroupedBackColor = "#EBF3FD";
pvt.ActiveView.FieldSets(i).Fields(0).SubtotalLabelFont.Name = "arial";
pvt.ActiveView.FieldSets(i).Fields(0).SubtotalLabelFont.Size = 8;
pvt.ActiveView.FieldSets(i).Fields(0).SubtotalFont.Name = "arial";
pvt.ActiveView.FieldSets(i).Fields(0).SubtotalFont.Size = 8;
pvt.ActiveView.FieldSets(i).Fields(0).SubtotalBackColor = "#EBF3FD";
}
//设定值的字体,字号,颜色等
for(var i = 0; i <= pvt.ActiveView.FilterAxis.FieldSets.Count - 1; i++)
{
pvt.ActiveView.FilterAxis.FieldSets(i).Fields(0).DetailFont.Name = "arial";
pvt.ActiveView.FilterAxis.FieldSets(i).Fields(0).DetailFont.Size = 8;
pvt.ActiveView.FilterAxis.FieldSets(i).Fields(0).DetailBackColor = "#EBF3FD";
pvt.ActiveView.FilterAxis.FieldSets(i).Fields(0).GroupedFont.Name = "arial";
pvt.ActiveView.FilterAxis.FieldSets(i).Fields(0).GroupedFont.Name = "arial";
pvt.ActiveView.FilterAxis.FieldSets(i).Fields(0).GroupedFont.Size = 8;
pvt.ActiveView.FilterAxis.FieldSets(i).Fields(0).GroupedBackColor = "#EBF3FD";
pvt.ActiveView.FilterAxis.FieldSets(i).Fields(0).SubtotalLabelFont.Name = "arial";
pvt.ActiveView.FilterAxis.FieldSets(i).Fields(0).SubtotalLabelFont.Size = 8;
pvt.ActiveView.FilterAxis.FieldSets(i).Fields(0).SubtotalFont.Name = "arial";
pvt.ActiveView.FilterAxis.FieldSets(i).Fields(0).SubtotalFont.Size = 8;
pvt.ActiveView.FilterAxis.FieldSets(i).Fields(0).SubtotalBackColor = "#EBF3FD";
}
}
</script>
</body>
</html>
问题1:
在执行mdxquery1时,有结果正常显示;执行mdxquery2,mdxquery3时都会提示“无明细数据,查询无法进行。数据提供程序不能提供进一步的错误信息。”,为什么?
难道owc11 pivot table mdx query语法与ssas2008 mdx query语法不一样?owc11 pivot table mdx query只能执行一些特定的mdx query,或者他的语法更加严格?
问题2:
在设置了“
//设定字段的字体,字号,颜色等
//设定值的字体,字号,颜色等”,这两个for循环后,会有错误提示“发生了0x8002000B错误。没有进一步信息提供。”,怎么设置具体的颜色等呢?
第一次写asp.net代码,也是第一次写js代码,都是在别人的基础上改的,大家勿笑。
有什么没写好的,大家提出来帮我改改。谢谢。
问题3:
如果您看到了这里,我想请问下,前端一般怎么展现Cube呢?有什么推荐的案例么,网上都看不到完整的案例,均是一句话略过。。
大家有什么说什么哦,非常感谢。
区区刚混csdn不久,分不多,以后会努力赚分,回馈大家。
[解决办法]
不懂 帮顶下
[解决办法]
这个真不懂,帮顶.
[解决办法]
第一次就来MDX,应该要转移到BI版去
[解决办法]
不懂帮顶!