I'm having a problem using an indexed view in a stored procedure for a crystal report. My stored procedure is basically pulling data from a table function that uses an indexed view.
MyStoredProc basically looks like this:
SELECT field1, field2, field3, .....
FROM MyTableFunction
MyTableFunction basically looks like this:
SELECT field1, field2, field3
FROM MyIndexedView WITH (NOEXPAND).
Now when I try to run the report in Crystal that uses MyStoredProc, I get a "No rowset returned.." error.
I know it has to do with the WITH (NOEXPAND) hint because when I comment it out, my reports works.
I really need to implement using this indexed view for my reporting so is there anyone that can tell me what's going on here?
Any help/suggestions will be greatly appreciated!
Thanks