09-04-17, 08:36 PM
(09-04-17, 08:15 PM)abdualla كتب : تفضل التعديل
PHP كود :
Private Sub PrintDocument1_PrintPage(sender As Object, e As Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim leftMagin As Integer = e.MarginBounds.Left
Dim topMagin As Integer = e.MarginBounds.Top
Dim cellFont As New Font("Arial", 14)
Dim cellForeColor As New SolidBrush(Color.Black)
Dim cellBackColor As New SolidBrush(Color.WhiteSmoke)
Dim cellBorderColor As New Pen(Brushes.Blue, 1)
Dim cellSize As New Size(300, 100)
Dim index As Integer = 0
For currentY = 0 To (Me.DataGridView1.Rows.Count - 1) \ 2
For currentX = 0 To 1
Dim cellText As String =
"confirming QSO with" & Me.DataGridView1.Rows(index).Cells(1).Value & vbNewLine & _
"Call: " & Me.DataGridView1.Rows(index).Cells(2).Value
Dim cellPoint As New Point(leftMagin + (currentX * cellSize.Width), topMagin + (currentY * cellSize.Height))
Dim cellRectangle As New Rectangle(cellPoint, cellSize)
e.Graphics.FillRectangle(cellBackColor, cellRectangle)
e.Graphics.DrawString(cellText, cellFont, cellForeColor, cellRectangle)
e.Graphics.DrawRectangle(cellBorderColor, cellRectangle)
index += 1
If index > Me.DataGridView1.Rows.Count - If(Me.DataGridView1.AllowUserToAddRows, 2, 1) Then Exit For
Next
Next
End Sub
بارك الله فيك استاذ عبدالله
نعم هذ المطلوب
شكرا لك
في خدمة بسيطه بارك الله فيك
محتاج يكون اذا نفس ال Product
الناتج له يكون تحت بعض
يعني مثلا
Product 1
موجود في الداتا قريد ثلام مرات وله ثلاث نتائج
النتاج ماله يكونون تحت بعض في نفس المربع
Product 1
1000
2000
3000
ان شاءالله وصلت الفكرة بارك الله فيك
السموحه بتعبك معاي
في ميزان اعمالك

