Showing posts with label dataset. Show all posts
Showing posts with label dataset. Show all posts

Friday, March 23, 2012

Number of records in table

Hi!
How I can calculate number of records in the table which has filtering?
E.g., DataSet "dsABC" return 1000 rows. After filtering table contains 300 rows.
Function:
= CountRows("dsABC") return 1000.
How I can get 300?

Alexey,

I'm not sure I completely understand your question. Do you want the number of rows to show up on the report? Is this correct?

|||Thanks. It's correct.
I found workaround - create expression in the table footer (e.g. texbox name "TableRows") :
= Count()
Then in the textbox on the report header area I create exppression:
=ReportItems!TableRows.Value
It's work!

Wednesday, March 21, 2012

Number of Dataset per Report

Hi

I am creating this report which requires 50 datasets to be created.

I was just wondering Is there any recommended number of dataset per report? Or Number of controls per report?

I really dont want to create this big number of dataset per report but sometimes its difficult to explain client.

Regards

Amit

There is not hard limit on the number of dataset or controls per report. It is possible that you might see problems if you have very complex report or if the dataset is very large at runtime depending on what kind of hardware you have (e.g. memory) though.|||

Thanks Fang for your reply.

I think I am not using much complex report. They are all simple queries but have to create separated dataset for each query.

I will make sure that client use the best hardware configuration.

Best Regards

Amit

Monday, March 19, 2012

Number Formatting Question

Hello,
I have a dataset that looks like this:
0.00
17.00
-25.00
That I want to be displayed like this:
0.00
17.00
25.00-
(Note that there is a trailing space after the positive numbers so that they
will line up properly with the negative ones)
I'm having trouble getting the trailing space to show up. I've tried the
following formatting strings, but none of them seem to work:
#,##0.00 ;#,##0.00-;0.00\ ;
#,##0.00 ;#,##0.00-;0.00 ;
#,##0.00 ;#,##0.00-;0.00' '
#,##0.00 ;#,##0.00-;0.00" ";
Can anyone help me with this?
Thanks in advance,
AmyYou could use an expression in the textbox where you want the data
displayed:
=iif(Fields!<Field Name>.Value >= 0, Fields!<Field Name>.Value & " ",
Fields!<Field Name>.Value & "-")
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"aelk" <aelk@.discussions.microsoft.com> wrote in message
news:9CD9BE54-8CBC-462D-8EA3-6B6C4566BA75@.microsoft.com...
> Hello,
> I have a dataset that looks like this:
> 0.00
> 17.00
> -25.00
> That I want to be displayed like this:
> 0.00
> 17.00
> 25.00-
> (Note that there is a trailing space after the positive numbers so that
> they
> will line up properly with the negative ones)
> I'm having trouble getting the trailing space to show up. I've tried the
> following formatting strings, but none of them seem to work:
> #,##0.00 ;#,##0.00-;0.00\ ;
> #,##0.00 ;#,##0.00-;0.00 ;
> #,##0.00 ;#,##0.00-;0.00' '
> #,##0.00 ;#,##0.00-;0.00" ";
> Can anyone help me with this?
> Thanks in advance,
> Amy|||Unfortunately I've tried that & it makes the 0.00 values come out as 0.
"Bruce Johnson [MSFT]" wrote:
> You could use an expression in the textbox where you want the data
> displayed:
> =iif(Fields!<Field Name>.Value >= 0, Fields!<Field Name>.Value & " ",
> Fields!<Field Name>.Value & "-")
> --
> Bruce Johnson [MSFT]
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "aelk" <aelk@.discussions.microsoft.com> wrote in message
> news:9CD9BE54-8CBC-462D-8EA3-6B6C4566BA75@.microsoft.com...
> > Hello,
> > I have a dataset that looks like this:
> >
> > 0.00
> > 17.00
> > -25.00
> >
> > That I want to be displayed like this:
> > 0.00
> > 17.00
> > 25.00-
> >
> > (Note that there is a trailing space after the positive numbers so that
> > they
> > will line up properly with the negative ones)
> >
> > I'm having trouble getting the trailing space to show up. I've tried the
> > following formatting strings, but none of them seem to work:
> >
> > #,##0.00 ;#,##0.00-;0.00\ ;
> > #,##0.00 ;#,##0.00-;0.00 ;
> > #,##0.00 ;#,##0.00-;0.00' '
> > #,##0.00 ;#,##0.00-;0.00" ";
> >
> > Can anyone help me with this?
> >
> > Thanks in advance,
> > Amy
>
>

Monday, February 20, 2012

Null Parameter

how does the isnull parameter work? I am at my wits end trying to get this to
work
I have a list (Male & Female) drop down based on another dataset. I have
included ALL in this list. I want to be able return results from both gender
when the ALL is selected from the drop down.
I need help on how i can do this : by expression or by anyother means.SELECT * From MyTable WHERE Gender=@.Gender OR @.Gender = 'All'
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"bibo" <bibo@.discussions.microsoft.com> wrote in message
news:7B3FBF72-27E0-492F-B34B-0C092D97FBD5@.microsoft.com...
> how does the isnull parameter work? I am at my wits end trying to get this
> to
> work
> I have a list (Male & Female) drop down based on another dataset. I have
> included ALL in this list. I want to be able return results from both
> gender
> when the ALL is selected from the drop down.
> I need help on how i can do this : by expression or by anyother means.

Null Hidden Parameter

In my report I have a dataset that is returning an ID field among other things. I am setting a hidden parameter = to that ID field. That parameter is then used to return another dataset.

My problem is that the original dataset with the ID field does not always bring back data (this is expected). If data is not brought back, I get an error when I try to execute the report ("The 'X' parameter is missing a value").

I have the parameter set to "Allow Null Values".

This value is not required in the SQL Server stored procedure that returns values for the new dataset.

The parameter is of type Integer. (So I am not able to set the "Allow Blank Value" property)

This is NOT a multi-value parameter.

Does anyone have any suggestions/ideas/workarounds to solve my problem?

Could you add a UNION to your first dataset to also return a record full of NULL values?

Would this mess with the rest of your report?

Something like:

SELECT
Id, Description
FROM X
UNION
SELECT
Null, Null

That way your dataset will always return a value even if there is no data in table X.
|||

That may work, the other option with SQL would be for me to use IF EXISTS

IF EXISTS (select ID, Desc) THEN

select ID, Desc

ELSE

Select null, null

I am more interested in why reporting services gives me that error when I am allowing null values. I suspect it has something to do with trying to assign the parameter value from an empty dataset.

Null filter

I'm using a parameter for Superintendents. The parameter drives a filter is
in the dataset; the parameter is not in the sql query.
I want the user to be able to select a single Superintendent from a queried
list, and have the report return filtered data. I also want the user to be
able to select none (or null) and see a full report from an unfiltered
dataset or table.
Problem is that even though I'm allowing null in the param, the report still
demands that a Superintendent be selected.Any solution to this? I have something similar where I
have two filters on a Report and I would like to have
an "All" option on both filters where one or both are
basically ignored.
I am using parameter lists and have tried to set the
value to ALL as '%', '*', <BLANK>, <Null> etc with no
luck.
>--Original Message--
>I'm using a parameter for Superintendents. The
parameter drives a filter is
>in the dataset; the parameter is not in the sql query.
>I want the user to be able to select a single
Superintendent from a queried
>list, and have the report return filtered data. I also
want the user to be
>able to select none (or null) and see a full report from
an unfiltered
>dataset or table.
>Problem is that even though I'm allowing null in the
param, the report still
>demands that a Superintendent be selected.
>.
>|||There is a difference between a filter and a query parameter. Filters filter
the data after first bringing over all the data. If you have a query
parameter then it only brings over the data you want. If you do the latter
then you can define the query parameter like so:
select * from sometable where myfieldname like @.myparam
Bruce L-C
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:100801c48b96$8f804540$3a01280a@.phx.gbl...
> Any solution to this? I have something similar where I
> have two filters on a Report and I would like to have
> an "All" option on both filters where one or both are
> basically ignored.
> I am using parameter lists and have tried to set the
> value to ALL as '%', '*', <BLANK>, <Null> etc with no
> luck.
> >--Original Message--
> >I'm using a parameter for Superintendents. The
> parameter drives a filter is
> >in the dataset; the parameter is not in the sql query.
> >I want the user to be able to select a single
> Superintendent from a queried
> >list, and have the report return filtered data. I also
> want the user to be
> >able to select none (or null) and see a full report from
> an unfiltered
> >dataset or table.
> >Problem is that even though I'm allowing null in the
> param, the report still
> >demands that a Superintendent be selected.
> >.
> >|||Hi Bruce. I understand that. What I am looking for is
an option to basically discard the filter for that record
set. Basically the ability to ignore the filter.
So if I returned back a recordset of all people who lived
in my state, and I had a filter on Gender as well as a
filter on City, I would like to be able to select a
Gender and select all for city and then show all the men
or women in the state, or select a city, and select all
and then show all the men and women in the city.
Right now if I have a filter on city and a filter on
gender, there is no option for a union, just an
intersection.
IMHO, this is a huge shortcoming especially with snapshot
reports. For example to run a sales report for a company
and have a filter on department. As constructed, you
must have a department, so if you wanted to show for the
whole company, you either have to do this at the database
and pass a parameter, or right a separate report.
I am looking for a way to add an "All" option to the
filter which basically will treat as a wildcard or
ignore, and currently it looks like that is not possible.
>--Original Message--
>There is a difference between a filter and a query
parameter. Filters filter
>the data after first bringing over all the data. If you
have a query
>parameter then it only brings over the data you want. If
you do the latter
>then you can define the query parameter like so:
>select * from sometable where myfieldname like @.myparam
>Bruce L-C
>"Dave" <anonymous@.discussions.microsoft.com> wrote in
message
>news:100801c48b96$8f804540$3a01280a@.phx.gbl...
>> Any solution to this? I have something similar where I
>> have two filters on a Report and I would like to have
>> an "All" option on both filters where one or both are
>> basically ignored.
>> I am using parameter lists and have tried to set the
>> value to ALL as '%', '*', <BLANK>, <Null> etc with no
>> luck.
>> >--Original Message--
>> >I'm using a parameter for Superintendents. The
>> parameter drives a filter is
>> >in the dataset; the parameter is not in the sql query.
>> >I want the user to be able to select a single
>> Superintendent from a queried
>> >list, and have the report return filtered data. I also
>> want the user to be
>> >able to select none (or null) and see a full report
from
>> an unfiltered
>> >dataset or table.
>> >Problem is that even though I'm allowing null in the
>> param, the report still
>> >demands that a Superintendent be selected.
>> >.
>> >
>
>.
>|||--There is a difference between a filter and a query
--parameter. Filters filter the data after first bringing
--over all the data. If you have a query parameter then
--it only brings over the data you want.
Yes and no... I understand what you are saying, but what
I am looking ofr is the option to not apply the filter
and get access to the full reocrd set that is returned.
As it looks like so far to me.. when you set up a filter
for a field, there is no Wildcard or "All" value, so with
a filter you can only see a subset of the recordset, and
never the full unfiltered recordset, which I think you
should be able to see.|||I tried a simply filter on a value with like and then put in * and it
returned everything. So it is possible to have a wildcard.
Bruce L-C
<anonymous@.discussions.microsoft.com> wrote in message
news:032d01c48f87$f9f0eed0$3501280a@.phx.gbl...
> --There is a difference between a filter and a query
> --parameter. Filters filter the data after first bringing
> --over all the data. If you have a query parameter then
> --it only brings over the data you want.
> Yes and no... I understand what you are saying, but what
> I am looking ofr is the option to not apply the filter
> and get access to the full reocrd set that is returned.
> As it looks like so far to me.. when you set up a filter
> for a field, there is no Wildcard or "All" value, so with
> a filter you can only see a subset of the recordset, and
> never the full unfiltered recordset, which I think you
> should be able to see.
>|||Was that a Textbox you entered the '*' in or did you
create a list for it.
I think we are getting close maybe.
I have set up a list for the filter to hide/make it
easier for the values. like Open for status of 'A',
Closed for status 'C', and want to add a All for all
statuses. I have tried assigning to <blank>, <null>, as
well as *, '*', %, '%', etc., and can not seem to assign
a wildcard to a labed value to creat a drop down list.
>--Original Message--
>I tried a simply filter on a value with like and then
put in * and it
>returned everything. So it is possible to have a
wildcard.
>Bruce L-C
><anonymous@.discussions.microsoft.com> wrote in message
>news:032d01c48f87$f9f0eed0$3501280a@.phx.gbl...
>> --There is a difference between a filter and a query
>> --parameter. Filters filter the data after first
bringing
>> --over all the data. If you have a query parameter then
>> --it only brings over the data you want.
>> Yes and no... I understand what you are saying, but
what
>> I am looking ofr is the option to not apply the filter
>> and get access to the full reocrd set that is returned.
>> As it looks like so far to me.. when you set up a
filter
>> for a field, there is no Wildcard or "All" value, so
with
>> a filter you can only see a subset of the recordset,
and
>> never the full unfiltered recordset, which I think you
>> should be able to see.
>
>.
>