Solved

Use DataSet as datasource for Crystal Reports in C# 2005

Posted on 2007-11-18
5
4,342 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Help 27 57
Help with preventing selection from a combobox 11 34
abstract class C# 1 31
Need syntax help building hyperlink 2 27
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 …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

830 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