Last post Jul 28, 2011 03:11 AM by bryanpaling
Jul 25, 2011 03:21 AM|bryanpaling|LINK
Hope you can help me on this. I have a Crystal Report File and I want to know what's the name of the Stored Procedure that is being used on the Report. How can I retrieve it through the code behind.
C# code would be better since I do coding in c#.
Jul 25, 2011 06:33 AM|asurani15|LINK
You probably can retrieve the binding source by using the following line of code.
Check it if it helps!!!
Jul 25, 2011 12:03 PM|necro_mancer|LINK
I do not think that you can retrieve the stored proc directly via the Crystal Report. I am open to other ideas!
Jul 25, 2011 09:58 PM|bryanpaling|LINK
that was the first thing that comes to my mind... guys, any idea? is it possible?
Jul 28, 2011 01:54 AM|morefays|LINK
You get the stored procedure name through coding from "oCRTables[i].Location" but you should write complete database logon information.
CrystalDecisions.CrystalReports.Engine.Database oCRDb = rpt.Database; // rpt means your reportdocument object before using this you will set the report path and connection
CrystalDecisions.CrystalReports.Engine.Tables oCRTables = oCRDb.Tables;
CrystalDecisions.CrystalReports.Engine.Table oCRTable = default(CrystalDecisions.CrystalReports.Engine.Table);
string = oCRTables[i].Location;
for complete detail check this link.
Jul 28, 2011 03:11 AM|bryanpaling|LINK
Thank you Farrukh! It helps! :)