Visual Studio SSRS RDL Files creating a new file &

2019-08-25 18:11发布

In VS I have a Solution file with SSRS Project. Within the project there are 8 RDL files. I am experiencing an issue when I open a file that it opens with an asterik (*) and upon closing the window it prompts that I save the file. Then I went to the folder in Windows Explorer, at which time I noticed that Visual Studio was creating new files every time I open the file-- <%FileName%>, <%FileName%- Backup>, <%FileName%- Backup (#)>, <....>.

This is wierd. Even wierder, the automatical file is created only for 4 of the RDL files in the Project (8 files in total). Four files are always creating new backup files; and four files are acting normal.

Does anyone know what is causing the files to automatically create backups?

I checked the VS File Properties (there is not much to see: FileName and Location). I also checked the File Explorer Properties (it is not Read Only). My Project Folder TargetServerVersion is SQL Server 2016 or later. The RDL files were downloaded from 2008 SSRS report server. I compared the tags for all the RPT files, after I found this SO thread (Can I control the version of new SSDT reports in Visual Studio?).

Problem files... (all say 2010)
* Daily Yum Products Daily Traffic Report.rdl
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" 
    xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
* Load Planning Worksheet.rdl
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" 
    xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
* Temporary Employees.rdl
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" 
    xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
* Weekly Yum Products Daily Traffic Report.rdl
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" 
    xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

Working files... (some 2008, some 2016)
* BoJangles Data Export.rdl
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" 
    xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
* Load Comment Report.rdl
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" 
    xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
* OnBase Upload_AP Invoice Validation.rdl
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" 
    xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
* ScannedProduction.rdl
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" 
    xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

Problem files (BACKUP COPY CREATED)...
* Daily Yum Products Daily Traffic Report.rdl
    <Report xmlns> all look the same as the original problem file

Other references:

I read this SO question but it's about a Project File not an RDL File: visual studio keeps asking to save project file as.

Here is a screenshot of File Explorer and the VS Project RDL.

enter image description here

======================

UPDATE: I even tried deleting and re-adding the files. The problem persists for the same 4 files; The other 4 files still work correctly. The files are in version control, so I tried this... delete files/ commit/ re-add the files/ commit/ tested opening the file/ Backup file auto created (still).

Removing RDL file that keep asking me to save...

Move these files 
FROM HERE...
  C:\Users\myUser\Documents\Visual Studio 2015\Projects\SSRS\Project_ssrs2016\Decommissioned-2\
TO HERE...
  C:\Users\myUser\Downloads\Decommissioned-2 (backup)\

DELETED FILES FROM PROJECT
* Daily Yum Products Daily Traffic Report.rdl
* Load Planning Worksheet.rdl
* Temporary Employees.rdl
* Weekly Yum Products Daily Traffic Report.rdl

Re-Adding RDL file that keep asking me to save...

Move these files 
FROM HERE...
  C:\Users\myUser\Downloads\Decommissioned-2 (backup)\
TO HERE...
  C:\Users\myUser\Documents\Visual Studio 2015\Projects\SSRS\Project_ssrs2016\Decommissioned-2\

ADDED FILES TO PROJECT
* Daily Yum Products Daily Traffic Report.rdl
* Load Planning Worksheet.rdl
* Temporary Employees.rdl
* Weekly Yum Products Daily Traffic Report.rdl

===========================

1条回答
姐就是有狂的资本
2楼-- · 2019-08-25 18:42

This problem was finally solved by editing the RDL file tag for all the problems files from the 2010 to 2016 Report XML schema. I did as follows: (in VS) > right-click report > View Code > Paste the 2016 > Save.

1) Daily Yum Products Daily Traffic Report.rdl
ORIGINAL
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" 
    xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
NEW
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" 
    xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

2) Repeated for all problem files with 2010 schema
3) Repeated for all problem files with 2010 schema
4) Repeated for all problem files with 2010 schema

* Auto Save issue is resolved.  

I think what was causing the Backup Files to be created had something to do with a Visual Studio detecting a conflict in the Project TargetServerVersion and the RDL XML Schema. Not sure why 2008 file works and 2010 doesn't work; regardless I left the 2008 as they were.

These SO posts had some helpful answers.

Can I control the version of new SSDT reports in Visual Studio?

Back UP file RDLs Creation in SSRS 2008 Automatically

查看更多
登录 后发表回答