Monday, March 12, 2012

RS two seperate queries within a report

Hi all.
I was wondering if I have a report andI want to prompt the user to
choose say current inventory or all inventory...Can i do that within a
parameter? The problem I'm having is that if the user chooses current
inventory it runs a query but if the user chooses all inventory it
would have to run a seperate query. Is there any way to do this in RS?
Thanks in advance.
MissyModify you query a little bit will let the user select either all inventory
or a single inventory
Let's say you have 2 datasets:
Dataset Inventory
SELECT * FROM your_table where prod = @.prod OR @.prod = 'All'
and
Dataset Prod
SELECT 'ALL' as Prod UNION
SELECT Prod from your_table -- products list
while in Layout tab change Report Parameters so the Prod parameter will get
result from dataset Prod.
"aggiechick717" <mhoppe@.chkenergy.com> wrote in message
news:1159456164.936789.137990@.m7g2000cwm.googlegroups.com...
> Hi all.
> I was wondering if I have a report andI want to prompt the user to
> choose say current inventory or all inventory...Can i do that within a
> parameter? The problem I'm having is that if the user chooses current
> inventory it runs a query but if the user chooses all inventory it
> would have to run a seperate query. Is there any way to do this in RS?
>
> Thanks in advance.
> Missy
>

No comments:

Post a Comment