May 10, 2006 at 11:21 pm
Hi Anyone,
Then I created a report with report wizard, in order to get through the wizard I put
EXEC "MyStoreProc" with hard code parameter then I modify again in DATA TAB.
I change the query type from a text command to a stored procedure
and remove the word EXEC and any hard-coded parameter values following the SP name.
I click on the Execute (!) button and see a window prompting me to enter parameter values. I have tried a few values in here to make sure it works. Everything is OK
Then my last step is connect Report parameters to Query parameters. I created dataset so user can choose the para value from the query list. I put the default value is null.
What should I do?
Which part I do wrong?
Below is my store proc
(@Branch varchar(10)=null, @DivCode varchar(10)=null,
@HACCProj varchar(10)=null, @PrimZone varchar(10)=null)
AS
SELECT
CNo,CName,[Search Name],CFName
FROM 'My View"
WHERE
(@branch is null or Branch = @branch)
AND (@DivCode is null or DivCode = @DivCode)
AND (@HACCProj is null or HACCProj = @HACCProj)
AND (@PrimZone is null or PrimZone = @PrimZone)
Thanks,
Susan
May 11, 2006 at 12:56 am
While defining the report parameters set allow nulls to true and default value to NULL. Also check if you have bound your dataset stored proc input parameters to your report paramters properly under parameters tab.
Prasad Bhogadi
www.inforaise.com
May 11, 2006 at 8:07 pm
Thanks Prasad.
Ok I have set:
when I preview it. The other 3 params have a Null checkbox so if I untick this box it will allow me to fill it.
However I want this param also have a dropdown list instead of manually typing
If I use ‘Available value from query’. It will go back to my previous problem that this 2nd params become a mandatory field.
How do I do this?
Thanks again
May 12, 2006 at 4:18 am
Give like this
for listing the values in the dataset
Select null your_column from your_table
union
select yourcolumn your_column from your_table
it wont ask for null
as now null is the part of the data provided by the query
Thank you
Raj Deep.A
May 15, 2006 at 4:27 pm
Thanks so much.
It works fine now.
actually there is a walkthrough for this for dynamic query listing
cheers,
S
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply