I'm using VB.net to create a Crystal Report and using DataGridView to show the data before print it out by Crystal Report. But now I want to:
- Add another column into the DataGridView named: "Print/Not Print"
- Using the value we add permanently into the "Print/Not Print" column as a variable to Print or to Not Print the row which contain it. In this case I prefer "1 = Print" and "0 = Not Print".
- After we change the DataGridView, the databsae in my SQL server still remains the same.
Please help me with this problem!

you need to add one more column to table Print as boolean and When user selects or unselects the data from Gridview u need to update those columns in DB and Get the data where Print=1 in crystal report.

In SQL server you first add column of type boolean.
U wrote code for fetching the vaules from database and bind to gird?

Then where you want to save the records which is used in reports and need to print?

Let's check things again: I want to have a Crystal Report which print what being shown in DataGridView; and on DataGridView there is a column which enables us to pick Print/Not Print the row contains it - eg: A blank column to insert variable, numbers, etc. The variables here should be 0, 1. Would that be possible?

You are making this harder than it needs to be.
You can create a table to store temporarily what needs to be printed and read that table from CR.
Or if you've got a unique key (and not a million records) I believe it's possible to pass the IDs as criteria to CR.

This article has been dead for over six months. Start a new discussion instead.