Answered by:
How to use Crystal Report in Visual Studio 2013?

Question
-
Hello,
How to use Crystal Report to create a report from MySQL database in Visual Studio 2013? As Crystal Report is not a default report viewer in Visual Studio 2013, how can I integrate it with Visual Studio 2013?
- Thanks
- Moved by CoolDadTx Friday, August 14, 2015 6:17 PM Wrong forums
Friday, August 14, 2015 6:21 AM
Answers
-
You download and install it from SAP.
http://www.sap.com/solution/sme/software/analytics/crystal-visual-studio/index.html
It's then a matter of adding the correct references to the dll from that download to your project.
It uses odbc to connect to a database by default.
I usually create a temporary table or stored procedure to build a report against.
It needs something to give it a list of fields and types to work on.
I don't use odbc live because it's inefficient and a nuisance to maintain the dsn etc.
At run time I go get the data and provide it as a datatable or collection for the report.
rd = new ReportDocument(); rd.Load("whatever.rpt")); rd.SetDataSource(dt); rd.Refresh();
Where dt is a datatable with the same fields of the same type as the report was built against.
It can actually have more fields in it, all the report cares about is that when it goes and looks for a field it expects to find, it's there and it's a matching type.
Friday, August 14, 2015 7:43 AM -
These forums are for MS products. Questions related to Crystal Reports should be posted in their forums (http://scn.sap.com/community/crystal-reports).Friday, August 14, 2015 6:17 PM
All replies
-
You download and install it from SAP.
http://www.sap.com/solution/sme/software/analytics/crystal-visual-studio/index.html
It's then a matter of adding the correct references to the dll from that download to your project.
It uses odbc to connect to a database by default.
I usually create a temporary table or stored procedure to build a report against.
It needs something to give it a list of fields and types to work on.
I don't use odbc live because it's inefficient and a nuisance to maintain the dsn etc.
At run time I go get the data and provide it as a datatable or collection for the report.
rd = new ReportDocument(); rd.Load("whatever.rpt")); rd.SetDataSource(dt); rd.Refresh();
Where dt is a datatable with the same fields of the same type as the report was built against.
It can actually have more fields in it, all the report cares about is that when it goes and looks for a field it expects to find, it's there and it's a matching type.
Friday, August 14, 2015 7:43 AM -
These forums are for MS products. Questions related to Crystal Reports should be posted in their forums (http://scn.sap.com/community/crystal-reports).Friday, August 14, 2015 6:17 PM