Click here to Skip to main content
15,888,018 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello, I am doing an application which will print barcodes but I am struggling with the crystal report using MySql... I did everything which must be done to connect to mysql , create dataset connect it to Mysql etc but I can't show the values of the table in the report...
Need some help
Thank you.

What I have tried:

I have used Dot Connect Mysql to connect it to the Dataset and I can see the values but not in the report...
Posted
Updated 10-Oct-16 23:34pm

Hi there,

Please refer below link for step by step implementation,If you find any query then let me know.



[^]

http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-stepbystep.htm[^]

Thanks
 
Share this answer
 
Comments
TatsuSheva 7-Oct-16 6:18am    
There is no picture there... Did you try it before ?
Paresh_Kapuriya 7-Oct-16 6:24am    
yes. i have tried it.. and also implented same thing.

which verions of visual studion and crystal report are you using ?
TatsuSheva 7-Oct-16 6:59am    
Visual Studio: VS Community 2015 , crystal report 13.
Is there a way to clear the report ? for example I have a textbox and in the textbox I put the numbers of copies of the barcode, so when I put two copies of the barecode, and when I change the number of copies it must clear the report and put the new copies...
Here is my code...
C#
for (int i = 0; i < numericUpDown2.Value; i++)
            {               
                cmd = new MySqlCommand("SELECT ChaineEAN, PrixVente FROM tb_produits WHERE Designation ='" + CMB_Designation.Text+ "'", MyConnexion);
                MySqlDataAdapter s2 = new MySqlDataAdapter(cmd);

                s2.Fill(ds1, "tb_produits");

                ds1.WriteXmlSchema((System.IO.Path.GetTempPath() + "\\Tucano_DataBaseConnect.xsd"));



                crystal.Load(@"C:...\CrystalReportEAN.rpt");


                crystal.SetDataSource(ds1);

                CrystalReport.ReportSource = crystal;

And is there a way to find the path to the crystal report ? I don't want to put C:..... in the load.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900