Monday, February 20, 2012

Preventing automatic generation of report

Is there some easy way to prevent a report from generating once the last
non-defaulted parameter is selected. This behavior is driving everyone nuts.
I have a whole series of reports where a user will select a company, and
then select a month, which is defaulted to the previous month but can be
changed. Because it is defaulted, the report runs as soon as a company is
picked, and the user never gets the chance to change the default month. It
needs to wait for me to finish selecting and confirming all parameters.Not sure how your parms are set up, but are you sure you're not supplying
defaults for all of the parms?
Thinking your report is executing immediately because it has all the parms
it needs (assigned by default) when you 1st access it. If report takes a
while to run, may appear it is letting you select parms, but is actually
going ahead and executing with defaults while you're choosing other parm
values. My testing, from both Report Manager (http://localhost/reports) and
the HTML Report Viewer (http://localhost/reportserver), does not function as
you've described. I have to hit View Report button after selecting the
final parm in order to get report to run.
An easy way to force your report to wait would be to make one of your parms
dependent on a fake parm like @.RunState. Requires the dependent parm be
populated from a dataset in order to set up the dependecy, but even if that
parm is populated from non-queried values currently, you can make it queried
like this:
SELECT 'Ford' AS Company, 1 AS CompanyID
UNION
SELECT 'Lincoln' AS Company, 2 AS CompanyID
UNION
SELECT 'Mercury' AS Company, 3 AS CompanyID
WHERE 'Yes' = @.RunState
Until you enter or select 'Yes' as your run state, the report won't execute.
Note, could also easily be set up off the date parm.
--
-- "This posting is provided 'AS IS' with no warranties, and confers no
rights."
jhmiller@.online.microsoft.com
"leehaak" <leehaak@.discussions.microsoft.com> wrote in message
news:FD9198BC-F8FE-4A93-B7F5-73BDD99FBB7D@.microsoft.com...
> Is there some easy way to prevent a report from generating once the last
> non-defaulted parameter is selected. This behavior is driving everyone
> nuts.
> I have a whole series of reports where a user will select a company, and
> then select a month, which is defaulted to the previous month but can be
> changed. Because it is defaulted, the report runs as soon as a company is
> picked, and the user never gets the chance to change the default month.
> It
> needs to wait for me to finish selecting and confirming all parameters.|||John,
Thanks for the reply. Yes, I'm absolutely certain that's how the parms are
set up. I do NOT supply a default parm for the company value, it's selected
from a dropdown list. The default value radio box is 'None' All other parms
have a default that is either 'Non-Queried' or 'From Query'. I've confirmed
this on the report server as well.
The report waits until I click on an item from the drop-down box, and then
immediately runs. In some cases, I can have a basically identical report
(actually copied from a template), with exactly same parms, and it WILL wait
until the 'View Report' button is hit. The problem, I can't see the
difference between these reports that would cause this. I'm trying to find
out what that difference is.
Since I know this can be done, I don't want to put in any 'gamey' solutions.
I just want to figure out why these reports behave differently with what
appear to be the exact same parms and defaults.
"John H. Miller" wrote:
> Not sure how your parms are set up, but are you sure you're not supplying
> defaults for all of the parms?
> Thinking your report is executing immediately because it has all the parms
> it needs (assigned by default) when you 1st access it. If report takes a
> while to run, may appear it is letting you select parms, but is actually
> going ahead and executing with defaults while you're choosing other parm
> values. My testing, from both Report Manager (http://localhost/reports) and
> the HTML Report Viewer (http://localhost/reportserver), does not function as
> you've described. I have to hit View Report button after selecting the
> final parm in order to get report to run.
> An easy way to force your report to wait would be to make one of your parms
> dependent on a fake parm like @.RunState. Requires the dependent parm be
> populated from a dataset in order to set up the dependecy, but even if that
> parm is populated from non-queried values currently, you can make it queried
> like this:
> SELECT 'Ford' AS Company, 1 AS CompanyID
> UNION
> SELECT 'Lincoln' AS Company, 2 AS CompanyID
> UNION
> SELECT 'Mercury' AS Company, 3 AS CompanyID
> WHERE 'Yes' = @.RunState
> Until you enter or select 'Yes' as your run state, the report won't execute.
> Note, could also easily be set up off the date parm.
> --
> -- "This posting is provided 'AS IS' with no warranties, and confers no
> rights."
> jhmiller@.online.microsoft.com
> "leehaak" <leehaak@.discussions.microsoft.com> wrote in message
> news:FD9198BC-F8FE-4A93-B7F5-73BDD99FBB7D@.microsoft.com...
> > Is there some easy way to prevent a report from generating once the last
> > non-defaulted parameter is selected. This behavior is driving everyone
> > nuts.
> > I have a whole series of reports where a user will select a company, and
> > then select a month, which is defaulted to the previous month but can be
> > changed. Because it is defaulted, the report runs as soon as a company is
> > picked, and the user never gets the chance to change the default month.
> > It
> > needs to wait for me to finish selecting and confirming all parameters.
>
>|||I am having a similar problem. I have two report parameters, one is hidden
(userid) and the other has two static values and a default. As soon as I
preview or open the report, it is automatically generating the report, not
giving the user a chance to change the parameter.
Any thoughts?
"leehaak" wrote:
> John,
> Thanks for the reply. Yes, I'm absolutely certain that's how the parms are
> set up. I do NOT supply a default parm for the company value, it's selected
> from a dropdown list. The default value radio box is 'None' All other parms
> have a default that is either 'Non-Queried' or 'From Query'. I've confirmed
> this on the report server as well.
> The report waits until I click on an item from the drop-down box, and then
> immediately runs. In some cases, I can have a basically identical report
> (actually copied from a template), with exactly same parms, and it WILL wait
> until the 'View Report' button is hit. The problem, I can't see the
> difference between these reports that would cause this. I'm trying to find
> out what that difference is.
> Since I know this can be done, I don't want to put in any 'gamey' solutions.
> I just want to figure out why these reports behave differently with what
> appear to be the exact same parms and defaults.
> "John H. Miller" wrote:
> > Not sure how your parms are set up, but are you sure you're not supplying
> > defaults for all of the parms?
> >
> > Thinking your report is executing immediately because it has all the parms
> > it needs (assigned by default) when you 1st access it. If report takes a
> > while to run, may appear it is letting you select parms, but is actually
> > going ahead and executing with defaults while you're choosing other parm
> > values. My testing, from both Report Manager (http://localhost/reports) and
> > the HTML Report Viewer (http://localhost/reportserver), does not function as
> > you've described. I have to hit View Report button after selecting the
> > final parm in order to get report to run.
> >
> > An easy way to force your report to wait would be to make one of your parms
> > dependent on a fake parm like @.RunState. Requires the dependent parm be
> > populated from a dataset in order to set up the dependecy, but even if that
> > parm is populated from non-queried values currently, you can make it queried
> > like this:
> >
> > SELECT 'Ford' AS Company, 1 AS CompanyID
> > UNION
> > SELECT 'Lincoln' AS Company, 2 AS CompanyID
> > UNION
> > SELECT 'Mercury' AS Company, 3 AS CompanyID
> > WHERE 'Yes' = @.RunState
> >
> > Until you enter or select 'Yes' as your run state, the report won't execute.
> > Note, could also easily be set up off the date parm.
> >
> > --
> > -- "This posting is provided 'AS IS' with no warranties, and confers no
> > rights."
> > jhmiller@.online.microsoft.com
> >
> > "leehaak" <leehaak@.discussions.microsoft.com> wrote in message
> > news:FD9198BC-F8FE-4A93-B7F5-73BDD99FBB7D@.microsoft.com...
> > > Is there some easy way to prevent a report from generating once the last
> > > non-defaulted parameter is selected. This behavior is driving everyone
> > > nuts.
> > > I have a whole series of reports where a user will select a company, and
> > > then select a month, which is defaulted to the previous month but can be
> > > changed. Because it is defaulted, the report runs as soon as a company is
> > > picked, and the user never gets the chance to change the default month.
> > > It
> > > needs to wait for me to finish selecting and confirming all parameters.
> >
> >
> >|||What is happening is if all your parameters (the showing ones) have a
default it automatically run. To stop this behavior you need at least one
parameter that the user selects.
Also, a question for you, why are you using the hidden parameter for userid
instead of the global variable user!userid?
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"bamboo" <bamboo@.discussions.microsoft.com> wrote in message
news:C918A8E7-9B68-443A-8B12-E29CCDCC9E83@.microsoft.com...
> I am having a similar problem. I have two report parameters, one is
hidden
> (userid) and the other has two static values and a default. As soon as I
> preview or open the report, it is automatically generating the report, not
> giving the user a chance to change the parameter.
> Any thoughts?
> "leehaak" wrote:
> > John,
> >
> > Thanks for the reply. Yes, I'm absolutely certain that's how the parms
are
> > set up. I do NOT supply a default parm for the company value, it's
selected
> > from a dropdown list. The default value radio box is 'None' All other
parms
> > have a default that is either 'Non-Queried' or 'From Query'. I've
confirmed
> > this on the report server as well.
> >
> > The report waits until I click on an item from the drop-down box, and
then
> > immediately runs. In some cases, I can have a basically identical
report
> > (actually copied from a template), with exactly same parms, and it WILL
wait
> > until the 'View Report' button is hit. The problem, I can't see the
> > difference between these reports that would cause this. I'm trying to
find
> > out what that difference is.
> >
> > Since I know this can be done, I don't want to put in any 'gamey'
solutions.
> > I just want to figure out why these reports behave differently with
what
> > appear to be the exact same parms and defaults.
> >
> > "John H. Miller" wrote:
> >
> > > Not sure how your parms are set up, but are you sure you're not
supplying
> > > defaults for all of the parms?
> > >
> > > Thinking your report is executing immediately because it has all the
parms
> > > it needs (assigned by default) when you 1st access it. If report
takes a
> > > while to run, may appear it is letting you select parms, but is
actually
> > > going ahead and executing with defaults while you're choosing other
parm
> > > values. My testing, from both Report Manager
(http://localhost/reports) and
> > > the HTML Report Viewer (http://localhost/reportserver), does not
function as
> > > you've described. I have to hit View Report button after selecting
the
> > > final parm in order to get report to run.
> > >
> > > An easy way to force your report to wait would be to make one of your
parms
> > > dependent on a fake parm like @.RunState. Requires the dependent parm
be
> > > populated from a dataset in order to set up the dependecy, but even if
that
> > > parm is populated from non-queried values currently, you can make it
queried
> > > like this:
> > >
> > > SELECT 'Ford' AS Company, 1 AS CompanyID
> > > UNION
> > > SELECT 'Lincoln' AS Company, 2 AS CompanyID
> > > UNION
> > > SELECT 'Mercury' AS Company, 3 AS CompanyID
> > > WHERE 'Yes' = @.RunState
> > >
> > > Until you enter or select 'Yes' as your run state, the report won't
execute.
> > > Note, could also easily be set up off the date parm.
> > >
> > > --
> > > -- "This posting is provided 'AS IS' with no warranties, and
confers no
> > > rights."
> > > jhmiller@.online.microsoft.com
> > >
> > > "leehaak" <leehaak@.discussions.microsoft.com> wrote in message
> > > news:FD9198BC-F8FE-4A93-B7F5-73BDD99FBB7D@.microsoft.com...
> > > > Is there some easy way to prevent a report from generating once the
last
> > > > non-defaulted parameter is selected. This behavior is driving
everyone
> > > > nuts.
> > > > I have a whole series of reports where a user will select a company,
and
> > > > then select a month, which is defaulted to the previous month but
can be
> > > > changed. Because it is defaulted, the report runs as soon as a
company is
> > > > picked, and the user never gets the chance to change the default
month.
> > > > It
> > > > needs to wait for me to finish selecting and confirming all
parameters.
> > >
> > >
> > >|||I am using the user!userid, but leave out the prompt which makes it a hidden
(not seen by user) parameter used for my query.
Working now, problem was hidden one (userid) had a default value and was
before other parameter in parameter list.
"Bruce L-C [MVP]" wrote:
> What is happening is if all your parameters (the showing ones) have a
> default it automatically run. To stop this behavior you need at least one
> parameter that the user selects.
> Also, a question for you, why are you using the hidden parameter for userid
> instead of the global variable user!userid?
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "bamboo" <bamboo@.discussions.microsoft.com> wrote in message
> news:C918A8E7-9B68-443A-8B12-E29CCDCC9E83@.microsoft.com...
> > I am having a similar problem. I have two report parameters, one is
> hidden
> > (userid) and the other has two static values and a default. As soon as I
> > preview or open the report, it is automatically generating the report, not
> > giving the user a chance to change the parameter.
> >
> > Any thoughts?
> >
> > "leehaak" wrote:
> >
> > > John,
> > >
> > > Thanks for the reply. Yes, I'm absolutely certain that's how the parms
> are
> > > set up. I do NOT supply a default parm for the company value, it's
> selected
> > > from a dropdown list. The default value radio box is 'None' All other
> parms
> > > have a default that is either 'Non-Queried' or 'From Query'. I've
> confirmed
> > > this on the report server as well.
> > >
> > > The report waits until I click on an item from the drop-down box, and
> then
> > > immediately runs. In some cases, I can have a basically identical
> report
> > > (actually copied from a template), with exactly same parms, and it WILL
> wait
> > > until the 'View Report' button is hit. The problem, I can't see the
> > > difference between these reports that would cause this. I'm trying to
> find
> > > out what that difference is.
> > >
> > > Since I know this can be done, I don't want to put in any 'gamey'
> solutions.
> > > I just want to figure out why these reports behave differently with
> what
> > > appear to be the exact same parms and defaults.
> > >
> > > "John H. Miller" wrote:
> > >
> > > > Not sure how your parms are set up, but are you sure you're not
> supplying
> > > > defaults for all of the parms?
> > > >
> > > > Thinking your report is executing immediately because it has all the
> parms
> > > > it needs (assigned by default) when you 1st access it. If report
> takes a
> > > > while to run, may appear it is letting you select parms, but is
> actually
> > > > going ahead and executing with defaults while you're choosing other
> parm
> > > > values. My testing, from both Report Manager
> (http://localhost/reports) and
> > > > the HTML Report Viewer (http://localhost/reportserver), does not
> function as
> > > > you've described. I have to hit View Report button after selecting
> the
> > > > final parm in order to get report to run.
> > > >
> > > > An easy way to force your report to wait would be to make one of your
> parms
> > > > dependent on a fake parm like @.RunState. Requires the dependent parm
> be
> > > > populated from a dataset in order to set up the dependecy, but even if
> that
> > > > parm is populated from non-queried values currently, you can make it
> queried
> > > > like this:
> > > >
> > > > SELECT 'Ford' AS Company, 1 AS CompanyID
> > > > UNION
> > > > SELECT 'Lincoln' AS Company, 2 AS CompanyID
> > > > UNION
> > > > SELECT 'Mercury' AS Company, 3 AS CompanyID
> > > > WHERE 'Yes' = @.RunState
> > > >
> > > > Until you enter or select 'Yes' as your run state, the report won't
> execute.
> > > > Note, could also easily be set up off the date parm.
> > > >
> > > > --
> > > > -- "This posting is provided 'AS IS' with no warranties, and
> confers no
> > > > rights."
> > > > jhmiller@.online.microsoft.com
> > > >
> > > > "leehaak" <leehaak@.discussions.microsoft.com> wrote in message
> > > > news:FD9198BC-F8FE-4A93-B7F5-73BDD99FBB7D@.microsoft.com...
> > > > > Is there some easy way to prevent a report from generating once the
> last
> > > > > non-defaulted parameter is selected. This behavior is driving
> everyone
> > > > > nuts.
> > > > > I have a whole series of reports where a user will select a company,
> and
> > > > > then select a month, which is defaulted to the previous month but
> can be
> > > > > changed. Because it is defaulted, the report runs as soon as a
> company is
> > > > > picked, and the user never gets the chance to change the default
> month.
> > > > > It
> > > > > needs to wait for me to finish selecting and confirming all
> parameters.
> > > >
> > > >
> > > >
>
>|||About user!userid. You don't need to have it as a report parameter. Anywhere
you use a report parameter you can use the global variable. RS creates a
report parameter automatically for you when you create a query parameter.
But you can do the following, in the dataset tab, click on the ..., go to
the parameters tab. For the query parameter for the userid click on the
mapping and pick expression, then use the global variable. Next to to the
layout tab and remove the report parameter that you were putting the userid
into.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"bamboo" <bamboo@.discussions.microsoft.com> wrote in message
news:1FBA05B9-D7E1-4CC4-97AA-A92AC802262D@.microsoft.com...
> I am using the user!userid, but leave out the prompt which makes it a
hidden
> (not seen by user) parameter used for my query.
> Working now, problem was hidden one (userid) had a default value and was
> before other parameter in parameter list.
>
>
> "Bruce L-C [MVP]" wrote:
> > What is happening is if all your parameters (the showing ones) have a
> > default it automatically run. To stop this behavior you need at least
one
> > parameter that the user selects.
> >
> > Also, a question for you, why are you using the hidden parameter for
userid
> > instead of the global variable user!userid?
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "bamboo" <bamboo@.discussions.microsoft.com> wrote in message
> > news:C918A8E7-9B68-443A-8B12-E29CCDCC9E83@.microsoft.com...
> > > I am having a similar problem. I have two report parameters, one is
> > hidden
> > > (userid) and the other has two static values and a default. As soon
as I
> > > preview or open the report, it is automatically generating the report,
not
> > > giving the user a chance to change the parameter.
> > >
> > > Any thoughts?
> > >
> > > "leehaak" wrote:
> > >
> > > > John,
> > > >
> > > > Thanks for the reply. Yes, I'm absolutely certain that's how the
parms
> > are
> > > > set up. I do NOT supply a default parm for the company value, it's
> > selected
> > > > from a dropdown list. The default value radio box is 'None' All
other
> > parms
> > > > have a default that is either 'Non-Queried' or 'From Query'. I've
> > confirmed
> > > > this on the report server as well.
> > > >
> > > > The report waits until I click on an item from the drop-down box,
and
> > then
> > > > immediately runs. In some cases, I can have a basically identical
> > report
> > > > (actually copied from a template), with exactly same parms, and it
WILL
> > wait
> > > > until the 'View Report' button is hit. The problem, I can't see the
> > > > difference between these reports that would cause this. I'm trying
to
> > find
> > > > out what that difference is.
> > > >
> > > > Since I know this can be done, I don't want to put in any 'gamey'
> > solutions.
> > > > I just want to figure out why these reports behave differently with
> > what
> > > > appear to be the exact same parms and defaults.
> > > >
> > > > "John H. Miller" wrote:
> > > >
> > > > > Not sure how your parms are set up, but are you sure you're not
> > supplying
> > > > > defaults for all of the parms?
> > > > >
> > > > > Thinking your report is executing immediately because it has all
the
> > parms
> > > > > it needs (assigned by default) when you 1st access it. If report
> > takes a
> > > > > while to run, may appear it is letting you select parms, but is
> > actually
> > > > > going ahead and executing with defaults while you're choosing
other
> > parm
> > > > > values. My testing, from both Report Manager
> > (http://localhost/reports) and
> > > > > the HTML Report Viewer (http://localhost/reportserver), does not
> > function as
> > > > > you've described. I have to hit View Report button after
selecting
> > the
> > > > > final parm in order to get report to run.
> > > > >
> > > > > An easy way to force your report to wait would be to make one of
your
> > parms
> > > > > dependent on a fake parm like @.RunState. Requires the dependent
parm
> > be
> > > > > populated from a dataset in order to set up the dependecy, but
even if
> > that
> > > > > parm is populated from non-queried values currently, you can make
it
> > queried
> > > > > like this:
> > > > >
> > > > > SELECT 'Ford' AS Company, 1 AS CompanyID
> > > > > UNION
> > > > > SELECT 'Lincoln' AS Company, 2 AS CompanyID
> > > > > UNION
> > > > > SELECT 'Mercury' AS Company, 3 AS CompanyID
> > > > > WHERE 'Yes' = @.RunState
> > > > >
> > > > > Until you enter or select 'Yes' as your run state, the report
won't
> > execute.
> > > > > Note, could also easily be set up off the date parm.
> > > > >
> > > > > --
> > > > > -- "This posting is provided 'AS IS' with no warranties, and
> > confers no
> > > > > rights."
> > > > > jhmiller@.online.microsoft.com
> > > > >
> > > > > "leehaak" <leehaak@.discussions.microsoft.com> wrote in message
> > > > > news:FD9198BC-F8FE-4A93-B7F5-73BDD99FBB7D@.microsoft.com...
> > > > > > Is there some easy way to prevent a report from generating once
the
> > last
> > > > > > non-defaulted parameter is selected. This behavior is driving
> > everyone
> > > > > > nuts.
> > > > > > I have a whole series of reports where a user will select a
company,
> > and
> > > > > > then select a month, which is defaulted to the previous month
but
> > can be
> > > > > > changed. Because it is defaulted, the report runs as soon as a
> > company is
> > > > > > picked, and the user never gets the chance to change the default
> > month.
> > > > > > It
> > > > > > needs to wait for me to finish selecting and confirming all
> > parameters.
> > > > >
> > > > >
> > > > >
> >
> >
> >

No comments:

Post a Comment