将 MDX 参数传递给 SQL 查询
我有几份来自 SSAS 2008 的报告,但其中一份报告必须深入到 SQL Server 报告,因为数据对于多维数据集来说太细化了。
关于传递参数有什么技巧吗?当然,它们是作为 MDX 传入的,我无法找到一种方法来通过源 MDX 获取“密钥”。令人惊讶的是我找不到很多关于此的指示。
让我知道这是否太模糊......
I have several reports that are from SSAS 2008, but one of them has to drill through to a SQL Server report simply because the data is far to granular for a cube.
Any tips on passing parameters? Of course they are passed in as MDX, and I can't figure out a way to get just the "Key" with the source MDX. Surprisingly I can't find a lot of pointers on this.
Let me know if this is too vague...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否将 MDX 作为字符串传入,以便您可以检查和摆弄?如果您可以提取维度和成员名称,您可以在 SQL 数据库中查找名称以找到所需的 ID,然后将其传递?
我假设你得到这样的字符串:
[位置].[所有位置].[南部].[萨里].[吉尔福德]
如果您在 SQL 数据库中查找“Guildford”,您将能够发现它是第 2134 行,这就是您所需要的?
Are you getting the MDX passed in as a string which you can examine and fiddle with? If you can extract the dimension and member name, you could look up the name in the SQL database to find the ID required, which could then be passed on?
I assume you are getting strings like this:
[Location].[All location].[South].[Surrey].[Guildford]
If you look up 'Guildford' in your SQL db you'll be able to find out it is row 2134 and that's what you need?
我假设您想从报告操作中调用此报告。如果您的属性具有单个列键,您可以使用以下方式引用它:
如果您的属性具有多个键列,您将使用 KEY0、KEY1 等来引用各个部分,而不是 MEMBER_KEY
I'm assuming that you want to call this report from a report action. If your attribute has a single column key you can reference it using something like:
If your attribute has multiple key columns you would use KEY0, KEY1, etc to reference the individual parts instead of MEMBER_KEY