Report provider class cannot contain multiple parameters with same name.

Question Status

Verified
Ysrael Fortuno asked a question on 9 Feb 2016 6:23 AM

Hi,

Anyone can give light about this issue, I tried to refresh dataset on the report designer, then I got this error "Report provider class cannot contain multiple parameters with same name paramName". I deleted all parameters but still the same error.

Reply
Suggested Answer
Martin Dráb responded on 9 Feb 2016 6:37 AM

There are two sets of parameters. There is one parameter node for the whole report and then one parameter node for each dataset. Please make sure that you've cleaned up both.

Reply
Iulian Cordobin responded on 9 Feb 2016 7:05 AM

Is your contract class being used in your DP class properly compiling?  Also, when you say you deleted all the parameters, you are referring that you deleted them from the SSRS report - Parameter section?

Reply
Ysrael Fortuno responded on 9 Feb 2016 7:15 PM

Hi Martin,

Yes, both are cleared properly, also I restart the AOS service to refresh but still same problem.

Weird thing is when I tried to import back the VS Project backup, it did not change, still the same ssrs report design.   

Reply
Ysrael Fortuno responded on 9 Feb 2016 7:19 PM

Hi Iulian,

Yes, contract class is being used in DP class and properly compiled.

Yes, I was referring on deleting parameters from the SSRS report - Parameter section.

Reply
Suggested Answer
Iulian Cordobin responded on 10 Feb 2016 7:04 AM

Do a complete refresh of the components, meaning restart the SSRS service, AOS, and then in AX do a Tools -> Caches -> Refresh elements and Refresh report server.

Reply
Ysrael Fortuno responded on 12 Feb 2016 1:43 AM

Hi Iulian,

I followed on your instruction but still the same, also I tried to removed the contract class in DP class but still the same.

Thanks,

Reply
Martin Dráb responded on 12 Feb 2016 2:06 AM

Can you show us your RDP class? The problem seems to be there. Also try restarting AOS after changing your RDP class; it's possible that the metadata service returns outdated data from cache.

Reply
Ysrael Fortuno responded on 12 Feb 2016 3:13 AM

Do think license for "Enable License code for authoring and editing" can cause this error. Also when I edit a class the model is still the same "Foundation" and not changing to CUS.

I created new DP class, but when I browse it in the Report designer dataset Query properties, new DP class is not on the list, I tried to restart AOS but still the same.  

Reply
Iulian Cordobin responded on 12 Feb 2016 3:31 AM

No, that code in the license is not causing this.

Now you are starting to describe a somehow different situation. For a DP class to be visible in the VS DP list it has to inherit one of the SRSDataProvider* classes, also to have specific attributes to describe the contract class SRSReportParameterAttribute(classStr(ContractClass)), maybe the query, etc. Have you done that?

Also, a standard class edited by you will still show on Foundation, only the tree nodes changed by you will show the  new model.

Reply
Parag Chapre responded on 12 Feb 2016 9:15 AM

Hello,

1. Can you please try to create new dataset & put RDP classname and check.

2. If you have parameters in Contract class and you are using that in RDP class then please write a simple job and call your report class & check. You will get whether you are facing issue. If its not help then please put your contract class method and processReport of RDP class.

Reply
Suggested Answer
Raj A responded on 12 Feb 2016 12:29 PM

Could you verify the DataContract Class?

In DataContract Class we have required parameter methods.

for all methods need to add one like below

[DataMemberAttribute('ParmName')]

This "ParmName" should be Unique and same as like Object name.

Verify it and give the status.

Don't forget to Mark it as Answer.

Reply
Ysrael Fortuno responded on 12 Feb 2016 9:26 PM

Sorry if I include different situation on this thread, I just want to know if VS RDP list is refreshing.

Yes, attributes were properly declared and extends SRSReportDataProviderBase in the class.

Do you think having 2 or 3 AOS Services in one environment, having multi company with different countries can also cause this

problem it is because there might be a setup that RDP will only show on specific business entity users?

Or can it be happen that Visual Studio is always pointing in one AOS services upon editing MSDynamicAX Vs Projects?

On this scenario you could realized that the problem is VS RDP list is not changing or refreshing no matter how many times AOS Service was restart and do cache refresh.

Reply
Verified Answer
Iulian Cordobin responded on 14 Feb 2016 7:03 AM

Certainly having multiple AOS servers is another plus factor in getting issues with development and deployments. I would however mention that you should not be doing development in a multi AOS topology, because of the exact same cause you mention: VS connected to one AOS, SSRS configured to work with another can cause issues.

I would suggest you try to develop in a one AOS environment and then move the TEST to a multi AOS scenario.

Plus, when you are doing deployment in a multi AOS scenario, for instance the Full CIL should be done on one server with the rest being closed, and then restart them sequentially. I'm not saying this applies to SSRS deployment, but the deployment relies heavily on the system wcf services, so, I can see some interference.

Reply
Verified Answer
Ysrael Fortuno responded on 16 Feb 2016 9:41 PM

Hi All,

Thank you for all the inputs, I've found the main cause of this problem. As I mentioned regarding the multiple AOS instance where the cause of the issue of VS RDP List is pointed in one AOS and also the reason why I having error "class cannot contain multiple parameters with same name".

As per Iulian, "deployment relies heavily on the system wcf services" where in wcf service regeneration also happening during AX Client Configuration. In our case, we have multiple AOS in the Dev environment, where other AOS instance is not been setup in the Client configuration, that's why we come this far.

My solution:

1. Reinstall VS Tool.

2. Add and setup the new AOS instance in AX Client Configuration

3. In the AX Client Configuration Connection tab, select instance and press Up button to change the connection and press refresh button.

Thanks,

Reply
Ysrael Fortuno responded on 17 Feb 2016 11:55 PM

Clarification on the error above "class cannot contain multiple parameters with same name" while browsing in Visual Studio SSRS Report Data Provider in report designer dataset query properties, the main cause of this is having 2 or more parameters in ssrs contract class have the same DataMemberAttribute name.

Impact: Cannot add new and update dataset with Data Source = Dynamics AX and Data Source Type = Report Data Provider in Report designer.

Solution:

1. Check parameters in SSRS contract class and see which are having the same DataMemberAttribute.

2. Give a unique DataMemberAttrite name each parameter in SSRS contract class.

Lesson:

When working on a multiple AOS instance to a Development Environment(where AOSs server are installed), before we start any development or customization in SSRS, consider to check the following:

  1. All AOS instance are included and properly setup in AX Client Configuration.
  2. Change or select which AOS instance you were connecting in AX Client Configuration, so connection of application like Visual Studio will be point at the right instance.
  3. Make sure that all parameters declared in SSRS contract class, has a unique DataMemberAttribute.

     Screenshot:

SSRS Error.

SSRS Contract Class in Other AOS Instance having duplicate DataMemberAttribute.

Reply
Verified Answer
Iulian Cordobin responded on 14 Feb 2016 7:03 AM

Certainly having multiple AOS servers is another plus factor in getting issues with development and deployments. I would however mention that you should not be doing development in a multi AOS topology, because of the exact same cause you mention: VS connected to one AOS, SSRS configured to work with another can cause issues.

I would suggest you try to develop in a one AOS environment and then move the TEST to a multi AOS scenario.

Plus, when you are doing deployment in a multi AOS scenario, for instance the Full CIL should be done on one server with the rest being closed, and then restart them sequentially. I'm not saying this applies to SSRS deployment, but the deployment relies heavily on the system wcf services, so, I can see some interference.

Reply
Verified Answer
Ysrael Fortuno responded on 16 Feb 2016 9:41 PM

Hi All,

Thank you for all the inputs, I've found the main cause of this problem. As I mentioned regarding the multiple AOS instance where the cause of the issue of VS RDP List is pointed in one AOS and also the reason why I having error "class cannot contain multiple parameters with same name".

As per Iulian, "deployment relies heavily on the system wcf services" where in wcf service regeneration also happening during AX Client Configuration. In our case, we have multiple AOS in the Dev environment, where other AOS instance is not been setup in the Client configuration, that's why we come this far.

My solution:

1. Reinstall VS Tool.

2. Add and setup the new AOS instance in AX Client Configuration

3. In the AX Client Configuration Connection tab, select instance and press Up button to change the connection and press refresh button.

Thanks,

Reply
Suggested Answer
Martin Dráb responded on 9 Feb 2016 6:37 AM

There are two sets of parameters. There is one parameter node for the whole report and then one parameter node for each dataset. Please make sure that you've cleaned up both.

Reply
Suggested Answer
Iulian Cordobin responded on 10 Feb 2016 7:04 AM

Do a complete refresh of the components, meaning restart the SSRS service, AOS, and then in AX do a Tools -> Caches -> Refresh elements and Refresh report server.

Reply
Suggested Answer
Raj A responded on 12 Feb 2016 12:29 PM

Could you verify the DataContract Class?

In DataContract Class we have required parameter methods.

for all methods need to add one like below

[DataMemberAttribute('ParmName')]

This "ParmName" should be Unique and same as like Object name.

Verify it and give the status.

Don't forget to Mark it as Answer.

Reply
Suggested Answer
JOnnagadla SudarshanChowdary responded on 10 Apr 2017 2:23 AM

Hi ysrael i my issues is solve thanks for your support

Reply