Crystal Report Through StorecdProcedure ?
hi,
i am using Visual Studio .Net 2003 C#. I am facing a problem while show a report in reportviewer (Crystal Report Viewer).
I created a report R.rpt using stored procedure (SP).
Stored Procedure is like this:
CREATE PROCEDURE usp_rpt_SP
@uid int,
@oid nvarchar(200),
@uoid int,
@STATUS int OUT,
@reccnt int OUT
AS
BEGIN
-----
-----
-----
END
This will return a virtual table. My R.rpt is using this virtual table. My report is showing a result properly in crystal report. See my R.rpt report is showing 3 parameter fields (@uid, @oid, and @uoid).
I am calling this report via c# code, report viewer is listing no records (means i'm looking only titles on report).
I am passing all three parameters like this in my C# code:
reportDocument = new ReportDocument();
reportDocument.Load(Server.MapPath(ViewState["reportname"].ToString()));
reportDocument.Refresh();
setreportconnection();
reportDocument.SetParameterValue("@uid", (int.Parse(uid)));
reportDocument.SetParameterValue("@oid",(System.St ring)owise);
reportDocument.SetParameterValue("@uoid", (int.Parse(uoid)));
crrptviewer.ReportSource = reportDocument;
crrptviewer.RefreshReport();
This will not showing any runtime error, but on report viewer i am not showing empty report. Why?
Please give me a suggestion how i can do to bring records?
It is urgent.
Thanx on advance.
Gopalakrishnan
|