Click here to Skip to main content
15,914,820 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi How to create a crystal report dynamically from datagridview data.
I have a database and a datagridview,the datagridview will fetch the data from database and it will show in the datagridview.After that i want to create a crystal report from the datagridview data but a point is there later whenever we make some changes to database then the reflected data should come in the datagridview and the crystal report should generate as per the updated data.Please help me..
Posted

1 solution

2 things:
1. It's complex to create and design a crystal report as per grid layout - a good project in itself
2. Why have a datagrid dependancy if you want a data driven crystal report?

Now,
Option 1: Export your grid with data as is in reports - excel, pdf, image etc:
Exporting a DataGridView to an Excel/PDF/image file by using Reporting Services report generation[^]
Exporting GridView to PDF Document using ITextSharp Library[^]

Option 2: Design a crystal report as you want and then call that report whenever you want to view it (i.e. when you want to show data of gridview in report)
C# Crystal Reports step by step [^]
Introductions to Crystal Reports in .NET[^]
 
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