Home All Groups Group Topic Archive Search About

Print rows from DataGrid matching criteria

Author
18 Apr 2006 4:45 PM
littleccguy
(new to programming/student)
I am using VS.Net 2003 (visual basic) on Windows XP with SQL Server
2005 Express.

I have one table in the SQL database that i brought into VS using
DataGrid.  I am able to view, edit and delete rows just fine.


I would like to be able to pull/print rows where certian columns value
meets a certian criteria.  The column values are just integers.


Example:  Print all rows to rtxtPrintText where column 2 contains the
value 25.


I know this may sound like basic stuff to a lot of you.  Like I said,
I'm just learning.


Thanks

Author
18 Apr 2006 5:03 PM
Chris
littleccguy wrote:
Show quoteHide quote
> (new to programming/student)
> I am using VS.Net 2003 (visual basic) on Windows XP with SQL Server
> 2005 Express.
>
> I have one table in the SQL database that i brought into VS using
> DataGrid.  I am able to view, edit and delete rows just fine.
>
>
> I would like to be able to pull/print rows where certian columns value
> meets a certian criteria.  The column values are just integers.
>
>
> Example:  Print all rows to rtxtPrintText where column 2 contains the
> value 25.
>
>
> I know this may sound like basic stuff to a lot of you.  Like I said,
> I'm just learning.
>
>
> Thanks
>

You can do this with Crystal Reports but that depends on what version of
VS.Net you have.

Chris
Author
18 Apr 2006 6:42 PM
littleccguy
I have Crystal, so I was able to do that - thanks.

What if I want to work with the results more in VB.Net before i print.
Say i want to pull each record and then do a second criteria search
within that, or maybe put each record into an array(if that is even
possible.)  I'm just trying to practice and understand what I might and
might not be able to do.

Thanks for the quick response Chris