Giter Club home page Giter Club logo

cake.ssrs's Introduction

Cake.SSRS

Cake.SSRS is set of aliases for Cake that help simplify deploying objects to SQL Server Reporting Services. Release notes can be found here.

License

Information

Stable Pre-release
GitHub Release - GitHub release
NuGet NuGet NuGet

Build Status

Develop Master
Build status Build status

Code Coverage

Coverage Status

Discussion

If you have questions, search for an existing one, or create a new discussion on the Cake GitHub repository, using the Extension Q&A category.

Join in the discussion on the Cake repository

About

This Addin only contains the functionality needed to upload the most common object types to SSRS (Reports, DataSets, and DataSources). Pull requests are accepted if you need additional functionality. Don't forget to include the unit tests with it.

Usage

Creating a Folder

SsrsCreateFolder("AdventureWorks", "/", new SsrsConnectionSettings
    {
        ServiceEndpoint = "http://localhost/reportserver/ReportService2010.asmx",
        UseDefaultCredentials = true,
		ProxyCredentialType = ProxyCredentialType.Ntlm,
		ImperonsationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation,
		SecurityMode = SecurityMode.TransportCredentialOnly
    });

Upload a Report

SsrsUploadReport("./path/to/report.rdl", "/AdventureWorks",
    new Dictionary<string, string>
    {
            ["Description"] = "Description for the Report"
    },
    new SsrsConnectionSettings
    {
        ServiceEndpoint = "http://localhost/reportserver/ReportService2010.asmx",
        UseDefaultCredentials = true,
		ProxyCredentialType = ProxyCredentialType.Ntlm,
		ImperonsationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation,
		SecurityMode = SecurityMode.TransportCredentialOnly
    });

Upload a Shared DataSet

SsrsUploadReport("./path/to/dataset.rsd", "/AdventureWorks",
    new Dictionary<string, string>
    {
            ["Description"] = "Description for the DataSet"
    },
    new SsrsConnectionSettings
    {
        ServiceEndpoint = "http://localhost/reportserver/ReportService2010.asmx",
        UseDefaultCredentials = true,
		ProxyCredentialType = ProxyCredentialType.Ntlm,
		ImperonsationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation,
		SecurityMode = SecurityMode.TransportCredentialOnly

    });

Upload a DataSource

SsrsUploadDataSource("./path/to/datasource.rds", "/AdventureWorks",
    new Dictionary<string, string>
    {
            ["Description"] = "Description for the DataSource"
    },
    new SsrsConnectionSettings
    {
        ServiceEndpoint = "http://localhost/reportserver/ReportService2010.asmx",
        UseDefaultCredentials = true,
		ProxyCredentialType = ProxyCredentialType.Ntlm,
		ImperonsationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation,
		SecurityMode = SecurityMode.TransportCredentialOnly
    });

Search for an Item

var catalogItem = SsrsFindItem ( 
    new FindItemRequest
    {
        Folder = "/AdventureWorks",
        ItemName = "My_Report_Name",
        Recursive = false
    },
    new SsrsConnectionSettings
    {
        ServiceEndpoint = "http://localhost/reportserver/ReportService2010.asmx",
        UseDefaultCredentials = true,
		ProxyCredentialType = ProxyCredentialType.Ntlm,
		ImperonsationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation,
		SecurityMode = SecurityMode.TransportCredentialOnly
    });

cake.ssrs's People

Contributors

gep13 avatar jericho avatar louisfischer avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cake.ssrs's Issues

Missing dlls from packaging

Missing dlls the following nuget packages:

  • System.Reflection.DispatchProxy
  • System.Security.Principal.Windows

How to use

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Addin version used:
  • Cake Version used:
  • Operating System:

Update README: Add link to GitHub Discussions

We've started using GitHub Discussions as the preferred communication channel moving forward (instead of Gitter) because it makes it easier to keep track of discussions in a structured way, especially if multiple discussions are happening at the same time. It also allows to search for previous questions/answers, which can be a helpful resource.

As such, we're recommending addin maintainers to update any links to Gitter to point to the GH discussions.

image

Template:

## Discussion

For questions and to discuss ideas & feature requests, use the [GitHub discussions on the Cake GitHub repository](https://github.com/cake-build/cake/discussions), under the [Extension Q&A](https://github.com/cake-build/cake/discussions/categories/extension-q-a) category.

[![Join in the discussion on the Cake repository](https://img.shields.io/badge/GitHub-Discussions-green?logo=github)](https://github.com/cake-build/cake/discussions)

Error

#addin nuget:?package=Cake.SSRS&version=0.6.0
var target = Argument("target", "Default");
 
Task("Default")
  .Does(() =>
{
        var directoryInfo = new DirectoryInfo(@"C:/git/Reports/");
        
        var configFiles = directoryInfo.GetFiles("*.rdl").ToList();

        var datasources = directoryInfo.GetFiles("*.rds").ToList();

        var datasets = directoryInfo.GetFiles("*.rsd").ToList();

        string url = "http://localhost/reportserver/ReportService2010.asmx";
        string password = "xxxxx";
        string user = "xxxx";

        SsrsConnectionSettings ssrsConnectionSettings = new SsrsConnectionSettings
        {
            ServiceEndpoint = url,            
            Password = password,
            Username = user,
            ClientCredentialType = ClientCredentialType.Ntlm,
            UseDefaultCredentials = false,
            SecurityMode = SecurityMode.TransportCredentialOnly,
            ProxyCredentialType = ProxyCredentialType.Ntlm            
            
        };

        var delay = Argument<int>("Delay", 1) * 1000;

        SsrsCreateFolder("Data Sources", "/",  ssrsConnectionSettings);
        Information("Esperando por {0} segundos...", delay / 1000);
        System.Threading.Thread.Sleep(delay);



        SsrsCreateFolder("Datasets", "/",  ssrsConnectionSettings);
        Information("Esperando por {0} segundos...", delay / 1000);
        System.Threading.Thread.Sleep(delay);


        //SsrsUploadDataSource
        foreach (var file in datasources){    
            Information( file.FullName);                       
            SsrsUploadDataSource(new FilePath(file.FullName), 
                                "/Data Sources", 
                                new Dictionary<string, string> { ["Description"] = "Description for the DataSource"}, 
                                ssrsConnectionSettings);
            Information("Esperando por {0} segundos...", delay / 1000);
            System.Threading.Thread.Sleep(delay);            
        }

        //SsrsUploadDataSet

        foreach (var file in datasets){    
            Information( file.FullName);   

            var teste = new FilePath(file.FullName);

              Information( teste);   


            SsrsUploadDataSet(teste, 
                              "/Datasets", 
                              new Dictionary<string, string> { ["Description"] = "Description for the Datasets"}, 
                              ssrsConnectionSettings);
            Information("Esperando por {0} segundos...", delay / 1000);
            System.Threading.Thread.Sleep(delay);
        }


        //SsrsUploadReport
        foreach (var file in configFiles){    
            Information( file.FullName);      
            if( file.FullName.Contains("Vertical"))      
            SsrsUploadReport(new FilePath(file.FullName), "/", ssrsConnectionSettings);
            Information("Esperando por {0} segundos...", delay / 1000);
            System.Threading.Thread.Sleep(delay);
        }




  Information("Hello World!");
});
 
RunTarget(target);

An error occurred when executing task 'Default'.
Error: One or more errors occurred.
System.Web.Services.Protocols.SoapException: The value for parameter 'ItemPath' is not specified. It is either missing from the function call, or it is set to null. ---> Microsoft.ReportingServices.Diagnostics.Utilities.MissingParameterException: The value for parameter 'ItemPath' is not specified. It is either missing from the function call, or it is set to null.
at Microsoft.ReportingServices.Library.ReportingService2010Impl.GetItemType(String ItemPath, String& Type)
at Microsoft.ReportingServices.WebServer.ReportingService2010.GetItemType(String ItemPath, String& Type)

Recommended changes resulting from automated audit

We performed an automated audit of your Cake addin and found that it does not follow all the best practices.

We encourage you to make the following modifications:

  • You are currently referencing Cake.Core 0.23.0. Please upgrade to 0.33.0
  • The Cake.Core reference should be private. Specifically, your addin's .csproj should have a line similar to this: <PackageReference Include="Cake.Core" Version="0.33.0" PrivateAssets="All" />
  • Your addin should target netstandard2.0. Please note that there is no need to multi-target, netstandard2.0 is sufficient.

Apologies if this is already being worked on, or if there are existing open issues, this issue was created based on what is currently published for this package on NuGet.org and in the project on github.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.