一、项目需求

  今天在做项目的时候,有一个需求,具体如下:在Report Server中存在一个报表,报表中有一个参数doctor_name,该参数允许多值,默认全部。但是由于前端页面医生选择时多选没有意义,因此,需要单选,但是在其他页面中存在多选的需求,因此这里还将doctor_name设置为allow multiple values。因此,具体需求为,前端页面选择一个医生时,就查询该医生的报表信息,但未选择任何医生时,就默认选择全部医生(相当于多值)。

二、解决方案

  我们设置数据集查询语句

SELECT  ... FROM ...    WHERE   (yourcolumname IN (@doctor_name))

  设置数据集的为参数表达式

  参数表达式为:

=SPLIT(JOIN(Parameters!doctor_name.Value,","),",")

此时,在前端aspx页面的后台,我们就可以传过来一个数组了

 string[] doctorlist = new string[this.lbxListDoctor.Items.Count];
for (int i = ; i < this.lbxListDoctor.Items.Count; i++)
{
doctorlist[i] = this.lbxListDoctor.Items[i].Value;
}
var rpdoctor = new Microsoft.Reporting.WebForms.ReportParameter("doctor_name", doctorlist);
serverReport.SetParameters(rpdoctor);

Report Server multiple value 多值选择的更多相关文章

  1. 迁移Report Server DataBase时遇到的坑

    1.项目背景 由于历史原因,公司部分系统的Report是基于SQL Server Report Service搭建的,且Reporting Services 和Report Server DataBa ...

  2. 145_Power BI Report Server自定义Form登录

    博客:www.jiaopengzi.com 焦棚子的文章目录 请点击下载附件 1.背景 很久没有更新Power BI Report Server了,发现自己机器还是2021年1月版本的,现在更新了20 ...

  3. Step by step Install a Local Report Server and Remote Report Server Database

    原创地址:http://www.cnblogs.com/jfzhu/p/4012097.html 转载请注明出处 前面的文章<Step by step SQL Server 2012的安装 &g ...

  4. SQL Server 2012 The report server cannot open a connection to the report server database

    案例环境: 操作系统版本:    Windows Server 2012 R2 Standard 数据库版本  :    SQL SERVER 2012 SP2 案例介绍: 今天进入一台新安装的SQL ...

  5. 后台获取前台runat=server的select的值

    <li> <asp:Label ID="Lpro" runat="server" Text="省份:" CssClass= ...

  6. Web service request SetParameters to Report Server http://host/reportserver failed. Error: 请求因 HTTP 状态 401 失败: Unauthorized

    迁移CRM服务器完成后在访问CRM的内部报表时报错,在查看应用服务器的日志时发现报"Web service request SetParameters to Report Server ht ...

  7. 更新版PowerBI发布了-- Power BI Report Server Update – March 2018

    新版的PowerBI server 和 Desktop 终于发布了.  详细增加功能见以下链接: 下载最新版PowerBI Report Server: https://powerbi.microso ...

  8. [转]How to: Create a Report Server Database (Reporting Services Configuration)

    本文转自:https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms157300%28v%3dsql.10 ...

  9. Quickstart: Embed a Power BI Report Server report using an iFrame in SharePoint Server

    In this quickstart you will learn how to embed a Power BI Report Server report by using an iFrame in ...

随机推荐

  1. NPOI读写Excel【转载】

    参考示例:https://www.cnblogs.com/luxiaoxun/p/3374992.html 感谢! 1.整个Excel表格叫做工作表:WorkBook(工作薄),包含的叫页(工作表): ...

  2. ABAP日期和时间运算

    "日期运算是以天为单位,时间运算以秒为单位.DATA:date1 TYPE d. "服务器当前日期date1 = sy-datum.WRITE: / date1 . "2 ...

  3. Webpack 入门学习

    1.什么是Webpack? Webpack可以看做是模块打包机:它做的事情是,分析你的项目结构,找到JavaScript模块以及其它的一些浏览器不能直接运行的拓展语言(Scss,TypeScript等 ...

  4. 两个页面实现mui轮播图与选项卡结合

    index.html页面 <!DOCTYPE html><html><head> <meta charset="utf-8"> &l ...

  5. typedef int status

    是个自定义类型的语句,typedef用来定义类型的别名,status i 就相当于int i

  6. 洛谷 P2827 蚯蚓

    题目描述 本题中,我们将用符号\lfloor c \rfloor⌊c⌋表示对c向下取整,例如:\lfloor 3.0 \rfloor= \lfloor 3.1 \rfloor=\lfloor 3.9 ...

  7. Android(java)学习笔记105:Android启动过程(转载)

    转载路径为: http://blog.jobbole.com/67931/ 1. 关于Android启动过程的问题: 当按下Android设备电源键时究竟发生了什么? Android的启动过程是怎么样 ...

  8. 在CNN中使用Tensorflow进行数据增强

    开始之前,需要思考一些基本问题 1.为什么需要大量数据 当您训练机器学习模型时,您真正在做的是调整其参数,以便它可以将特定输入(例如,图像)映射到某个输出(标签).我们的优化目标是追逐我们模型损失较低 ...

  9. C#之winform实现文件拖拽功能【转】

    将一个文件拖拽到窗体的某个控件时,将该控件的路径显示在该控件上,只要拿到了路径自然可以读取文件中的内容了 将一个控件的属性AllowDrop设置为true,然后添加DragDrop.DragEnter ...

  10. 2018.5.6 解决问题:oracle------ORA-12514 TNS 监听程序当前无法识别连接描述符中请求服务

    解决问题:ORA-12514 TNS 监听程序当前无法识别连接描述符中请求服务 或者是重启电脑之后无法进入控制台企业管理器(OEM)图形化界面(重新添加注入监听器就行了 文件listener.org) ...