November 18, 2015 at 8:12 am
I need to create a report parameter drop down which should have first and last name concatenated.
*******Main SQL Query************
SELECT DISTINCT
a.DiseId,
n1.LastName,
n1.FirstName,
n1.MiddleName,
...............................
FROM Table1
I have DataSet already created which has all the fields from this query. I tried creating a calculated field in the DataSet, but dint work.
I also tried creating a separate DataSet by creating the below query -
Select FirstName, lastName, convert(varchar(50),FirstName) + ' ' + convert(varchar(50),lastName) as FullName from Table2
I can see the Concatenation result in a drop down but I get this below error, this error occured only after I created the new data set with concatenation query.
An error occurred during local report processing.
The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.
How do I go about to remove the error and create the filter??
November 18, 2015 at 12:02 pm
I was able to remove the error now.
My Query for second Dataset [FullName] is as follows -
select Distinct FirstName + ' ' + lastName AS FullName
from table2
It might have caused because of convert(varchar(50)) in my previous query.
November 18, 2015 at 12:09 pm
How to apply the parameter in the first dataset???
This is what I tried.
SELECT * FROM
(SELECT DISTINCT
a.DiseId,
n1.LastName,
n1.FirstName,
n1.MiddleName,
...............................
FROM Table1 a
----------) AS Entity
WHERE Entity.FirstName + ' ' + lastName = @FullNameParam
When I created this query. "Define Query Parameters" window was displaying for the @FullNameParam.
I removed a "Order By" from the original query but still no data was showing in the table.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply