Click here to Skip to main content
16,006,355 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Some one help me please to prepare crystal report in vb.net and sql server database table from datagridview control checkd value (i mean using different values)
i will be very appreciate

thank you
bhojendra
Posted
Comments
radix3 21-May-10 9:16am    
you mean that u want the selected data from the grid view to appear onto your crystal report which you will be selecting by a checkbox is that what you mean

1 solution

You can use datatable to store your values and if you are using checkbox or something to select row from girdview then you can make query on datatable and store that reuslt into dataview.

For example.

This is your database value which you can store in datatable.If selected column is not in database you can add column in datatbale for fetching selected records from grid. Assign this data table to your gridview.


ID Name Age Selected
1 A 21 False
2 B 64 True
3 c 55 True
4 D 48 False

Now you can make query on datatable and store result into dataview.
Code for that
Dim dv as new dataview (datatble("Selected = True"),Sort by column, DataViewRowState.CurrentRows)

Now assign this dataview to your Crystal Report and check it.
 
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