English 中文(简体)
I need HELP , 即从下至下一份报告中选择所有报告
原标题:I need HELP getting the ALL Report choice in the drop down to run the Report for ALL

I m pulling from Table A which has 4 Transaction Statuses... 03 , 05 , 06 , & 07
I ve defined a dataset which pulls them...

SELECT  ALL  AS label, NULL AS value, 0 AS iordr
UNION ALL
SELECT  03  AS label,  03  AS value, 1 AS iordr
UNION ALL    
SELECT  05  AS label,  05  AS value, 2 AS iordr
UNION ALL
SELECT  06  AS label,  06  AS value, 3 AS iordr
UNION ALL
SELECT  07  AS label,  07  AS value, 4 AS iordr
ORDER BY iordr

But when I try to define the Parameter, when I select ALL from the drop down of the report, it doesn t pull 03 , 05 , 06 and 07 - in fact, it pulls NOTHING... how do I make it so that the ALL choice will pull ALL statuses in one report?
Report Parameter Properties:

General
Data Type: Text; Allow null Value
Select parameter visibility: Visible
Available Values:
Select from one of the following options:
Get values from a query
Dataset (the one defined above)
Value field: value
Label field: label
Default Values:
Select from one of the following options: No default value

问题回答

从您的下级中挑选的价值将载于{NUL, 03 , 05 , 06 , 07 }。 页: 1 WHERE 报告中的条款如下:

SELECT ...
FROM ...
WHERE SomeColumn = @UserSelectedValue
  OR @UserSelectedValue IS NULL
;

It won t work if your WHERE clause is just WHERE SomeColumn = @UserSelectedValue because = NULL is not valid (as ANSI-standard anyway), and it would only give you results for SomeColumn being NULL.

通过有效比较<代码>NULIS NUL,你重新设定了每个单行都具备的条件,从而给你/strong>数据。

在SSRS中,多价值参数被作为混合体分离。

使用SSRS多价值参数的最容易的方法是将全部电离层填入数据集,并使用<代码>。 WHERE myTable.Column IN (@MyPara amountName

Or you can move your filtering parameter into the dataset filter or maybe a filter on the tablix that you are using.

如果你真的需要将多价值参数输入一个储存的程序,那么,你将需要做一点细微的 par平,以将其分开。





相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

难以执行 REGEXP_SUBSTR

I m 查询Oracle 10g。 我有两张表格(样本数据见下文)。 i m 试图提取一些领域

SQL Query Shortcuts

What are some cool SQL shorthands that you know of? For example, something I learned today is you can specify to group by an index: SELECT col1, col2 FROM table GROUP BY 2 This will group by col2

PHP array callback functions for cleaning output

I have an array of output from a database. I am wondering what the cleanest way to filter the values is example array Array ( [0] => Array ( [title] => title 1 ...

OracleParameter and DBNull.Value

we have a table in an Oracle Database which contains a column with the type Char(3 Byte). Now we use a parameterized sql to select some rows with a DBNull.Value and it doesn t work: OracleCommand ...

Running numbers in SQL

I have a SQL-statement like this: SELECT name FROM users WHERE deleted = 0; How can i create a result set with a running number in the first row? So the result would look like this: 1 Name_1 2 ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...

热门标签