How to retrive a lost SQL Server Reporting Services 2005 RDL report file from a database if the source code has been lost#

  • This is acheived using a c# application
  • First thing to do is locate the Image column in the Catalog table in the report SQL Server database, you can look up the specific row using the itemid
  • Then the byte array returned can be converted into a string using the code below
AppSettingsReader config = new AppSettingsReader();
            string dbConnection = config.GetValue("DB", typeof(string)).ToString();
            SqlConnection conn = new SqlConnection(dbConnection);
            conn.Open();
            SqlCommand cmd = new SqlCommand("select content from dbo.Catalog where itemid = '70F31BA8-B6C8-4322-BB9E-89C82D2E60EC'", conn);
            cmd.CommandType = CommandType.Text;

            try
            {
                SqlDataAdapter adapter = new SqlDataAdapter(cmd);
                DataSet dataset = new DataSet();
                adapter.Fill(dataset);

                using (DataTable dt = dataset.Tables["table"])
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        byte[] data = (byte[])row["content"];
                        textBox1.Text = System.Text.Encoding.ASCII.GetString(data);
                    

                       
                    }
                }
            }
            catch (Exception ex) {

                MessageBox.Show(ex.Message);
            }

Back to C#

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 24-May-2017 15:30 by UnknownAuthor
G’day (anonymous guest) My Prefs
  • View Page Source
  • This clear IPSec security association,
    clear ipsec sa peer X.X.X.X
    

All Pages

Page views: 1897

Private Tomcat

Linux

MySQL

Email

SQL Server

ASP

JSP

C#

Web Mail

Windows Plesk

Linux Plesk

PHP

Gaming

ASP.NET

Persits ASPUpload

Wiki Help

Referring Pages:
...nobody

JSPWiki v2.8.1