Here of yew a way to be able to update reports and not work with fixed reports but dynamic.
Sub REPORTE_COMUNICADOS(codigo As String)
Dim rpt As New ReporteComunicado
Try
Dim Tabla As DataSet
Dim existe As Boolean
Dim cad As String
cad = " exec [SP_REPORTE_COMUNICADO] '" & codigo & "' "
Tabla = lsql.CARGAR_DATASET(cad)
existe = System.IO.File.Exists("C:\XSD_COLTENE\LOGISTICA\REPORTE_COMUNICADOS.XSD")
If existe = False Then
My.Computer.FileSystem.CreateDirectory("C:\XSD_COLTENE")
My.Computer.FileSystem.CreateDirectory("C:\XSD_COLTENE\LOGISTICA")
Dim URL As String = "C:\XSD_COLTENE\LOGISTICA\REPORTE_COMUNICADOS.XSD"
Tabla.WriteXmlSchema(URL)
End If
rpt.SetDataSource(Tabla)
REPORTES_BLANCO.CrystalReportViewer1.ReportSource = rpt
REPORTES_BLANCO.Text = "REPORTE_COMUNICADOS"
REPORTES_BLANCO.WindowState = FormWindowState.Maximized
REPORTES_BLANCO.Show()
Catch ex As Exception
End Try
End Sub
then you call the button in this way
imp.REPORTE_COMUNICADOS(codigo)
'your connection [If you block in N layers change to the connection you have in it]