Does anyone know if it is possible to pass a formula or Crystal special field to a stored procedure? I'm using BOXI and have a table called Security with UserId along with another information I can use for filtering. I have a stored procedure:
begin
create table #GetDivision (@UserId Varchar(15))
insert into #GetDivision
SELECT Division FROM Security
WHERE [User] = @UserId
select Division from #GetDivision
end
I'd like to join the result (Division) to the source data. The stored procedure runs fine when say I run it from Query Analyzer, however from Crystal it is prompting the user for their User Id to pass into the parameter. It does work when I type in a User Id, but obviously that defeats the whole idea because the user could type in anything. I'd like to pass CurrentCEUserName (or a formula that equals CurrentCEUserName) to this stored procedure.
I know Business Views is an option but we're hoping to implement this without going to Business Views just yet as that is a massive project.
Any other ideas would be appreciated!
begin
create table #GetDivision (@UserId Varchar(15))
insert into #GetDivision
SELECT Division FROM Security
WHERE [User] = @UserId
select Division from #GetDivision
end
I'd like to join the result (Division) to the source data. The stored procedure runs fine when say I run it from Query Analyzer, however from Crystal it is prompting the user for their User Id to pass into the parameter. It does work when I type in a User Id, but obviously that defeats the whole idea because the user could type in anything. I'd like to pass CurrentCEUserName (or a formula that equals CurrentCEUserName) to this stored procedure.
I know Business Views is an option but we're hoping to implement this without going to Business Views just yet as that is a massive project.
Any other ideas would be appreciated!