السلام عليكم يا شباب
اليوم حاولت انه اطبع تقرير موجود عندي بصورة مباشرة اي بدون ظهور المعاينة للتقرير
فحاولت بالكود التالي وكانت النتيجة جدا مضحكة لانه طبع لي مسار التقرير في الحاسوب بدل التقرير
طيب اذا انا عندي تقرير موجود في مسار معين كيف اطبع محتويات التقرير وليس مساره ؟؟؟
الكود كان كالتالي
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
AddHandler PrintDocument1.PrintPage, AddressOf PrintGraphic
PrintDocument1.Print()
End Sub
Private Sub PrintGraphic(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
ev.Graphics.DrawString(Application.StartupPath & "/Report1.rdlc", New Font("Arial", 11, FontStyle.Regular), Brushes.Black, 120, 120)
ev.HasMorePages = False
End Sub