| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Printing Database Field on Multiple Columns
Dear Friends:
Is there any way exists, that may I print a database Fields on Multiple columns, like, I have a paper of bigger width approx 15", and I have only three fields i.e. PNo, Type, Amount to print to that Paper. The Type fields has certain values, like when the Type changes, the Fields may be printed on teh next part of the Paper. As I estimate, three protion can be printed on my page, but how to accomodate then, don't know, please help me. |
|
#2
|
|||
|
|||
|
Re: Printing Database Field on Multiple Columns
I don't know what type of data source you have, but if you are using a relational database you could implement a stored procedure. First read the data into a cursor and based on some condition make the split to your final data structure returned by another cursor.
e.g. Implement a counter that recieves a value (1,2,3) when looping your cursor if counter = 1 Then val1a := cursor_field1 val1b := cursor_field2 val1c := cursor_field3 if counter = 2 Then val2a := cursor_field1 val2b := cursor_field2 val2c := cursor_field3 if counter = 3 Then val3a := cursor_field1 val3b := cursor_field2 val3c := cursor_field3 Set counter := 1 and write (val1a, val1b, val1c,val2a, val2b, val2c,val3a, val3b, val3c) to your return cursor. - Jukka |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|