Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is best data source to use?

Status
Not open for further replies.

newtomysql

Technical User
Apr 11, 2001
96
MY
Dear All,
I am using crystal report with a C# application. So before that I prepare a dataset as the datasource and in it I create 2 datatable one is called dtStockMovementReport and dtStockMovementDetailReport respectively. In both my datatable I got my productID as a column which infact links both my tables. The reason I break them is because some of columns need not to be repeated in the dtStockMovementDetailReport which I feel will be a waste. But the unfortunate think is that once my report is loaded from my windowsform is stays there for few minutes before the data gets loaded. So what is the problem is it due to the relationship or link between the datatables or shall I just use one datatable is enough?
 
How many records are in your tables when you try to view the report?

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Dear Dell,
The data in dtStockMovementReport should less than 2000 lines only but the data in dtStockMovementDetailReport should be few thousand and the link will be productID. Thanks.
 
There are a couple of things going on.

1. The first time that you run a report within a period of time, it takes a while to load the Crystal assemblies so that it can process it. Subsequent report runs don't have this overhead and AFAIK, there's nothing you can do to shorten this.

2. Crystal has to process all of your records in memory to get the data ordered and grouped correctly - there is no db server that can handle this part of generating the report. Because you have several thousand records, this does take some processing time.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Dear Dell,
What is AFAIK? So I guess about the thousand of data I have no choice either to wait or do you think a better proecesses can do a better job? Thanks.
 
A s
F ar
A s
I
K now

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Is there a specific reason why you're reporting off of an in memory dataset? What type of database are you using? Is it possible to report directly off of the database and let it handle sorting and grouping the records?

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Dear Dell,
I am using mysql with C#. I guess the problem why I am using this method is I dont find any direct method to pump into crystal report via C#. Do you have any idea please ? Thanks.
 
Is there a particular reason why you need to get data to the report from the application instead of directly from the database?

For example, I have a couple of reports where I have to use an in memory dataset because the data is coming from the BusinessObjects CMS database which can't be queried directly. So I use the SDK and their query language to get the data into a dataset so that I can run a report. We also have two different methods of generating reports that are connected to the database - for complicated reports we run an application that processes data and puts it into one or two de-normalized "report" tables that the report reads the data from and for easier reports we connect directly to the database tables.

So, your report could read directly from your data tables or your application could put the data into two new tables in the database and the report could read from there.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Dear Dell,
I dont know how to get the data directly from mysql to crystal report in C#. So my problem was I was following based on article on the internet.
 
How do you connect to MySQL in your application? Are you using an ODBC connection or something else?

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Dear Dell,
I connecting to mysql via their own connector called as mysql connector net v.5.2.3. This is a kind of driver to connect to mysql via C#.
 
For Crystal, I would first try to use an OLE DB connection. If the database structure is the same or similar to your database then in your existing report, go to the Database menu and select "Set Datasource Location", in the bottom panel double-click on "Create New Connection" and then select "OLE DB (ADO)". You'll get a window that shows all of the OLE DB providers that are available. If MySQL is there, select it. If it's not, you'll either have to create an ODBC DSN for your database and connect to it, or find an OLE DB provider for MySQL (I don't work with MySQL, so I don't know if one is available.) Then select the database or tables on the top and the corresponding ones on the bottom and click on the "Update" button.

If the structures are not similar, you may be better off creating a new report. In the report creation wizard, you will have the option to select a data source - follow the instructions above for creating a new connection.

-Dell



A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top