Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 764835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:47:35+00:00 2026-05-14T16:47:35+00:00

My SSRS report loads logo images for each customer from a customer number specific

  • 0

My SSRS report loads logo images for each customer from a customer number specific folder on the report server.

I write an expression, to form my URL to the image based on th customer number.

..."http://localhost/images/" + iCustomerNumber.ToString() + "/logo.gif"

I am able to get this working, but the problem I face is, when a particular customer doesn’t has an image, then my report shows a red X mark in place of the logo. In this case, I expect to hide the image control itself. Any thoughts????

The other dirty solution will be to ensure that each customer specific folder has the designated image! even if there is no logo for a customer, I’ll place a blank.gif or a spacer.gif of probably a square pixel in dimension!.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T16:47:36+00:00Added an answer on May 14, 2026 at 4:47 pm

    You could try adding some custom code and use this in the Image.Value property to load a default image if no image is found:

    Public Function GetImage(ByRef CustomerNumber As String) As String
        ' Customer image
        Dim ImageCustomerURL As String
        ImageCustomerURL = "http://localhost/images/" + CustomerNumber + "/logo.gif"
        ' Default Image if customer image does not exist
        Dim ImageDefaultURL As String
        ImageDefaultURL = "http://localhost/images/default.gif"
    
        ' Create a web request to see if customer image exists
        Dim m_Req As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(ImageCustomerURL)   
        Try
            Dim HttpWResp As System.Net.HttpWebResponse = CType(m_Req.GetResponse(), System.Net.HttpWebResponse)
            If HttpWResp.StatusCode = System.Net.HttpStatusCode.OK
                Return ImageCustomerURL
            Else
                Return ImageDefaultURL 
            End If
        Catch ex As System.Net.WebException
            If ex.Status = System.Net.WebExceptionStatus.ProtocolError Then
                Return ImageDefaultURL 
            End If
        End Try
        Return ImageDefaultURL 
    End Function
    

    Then your Image.Value property expression is:

    =Code.GetImage(iCustomerNumber.ToString())
    

    Edit: Set the Visibility.Hidden property rather than use a default image

    Well, I thought it might be nicer to have a default image rather than a blank space but it’s really the same idea:

    Public Function HideImage(ByRef CustomerNumber As String) As Boolean
        ' Customer image
        Dim ImageCustomerURL As String
        ImageCustomerURL = "http://localhost/images/" + CustomerNumber + "/logo.gif"
    
        ' Create a web request to see if customer image exists
        Dim m_Req As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(ImageCustomerURL)   
        Try
            Dim HttpWResp As System.Net.HttpWebResponse = CType(m_Req.GetResponse(), System.Net.HttpWebResponse)
            If HttpWResp.StatusCode = System.Net.HttpStatusCode.OK
                Return False
            Else
                Return True
            End If
        Catch ex As System.Net.WebException
            If ex.Status = System.Net.WebExceptionStatus.ProtocolError Then
                Return True
            End If
        End Try
        Return True
    End Function
    

    Then your Visibility.Hidden property expression is:

    =Code.HideImage(iCustomerNumber.ToString())
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My SSRS report fetches data from my DATAWAREHOUSE. The ASP.NET application I have is
I have SSRS report with its own datasets coming straight from the database. I
I have an SQL Server Reporting Services (SSRS) report, that uses a view. That
I need to write a SSRS Report (RDLC) with Sub Report and directly export
I am creating SSRS Report using Microsoft SQL Server Report Builder 3.0. I am
In SSRS 2008, is it possible load detail report from summary report automatically? The
I'm developing an SSRS report where I need to place three images (company logos)
I've been using the excellent ssrsmsbuildtasks for a couple years to automate ssrs report/folder/datasource
I am using the SQL Server Report Server from Microsoft SQL Server 2005. In
In a VS05 SSRS report I have a field coming back from the database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.