I solved by passing the value of the textbox in the form 1 to textbox in the form 2
Private Sub BTN_PRINT_Click(sender As Object, e As EventArgs) Handles BTN_PRINT.Click
Try
If TXT_Guid.Text = "" Then
MessageBox.Show("لاتوجد بيانات للطباعة ")
Else
Dim obb As New Form1
obb.val = Me.TXT_id.Text()
obb.Show()
End If
Imports System.Data
Imports System.Data.OleDb
Imports Microsoft.Reporting.WinForms
Imports System.Data.SqlClient
Public Class Form1
Public Property val As String
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.ReportViewer1.RefreshReport()
End Sub
Private Sub ReportViewer1_Load(sender As Object, e As EventArgs)
TextBox1.Text = val
Dim id As String = TextBox1.Text
Dim CON As New SqlConnection("Data Source=MOHAMEDTHRWAT20\SQLEXPRESS;Initial Catalog=data_egy;User ID=sa")
Dim COM As New SqlCommand("SELECT * FROM [dbo].[tb_br] where id ='" & id & "' ", CON)
Dim SD As New SqlDataAdapter(COM)
Dim DTa As New DataTable
SD.Fill(DTa)
With Me.ReportViewer1.LocalReport
.DataSources.Clear()
.ReportPath = "C:\Users\mothr\onedrive\المستندات\visual studio 2012\Projects\WindowsApplication1\WindowsApplication1\PL\PL_ACC\Report1.rdlc"
.DataSources.Add(New ReportDataSource("DataSet1", DTa))
End With
Me.ReportViewer1.RefreshReport()
End Sub
End Class
Catch ex As Exception
End Try
End Sub