Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

ssrs 2008 report to display no rows message

$
0
0
In t-sql 2008 for an SSRS report, I am inserting rows into a temp table. In the sql, I am listing fields that will always exist and I am doing a left join on tables and columns that may not exist. In the ssrs report, I only want to display data on the report when data is selected for the tables that have a left join on them. If there is no data in any of the left join columns, I do not want to display data on the report. Thus right now, if no data exists in the left join columns that are loaded to the temp table, I am deleting the rows from the temp table. This way the data will not appear on the ssrs report.Can you tell me if this is a good solution? If not, would you show me an example of sql that I could use that would be a better solution?Here is an example of the existing sql:declare @student int = 932709select studentname, studentnumberfrom student where @student = studentnumberleft outer join (select studentnumber, address from stuentabc) as stuentabcon student.studentnumber = stuentabc.studentnumber

Viewing all articles
Browse latest Browse all 2791

Trending Articles