【发布时间】:2016-04-15 09:22:56
【问题描述】:
我想向使用报告数据提供程序的 SSRS 报告添加参数。
我在 AOT 中搜索了 LedgerTrialBalanceContract 类,并在 classDeclaration 中添加了一个属性“CurrencyCode accountingCurrency;”。
在这一步之后,我添加了一个方法“parmAccountCurrency”,如下所示:
[
DataMemberAttribute(identifierStr(accountingCurrency))
]
public CurrencyCode parmAccountCurrency(CurrencyCode _accountingCurrency = accountingCurrency)
{
//accountingCurrency = _accountingCurrency;
accountingCurrency = CompanyInfo::standardCurrency();
return accountingCurrency;
}
我知道 accountingCurrency 始终是来自“CompanyInfo::standardCurrency();”的值这就是目标。
在 LedgerTrialBalanceDP 类的初始化方法中,我另外添加了此代码 sn-p 的第二行:
contract = this.parmDataContract() as LedgerTrialBalanceContract;
contract.parmAccountCurrency(CompanyInfo::standardCurrency());
在此更改后,我在 AX 对话框中看到我的参数值正确(参见 screenshot),但在 VisualStudio 中没有。
目的是在文本框中的报告中显示此参数。
有人知道我想念什么吗?
【问题讨论】:
-
尝试在 Visual Studio 中刷新报表的数据集。
-
是的!谢谢你的帮助!
-
在将带有参数的文本框添加为 contant 后出现以下异常:“SysOperationDataContractInfo 对象未初始化。堆栈跟踪 (C)\Classes\SrsReportDataContractUIBuilder\addDialogField - 第 10 行 (C)\Classes\SysOperationAutomaticUIBuilder\ buildGroup - 第 41 行"
-
我不确定您所说的“参数作为常量”是什么意思。您是否尝试过增量/完整 cil 编译?
-
我的意思是我在文本框 [@accountingCurrency] 中写入以在报告上显示参数。我不知道,因为我同时从事多个项目。我现在用完整的 CIL 尝试一下,然后再次发布我的结果。
标签: ssrs-2008 axapta ssrs-2012 microsoft-dynamics x++