mattdaddyjuice
Member
- Joined
- Jan 15, 2009
- Messages
- 21
- Programming Experience
- 5-10
I do not have access to crystal reports and the way I currently create reports in VB.NET is by calling the data to a grid and using a loop to grab the fields from each row I need.
All the while, I am saving the information to a string like this during each loop increment.
tempstr += s1 & vbTab & s2 & vbTab & s3 & vbTab & ... & vbCrLf
When the loop is finished, I put the string in a rich text box and save it as a rich text file. Then I place my tabs for wordpad and open the file in wordpad like this.
RichTextBox1.Text = tempstr
With Me.RichTextBox1
.SelectAll()
.SelectionTabs = New Integer() {312, 396, 498, 600, 702}
End With
RichTextBox1.SaveFile("C:\report.rtf")
System.Diagnostics.Process.Start("wordpad.exe", "C:\report.rtf")
This just seems like a sloppy way of accomplishing this, so I am willing to take any suggestions/advice I can get. Thanks!
All the while, I am saving the information to a string like this during each loop increment.
tempstr += s1 & vbTab & s2 & vbTab & s3 & vbTab & ... & vbCrLf
When the loop is finished, I put the string in a rich text box and save it as a rich text file. Then I place my tabs for wordpad and open the file in wordpad like this.
RichTextBox1.Text = tempstr
With Me.RichTextBox1
.SelectAll()
.SelectionTabs = New Integer() {312, 396, 498, 600, 702}
End With
RichTextBox1.SaveFile("C:\report.rtf")
System.Diagnostics.Process.Start("wordpad.exe", "C:\report.rtf")
This just seems like a sloppy way of accomplishing this, so I am willing to take any suggestions/advice I can get. Thanks!