问题
I want to add a parameter to a SSRS report which uses a report data provider.
I searched the LedgerTrialBalanceContract class in AOT and added in the classDeclaration an attribute "CurrencyCode accountingCurrency;".
After this step, i added a method "parmAccountCurrency" which look like this:
[
DataMemberAttribute(identifierStr(accountingCurrency))
]
public CurrencyCode parmAccountCurrency(CurrencyCode _accountingCurrency = accountingCurrency)
{
//accountingCurrency = _accountingCurrency;
accountingCurrency = CompanyInfo::standardCurrency();
return accountingCurrency;
}
I know the accountingCurrency will be always the value from "CompanyInfo::standardCurrency();" that's the aim.
In the initialize method from the class LedgerTrialBalanceDP i added additionally the second line from this code snippet:
contract = this.parmDataContract() as LedgerTrialBalanceContract;
contract.parmAccountCurrency(CompanyInfo::standardCurrency());
After this changes I see my parameter with right value in the AX dialog (see screenshot) but not in VisualStudio.
The aim is to show this parameter on the report in a textbox.
Have anybody an idea what I miss?
回答1:
Make sure to refresh the dataset of the report in Visual Studio and do an incremental or full cil compilation after modifying the contract class.
来源:https://stackoverflow.com/questions/36643221/ax-ssrs-report-parameter-is-shown-but-not-useable-in-the-report