Thursday, February 16, 2012

'Allow null values' causes report to run automatically

Hi
I have a long running report. The report is based on a SQL Server 2005
stored procedure, with a single Integer parameter. I want to allow the
user to choose NULL for the parameter, but I don't want the report to
run without the user clicking 'View Report'. But I am finding (from
Report Parameters) when I choose 'Allow null values' there is no
default value of 'None'. I don't want to specify a default value,
because this causes the report to execute immediately.
Has anybody come across this?
cheers,
TJWhat you need, and what would be nice, is a default option of None
(not Null) which doesn't allow the report to run until the user
selects a value. Unfortunatley, the only default options you have
are: Non-queried, From query and Null.
The simplest solution is probably to set a Non-queried default value
that is invalid in your report. This will till cause your report to
run but will return an empty result set. If it's a very simple report
you could then set the visibility of your elements to not show, or
possibly show "Please select a value", if this default invalid value
is given. Otherwise you'll get an empty looking report or, worse yet,
an error; either result would probably be confusing to the user.
Matt Penner
On Jan 2, 7:28 pm, TJ <newsgroups...@.gmail.com> wrote:
> Hi
> I have a long running report. The report is based on a SQL Server 2005
> stored procedure, with a single Integer parameter. I want to allow the
> user to choose NULL for the parameter, but I don't want the report to
> run without the user clicking 'View Report'. But I am finding (from
> Report Parameters) when I choose 'Allow null values' there is no
> default value of 'None'. I don't want to specify a default value,
> because this causes the report to execute immediately.
> Has anybody come across this?
> cheers,
> TJ

No comments:

Post a Comment