Crystal reports error using indexed views

  • 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

     

     

     

  • This was removed by the editor as SPAM

  • Why must you use an indexed view?  We use stored procedures and SQL statements to return recordsets to unbound Crystal Reports.  As long as the SQL queries are well written, they take advantage of existing indexes.

    That said, I don't know why an indexed view wouldn't necessarily work, but except for some unusual circumstances, using an SP is better than using a view.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply