I have a stand-alone HTML page based on the Report Viewer samples. This page calls the api/reports API. When my report is not parameterized, the Report Viewer works great and my report appears. I am now trying to add parameters to my report.
Here is my Report Viewer script that passes the parameter:
Here is the parameter JSON being passed into '/api/reports/clients/085707-b6ce/parameters':
[{"name":"LastName","type":"System.String","text":"Last Name","multivalue":false,"allowNull":false,"allowBlank":true,"isVisible":false,"autoRefresh":false,"hasChildParameters":false,"childParameters":null,"availableValues":null,"value":"McGuy","id":"LastName","label":"McGuy"}]
So it appears to be passing the parameter. In fact, I added a text box that prints the LastName parameter, and when the report loads, it shows "McGuy", which is the value I am passing. But the report does not return any rows. Here is my report SQL:
When I go through the "Configure SQL Data Source" dialogues in the stand alone Report Builder, it returns records based on my parameter, when I preview.
I am not sure what I am doing wrong. Any help would be great.
Here is my Report Viewer script that passes the parameter:
$("#reportViewer1") .telerik_ReportViewer({ serviceUrl: "http://localhost:36563/api/reports/", templateUrl: '/ReportViewer/templates/telerikReportViewerTemplate-8.1.14.804.html', reportSource: { report: "MembersTest.trdx", parameters: { LastName: 'McGuy' } } });Here is the parameter JSON being passed into '/api/reports/clients/085707-b6ce/parameters':
[{"name":"LastName","type":"System.String","text":"Last Name","multivalue":false,"allowNull":false,"allowBlank":true,"isVisible":false,"autoRefresh":false,"hasChildParameters":false,"childParameters":null,"availableValues":null,"value":"McGuy","id":"LastName","label":"McGuy"}]
So it appears to be passing the parameter. In fact, I added a text box that prints the LastName parameter, and when the report loads, it shows "McGuy", which is the value I am passing. But the report does not return any rows. Here is my report SQL:
SELECTLast_Name, First_Name, Middle_Name, Birth_DateFROMMemberWHERE(Last_Name = @LastName)When I go through the "Configure SQL Data Source" dialogues in the stand alone Report Builder, it returns records based on my parameter, when I preview.
I am not sure what I am doing wrong. Any help would be great.