Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Print EXISTING Crystal Report based on stored proc Post Reply Post New Topic
Author Message
Rulex
Newbie
Newbie


Joined: 03 Mar 2009
Location: Canada
Online Status: Offline
Posts: 4
Quote Rulex Replybullet Topic: Print EXISTING Crystal Report based on stored proc
    Posted: 23 Mar 2009 at 8:37am

Hello everybody,

My task is to run EXISTING Crystal Report from some application.  I have already working solution, which uses Crystal Report SDK, but on some reason I need to be able to run it using C#.  These EXISTING Crystal Reports are based on stored procedures and all stored procedures have one parameter.  After I add all required info (logon info, parameter info) into ReportDocument class, assign it as a source to CrystalReportViewer and run it, nothing comes out, I mean print/preview resulting in just completely white sheet of paper.  There are no complaints regarding logon info or parameter not set, just nothing comes out.  If I’m using same C# code to run the report, which is not based on stored procedure, my C#code works fine.  Running of the SQL profiler provides some info, which may give some hints for knowledgeable person J.  Here is the info I can see running the profiler:

 

Working Crystal SDK version produces the following line in SQL Profiler: (TextData columnt)

 

exec sp_someReportBasedStoredProcedure ‘paramValue’

 

If I’m calling same report from C#, I’m getting the following line in profiler:

 

exec “sp_someReportBasedStoredProcedure”

 

One can notice two major differences:

 in C# case, which is not working, the name of the stored procedure is in double quotes, and the parameter value is missing.

 

If somebody can help, but will require my code (how I’m setting logon and parameter info), I’ll be glad to provide it in my next post.

 

Thanks in advance

 

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.