C# Reporting Service报表自动安装(例子)

这篇博客介绍如何使用C#实现Reporting Service报表的自动安装。通过创建一个Windows Forms应用程序,设置报表服务器URL、数据库连接信息,动态创建文件夹、数据源,并上传报表文件。代码中详细展示了创建数据源、上传报表的步骤,以及处理可能出现的异常。
摘要由CSDN通过智能技术生成

首先添加本地WebService的引用,地址是: http://localhost/ReportServer/ReportService.asmx引用,可以把这个地址设置为动态方便以后修改。

 

全部原代码如下:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using System.Configuration;
using System.IO;
using System.Net;
using System.Web.Services;
using System.Web.Services.Protocols;
//using ReportServiceSetup.RS;

namespace UpdateReport
{
    public partial class setup : Form
    {
        private byte[] definition = null;
        private ReportServiceSetup.ReportingService rs = new ReportServiceSetup.ReportingService();
        private string ServerIP = "";
        private string SqlUserName = "";
        private string sqlPassword = "";
        private string filePath = @"f:\xyq\Report\";//报表存放路径
        //private Warning[] warn = null;

        public setup()
        {
            InitializeComponent();

            ServerIP = this.TxtReportIP.Text;//数据库服务器ip
            SqlUserName = this.TxtUserName.Text;//数据库服务器登陆名
            sqlPassword = this.TxtPassWord.Text;//数据库服务器登陆密码
        }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值