一、项目需求

  今天在做项目的时候,有一个需求,具体如下:在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. Linux开机启动服务

    一.添加启动脚本 vim /etc/rc.d/rc.local sh /home/glt/apache-tomcat-/bin/email.sh 二.启动服务 systemctl enable rc- ...

  2. mysql导入sql文件错误#1044 - Access denied for user 'root'@'localhost'

    在我的个人知识管理中,经常用到mysql数据库,wordpress搭建的worklog.搜索测试数据.我blog的测试环境等.我在自己的电脑上整了WAMP(Windows Apache MySQL P ...

  3. go 从表结构生成结构体

    package main import ( "fmt" "github.com/gohouse/converter" ) func main() { // 初始 ...

  4. java http的get,post请求

    初学可用F12查看任意网页帮助理解 package httpTest: import java.io.BufferedReader; import java.io.IOException;import ...

  5. jquery中使用each遍历。

    一直知道each这个方法,但是就是不太明白到底怎么用,今天两个地方都使用了each.真的太高兴了,太有成就感了. 东钿微信平台订单列表页 全部订单之前是按照产调,评估,借款的顺序依次排下来,华总说要按 ...

  6. All boundaries are conventions, waiting to be transcended.

    All boundaries are conventions, waiting to be transcended.所有界限都是陈规,等着被打破.

  7. JDK8下的HashMap有什么特别之处?

    一.前言 上篇认真的分析了在JDK7下的HashMap, 如果还没看过的或者忘记了的可以先去回顾下,这样可以更好的了解JDK8下的HashMap基于JDK7做了什么改动.分析JDK8下的HashMap ...

  8. iOS 应用架构 (三)

    iOS 客户端应用架构看似简单,但实际上要考虑的事情不少.本文作者将以系列文章的形式来回答 iOS 应用架构中的种种问题,本文是其中的第二篇,主要讲 View 层的组织和调用方案.下篇主要讨论做 Vi ...

  9. Jquery ajax中表单提交被拦截的问题处理方法

    在实际开发项目中,由于要做支付宝的批量退款处理,需要用到ajax中去提交表单数据,项目截图如下: 由于在第二张截图“确认退款”那里需要异步ajax提交数据到服务器处理信息,处理成功后将返回的数据装载到 ...

  10. miniLCD12864 16引脚

    显示图片 main.c #include<reg51.h>#include"st7565.h"//---存一个图片--//unsigned char code pic[ ...