Solved

Use DataSet as datasource for Crystal Reports in C# 2005

Posted on 2007-11-18
5
4,339 Views
Last Modified: 2013-11-26
Hello,

I am getting close to the deployment stage with a C# project and have run into a few snags. My project has many Crystal reports which I connect to sql Sprocs using OLEDB for SQL SERVER. This works well once everything is connected but...

Problem:
If I want to change the database location to a new server it can take a couple of hours re-connecting each crystal report in my project to the new server with OLEDB in Field explorer. It is a MAJOR headache with the reports with subreports and passed params. This NEVER seems to work well.

I know there must be an easier way to connect Crystal Reports to a datasource in order to achieve a more "seamless" transition to a new datasource (or the same stored procedure on a different server - my case).

I thought that creating a dataset in my project which harbors the correct stored procedure might be a solution. So  I created a datset , added the appropriate stored procedure and connected the new dataset as the datasource for the crystal reports.

I am having trouble getting the dataset to work.

1. Crystal Reports does not recognize the SPROC's parameters and it gives erroneous values for some of the fields.

Does anyone know what may be going on here??

Thanks!
0
Comment
Question by:Saxitalis
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:habibb
ID: 20310544
are you dynamicaly passing the connection information to reports or at designe time?
for reports designed at Stored procedures need to pass parameters with "@" sign.

My recomendation is designing of reports from stored procedure slows the reports.
0
 

Author Comment

by:Saxitalis
ID: 20313913
I am passing the connection at design time (if I am understanding what you mean) to the stored prcedures and yes I have noticed that the reports can be slow. It works fine other than the small performance issue.

What do you mean by passing the connection information dynamically?

Thanks!

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 20317394
How about using a dataste from the program and passing it to the report
http://www.emoreau.com/Entries/Articles/2006/09/Feeding-Crystal-Reports-from-your-application.aspx

mlmcc
0
 

Author Comment

by:Saxitalis
ID: 20317657
Thanks for the link! I have been looking for something similar with C# examples. I don't know VB at all. For some reason this type of example seems to be VB prevelant...
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 20317689
Agree.  There aren't many out there.

Here are some.  Not sure if there is one that fits the bill
http://support.businessobjects.com/communityCS/FilesAndUpdates/csharp_web_samples.exe.asp

mlmcc
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now