I have developed an SSRS report and have added more and more parameters during development.
e.g. customised lookups of Project data and Project categories allowing multi-selection from datasources built from X++ queries, single select custom Enums, date fields.
Now I wish to add a multi-select parameter that offers a list of all the values of a particular Enum any of which my be selected.
I cannot find a way to do this with my current report.
The simplest (I thought) would be to create an "AX Enum Provider" dataset in Visual Studio and linking the report parameter Values to this dataset.
This seems to work in Visual Studio 2010:
but not in AX - it is missing when I do not code up adding the dialog in the Build() method below of the UIBuilder class. If I do code it up then it is empty.
I also tried this post as an alternative but could not get any enum data to the dialog either:
community.dynamics.com/.../576856
I've done the following refreshes from time to time because I know how AX report dev can be:
- Delete report from Report Manager and re-deploy from Visual Studio
- Clear the caches
- Full Compile
- Full CIL Compile
- Incremental CIL Compile
- Restart Report Services
- Restart the AX Client
In outline, I am using the following classes:
// To control report execution
class MP_SSRS_086_ReportController extends SrsReportRunController
{}
// To provide the parameter dialog elements
class MP_SSRS_086_UIBuilder extends SysOperationAutomaticUIBuilder
{}
public void build()
{
//super();
contract = this.dataContractObject() as MP_SSRS_086_SrsReportContract;
multiProjectDialog = this.addDialogField(
methodStr(MP_SSRS_086_SrsReportContract, parmMultiProject),
contract);
// etc..
}
// To provide custom lookups
public void postBuild()
{
super();
// get data contract
contract = this.dataContractObject() as MP_SSRS_086_SrsReportContract;
multiProjectDialog = this.bindInfo().getDialogField(
contract,
methodStr(MP_SSRS_086_SrsReportContract, parmMultiProject));
// register override method & method requiring execution
multiProjectDialog.registerOverrideMethod(
methodStr(FormStringControl, lookup),
methodStr(MP_SSRS_086_UIBuilder, multiProjectLookup),
this);
// etc..
}
// to suppress default behaviour
public void postRun()
{
// this needs explicitly commented out otherwise you get errors
//super();
}
[DataContractAttribute,
SysOperationContractProcessingAttribute(classstr(MP_SSRS_086_UIBuilder))]
class MP_SSRS_086_SrsReportContract implements SysOperationValidatable
{
SchedToDate schedFromDate;
SchedToDate schedToDate;
List multiProject;
List multiProjectCategory;
List multiActivityTaskTimeType; // I want this to be hold my multi-select list of Enum strings
CustomEnum_LabourReportSummaryOption summaryOption;
CustomEnum_EstimateReportCondition estimateReportCondition;
}
[DataMemberAttribute('MultiActivityTaskTimeType'),
AifCollectionTypeAttribute("return",Types::String),
SysOperationLabelAttribute('Task Status')]
public List parmMultiActivityTaskTimeType(List _multiActivityTaskTimeType = multiActivityTaskTimeType)
{
multiActivityTaskTimeType = _multiActivityTaskTimeType;
return multiActivityTaskTimeType;
}
[SRSReportParameterAttribute(classStr(MP_SSRS_086_SrsReportContract))]
class MP_SSRS_086_SrsReportDP extends SRSReportDataProviderBase
{}
// access to parameter values and report data processing is working fine
*This post is locked for comments
I have the same question (0)

Report
All responses (
Answers (