Visual Basic - Problema on data report

Life is soft - evento anual de software empresarial
 
Vista:

Problema on data report

Publicado por Antonio Guzman (2 intervenciones) el 10/06/2011 22:20:27
Tengo un programa que funciona muy bien, pero en muchas ocasiones a la hora de imprimir el data report sale una panatta en blanco, y me ha pasado en diferentes programas

asi esta el codigo de la impresion
dteEntorno.rsremision_Grouping.Filter = "[nroCompra]=" & Val(Me.LBLNR)
rptFactura.Refresh
nw = MsgBox("Desea las documentos de Investigación de crédito", vbYesNo, "Integra")
If nw = vbYes Then
frmsocio1.PrintForm
frmsocio2.PrintForm
frmsocio3.PrintForm
End If
z = MsgBox("Desea las condiciones de venta", vbYesNo, "Integra")
If z = vbNo Then
rptFactura.Sections("reportfooter").Controls("etiqueta30").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta41").Visible = False
' rptFactura.Sections("remision_Grouping_Footer").Controls("lblc3").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta42").Visible = False
' rptFactura.Sections("remision_Grouping_Footer").Controls("lblc5").Visible = False
' rptFactura.Sections("remision_Grouping_Footer").Controls("lblc6").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta43").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta44").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta45").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta40").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta39").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta36").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta35").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta46").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta47").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta48").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta49").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta50").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta37").Visible = False
rptFactura.Sections("reportfooter").Controls("etiqueta38").Visible = False
rptFactura.Sections("reportfooter").Controls("FORMA9").Visible = False
rptFactura.Sections("reportfooter").Controls("FORMA10").Visible = False
rptFactura.Sections("reportfooter").Controls("FORMA11").Visible = False
rptFactura.Sections("reportfooter").Controls("FORMA12").Visible = False
rptFactura.Sections("reportfooter").Controls("FORMA13").Visible = False
rptFactura.Sections("reportfooter").Controls("LÍNEA8").Visible = False
rptFactura.Sections("reportfooter").Controls("LÍNEA9").Visible = False
rptFactura.Sections("reportfooter").Controls("LÍNEA10").Visible = False
rptFactura.Sections("reportfooter").Controls("LÍNEA11").Visible = False
rptFactura.Sections("reportfooter").Controls("LÍNEA12").Visible = False
rptFactura.Sections("reportfooter").Controls("FORMA1").Visible = False
End If
W = MsgBox("Desea mostrar el IVA", vbYesNo, "Integra")
If W = vbNo Then
rptFactura.Sections("remision_Grouping_Footer").Controls("lbliva").Visible = False
rptFactura.Sections("remision_Grouping_Footer").Controls("lbltotal").Visible = False
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta24").Visible = False
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta25").Visible = False
rptFactura.Sections("REPORTFooter").Controls("ETIQUETA36").Visible = False
End If
'rptFactura.Sections("remision_Grouping_Footer").Controls("Forma1").Visible = False
rptFactura.Sections("remision_Grouping_Footer").Controls("Etiqueta34").Visible = False
rptFactura.Sections("remision_Grouping_Header").Controls("lblCIUDADESTADO").Caption = Me.txtCiudad & " ," & Me.TXTESTADO
rptFactura.Sections("remision_Grouping_Header").Controls("lbldirycp").Caption = Me.txtcolonia & " C.P.: " & Me.txtcp
If IsNull(Me.txtcantabo) Then
rptFactura.Sections("remision_Grouping_Footer").Controls("lblcantletra").Caption = UCase(letra(Val(subtotal))) & " PESOS (00/100)M.N."
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta29").Visible = False
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta19").Visible = False
rptFactura.Sections("remision_Grouping_Footer").Controls("FORMA1").Visible = False
Else
' rptFactura.Sections("remision_Grouping_Footer").Controls("FORMA1").Visible = True
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta29").Visible = True
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta19").Visible = True
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta33").Visible = True
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta32").Visible = True
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta31").Visible = True
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta34").Visible = True
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta33").Caption = frmFactura.txtbanco
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta32").Caption = frmFactura.txtmedio
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta31").Caption = frmFactura.txtcuenta
If Val(frmFactura.txtcantabo) > 0 Then
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta34").Caption = frmFactura.txtfechadep
End If
'rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta29")
rptFactura.Sections("remision_Grouping_Footer").Controls("lblcantletra").Caption = UCase(letra(Val(subtotal) - Val(Me.txtcantabo))) & " PESOS (00/100)M.N."
End If
rptFactura.Sections("remision_Grouping_Footer").Controls("lblTOTPIEZAS").Caption = NUMPIEZAS
If Not IsNull(Me.txtdescto) Then
rptFactura.Sections("remision_Grouping_Header").Controls("lblDESCTO").Caption = Val(Me.txtdescto) & " %"
Else
rptFactura.Sections("remision_Grouping_Header").Controls("lblDESCTO").Caption = "0 %"
End If

If Not IsNull(Me.txtpedim) Then
rptFactura.Sections("remision_Grouping_Header").Controls("lblpedim").Caption = Me.txtdescto
End If
If Not IsNull(Me.txtdocto) Then
rptFactura.Sections("remision_Grouping_Header").Controls("lbldocto").Caption = Me.txtdocto
End If
rptFactura.Sections("remision_Grouping_Footer").Controls("lblSUBTOTAL").Caption = Format(subtotal, "#,###,##0.00")
If Not IsNull(Me.txtcantabo) Then
rptFactura.Sections("remision_Grouping_Footer").Controls("lblANTICIPO").Caption = Format(Me.txtcantabo, "$ #,###,##0.00")
If W = vbNo Then
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta29").Caption = Format(Val(subtotal) - Val(frmFactura.txtcantabo), "$ #,###,##0.00")
Else
rptFactura.Sections("remision_Grouping_Footer").Controls("etiqueta29").Caption = Format(Val(subtotal) * 1.16 - Val(frmFactura.txtcantabo), "$ #,###,##0.00")
End If
If W = vbNo Then
rptFactura.Sections("remision_Grouping_Footer").Controls("lblP2").Caption = " cantidad de " & Format(Val(subtotal) - Val(Me.txtcantabo), "#,###,##0.00") & " ( " & letra(Val(subtotal) - Val(Me.txtcantabo)) & " pesos 00/100 M.N. ), cantidad que pagaremos el dia ____ del mes de _____________ "
Else
rptFactura.Sections("remision_Grouping_Footer").Controls("lblP2").Caption = " cantidad de " & Format(Val(subtotal) * 1.16 - Val(Me.txtcantabo), "#,###,##0.00") & " ( " & letra(Val(subtotal) * 1.16 - Val(Me.txtcantabo)) & " pesos 00/100 M.N. ), cantidad que pagaremos el dia ____ del mes de _____________ "
End If
Else
rptFactura.Sections("remision_Grouping_Footer").Controls("lblANTICIPO").Caption = 0
If W = vbNo Then
rptFactura.Sections("remision_Grouping_Footer").Controls("lblP2").Caption = " cantidad de " & Format(subtotal, "#,###,##0.00") & " ( " & letra(Val(subtotal)) & " pesos 00/100 M.N. ), cantidad que pagaremos el dia ____ del mes de _____________ "
Else
rptFactura.Sections("remision_Grouping_Footer").Controls("lblP2").Caption = " cantidad de " & Format(subtotal * 1.16, "#,###,##0.00") & " ( " & letra(Val(subtotal) * 1.16) & " pesos 00/100 M.N. ), cantidad que pagaremos el dia ____ del mes de _____________ "
End If
End If
rptFactura.Sections("remision_Grouping_Footer").Controls("lblP1").Caption = "En Guadalajara, Jalisco a " & Day(Date) & " de " & Format(Month(Date), "mmmm") & " de 2011. por el presente pagaré debe(mos) incondicionalmente a la orden de C. NEYROSH GROUP SA DE CV la"
rptFactura.Sections("remision_Grouping_Footer").Controls("lblIVA").Caption = Format(Val(subtotal) * 0.16, "#,###,##0.00")
rptFactura.Sections("remision_Grouping_Footer").Controls("lblTOTAL").Caption = Format(Val(subtotal) * 1.16, "#,###,##0.00")
rptFactura.Sections("remision_Grouping_Footer").Controls("lblFORMAPAGO").Caption = Me.cboFormaPago
rptFactura.Sections("remision_Grouping_Footer").Controls("lblP3").Caption = "del ___________, en esta ciudad de Guadalajara, Jalisco, valor recibido a mi (nuestra) entera satisfacción. Este Pagaré forma parte de una serie numerada del 1 al __________ y todos estan sujetos a la condición de que al no pagarse cualquiera de ellos a su vencimiento, serán exigibles"
rptFactura.Sections("remision_Grouping_Footer").Controls("lblP4").Caption = "todos los que le sigan en número, además de los ya vencidos, desde la fecha de su vencimiento de este documento hasta el dia de su liquidación y causarán intereses moratorios al tipo de _____% mensual por todo el tiempo que esté insoluto, sin prejuicios al cobro mas los gastos que por ello se originen."
rptFactura.Sections("remision_Grouping_Footer").Controls("lblP5").Caption = "Las partes que intervenimos en el presente documento no sometemos expresa, clara y terminantemente al fuero de los tribunales competentes de la ciudad de Guadalajara, jalisco para dirimir cualquier controversia del cumplimiento del presente documento, renunciando clara y terminantemente al fuero de cualquier otra entidad federativa presente o futura, esto de conformidad a los artículos 1092 y 1093 del código de comercio."
rptFactura.Sections("remision_Grouping_Footer").Controls("lblP6").Caption = Me.txtDireccion & " " & Me.txtcolonia & " CP:" & Me.txtcp
rptFactura.Sections("remision_Grouping_Footer").Controls("lblP7").Caption = Me.txtCiudad & ", " & Me.TXTESTADO & " RFC:" & Me.TXTRFC & " TEL: " & Me.txtTelefono
If W = vbNo Then
rptFactura.Sections("REPORTFooter").Controls("ETIQUETA46").Caption = Format((subtotal - Val(Me.txtcantabo)) * 0.7, "#,###,##0.00")
rptFactura.Sections("REPORTFooter").Controls("ETIQUETA47").Caption = Format((subtotal - Val(Me.txtcantabo)) * 0.75, "#,###,##0.00")
rptFactura.Sections("REPORTFooter").Controls("ETIQUETA48").Caption = Format((subtotal - Val(Me.txtcantabo)) * 0.8, "#,###,##0.00")
rptFactura.Sections("REPORTFooter").Controls("ETIQUETA49").Caption = Format((subtotal - Val(Me.txtcantabo)), "#,###,##0.00")
rptFactura.Sections("REPORTFooter").Controls("ETIQUETA50").Caption = Format((subtotal - Val(Me.txtcantabo)) * 1.1, "#,###,##0.00")
Else
rptFactura.Sections("REPORTFOOTER").Controls("ETIQUETA46").Caption = Format((subtotal - Val(Me.txtcantabo)) * 1.16 * 0.7, "#,###,##0.00")
rptFactura.Sections("REPORTFOOTER").Controls("ETIQUETA47").Caption = Format((subtotal - Val(Me.txtcantabo)) * 1.16 * 0.75, "#,###,##0.00")
rptFactura.Sections("REPORTFOOTER").Controls("ETIQUETA48").Caption = Format((subtotal - Val(Me.txtcantabo)) * 1.16 * 0.8, "#,###,##0.00")
rptFactura.Sections("REPORTFOOTER").Controls("ETIQUETA49").Caption = Format((subtotal - Val(Me.txtcantabo)) * 1.16, "#,###,##0.00")
rptFactura.Sections("REPORTFOOTER").Controls("ETIQUETA50").Caption = Format((subtotal - Val(Me.txtcantabo)) * 1.16 * 1.1, "#,###,##0.00")
End If
If Len(Me.txtpedim) > 1 Then
rptFactura.Sections("REMISION_GROUPING_HEADER").Controls("LBLPEDIM").Caption = Me.txtpedim
End If

rptFactura.Show


en muchas ocasiones la pantalla se ve muy bien, pero en otras ocasiones solo sale una pantalla en blanco, que me recomiendan hacer?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder