Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 12th, 2007, 06:27 AM
Registered User
 
Join Date: Jan 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using SP in Crystal Report with c#

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












Similar Threads
Thread Thread Starter Forum Replies Last Post
Report Services Wont execute My SP desireemm Reporting Services 1 December 21st, 2007 03:46 AM
VS 2002 Crystal Report opens Seagate crystal 8 tusis_1 Crystal Reports 0 May 12th, 2007 11:45 AM
SP to report all databases with Last backup Hal Levy SQL Server 2000 4 May 17th, 2005 10:32 AM
Pass Crystal parameter to a SQL sp cphspain Crystal Reports 5 January 27th, 2005 07:03 AM
Can a SP run another SP as sa? dbradley SQL Server 2000 0 July 17th, 2003 08:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.