Validacion de impresion con DT nulo, motivos de traslados en comercio exterior

This commit is contained in:
2022-11-04 00:08:20 -07:00
parent b216769990
commit d97c0f4047

View File

@@ -6033,6 +6033,7 @@ Public Class ClsPaginas
Dim ds As New DataSet Dim ds As New DataSet
For Each rpds As ReportDataSource In DataSource For Each rpds As ReportDataSource In DataSource
If rpds.Value IsNot Nothing Then
If rpds.Value.GetType().ToString() = "System.Data.DataTable" Then If rpds.Value.GetType().ToString() = "System.Data.DataTable" Then
Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable) Dim dt As DataTable = DirectCast(rpds.Value, Data.DataTable)
dt = dt.Copy() dt = dt.Copy()
@@ -6044,6 +6045,11 @@ Public Class ClsPaginas
ojext.Value = rpds.Value ojext.Value = rpds.Value
reportobjects.Add(ojext) reportobjects.Add(ojext)
End If End If
Else
Dim dt = New DataTable()
dt.TableName = If(String.IsNullOrEmpty(rpds.Name), "DataTable1", rpds.Name)
ds.Tables.Add(dt)
End If
Next Next
For Each rpds As ReportParameter In Parametros For Each rpds As ReportParameter In Parametros
@@ -7146,7 +7152,10 @@ Public Class ClsPaginas
nRowCECabecera("Version") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Version").InnerText nRowCECabecera("Version") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("Version").InnerText
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado") IsNot Nothing Then
nRowCECabecera("MotivoTraslado") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText nRowCECabecera("MotivoTraslado") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText
End If
nRowCECabecera("TipoOperacion") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoOperacion").InnerText nRowCECabecera("TipoOperacion") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoOperacion").InnerText
nRowCECabecera("ClaveDePedimento") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("ClaveDePedimento").InnerText nRowCECabecera("ClaveDePedimento") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("ClaveDePedimento").InnerText
nRowCECabecera("CertificadoOrigen") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("CertificadoOrigen").InnerText nRowCECabecera("CertificadoOrigen") = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("CertificadoOrigen").InnerText
@@ -7181,8 +7190,10 @@ Public Class ClsPaginas
End Try End Try
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado") IsNot Nothing Then
CEMotivoTraslado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText CEMotivoTraslado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("MotivoTraslado").InnerText
End If
CETipoCambio = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoCambioUSD").InnerText CETipoCambio = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("TipoCambioUSD").InnerText
@@ -7378,7 +7389,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("CEIncoterm", RCEIncoterm)) params.Add(New ReportParameter("CEIncoterm", RCEIncoterm))
params.Add(New ReportParameter("CEId", CEId)) params.Add(New ReportParameter("CEId", CEId))
params.Add(New ReportParameter("CEMotivoTraslado", RCEMotivoTraslado)) params.Add(New ReportParameter("CEMotivoTraslado", RCEMotivoTraslado))
params.Add(New ReportParameter("CETipoCamvio", CETipoCambio)) params.Add(New ReportParameter("CETipoCambio", CETipoCambio))
End If End If