and now, ladies and gentlemen, another great news!
you can use stored procedures in the universe in XI R2! (of course with dynamic SQL, temp tables and other powerfull sql features)
how to proceed:
just create derived table in the universe with the following SQL:
SELECT * FROM OPENROWSET('SQLNCLI', 'Server=localhost;Trusted_Connection=yes','EXEC sp_myReport')
(oops! forgot to tell you it will work only with MS SQL 2000 or higher, unless your DBMS has something similar to OPENROWSET)
that’s it, guys! now you can use it like a normal table including joining it to other tables or stored procedures
I believe, this time there are no tricks - both derived tables and OPENROWSET are supported and well documented.
just a few further guidlines:
- if you get connection error - try to change provider to OLEDB, or Trusted_Connection to uid=login;pwd=P@$$w0rd, or localhost to your server/instance name
- if you get error ‘No column or data to fetch’ change 2nd parameter of OPENROWSET to following:
'SET FMTONLY OFF;EXEC sp_myReport'
there are other ways to fix it, but it’s just enough to start with
3. last and the most important: to use prompts change the last parameter of OPENROWSET to following:
'EXEC sp_myReport '@Prompt('prompt','A',,mono,free)''
Well, if you say XI 3.0 supports SPs natively, yes, but you can’t join it to other table or stored procedure and use them together in a single query, so, even in XI 3.0 I’ll stay with my approach.
Enjoy!
Dmitry Biryukov (BOB member since 2006-10-15)