Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

How to Pass Parameters #41

Closed
brdmyldz opened this issue Feb 1, 2020 · 5 comments
Closed

How to Pass Parameters #41

brdmyldz opened this issue Feb 1, 2020 · 5 comments

Comments

@brdmyldz
Copy link

brdmyldz commented Feb 1, 2020

Hi Bob,

Thank you for the awesome work. So I've been using the Report Renderer for a file My boss asked me to make one more automation but I couldn't manage to get it working.

For the previous flows, report renderer easily worked without any parameter passing like you described in the guide. I guess I was lucky because I couldn't figure out where to find the parameters for the specific report.

For this one however, it gives me error code 400 with the message of "Something went wrong: Error while getting report session. This is most likely an issue with invalid report parameters.". I'm guessing this new flow I'm working on is not working because the data is not coming from the same database compare to others. I believe I should pass the parameters to fix this issue but I'm pretty new to Dynamics 365 environment and I couldn't figure out where to find the parameters for the specific report.

I'm attaching a picture of how the flow error looks like and also pasting the error code below. Error code looks similar to the codes in previous posts but I couldn't figure it out. Maybe if you could help me how to find the JSON body of the parameters that would be great. I would be super happy if you could take look!

{
"error": {
"code": "0x80040265",
"message": "Something went wrong: Error while getting report session. This is most likely an issue with invalid report parameters.",
"innererror": {
"message": "Something went wrong: Error while getting report session. This is most likely an issue with invalid report parameters.",
"type": "System.ServiceModel.FaultException1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]", "stacktrace": " at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext, Dictionary2 optionalParameters)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Execute(OrganizationRequest request, ExecutionContext executionContext)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.ExecuteOperation(CrmODataExecutionContext context, EdmOperation edmOperation, Dictionary2 parameters, Dictionary2 boundParameters)\r\n at Microsoft.Crm.Extensibility.OData.ActionController.ProcessOperationRequest(String operationName, Dictionary2 operationParameters, EntityReference entityReference, String boundEntityName, String boundEntityType)\r\n at Microsoft.Crm.Extensibility.OData.ActionController.<>c__DisplayClass11_0.<PostBoundAction>b__0()\r\n at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func1 func, IEnumerable1 additionalCustomProperties)\r\n at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func1 func)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"
}
}
}

Screen Shot 2020-02-01 at 4 47 47 PM

@talismanconsulting
Copy link

Your parameters have to be in JSON format and named exactly as they are in the report. For example:
Your report parameter is: PositionId

Snag_1f685466

Then:
Snag_1f679ee2

@srinirn
Copy link

srinirn commented Apr 3, 2020

Hi,
I am having the same problem. I am trying with default report "Account Distribution" and trying to pass the parameters for TopAccounts and GroupBy.
Any solution or directions to pass the parameters .

@adventureconsultants
Copy link

I downloaded the Renderer Report Example zip file linked on #10 and it will allow me to produce a PDF from a system report such as 'Account Summary' but the moment I switch it to a report I have created either using the same "CRM_FilteredAccount" parameter or no parameters required at all I still get "Something went wrong: Error while getting report session. This is most likely an issue with invalid report parameters"

I simply don't appear to be able to create a report using the wizard or a custom SSRS report in VS and have it render.

@shalumalik
Copy link

Hi,
Has anyone resolved this issue? I am also facing the same issue wherein I am providing the exact same values in parameters as used in Report, it's throwing this error.

@bguidinger
Copy link
Owner

This solution is no longer being maintained. Please refer to the updated README for an alternative approach.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants