SBX - Search With Button

SBX - Forum Post Title

Uploading .rdl file gives the following error : Reporting Error The expected parameter has not been supplied for the report.

Microsoft Dynamics CRM Forum

Kruthika Pillay asked a question on 10 Aug 2018 8:58 AM
My Badges

Question Status

Verified

Hello,

I have to create a report which uses "From Date" and "To Date" as dynamic values from user. For achieving this I have created two parameters of Date/Time type in ssrs report and added the following filter in fetchxml:

<filter type="and">
<condition attribute="date" operator="on-or-after" value="@CRM_FromDate" />
<condition attribute="date" operator="on-or-before" value="@CRM_ToDate" />
</filter>

This works fine on visual studio but the .rdl file uploaded in crm throws an error: The expected parameter has not been supplied for the report.  The error shows up even before prompting for the "From Date" and "To Date"

There is no security role issue, as I've logged in as administrator neither do I have multiple Datasets to focus on their order.

Any help would be appreciated.

Reply
David Jennaway responded on 10 Aug 2018 9:37 AM
My Badges

Have you specified default values for each parameter ? If not, try applying default values.

Something else to consider is that FetchXml expects dates to be provided in YYYY-MM-DD format, and SSRS may not do that by default. The date formatting in SSRS may differ by user, and this will be different in Visual Studio compared to the server. It may be necessary to use an expression to get the date in the correct format

Reply
Jay Buddhdev responded on 10 Aug 2018 12:52 PM
My Badges

Hi Kruthika,

Could you please tell me whether you are using pre-filtering or not?

Thanks,

Jay

Reply
Kruthika Pillay responded on 13 Aug 2018 12:42 AM
My Badges

Hi Jay,

Yes, I am using pre-filtering

Reply
Rawish Kumar responded on 13 Aug 2018 12:54 AM
My Badges

Hi Kruthika,

Do you have two data source? or just a single one?

Reply
Kruthika Pillay responded on 13 Aug 2018 1:30 AM
My Badges

Hi David,

I tried assigning default value by specifying the following: =Format(Parameters!CRM_ParameterName.Value, "0000-00-00 00:00:00")

It gives me the following error : The DefaultValue expression for the report parameter contains an error. The expression references a parameter which does not exist in Parameters collection.

The parameter does exist in the collection and I also crosschecked if it uses the correct case.

Reply
Kruthika Pillay responded on 13 Aug 2018 1:36 AM
My Badges

Hi Rawish,

I have a single data source.

Reply
Jay Buddhdev responded on 13 Aug 2018 2:27 PM
My Badges

Hi Kruthika,

Can you please share your .rdl file. I am having not sure why you are using pre-filtering?

Reply
Kruthika Pillay responded on 16 Aug 2018 1:57 AM
My Badges

Hi Jay,

There is an associated entity, that is the reason why I'm using pre-filtering. The parameter checks the date value from the associated entity's date field.

Reply
Kruthika Pillay responded on 22 Aug 2018 4:38 AM
My Badges
Verified Answer

Hello everyone,

After trying out every possible suggested solution, the issue was resolved simply by changing the parameter names from @CRM_FromDate, @CRM_ToDate  to  @FromDate , @ToDate. The prefix "CRM_"  in the parameter name turned out to be the problem.

I still don't understand the reason why the prefix could result in an issue. 

Reply
Jay Buddhdev responded on 29 Aug 2018 5:13 PM
My Badges
Suggested Answer

Hi Kruthika,

If you are using pre-filtering, you have to add CRM_ before the parameter name. The reason behind it is to let SQL server to pass the query of pre filtering parameter so that it can be compared with the associated field. I am still not able to identify why you would be using pre-filtering. The concept of pre-filtering is to associate the report with a record, as here I can see you are just filtering the data. Will appreciate if you upload the .rdl file.

Thanks

Jay

Reply
Kruthika Pillay responded on 22 Aug 2018 4:38 AM
My Badges
Verified Answer

Hello everyone,

After trying out every possible suggested solution, the issue was resolved simply by changing the parameter names from @CRM_FromDate, @CRM_ToDate  to  @FromDate , @ToDate. The prefix "CRM_"  in the parameter name turned out to be the problem.

I still don't understand the reason why the prefix could result in an issue. 

Reply
Jay Buddhdev responded on 29 Aug 2018 5:13 PM
My Badges
Suggested Answer

Hi Kruthika,

If you are using pre-filtering, you have to add CRM_ before the parameter name. The reason behind it is to let SQL server to pass the query of pre filtering parameter so that it can be compared with the associated field. I am still not able to identify why you would be using pre-filtering. The concept of pre-filtering is to associate the report with a record, as here I can see you are just filtering the data. Will appreciate if you upload the .rdl file.

Thanks

Jay

Reply

SBX - Two Col Forum

SBX - Migrated JS