Help for using (exernal images) from the website with SSRS - sql-server

I have a small web site where i maintain users data. I maintain the users data in table and store there images like /images/users/user_id.jpeg on the server.
I am using the ReportViewer control in the asp.net page to show the reports from SSRS in the web application.
Now user want reports where they can see the users image in the report so that they can export it as pdf and get it printed.
In report i tried html image tag with full and relative url with option to render HTML however its not working. Also i tried the image control in the toolbox with external url and that too appears to be now working.
Can someone please help me get around this problem or guide me to some helpful links.
Thanks all,

It will be a lot easier to set up the report so that your users can see the image, if you can see the image in preview in Report Designer.
Make sure you have a working URL that takes you to one of your images. Test it, by pasting the URL into the address bar of your browser and ensure that the image is displayed in the browser.
Delete the existing image from your report. Insert a new image into the report object (normally a list or table) you are using to display your table. (This should be where the old image was.)
Specify Web as the image source, and enter your working URL as the URL of the image.
Preview the report in the report designer. You should be able to see the image (with the hardcoded URL) displayed correctly in the report.
Assuming all images are stored in the same directory on your server, switch to the layout tab of your report designer and click on the image object. In the Properties window, the value attribute should be the harcoded URL.
Click on the <Expression...> option from the dropdown menu for the Value attribute. Edit the expression so that it says ="your URL, without the filename" & Fields!your image filename data field name.Value
Preview the report in the report designer. You should be able to see the appropriate image for your data displayed correctly in the report.
If everything has gone correctly up to this point, deploy the report and try viewing it in the Report Manager. You should be able to see the appropriate image for your data displayed correctly in the report.
At this point, your users should now be able to see the report images.

I tried everything!!! It wasn't working in BIDS, Web Browser nor a Winform Report Viewer control.
I ended up hard-coding the image and it still didn't work:
="http://MyServer/Reports_SQL2008/Pages/Resource.aspx?ItemPath=%2fProjectReporting%2fBRAND_Logo.png&RetrieveResource=True"
I am pretty sure the problem was something to do with Active Directory Group Policy propagation. I suggest to leave it overnight if you have the same problem and have tried everything you can think of:
Setup Unattended Execution Account in SSRS Config with a service account who's password wont expire:
Permissions (both on image and also at Site Settings):
Can navigate to the image successfully, but it still doesn't show in the report.
Have the SSRS Image Properties set correctly, with the equal sign and url enclosed in double quotes, ie: ="url"
Even clear your browsers cache and tried different browsers, etc, etc
Anyway next morning I tried and the hardcoded path works and now this dynamic URL works too:
http://MyServer/Reports_SQL2008/Pages/Resource.aspx?ItemPath=%2fProjectReporting%2f" & First(Fields!Brand.Value, "ClientAndBrandByAccount") & "_Logo.png&RetrieveResource=True"
The XML in the RDL file is HTML encoded and looks like this:
<Image Name="Logo">
<Source>External</Source>
<Value>="http://MyServer/Reports_SQL2008/Pages/Resource.aspx?ItemPath=%2fProjectReporting%2f" & First(Fields!Brand.Value, "ClientAndBrandByAccount") & "_Logo.png&RetrieveResource=True"</Value>
I tried to make the Server URL dynamic as Alex Z shows, though I had to use this Replace code:
=Replace(Globals!ReportServerUrl,"/ReportServer_","/Reports_") & "/Pages/Resource.aspx?ItemPath=%2fProjectReporting%2f" & First(Fields!Brand.Value, "ClientAndBrandByAccount") & "_Logo.png&RetrieveResource=True"

Create a relative url using the expression and global variable Globals!ReportServerUrl
= Globals!ReportServerUrl + "your path to image"

Related

Images in Google data studio dashboard working for editor but not working for viewer

I use google form to collect images. The images are stored in a folder in google drive. The folder is shared publicly so that all the photos within the folder are also public if the link is available. The responses are stored in google sheet and converted to a accessible file that i.e. change from "https://drive.google.com/open?id=" to "https://drive.google.com/uc?id=" so that images are directly accessible. The google sheet is connected with google data studio. I need to show these images in the data studio dashboard. What I could find as solution was to create a table with the image URLs. Using a table, I've tried to do the following
Created a new field in google data studio and added image function with a link as mentioned above.
Instead of creating a new field, changed the type of image URL column to URL as well as image.
Both above are working for me as an editor (during edit or view as shared in below images. But when I share the dashboard as a link and view it in incognito mode, it is not working. I hope I'm able to explain.
Google Form Link: https://forms.gle/FFjX7cV8tJUSx5GW9
Google sheet where data is collected : https://docs.google.com/spreadsheets/d/1glpAId0LHgTUUtVk3RwakDr-H1KUXk3WtA-SE50HKXQ/edit?usp=sharing + also Embedded in google data studio
Google Data Studio link: https://datastudio.google.com/s/oaCN4EO-J4c
Its working for me as editor, but as a viewer in above link, its not working as visible in above data studio link
But as a viewer (incognito mode) images are not visible.
Actually, the images work for any user logged into its own Google account. The problem is really experienced when the dashboard is open with no logged user.
Diving into the problem, it seems to be related with the number of redirects that Google Drive need to access the image. Reproducing your dashboard I was able to see the error ERR_TOO_MANY_REDIRECTS in browser's Dev Mode.
Steps in logged mode:
Access https://drive.google.com/uc?id=[id]
302 Redirect to https://*.googleusercontent.com/docs/
The image is returned
Steps in non logged mode:
Access https://drive.google.com/uc?id=[id]
302 Redirect to https://*.googleusercontent.com/docs/...
302 Redirect to https://docs.google.com/nonceSigner?...
The image is returned
If you look into Dev Mode, it is possible to note that the URL ended with "/nonceSigner" is accessed dozens of times when not logged (the same does not happen when logged). This means that Data Studio start a loop trying to access the image, which triggers a "retry" operation when it sees a double redirect.
Curiously, this does not happen when using the standard Image control (instead of table chart, that reads from a DataSource), so it seems to be a bug in the Table chart component.
So you're out of luck. My suggestion is to use Cloud Storage instead of Google Drive, since it seems you're using some undocumented features and they'll surely break at some time.
Another option is to report this bug to DataStudio team (report here). There are Data Studio developers that activelly answer questions in StackOverflow (like Minhaz Kazi), so try to drive their attention to this issue.
I was having a related issue here - a colleague was not able to view images in a data studio dashboard, even though he was able to view the same files directly in Drive. It turned out to only be a problem using the Brave browser! I can't figure out what exactly was going on, but posting here in case it helps someone else.

SSRS 2016 Toolbar Back Button

I am trying to figure out in SSRS 2016 why the back button goes missing and how to get it back. I am adding the report into an iFrame of another application - I do not have access to that application's code, I just get to put in a URL.
If I put in a URL like this:
http://sqlservername/Reports/report/Cityworks%20Reports/Parks/ParksReport?rs:embed=true
I get the back button, however the report does not scroll horizontally very well.
If I put the URL in like this, the report scrolls horizontally very well however the back button goes missing:
http://sqlservername/ReportServer/Pages/ReportViewer.aspx?Cityworks+Reports%2fParks%2fParksReport&rs:Command=Render
I have tried to see what other options are available and am stumped at the moment. Has anyone come across this and know a solution?
Try add to the wanted URL the follow parameter
&rc:showbackbutton=true
One URL is for the Report manager, and the other for Browsing. The URL with YourServer\ReportServer is the browser landing page; there's therefore no "need" for the back button as it's purely a browsing page. If you go to http://YourServerName/ReportServer you'll see you have a page that very much looks like one you get with IIS with folder browsing enabled. Normally you only land on these pages when you receive a report by email, which contains a link to the report; or you are an end user.
The other URL YourServer\Reports is the report manager. It makes more sense here to have a back button, as you are navigating a management portal. As a result you could have come from other pages other than the folder browser page.

SSRS not display external image

In report designer, I have a logo.jpg located in the same directory of the reports. If I set the image source as external and path as logo.jpg. The image will show in designer preview. However, after I deploy the reports and the image to SSRS server, the image will not show. What happens is the image will be saved in SSRS as resources, but once I click on it it will give me some messy code.
If I open the report in the application, the image will also not display.
However, if I download it I can view it from my hard drive.
My current fix is to use absolute path in report designer or point to a image in the web, but that is not ideal.
I think that would be a access permission problem but I could not figure out why.
I used https://convert.town/image-dpi to convert my image to 96 dpi. SSRS then renders the image correctly in the pdf export.

PowerBI unable to display image for Chiclet Slicer

So I've started using Microsoft's latest BI tool, PowerBI. I am very interested using the chiclet slicer custom visualisation module and include logos on the dashboard so that relevant data is filtered when clicked on a particular company logo.
I have added an ImgURL field in the Region table as and the URL of the website maps to the Region values. However for some reason I am not able to display the image instead the URL is displayed. See screenshots below. How can I make it to display the image instead of the URL. What am I doing wrong? Pls see screenshots below.
If I click on London, the corresponding rows are filtered i.e. clipartbest.com website is only displayed (as expected) as below, however it doesn't bring through the image:
I've tried this with different URL links and can't seem to get it work. Any ideas? Help would be appreciated.
This is solved now. You need to drag a field in the 'Values' section otherwise the images won't be displayed.

Show entire report in SSRS Report Viewer Web Control?

So I have the SSRS Report Viewer Web control on a WebForm in my project, and it is working as expected now.
Since the print button does not naturally render in browsers other than IE, I've implemented this solution SSRS print button in Chrome and Firefox to give users in those browsers some ability to still print.
However, several of my reports are multi-page reports. It would be useful to show the entirety of the report at one time so the user only has to click the print button one time.
I've looked for a setting in the control, and simply do not see one. As I'm using server reports, it would not be possible to modify the RDL to make the page "larger".
What other approach could I take to display the whole multiple page report at one time?
If I understand correctly, you want the interactive size to show ALL your data, but the normal printed output (via the SSRS button) to use the proper page size.
To do this, you can modify the report's InteractiveSize Height property and set it to zero (0in). You can find this on the report's property page (press F4 to see the property page if not displayed). It is not shown in the normal report properties dialog -- only in the Properties Window.
This will make the interactive report page-less and render all the report data in one go. Assuming its not terribly large, this works well for people annoyed by the paging on the interactive report viewer and who just want to scroll through a data list.

Resources