473,396 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help Creating different mailing labels on a page using vb.net tia Sal

sal
Greets, all

I'm trying to create different multiple mailing type labels on a page
reading from an untyped dataset anyone have any ideas on how I can get
this done without crystal reports a plan text file would be fine.

My untyped dataset looks like this (comma denotes next cell in untyped
dataset)
Name,Address,Age

I would like to get the output text file to look like this with each
name,address,phone being different

Name Name Name
Address Address Address
Age Age Age
Example of untyped dataset:
John,23 noway, 12
Sally,12 yesway, 34
Suzzy, 43 okway, 21
Example of Output I would like to get in text file:

John Sally Suzzy
23 noway 12 yesway 43 okway
12 34 21

tia
PS I'm using vb.net
Sal
Nov 21 '05 #1
2 1503
Sal

I thought I had made this sample already often however I could not find it
on Google. It is just rotating the datatable

Here a sample I made again this morning in my opinion exactly to your
problem description.

\\\Needs only a project with a datagrid on a form
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim ds As New DataSet
Dim dt1 As New DataTable("Original")
ds.Tables.Add(dt1)
dt1.Columns.Add("Name")
dt1.Columns.Add("Adress")
dt1.Columns.Add("Age")
For i As Integer = 0 To 2
dt1.Rows.Add(dt1.NewRow)
Next
dt1.Rows(0).ItemArray = New Object() {"John", "23 noway", 12}
dt1.Rows(1).ItemArray = New Object() {"Sally", "12 yesway", 34}
dt1.Rows(2).ItemArray = New Object() {"Suzzy", "43 okway", 21}
Dim dt2 As New DataTable("Reflection")
ds.Tables.Add(dt2)
For i As Integer = 0 To ds.Tables("Original").Rows.Count - 1
dt2.Columns.Add(i.ToString)
Next
For i As Integer = 0 To ds.Tables("Original").Rows.Count - 1
Dim dr As DataRow = ds.Tables("Reflection").NewRow
For y As Integer = 0 To ds.Tables("Original").Columns.Count - 1
dr(y) = ds.Tables("Original").Rows(y).Item(i)
Next
ds.Tables("Reflection").Rows.Add(dr)
Next
DataGrid1.DataSource = ds.Tables("Reflection")
End Sub
///

I hope this helps a little bit?

Cor
"sal" <sa*@spp.net>
Greets, all

I'm trying to create different multiple mailing type labels on a page
reading from an untyped dataset anyone have any ideas on how I can get
this done without crystal reports a plan text file would be fine.

My untyped dataset looks like this (comma denotes next cell in untyped
dataset)
Name,Address,Age

I would like to get the output text file to look like this with each
name,address,phone being different

Name Name Name
Address Address Address
Age Age Age
Example of untyped dataset:
John,23 noway, 12
Sally,12 yesway, 34
Suzzy, 43 okway, 21
Example of Output I would like to get in text file:

John Sally Suzzy
23 noway 12 yesway 43 okway
12 34 21

tia
PS I'm using vb.net
Sal

Nov 21 '05 #2
sal
"Cor Ligthert" <no************@planet.nl> wrote in
news:OE**************@TK2MSFTNGP14.phx.gbl:
Sal

I thought I had made this sample already often however I could not
find it on Google. It is just rotating the datatable

Here a sample I made again this morning in my opinion exactly to your
problem description.

\\\Needs only a project with a datagrid on a form
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim ds As New DataSet
Dim dt1 As New DataTable("Original")
ds.Tables.Add(dt1)
dt1.Columns.Add("Name")
dt1.Columns.Add("Adress")
dt1.Columns.Add("Age")
For i As Integer = 0 To 2
dt1.Rows.Add(dt1.NewRow)
Next
dt1.Rows(0).ItemArray = New Object() {"John", "23 noway", 12}
dt1.Rows(1).ItemArray = New Object() {"Sally", "12 yesway",
34} dt1.Rows(2).ItemArray = New Object() {"Suzzy", "43 okway",
21} Dim dt2 As New DataTable("Reflection")
ds.Tables.Add(dt2)
For i As Integer = 0 To ds.Tables("Original").Rows.Count - 1
dt2.Columns.Add(i.ToString)
Next
For i As Integer = 0 To ds.Tables("Original").Rows.Count - 1
Dim dr As DataRow = ds.Tables("Reflection").NewRow
For y As Integer = 0 To
ds.Tables("Original").Columns.Count - 1
dr(y) = ds.Tables("Original").Rows(y).Item(i)
Next
ds.Tables("Reflection").Rows.Add(dr)
Next
DataGrid1.DataSource = ds.Tables("Reflection")
End Sub
///

I hope this helps a little bit?

Cor
"sal" <sa*@spp.net>
Greets, all

I'm trying to create different multiple mailing type labels on a page
reading from an untyped dataset anyone have any ideas on how I can
get this done without crystal reports a plan text file would be fine.

My untyped dataset looks like this (comma denotes next cell in
untyped dataset)
Name,Address,Age

I would like to get the output text file to look like this with each
name,address,phone being different

Name Name Name
Address Address Address
Age Age Age
Example of untyped dataset:
John,23 noway, 12
Sally,12 yesway, 34
Suzzy, 43 okway, 21
Example of Output I would like to get in text file:

John Sally Suzzy
23 noway 12 yesway 43 okway
12 34 21

tia
PS I'm using vb.net
Sal



Thanks it works perfectly!!!!!!!
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to...
0
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to...
2
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to...
2
by: divyac | last post by:
I have developed an address book using php and mysql.I have all the contacts list in a table with check boxes.Now that i want to create mailing labels for the checked contacts...i.e.,the arrangements...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.