Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
551 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Bulk uploading images to a report server in SSRS Part two of a three-part series of blogs |
---|
In SQL Server Reporting Services, storing images on a report server provides a convenient way to display pictures in a report. Uploading images one-by-one is tedious so this blog shows you one way to upload multiple images at the same time, including how to organise the files into different folders.
|
In this blog
To upload multiple image files to the report server, we'll use Visual Studio to create a report server project, add our image files to the project and then deploy it to the report server.
In this example, I'd like to upload multiple image files stored in separate folders in my file system.
I have three subfolders, each containing multiple images.
I'd like to replicate this set of subfolders when I upload the images to the report server.
In Visual Studio, we'll create one report server project for each of the subfolders shown above. To begin, open Visual Studio and choose to create a new project. Here's how to do this in Visual Studio 2022:
Open Visual Studio and choose Create a new project.
Next, choose which type of project to create. For this example we'll create a Report Server Project
Select Report Server Project (you can use the search box at the top to filter the list) and then click Next.
Enter a name for the solution and the first project and choose where to save the solution:
The Project name will be used to set the folder name when we deploy the project later.
Click Create to create the solution. After a few seconds you'll see the solution and project listed in the Solution Explorer window:
Your new solution and project displayed in Visual Studio.
To include image files in a project, we need to add them to the Reports folder. To do this, right-click the Reports folder and choose Add | Existing Item...
Choose the options shown above to start adding files to the project.
You can now choose the image files you want to include in the project:
Choose to view All Files (*.*) from the filter dropdown list, then pick the files you want to import and click Add.
You'll see your selected files appear in the Reports folder of the project:
The files have been imported into the project.
If you want to create multiple folders of image files, you can create multiple projects in the same solution. To do this, from the Visual Studio menu choose File | Add | New Project...
Choose the option shown here to add a project to the existing solution.
You can then choose which type of project to create:
You should find Report Server Project in the recently used templates list.
Give the project a name which matches the name of the folder you want to create:
When we deploy this project, it will create a folder called Countries on the report server.
Click Create to add the new project to the existing solution:
Your second project will be displayed in the same solution.
You can now add images to the Reports folder of the new project. Repeat this process for each folder you want to create on the report server.
Our solution contains three report server projects, each of which contains a set of image files in the Reports folder.
The next part of this blog series shows you how to configure and deploy your projects to upload all the images to the report server.
Parts of this blog |
---|
|
Some other pages relevant to the above blogs include:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.