views:

2012

answers:

1

Hi,

I am able to create a crystal report for a single table call from C#.\ But I have to call generic stored procedure or a single stored procedure. How can I do this?

  1. Do we can acheive this using XML files also? I mean .. the details abt which table the SP is referring to and if I want to dump the data to excel sheet, which cells the data needs to be inserted.

I have XML for my tables also. Now I hav to call stored procedure in crystal reports.

Please suggest me doin this

Thank you, Ramm

+1  A: 

I'm not sure that I totally understand the question so I'll answer it the best I can.

Try this link to help you get started on what you are looking for. http://www.beansoftware.com/ASP.NET-Tutorials/Using-Crystal-Reports.aspx

You can report off of xml data if needed by using the XML connection in the datasources screen.

Edit: If are just trying to connect the report to an sp then you should be able to do it using the OLE DB ADO connector and SQL Server provider. Once connected you should be able to navigate down to the stored procedures and add the one you want as a selected table. Then simply add the fields to the report detail section and format it so that it exports properly to Excel. Hope this helps.

Dusty
Hi Dusty,Thanks for the link.Currently with the help of XML files ( this xml has the data relating to which table it has to refer for the data and also the range of excel cells to which this data has to be written)But I have done this using .net windows app.. As, currently I am new to crystal reports and I need stored procedures to call the db and get the data from db and dump into excel. )I guess I made some sense in explaining this. All I have to do is no HARDCODING anything in the code for the data from db. all i have to do is to get usign SP's and XML'sThanksRamm
Aditya
I've edited my post so that maybe it helps a little more.
Dusty