Building a solution to Document SSRS reports
Hy, I am actually try to make my own tool to ducuments .rdl docs. I have many clues but don't know which is the easyest. 1- using SSIS and SSRS to generat documentation , here is the insparing article ( http://msdn.microsoft.com/en-us/library/ff793463%28v=sql.105%29.aspx) 2-creat a web service and use soap api to documents the reports i don't even know if it will work :D , and have not enought time to make bad decisions, Any advice? Thanks in advence.
July 17th, 2012 6:44pm

Maybe this helps. http://gallery.technet.microsoft.com/scriptcenter/42440a6b-c5b1-4acc-9632-d608d1c40a5c Regards, Dave Patrick .... Microsoft Certified Professional Microsoft MVP [Windows] Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2012 9:36pm

thank u for the link.
July 18th, 2012 5:00am

Hello Luffye, Thank you to post your questions on TechNet forum. Based on my experience, I recommend you use the second solution, to export the report via SOAP API. The two solutions will use the C# code to access the report SOAP service to get the report. In the SSIS, it has some limitation on debugging the code. Here is the link about how to debug SSIS script task. http://msdn.microsoft.com/en-us/library/ms135952.aspx If you use the C# application to access the SOAP service. It can achieve your goals and be easier to debug than using SSIS script task. http://support.microsoft.com/kb/875447 (This is for SSRS 2005 or SSRS 2000. Some feature may be out-of-date. You can refer to the sample. If you want to get more accurate service API, please refer to the next article.) http://msdn.microsoft.com/en-us/library/ms154052.aspx If you have further questions about this issue, please let me know. Regards, EdwardEdward Zhu TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
July 18th, 2012 11:33pm

Hi Zhu, i actually used the link that Dave gave me, few days ago and tried to execute the sql query from a c# application(stored pocedure),it is working! but know i am stocked, i want to save the result of the query in(different format a word document or a database ....) ,also from the c# application,the question is how to save the data from that query ! Thanks for your post ! but i want to document the reports , in other words, i am trying to generat a documentation ( in different format )where you fine informations about the report( parameters , datasets, datasoures , last time modifier, users that have access to this report ... etc ). Thank you in advence !
July 19th, 2012 12:36pm

Hi Luffye, Can you also take a look at this one? http://ssrscatalogqueries.codeplex.com/ Thanks, Khilit http://www.bigator.com
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2012 10:22pm

Hello Luffye, Thank you to clarify your requirement. Please try the following C# code on your side. public static DataSet GetInfo(string reportName, bool showExecutionLog = false) { DataSet result = new DataSet(); using (SqlDataAdapter adapter = new SqlDataAdapter()) { adapter.SelectCommand = new SqlCommand(); adapter.SelectCommand.CommandType = CommandType.StoredProcedure; adapter.SelectCommand.CommandText = "sp_HelpSSRSReport"; adapter.SelectCommand.Parameters.Add(new SqlParameter("ReportName", reportName)); adapter.SelectCommand.Parameters.Add(new SqlParameter("ShowExecutionLog", showExecutionLog)); adapter.SelectCommand.Connection = new SqlConnection(ConfigurationManager.ConnectionStrings["default"].ConnectionString); adapter.Fill(result); } return result; } The method will return a data set, which contains all the information you need. I run the sample Dave provided, and it returns 7 results. The dataset the above code returns contains 7 tables with the same order of the result from the Stored Procedure. Therefore, you can document the report based on it. If you have any questions about this issue, please let me know. Regards, EdwardEdward Zhu TechNet Community Support
July 19th, 2012 10:31pm

Hello Luffye, Thank you to clarify your requirement. Please try the following C# code on your side. public static DataSet GetInfo(string reportName, bool showExecutionLog = false) { DataSet result = new DataSet(); using (SqlDataAdapter adapter = new SqlDataAdapter()) { adapter.SelectCommand = new SqlCommand(); adapter.SelectCommand.CommandType = CommandType.StoredProcedure; adapter.SelectCommand.CommandText = "sp_HelpSSRSReport"; adapter.SelectCommand.Parameters.Add(new SqlParameter("ReportName", reportName)); adapter.SelectCommand.Parameters.Add(new SqlParameter("ShowExecutionLog", showExecutionLog)); adapter.SelectCommand.Connection = new SqlConnection(ConfigurationManager.ConnectionStrings["default"].ConnectionString); adapter.Fill(result); } return result; } The method will return a data set, which contains all the information you need. I run the sample Dave provided, and it returns 7 results. The dataset the above code returns contains 7 tables with the same order of the result from the Stored Procedure. Therefore, you can document the report based on it. If you have any questions about this issue, please let me know. Regards, EdwardEdward Zhu TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2012 10:33pm

HELLO ZHU, Thank you very much for that code !! it is working :D !! is it possible to store the dataset into a new database or just in world document ?
July 20th, 2012 7:21am

Hello Luffye, Thanks for your response. Of course, you can store the dataset into the new database or document. If you want to store it in the database, please refer to the following links to achieve this goal. http://msdn.microsoft.com/en-us/library/0f92s97z.aspx http://stackoverflow.com/questions/6134256/to-save-the-whole-datatable-into-one-database-table If you want to save it to the document, you may use the Microsoft.Office.Interop namespace. The following links are helpful to you. http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.documentclass.saveAs http://stackoverflow.com/questions/7811481/how-to-save-doc-file-using-c-sharp If you have any questions about this issue, please tell us freely. Regards, EdwardEdward Zhu TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
July 22nd, 2012 10:05pm

Hello Luffye, Thanks for your response. Of course, you can store the dataset into the new database or document. If you want to store it in the database, please refer to the following links to achieve this goal. http://msdn.microsoft.com/en-us/library/0f92s97z.aspx http://stackoverflow.com/questions/6134256/to-save-the-whole-datatable-into-one-database-table If you want to save it to the document, you may use the Microsoft.Office.Interop namespace. The following links are helpful to you. http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.documentclass.saveAs http://stackoverflow.com/questions/7811481/how-to-save-doc-file-using-c-sharp If you have any questions about this issue, please tell us freely. Regards, EdwardEdward Zhu TechNet Community Support
July 22nd, 2012 10:06pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics