 |
|
ต้องการให้ crytal report เรียงตัวเลขตามจำนวน ค่าใน textbox |
|
 |
|
|
 |
 |
|

Code (VB.NET)
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
ds.Tables("dtQRCode").Rows.Clear()
Me.CrystalReportViewer1.Refresh()
For i As Integer = 0 To Int32.Parse(TextBox1.Text) - 1
ds.Tables("dtQRCode").Rows.Add(qrimage, tb1, tb2, tb3, tb4, tb5, tb6, tb7, tb8)
Next
Dim rpt As New rptQRCode
rpt.Load(Application.StartupPath & "\Reports\rptQRCode.rpt")
rpt.SetDataSource(ds.Tables("dtQRCode"))
CrystalReportViewer1.ReportSource = rpt
End Sub
ตามรูปผมพิมพ์ตัวเลขเข้าไปตามจำนวนที่ต้องการ อยากให้วงกลมสีแดงเรียงตัวเลข 1 2 3 4 ไปเรื่อยๆ ต้องเขียนลูปยังไงครับ
Tag : .NET, VB.NET
|
|
 |
 |
 |
 |
Date :
2021-08-10 10:39:24 |
By :
sakkapong |
View :
651 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ในลูปก็ add เหมือน qrimage แต่ใช้ i+1 แทน
แต่ต้องอ้างอิงตามโครงสร้างของ report ส่วนที่ใช้แสดงตัวเลขด้วย
|
 |
 |
 |
 |
Date :
2021-08-10 15:46:05 |
By :
TheGreatGod_of_Death |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
For i As Integer = 1 To Int32.Parse(TextBox1.Text)
tb8 = i
ds.Tables("dtQRCode").Rows.Add(qrimage, tb1, tb2, tb3, tb4, tb5, tb6, tb7, tb8)
Next
คิดมากปวดหัว จุดใต้ตำตอ tb8=i จบข่าว
ขอบคุณทุกๆกำลังใจครับ
|
 |
 |
 |
 |
Date :
2021-08-11 16:08:22 |
By :
sakkapong |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|