Solved

Use DataSet as datasource for Crystal Reports in C# 2005

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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 …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

821 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