报告服务问题。前向依赖无效

发布于 2024-11-18 07:11:07 字数 1016 浏览 6 评论 0原文

我对 Reporting Services 报告有疑问。我的报告有两个数据集,一个用于获取实际的报告数据,另一个用于获取翻译后的资源字符串,以便在报告中使用文字文本的位置进行显示。该数据集需要三个参数,一个语言集 ID、一个语言代码和一个与资源名称匹配的字符串。

按照一个例子,我发现这里< /a> (Miguel Catalão 的回复)我创建了一个多值参数 @Resources ,它将从资源数据集和一个从多值查询中查找特定值的代码函数。然后,无论何时使用文字字符串,都会从表达式中调用该函数。

我认为这应该可行,但我遇到了一个我无法完全找到解决方法的问题。 @Resources 参数依赖于 Resources 数据集,而后者又依赖于三个参数,因此存在依赖问题; @LanguageSetID、@LanguageCode 和@ResourceNameLookup。我读到声明参数的顺序很重要,因此我确保最后三个参数出现在 @Resources 参数上方,并且所有三个参数都有默认值,这些默认值将导致数据集检索数据。

然而,我在预览报告时仍然收到以下错误;任何建议或指导将不胜感激。

The report parameter ‘Resources’ has a DefaultValue or a ValidValue that depends on the report parameter “LanguageCode”. Forward dependencies are not valid.
The report parameter ‘Resources’ has a DefaultValue or a ValidValue that depends on the report parameter “ResourceNameLookup”. Forward dependencies are not valid.

I have a problem with a Reporting Services report. My report has two datasets, one that fetches the actual report data and one that fetches translated resource strings for displaying wherever literal text is used on the report. This dataset requires three parameters, a language set id, a language code and a string to match against resource names.

Following an example I found here (the reply by Miguel Catalão) I have created a multivalue parameter @Resources that will be populated from the resource dataset and a code function that looks up specific values from the multivalue query. This function will then be called from expressions wherever literal strings are used.

I think that this should work but I have run into a problem that I can't quite figure out a workaround for. There is a dependency problem in the @Resources parameter being dependent on the Resources dataset which in turn is dependent on three parameters; @LanguageSetID, @LanguageCode and @ResourceNameLookup. I have read that the order of declaring parameters is important so I have made sure that the last three parameters appear above the @Resources one and that all three of them have default values that will result in data being retrieved by the dataset.

Yet I am still getting the following errors when previewing the report; any advice or guidance would be most appreciated.

The report parameter ‘Resources’ has a DefaultValue or a ValidValue that depends on the report parameter “LanguageCode”. Forward dependencies are not valid.
The report parameter ‘Resources’ has a DefaultValue or a ValidValue that depends on the report parameter “ResourceNameLookup”. Forward dependencies are not valid.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧人 2024-11-25 07:11:07

我有同样的错误,但这是由于其他原因造成的。我所做的就是在报告中创建一个参数,然后将默认值链接到数据集。

这又添加了数据集中所需的参数。不知何故,我的列表中参数的顺序发生了变化。这时我开始看到“转发依赖项无效”错误。

然后我查看了另一份报告,该报告使用相同的过程将参数链接到数据集。我注意到我的参数的顺序不同。我只是返回到我的新报告,并使用向上和向下箭头,直到我的参数与工作报告的顺序相同。这似乎修复了错误并且工作正常。显然,使用数据集的参数需要低于存储过程中使用的参数。

从长远来看,这对某人有帮助。

C/N:参数由数据集(存储过程)填充。正在填充的参数高于 SPROC 预期的一些参数。

I had the same error but it was due to something else. What I had done was created a Parameter in my report, then linked the Default Values to a Dataset.

This in turn added the parameters needed in the Dataset. Somehow, the order of the parameters in my list were changed. This is when I stared getting the 'Forward Dependencies are not Valid' error.

I then looked at another report that used the same process to link a Parameter to a Dataset. I noticed that the order of my Parameters were different. I simply went back to my new report, and used the up and down arrows until my Parameters were in the same order as the working report. This seemed to fix the error and work fine. Apparently the the Parameter that was using the Dataset needs to be below the Parameters that are used in the SPROC.

I this helps someone in the long run.

C/N: Parameter was being filled by a Dataset(Stored Procedure). The Parameter that was being filled was above some of the Parameters that it was expecting for the SPROC.

饮湿 2024-11-25 07:11:07

这一切都是我犯下的一个愚蠢的错误造成的。我复制并修改了我提到的帖子中的代码函数,但忽略了将参数的数据类型从整数更改为字符串,这是我的。

错误的表现方式似乎很奇怪,但我现在已经解决了这个问题,只是遇到了我在 另一个问题

This was all caused by a stupid error I made. I copied and modified the code function from the post I mention but neglected to change the data type of the argument from integer to string, which mine is.

It seems rather odd that the error manifested in the way it did but I have gotten past that problem now, only to run into another that I ask about in another question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文