If you became a customer of the Syncfusion� Reporting Platform or the Report Viewer, Report Designer, or Report Writer components before October 2019 and have questions related to those products, you can request support through our forum system. However, please note that this support system is only for existing customers who are still using the Syncfusion� Reporting Platform or its components and not for new customers looking for reporting products from Syncfusion�.

For new customers or those with general reporting questions, we recommend contacting our support team at https://support.boldreports.com/, which is a separate brand created by Syncfusion� for its reporting solutions. Our team will be happy to assist you with any questions you may have.

Thank you for choosing Syncfusion� for your reporting needs.

Query tries to pass parameter deffinition instead of value to rest api

Hello,

Currently I'm trying to move my reports from old teleriks platform to BoldReports. 
I just faced an issue when trying to connect to rest api from DataSource deffinition.
I need to send my parameter in header and they are defined as value of my report parameter - for example: 
 dateFrom: =Parameters!FromDate.Value
It works at runtime but I cant edit the DataSource deffinition. When I try to do this there is a popup that says I need to fill up values for my parameters (so I set raw values there) but then I've got a message that: 
ReportDesigner failed to connect the datasource
and in details:
HEADERS ======= Accept: application/json Authorization: bearer blabla Host: localhost:5001 [...] dateFrom: =Parameters!FromDate.Value dateTo: =Parameters!ToDate.Value 
I can also see that these parameters are send as  "=Parameters!FromDate.Value" to my WebAPI controller.
So the fact that I set correct values insted of expressions is ignored.

Is it known issue? Any workaround exists?

BTW unfortunatelly I can't send these parameters as regular parameters for POST action - I always receiving null values. I need to use headers then. I cant pass them in url as cocatenated values because then I have message: The data source ‘X’ has both or neither of the following: DataSourceReference and ConnectionProperties. The data source must have exactly one of these elements. I guess there is a problem with "&" in concatenations.

3 Replies

MS Muthuramana Sankaranarayanan Syncfusion Team March 1, 2021 08:38 AM UTC

Hi Kamil, 

Could you please let us know the platform details of your application in which you have embedded the Report Designer component? 

Also could you please confirm if you have configured the WebAPI data extension for the Report Designer application as like shown in below documentation, 


If you have already configured then could you please share with us the issue reproducible report along with the snaps of the issue that you are facing as it will be helpful for us to validate the reported issue from our end. 

Regards, 
Muthu Ramana S 



KM Kamil Miszczak March 1, 2021 08:19 PM UTC

Hello Muthu,

1. I am using blazor viewer in tandem with standalone report designer.
2. WebAPI data extension is configured so viewer is able to operate.
3. Ok I'll try to add some samples:
in my report rdl file I have datasource deffinition like bellow:
<DataSource Name="GetEmployeesWithEvents">
      <ConnectionProperties>
        <DataProvider>WebAPI</DataProvider>
        <ConnectString>{"MethodType":"Get","Headers":[{"Key":"Authorization","Value":"=Parameters!Token.Value"},{"Key":"businessCustomerId","Value":"=Parameters!BusinessCustomer.Value"},{"Key":"dateFrom","Value":"=Parameters!FromDate.Value"},{"Key":"dateTo","Value":"=Parameters!ToDate.Value"},{"Key":"structureUnitIds","Value":"=Join(Parameters!CustomerStructureUnit.Value, \",\")"}],"SecurityType":"None","URL":"=Parameters!Url.Value &amp; \"api/employeesAPI/GetEmployeesWithEvents\"","DataFormat":"JSON"}</ConnectString>
        <rd:CustomProperties>
          <rd:CustomProperty>
            <rd:Name>DefaultValues</rd:Name>
            <rd:Value>{"url":"https://localhost:5001/api/employeesAPI/GetEmployeesWithEvents","rawdata":"","parameters":[],"headers":[{"Key":"Authorization","Value":"bearer blabla"},{"Key":"businessCustomerId","Value":"43"},{"Key":"dateFrom","Value":"2020.01.01"},{"Key":"dateTo","Value":"2021.02.28"},{"Key":"structureUnitIds","Value":"1,2,3,4,5,6,7,8"}]}</rd:Value>
          </rd:CustomProperty>
        </rd:CustomProperties>
      </ConnectionProperties>
    </DataSource>

In the designer I click on Save button (from Edit Connection panel). It sends parameters like businessCustomerId = "=Parameters!BusinessCustomer.Value" to my API. So instead just get the proper int from default value (43 in this example) I have unusable string "=Parameters!BusinessCustomer.Value".  Base on this it will not get the proper response structure and I cant configure Data. My workaround is to change the parameter like "=Parameters!BusinessCustomer.Value" to proper testing parameter on API side. Good thing is that works correctly at runtime from js report viewer inside my blazor application.


MS Muthuramana Sankaranarayanan Syncfusion Team March 2, 2021 12:03 PM UTC

Hi Kamil, 

Thanks for sharing the details with us. 

We checked the reported issue but we were not able to reproduce this. Hence could you please share with the issue reproducible report so that we can further analyze this issue from our end? 

Regards, 
Muthu Ramana S 


Loader.
Up arrow icon