[英]SSRS 2012 limit values returned from parameter dataset
Running SSRS2012. 运行SSRS2012。 We report using cubes, so I cannot change the MDX/Query code.
我们使用多维数据集进行报告,因此无法更改MDX /查询代码。
I have a simple query from a Client cube: Client.ClientID, Client.ClientName, Client.ClientAddress 我有一个来自Client多维数据集的简单查询:Client.ClientID,Client.ClientName,Client.ClientAddress
I have used the Query Designer to add ClientID as a parameter. 我已经使用查询设计器添加ClientID作为参数。
SSRS has automatically: SSRS自动具有:
This is expected behaviour and the report runs as expected, prompting me to choose a value from the list. 这是预期的行为,报告按预期运行,提示我从列表中选择一个值。 If I do, it returns the data for the single client I'm after.
如果我这样做,它将返回我所追寻的单个客户端的数据。
This is my problem. 这是我的问题。
Although it works, the list of values returned is very long and so is difficult to use. 虽然可以,但是返回的值列表很长,因此很难使用。 Users will only be running this report for one client at a time so they'd like to type in the single client id and run the report.
用户一次只能为一个客户端运行此报告,因此他们想输入单个客户端ID并运行该报告。
I've tried everything I can think of. 我已经尝试了所有我能想到的。
The closest I've come is adding another parameter @PreFilter and using that as a filter on the parameter dataset. 我最接近的是添加另一个参数@PreFilter并将其用作参数数据集上的过滤器。
However, to the user it's terrible. 但是,对于用户而言,这是可怕的。 They're prompted to type the client id into @PreFilter, then they have to wait an age (as the parameter dataset is filtered) and then they select the exact same client id from the @ClientClientID parameter prompt.
提示他们在@PreFilter中键入客户端ID,然后必须等待一个年龄(因为过滤了参数数据集),然后从@ClientClientID参数提示符下选择完全相同的客户端ID。
I've even specified the default value of @ClientClientID to be @PreFilter, but they're still prompted to Select a value . 我什至将@ClientClientID的默认值指定为@PreFilter,但是仍然提示他们选择一个值 。
There must be a better way! 一定会有更好的办法!
Sounds to me like a data modelling issue. 在我看来,这就像一个数据建模问题。 Probably the ClientId in parameter is taken directly from the fact table instead of from Client dimension.
参数中的ClientId可能直接从事实表中获取,而不是从Client维中获取。 If the data is properly modelled eg star schema having separate facts and dimensions the retrieving of client data should be faster.
如果对数据进行了适当的建模(例如,具有不同事实和维度的星型模式),则客户端数据的检索应该更快。
Finally - a much better way. 最后-更好的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.