Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 The property ‘DefaultValue’ of report parameter ‘s

Author  Topic 

karenros
Starting Member

37 Posts

Posted - 2007-08-02 : 16:48:39
Hi,

I have declared an internal paramter and given the default non queried value as



select @split = case when max(rowid)%2 = 1 then (max(rowid)/2) + 1 else max(rowid)/2 end





and when i run it i am getting the error -- The property 'DefaultValue' of report parameter split doesnt have the expected type. What should i do to solve it. Any help is appreciated.



Regards,

Karen

JoeNak
Constraint Violating Yak Guru

292 Posts

Posted - 2007-08-13 : 16:29:08
Try this:

select @split = case when max(rowid)%2 = 1 then ((max(rowid) + 1)/2) else max(rowid)/2 end

edit: typo
Go to Top of Page

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-08-13 : 17:27:49
I am assuming this is in reference to your earlier question about splitting the data into 2 tables.
I actually created report project just to try out your issue. Here's what I did.

(1) Layout your report with 2 tables
(2) In your data region:

declare @spid int

CREATE TABLE #TmpResults(rowid int IDENTITY, PlanId int, PlanName varchar(200), InvestmentName varchar(500), InvestmentType char(1),
IsPortfolioFundOnly bit, InvestmentId int) Declare @PlanId int
INSERT INTO #TmpResults EXEC ICCStatements..rpt_SelectInvestments @PlanId

Select @spid = case when max(rowid)%2 = 1 then Cast ((max(rowid)/2) + 1 as Integer) else Cast (max(rowid)/2 as Integer) end
From #TmpResults


select *, @spid as splitvalue
from TmpResults


so your result set will have the additional column SplitValue.
(3) Create a parameter of type "Internal" , data type int, "From query" and choose the dataset and SplitValue as the label and value.
(4) In your Layout, right click on the first table and go to "Filters". Create a filter with =Fields!rowid.Value <= =Parameters!SplitId.Value (where splidid is the name of the internal parameter we created).
(5) Similarly, right click on second table and create another filter with =Fields!rowid.Value > =Parameters!SplitId.Value




Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page
   

- Advertisement -