Visual Studio for SSRS 2008 - How to organize reports into subfolders in Solution Explorer? - sql

Right now I have a project called reports with several reports. In solution explorer it looks like this:
Shared Data Sources
-- DEV
Reports
-- Report1
-- Report2
-- Report3
I want to make it look like this and have the same structure carry over to the report manager website when I click deploy.
Shared Data Sources
-- DEV
Folder A
-- Report1
Folder B
-- Report2
-- Report3
Anyone know how to do this?

I'm using SSRS 2005 - I think this part of it works in the same way as 2008.
As far as I can tell, you can't have folders within projects, but you can have multiple projects within a solution.
To create a new folder, right-click on the solution in the Solution Explorer and select Add>New Project...
Type in your new Project Name (eg. MyProject), and select Report Server Project from the list of Visual Studio installed templates. Click on OK, and your new Project should appear at the end of the list of projects in the Solution Explorer.
(There are other ways of setting up a new Reports project, but this seems to be the quickest.)
If you now right-click on your new Report Project and select Properties, you can see the TargetReportFolder, which will default to your new Project Name (eg. MyProject). When you deploy reports from SSRS, they are deployed to this location. (You can change the location, if you wish - I find it easier to keep track of what's going where by using the Project name.)
You will need to copy any data sources to be used in each project, into the data sources folder of all projects that use that data source. By default, OverwriteDataSources is set to false, so when you deploy a new report, it will use the data source already deployed to the Report Manager environment.
So to get the Report Manager structure that you want to see:
Create Projects called Folder A and Folder B
Move/copy Report1 into the Reports folder in Project Folder A
Move/copy Report2 and Report3 into the Reports folder in Project Folder B
Move/copy data source DEV into the Shared Data Sources folders in Projects Folder A and Folder B
Deploy your reports
Don't forget to check your changes into source control.

The way do it is similar to other posters, I have one solution with multiple projects (each project is named and put into the same folder name that I want it deployed under).
Then I rigged up a script in RS which:
- Creates a single data source used by all reports, in my case
- Loops through all directories in the solution folder
-- Creates the same folder name on the RS server
-- Deploys all files in this directory to that folder on the RS server
-- Uses rs.SetItemDataSources on each report to redirect it to my main data source
And that's basically it.
Caveats are you sometimes get files uploaded you didn't want to (like deleted reports with the .RDLs still hanging around). But you can script all around that, or just blow it away in RS and re-upload again.
Doing this, I have one script but can deploy a structure under numerous different parent folders, each with different data sources, and have all the reports in a folder drawing data from a different database. This lets me run 1x RS instance but have development, testing, training, etc areas.

We manage this with Linked Reports in SSRS. We deploy reports to a Report Distribution folder, hidden from users, then create Linked Reports in the Reporting Services web UI (an option in the Manage section for each report). You can create the Linked Report in any folder, so you can build the folder structure you want and put the linked reports in the appropriate place.
You can deploy everything to the single distrib folder from VS, and the linked reports are updated. This solves the sub-report and DataSource issues since all reports 'run from' the distrib folder. There's obviously a lot of setup up front, and creating a new environment is a hassle - It happens so infrequently that we haven't tried to automate it.

I have a BI project going in SSRS2008 with roughly 80 reports - and this is my experience with deploying reports into folders. This is my first foray into developing in Reporting Services, so any gurus please smack me if I'm out to lunch.
Initially, I used folders in source control to separate smaller reports by department to help keep me organized. That worked fine while I was initially developing my reports, however the first time I deployed the project to the report server the structure was completely flattened - so I gave up on using a folder structure to organize.
As far as I'm aware the only way you can create a folder structure in SSRS is to use the Report Manager UI and create folders on the Report Server. I'm assuming from there you would modify the path in the report properties in Visual Studio. Either that or you have to define the path when you first set up the report. I haven't tested this so YMMV.
So in conclusion: It is not possible to create the folders in BIDS and deploy your reports into folders utilizing the IDE. I hope this is addressed in 2008R2 because it's kind of a pain having all those reports thrown together in the Solution Explorer.

You can have the files in separate folders on the disk/source control however they list flat and sorted alphabetically in Visual Studio.
I cannot see a user interface to manage the above thing but if you edit the project file (single project file of a VS solution) you can specify the FullPath XML tag of each report file.

I created a report server type project and had no option to add another project. Instead I edited the SLN file and added my other projects. The first part of the SLN file then looked like this in the end to access my 2 projects in sub folders to the SLN file
Microsoft Visual Studio Solution File, Format Version 10.00
Visual Studio 2008
Project("{F14B399A-7131-4C87-9E4B-1186C45EF12D}") = "RestOfWorld", "RestOfWorld\RestOfWorld.rptproj", "{D24D5EEA-88A4-4375-802B-7CA877202787}"
EndProject
Project("{F14B399A-7131-4C87-9E4B-1186C45EF12D}") = "NorthAmerica", "NorthAmerica\NorthAmerica.rptproj", "{C64A3BDC-F526-4037-AD48-31799BECC3AD}"
EndProject
Global

#skiwii is correct, with VS 2013 Community edition and SQL Data Tools -- Business Intelligence, you do not see the Solution node at the top of the tree in VS Solution Explorer, and you do have to hack the .SLN file to expose it.
Start with the desired master .sln and one .rptproj file in your source tree. call that 'parent'.
Create a brand new, empty Report Services .rptproj file in a new subfolder (under the folder containing the .sln). e.g, project is 'child1'. VS will also give you a child1.sln file in that folder.
Close all VS windows.
With your favorite text editor (teco!)
open child1.sln.
Copy the 2 lines at the top; Project... and EndProject
Open parent1.sln
Paste those lines under the existing Project / EndProject.
Now open parent1.sln in VS. You will magically see the Solution node at the top of Solution Explorer window.
If you have been very lucky, you will also see a second project called child1. But if not, no problem. You can just right click on the solution and Add a new project of type Report Services.

Related

3 tier architecture, could not find file

Hi i'm developing windows desktop app using 3 tier architecture with VB, when i run the application i get "Could not find file 'C:\Users\PHU-T\Documents\Visual Studio 2013\Visual_Basic_2013_SBS\Chapter 09\Orange Student\bin\Debug\Students.accdb" error. The Student.accdb file is the Data Access Layer project, the file is copied to bin\Debug folders of the Data Access Layer and Business Logic Layer projects but not in the Presentation Layer. I don't want to create fixed data source like 'C:\Users\PHU-T\Documents\Visual Studio 2013\Students.accdb' as the project will be submitted for marking. How can i solve this? i'm using the data source below.
Data Source=|DataDirectory|\Students.accdb
You need to add a reference to the DAL project from your PL project in order for the .accdb file to end up in the output directory of your main application.
Update
I could not reproduce this myself in Visual Studio 2013 with a similar project setup. Referencing the BLL project from the main app was all I needed to copy the DB. You might want to check the properties of the .accdb file in your project and make sure it's set to "Copy Always".

How do I change Process Template on an existing Team Project in TFS 2010?

How do I change process template to MSF for Agile on an already existing team project in TFS 2010?
We have upgraded our TFS 2008 to 2010, and now I would also like to change the process template to MSF for Agile (currently CMMI).
We haven't used the workitem functionality much so if some information gets lost in the conversion doesn't matter.
Once you've created a Team Project, you unfortunately can't just upload a new process template. As Robaticus says, you'll have to download the XML for the template and modify it, then re-upload it. The power tool lets you create NEW templates for NEW team projects, but it won't modify an existing one.
Instead, you can use the witadmin.exe tool (on any computer with Team Explorer installed, under \Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE, or just from a Visual Studio Command Prompt) to export the current workitem definitions and re-import them once you've made your changes.
Luckily, if you're not using workitem tracking much, then this might not be too difficult. You might be able to just delete all the existing workitem types and then re-upload the new types.
If this is too much trouble, consider how much you want to retain your source control history. It might be worth creating a new Team Project with the Agile template and then just moving all your source code into it.
You can't change the process template, however you can change the work item types. So for bugs, tasks you can swap to the Agile definitions.
You can do this in 2010 with witadmin, in 2008 it's importwit, by first downloading the template to disk (you'll need the TFS power tools for this). Then point the console app at bug.xml, task.xml etc..
Usage: witadmin importwitd /collection:collectionurl [/p:project] /f:filename [/e:encoding] [/v]
/collection Specifies the Team Foundation project collection. Use a fully specified URL such as
http://servername:8080/tfs/Collection0.
/p Specifies the team project in which the new work item type is imported. This is required, except when
the validation-only option is used.
/f Specifies the work item type XML definition file to import.
/e Specifies the name of the .NET Framework 2.0 encoding used to import the XML file. For example,
/e:utf-7 will use Unicode (UTF-7) encoding. Encoding is automatically detected whenever possible. If
the encoding cannot be detected, UTF-8 is used.
/v Validates the XML definitions for the work item type, link type, or global workflow without importing
them.
You can export the agile process template to disk, then import the work items into your existing project. You may need the TFS Power Tools to do this.
I may be too late for this question, but the TFS Integration Platform tools could really help here.
See this question on server fault that details on how to move from Scrum For Team System V2 to Microsoft Visual Studio Scrum 1.0.
You would need to setup your own mappings to move from your templates to the target template, but the process is the same.
Please note witadmin.exe could help in some scenarios but TFS Integration Platform is your ultimate choice to achieve this task. There is a user voice item still pending. Please check this SO thread.
I think the best way to accomplish this is to create a new Team Project with "the new" process template and use the TFS Integration tool to migrate your existing WorkItems and choose create a new branch from Source Control, so you'll have new work Items (with the new workflow) and the source control history (as well). You'd even do this across versions of TFS!! (On the case interested on migrate TFS 2005/2008/2010)
Another way might be to use the WorkItem Templates, but I think this is more a kind-of visual style (I've not much experience) applied to the Work Item. To do so, just right click on your project, import the WITDefinition and apply the template by selecting Apply template on desired WorkITems.

How can I share a Data Source between multiple projects in Microsoft SQL Server 2005 Reporting Services and keep Visual Studio "Preview"?

I have a solution that contains multiple reporting projects (one per target deployment folder - I think this is the only way to achieve this effect, at least until I abandon Visual Studio for report deployment).
I want to specify my data source information "once and only once" for all these reports.
So far, I have created a separate reporting project that contains my shared data source. If I deploy things to a reporting server in the right order and offer sufficient prayers to appropriate gods, the reports seem to link up to the shared data source there and run (at least via the Report Manager in IE).
When I am developing a report, though, I can no longer "Preview" to try it out locally - I now must deploy it to a report server to try running it. This is a hassle.
Is my only recourse to add a whole bunch of copies of a data source (pointing at my development database), one in each project, set those not to deploy off my machine, and (probably) exclude them from source control?
A technique (dirty trick?) I am playing with now is to copy my data source (.rds) into each project, close Visual Studio, then in the underlying files/folders:
Delete the copied .rds from my report projects (leaving only the one copy in my Data Sources project)
In each report project's project file (Foo.rptproj), change the text of the Project.DataSources.ProjectItem.FullPath element from My Shared Data Source.rds to ..\Data Sources\My Shared Data Source.rds
This way all reporting projects reference the same underlying file on the filesystem, so they share a single data source definition, but each project also kind of has a "local" shared data source, so Visual Studio is kept happy.
Regarding source control: there is still only one copy of the .rds checked in, so we're not polluting the code base with lots of icky duplicates; the changes to the .rptproj files can be checked in, so we're not forcing developers into unnatural source-control gymnastics (selective partial commits etc.) to maintain a sane master copy.
Each reporting project will try to deploy this data source, though I've forbidden the overwriting of existing data sources on the server, so it's not too big a deal . . . and I suppose if I intended to overwrite the server's data source definition, it wouldn't really matter whether I overwrote it once or ten times with the same .rds.
Disclaimer: this is still an experiment. I don't have experience using this technique in practice yet, so I can't go so far as to actually recommend it.
Woody,
What we have tended to do is:
On the server have a folder called "DataSources", which is hidden from the users. In there will be all of the data sources.
For each reporting project in VS there will be a folder, also called "DataSources", but this time it will only contain the data source for this report.
As long as the folder structure is the same (i.e. report and data source have the same corresponding folder level on server and in VS) this seems to work for us.

How do I share an image between projects in Microsoft SQL Server Reporting Services 2005?

I have a SQL Server 2005 Reporting Services solution containing several reporting projects. (I need separate reporting projects so that I can deploy reports to the correct folders on the report server.)
We want to include our company's logo in the header of each report.
I don't want to bake the logo image into each report ("embedded"); nor do I want to include a copy of the logo in each reporting project.
Still, I would like for the logo to "live" in the solution and on the report server one way or another so it's packaged up with the reports and gets deployed along with the reports.
How?
The best solution I have come up with so far goes like this:
Create a reporting project (called “Shared” in my case).
Include the logo image in that project (it goes into the “Reports” folder, but that seems irrelevant).
Configure that project to deploy where and when I want. (For the “where”, a folder called “Shared” was the default and suited me.)
On each report, set the properties for the image in the “layout” tab thus (and I mean the properties in the sidebar view, not the other properties in the pop-up dialog box):
Under “Data”, set Source to “External”
Under “Data”, set Value to “../Shared/logo.png”
(To apply this to many reports, it helps to do bulk manipulations on the RDLs’ underlying XML.)
This shows a broken image link when I play with the report in Visual Studio, but when I deploy it to a report server, the logo appears.

Making a website/project Portable

Good evening/morning/after/noon.
I have an ASP.net 3.5 website and I am using vb.net in VWD 2008 Express, I am also using MS SQL Server 2008 Express, I used ajax tabs and a textBox charavters counter control develped by https://web.archive.org/web/20211020202742/https://www.4guysfromrolla.com/
The database is attached with MS SQL Server Management Studio Express and the files are stored in the SQL default "Data" folder.
The whole project's code and forms are stored in a folder in my E drive.
I need to hand the whole project to another coworker who have to finish it, please describe in steps how can i make my website portable (like i can put it all in a folder that he can carry around in his flash disk).
PS: I have had a problem trying to move the project from one server to the other, the pproject seems to look for the dlls of the AJAX control and the textBox counter where i originally unzipped the folders in which they cam in, which i think was on my desktop, although when i added those controls to the Tools tab, i created a new tab, then i choose the dll from the where i unzipped the controls source code, aint that enough?
Thanks in advance
When you create the structure, make a folder for referenced files in the source tree. You can then reference from there. If you do that the entire tree is portable. The only changes, from environ, to environ, are configuration elements. And, if on the local system, you use SQL Express and put in the App_Data folder, it cana connect to your coworkers system, as long as he also has SQL Express.