In this article i will show you how to create a crystal report that based on a custom SQL statement; you have to follow these steps after creating a new project and a sample database :
- Add a data set item.
- Customize the data set to fit the data that will be retrieved from the database.
- Add a crystal reports item and link it to the previous added data set.
- Add a crystal report viewer component to the form which you want to view the report and link it to the previous added crystal report.
- Find a way to program a function that returns a data table, and be sure that the columns names and the columns data types in the data table are same as these in the data set .
- Bind the data table with the data set, and the crystal report viewer with a report document by using this code
DataSet1 ds = new DataSet1();
ds.Tables[0].Merge(datattable1);
rpt.Load(/*CrystalReport1.rpt path*/);
rpt.SetDataSource(ds);
crystalReportViewer1.ReportSource = rpt;
And for more details watch this video
What a lovely looking you are! I love this
ReplyDeleteCrystal Custom
Very informative blog. Thanks
ReplyDeletePromo sunglasses
ReplyDeleteSun damage may strike at any season, whether it’s summer or winter, so it’s wisest to always wear sunglasses whenever we go out. It makes for an awesome fashion statement too!
Crystal Custom
Promotional Sunglasses
Promo Sunglasses
Personalized sunglasses
Customized sunglasses
Imprint your logo and it will be seen reflecting sunlight all day long. But remember, wearing your sunglasses at night is now a growing trend, so you'll get exposure even after the sun has set.
ReplyDeletePromo sunglasses