Set TargetServerVersion in web app project for local mode RDLC use

David McDivitt 221 Reputation points
2022-07-27T16:42:30.117+00:00

My RDLC file opens fine unless I add a parameter, then it changes from 2008 to 2016. I found many people have this problem. The solution is to change TargetServerVersion to 2008. I don't know why going back to 2008 is the solution when reporting services should recognize and render an RDLC that has 2016. Nevertheless I need to set TargetServerVersion somehow in my project and can find no documentation or instructions on that. This is not SSRS, but rendering a standalone RDLC file in local mode using Microsoft.Reporting.WebForms.

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
Developer technologies VB
{count} votes

1 answer

Sort by: Most helpful
  1. David McDivitt 221 Reputation points
    2022-08-02T20:07:42.663+00:00

    I was not able to find a solution for this the way I was doing it. Appreciate links by @Jiachen Li-MSFT . I was trying to stuff all my values onto the report with parameters. Instead I used and exploited a datasource. In the application I made a class with getter and setter for each information item, all strings, then added the datasource in code with an array as the datasource. I made vbscript that reads a file with a list of field names, writing three files out: text to paste into the report as dataset items, a class for the application, and lines for the application setting each item in the instantiated class. Text from each file is pasted into the correct place and tweaked. Some of the information items are wads of text. In my experimentation I found parameters can be used, but the designer will always change the version to 2016. So, for parameters, save a copy of the RDLC file, use the designer to create one parameter, save, copy out just the parameter block, and paste back in to the restored copy. Add new parameters by editing the RDLC file. However, any time the designer is used it will change the version and it no longer works. If no parameters it will remain as 2008 with no issues. I fail to see why Microsoft can't properly support this useful tool.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.