How to know if ReportViewer is installed on client machine RRS feed

  • Question

  • Here is the problem.

    Long time ago I deployed an application without reporting functionality, those machines only installed the .net framework and my app. Now recently i started to create reports and printable versions of the data displayed.

    How can i know from my program if I have access to the reportViewer (if it is installed)

    This is because I also created some kind of "automatic updates" service (homebrew) and it can install missing components (launch external programs on demand).

    There is little contact with the users and some of them have basic knowledge of the system and windows itself... so asking them to download an update or the reportviewer manually without confirming that thats the problem will be dificult (and cause a lot of confussion).


    In my app I want that in case the user doesn't have the report engine installed the app downloads it from the web and begin installing it automatically.


    How can I detect the report engine is missing?

    Wednesday, July 25, 2007 1:53 PM

All replies

  • Funny, I just posted a variant of this for somebody else on the forum... pulled the code out because he wanted the running version of the viewer...Here is a similar piece of code I use to figure out if SQLServer CE is available...  you could use something very similar to this, it's actually more apt for your case  <s>...






    Code Snippet

    Private Sub InitializeCEDataConnection()
            If My.Settings.DatabaseIsCompact AndAlso _
               IsNothing(Me.SqlCeConnection1) Then
                'SqlCeConnection1 -- we are handling this differently from a normal
                ' SqlConnection in case CE support files not installed.
                Dim x As System.Reflection.Assembly = System.Reflection.Assembly.GetEntryAssembly(), _
                    y As System.Reflection.Assembly = Nothing
                    For Each objDepAssembly As System.Reflection.AssemblyName In _
                        If objDepAssembly.ToString().ToUpper().Contains("SQLSERVERCE") Then ' change this
                                y = System.Reflection.Assembly.Load(objDepAssembly.FullName)
                                y = Nothing
                            End Try
                        End If
                    If Not IsNothing(y) Then

                     ' work here, setting up the connection object
                       ' set the connection object to nothing

                    End If
                Catch Ex As Exception
                    ' set it to nothing

                    x = Nothing
                    y = Nothing
                    If IsNothing(Me.SqlCeConnection1) Then
                        Me.DisableDatabaseReporting() ' user feedback occurs in here
                    End If
                End Try
            End If

        End Sub



    Wednesday, July 25, 2007 2:11 PM