May 19, 2012  
   Login  
Forum  
 
ForumForumEnesys RS Data ...Enesys RS Data ...Support - RS Da...Support - RS Da...Optional report parameters / Null valuesOptional report parameters / Null values
Previous Previous
 
Next Next
New Post
 1/3/2008 2:49 PM
 

hi,

how I could create an optional parameter respectively enable the selection of null-parameter? Picking the Null-value-box when creating report parameters is not sufficient.

New Post
 1/3/2008 7:19 PM
 

Hi,

Could you elaborate on your exact requirement? You can also send some screenshot by email if you like.

Regards,


Frederic LATOUR
ENESYS
New Post
 1/4/2008 12:51 PM
 

Hi,

I have already implemented report parameters in reports.I generally use report parameters to filter (=limit) the report data. So this is nothing completely new for me.

But now the users have asked for an option to implement optional filter parameters: they want to have multiple filter criterias, but do not want to have the need to apply all filter parameters in one report. They would either pick the value from parameter A or parameter B.

As the surface of "report parameters" showed me the option "Null value" and "empty value" I hoped to implemented this feature by picking one of these boxes. But no change! I've already tried several workarounds.

Now I hope that you can show me one solution to do this.

Thanks.

New Post
 1/4/2008 3:24 PM
 

Hi,

What is the data type of your parameters (A and B)?

Are we talking of parameters which available values are set using another Dataset or is the user free to enter any data?

Regards,


Frederic LATOUR
ENESYS
New Post
 1/4/2008 3:33 PM
 

I was using a dataset instead of free text entries.You may say that when using a dataset query my data do not contain any Null values? This is not the case: the dataset contains NULL and I can choose this value.

But how to continue? When I now select the "Null"-Value in my report parameter I get a report with no data results. This is not the intentition that I had: I just wanted to optionally apply the filter.

New Post
 1/4/2008 3:52 PM
 

Hi,

On a general basis, you won't be able to use CAML queries in that situation. You may have some filter at the report level of that kind:

=iif(isnothing(Parameters!A.Value), Fields!YourField.Value, Parameters!A.Value)
=

Fields!YourField.Value

Is it what you are looking for? If not, it would really help to have your query, some details about your parameters, and also the query you are using for your parameter available values.

Regards,


Frederic LATOUR
ENESYS
New Post
 1/8/2008 11:17 AM
 

Hi,

Sorry that my post was quite misunderstanding. I think that your solution meant something else.

Essentially I need one filter-parameter that should be implemented as an optional report parameter. This means: the user can pick one filter criteria from a drop-down list - but does not have to. 
(Reporting Services seemed to provide this feature as you can pick the null-value and empty value box in the user interface for creating the report parameters.But in reality it had no effect on the output: I always had to pick one parameter and so my choice was not optionally.)

So this solution does not seem to work. But I chose another way: I integrated one "Null"-Value into my filter parameter values. So the user can pick the null-value from a drop-down list.

Now I wanted to specify that: 
if my the null-value is choosen, all data will be displayed (no filtering!) and
if one of the other filter values are choosen, data will be filtered by the choosen value and displayed.

But I have no idea how to implement this. Do you have any idea how to do this? Or do you know any workaround?

New Post
 1/8/2008 4:26 PM
 

Hi,

Are you retrieving the parameter values from a SharePoint list?

If so, you could use a query similar as the following for retrieving a dataset for the parameter's available values :

<?xml version="1.0" encoding="utf-8" ?>

<root xmlns="http://enesyssoftware.com/schemas">

    <list title="Products" relativeSiteUrl="/sites/demo/" tableName="Products">

      <fields>Category</fields>

      <query>

      </query>

    </list>

 

    <sqlOp op="distinct">

      <dstTableName>DistinctCategories</dstTableName>

      <tableName>Products</tableName>

      <fieldName>Category</fieldName>

      <addValue>ALL</addValue>

    </sqlOp>

    <resultSet>DistinctCategories</resultSet>

</root>

It uses a undocumented feature (addValue) for adding some value in the dataset resulting from "distinct" operation.

Your main query could be as the following :

<?xml version="1.0" encoding="utf-8" ?>

<root xmlns="http://enesyssoftware.com/schemas">

  <list title="Products" relativeSiteUrl="/sites/demo/" tableName="Products">

    <fields>Title, Supplier, Category, UnitPrice</fields>

    <query>

    </query>

  </list>

 

  <sqlOp op="select">

    <dstTableName>FilteredProducts</dstTableName>

    <sourceTableName>Products</sourceTableName>

    <selectExpression>'@category!' = 'ALL' OR Category = '@category!'</selectExpression>

  </sqlOp>

  <resultSet>FilteredProducts</resultSet>

</root>

Your report parameter would be configured like the following:

Is it what you are looking for?

Regards,


Frederic LATOUR
ENESYS
Previous Previous
 
Next Next
ForumForumEnesys RS Data ...Enesys RS Data ...Support - RS Da...Support - RS Da...Optional report parameters / Null valuesOptional report parameters / Null values

 
You need to login for posting to the forums.
If you don't have a login, click here to register.
 
Copyright 2010 Enesys - All rights reserved Terms Of UsePrivacy Statement