locked
SDK Package: How to obtain Reporting Servies ReportProject object? RRS feed

  • Question

  • I'd like to write some extensibility for Microsoft Reporting Services projects in Visual Studio.  While poking around the Reporting Services assemblies I found the ReportProject class in Microsoft.ReportingServices.Designer.  I'd like to find a way to get a handle to this ReportProject object because it looks like it provides access to all the items in the project -- data sources, datasets, reports, etc.

    Does anybody know how to obtain a ReportProject object for the currently selected Reporting Services project?

    I tried using DTE.ActiveSolutionProjects but it returns a object of type ProjectExt in Microsoft.DataWarehouse.VsIntegration.Shell.Project.Extensibility, which doesn't seem to have any methods that are useful to me.

    Monday, July 2, 2012 9:11 PM

All replies

  • Hi LChris,

    You can try like this:

    Array projects=(Array)Dte.ActiveSolutionProjects;

    Project project= null;

    if (projects.Length > 0)
    {

    project=projects.GetValue(0) as Project;

    }

    ------------------------------------------------------

    I think the project is what you want.

    Best regards,

    Disley


    • Edited by Disley Tuesday, July 3, 2012 8:41 AM
    Tuesday, July 3, 2012 8:41 AM
  • Hi Disley -- as I mentioned in my original posting I have used this technique to get the active project.  It's just that the project object returned to me doesn't seem that useful, and I don't know how to use it to obtain handles to the items in the report project.  The ReportProject class seems to provide everything I want, but I don't know how to obtain it.
    Wednesday, July 4, 2012 7:24 PM
  • Hi Lchris,

    You can try to use macro to obtain it what you can refer to :http://msdn.microsoft.com/en-us/library/b4c73967(v=vs.100)

    Regards,

    Disley

    Thursday, July 5, 2012 7:15 AM