Portal    Foro    Buscar    FAQ    Registrarse    Conectarse


Publicar nuevo tema  Responder al tema 
Página 1 de 1
 
 
Reporte En Gambas3
Autor Mensaje
Responder citando   Descargar mensaje 
Mensaje Reporte En Gambas3 
 
Saludos señores, antes de publicar mi aplicacion, la estamos migrando a gambas3. todo bien algunas cosas cambiaron en el form se hicieron mas pequeñas muchas cosas de estetica.

Ahora sale un problema mi codigo de reportes que funcionaba en gambas2 no funciona en gambas3 :s Bueno aqui les dejo mi codigo.

Public Sub Button7_Click()
Dim A As Single
Dim B As Single
Dim C As Single
Dim reporte As New Report
Dim cabezera As ReportTextLabel
Dim texto As ReportLabel
Dim columnas As ReportHBox
Dim body As ReportVBox
Dim j As Integer
Dim i As Integer
Dim R As Integer

Dim enteimpuesto As String
Dim riff As String
Dim nombref As String
Dim direa As String
Dim direb As String
Dim zonapostale As String
Dim ivae As Float
Dim ivasacado As Float
Dim totalsiniva As Float
Dim horar As String
Dim fechar As String
Dim monedaresult As Result
Dim n_factura As Integer
Dim contadorf As Result

monedaresult = cn.Exec("SELECT * FROM  opcionesdf")
If mc = True Then
r = Message.Warning(" ¿Desea Finalizar la compra?  ", " SI ", " NO ")
If r = 1 Then


reporte.Clear
reporte.Padding = "1 cm"
reporte.Size = "A4"
cabezera = New ReportTextLabel(reporte)
cabezera.Font = Font["Arial,+12"]
cabezera.Alignment = Align.Center
cabezera.Text = "<table><tr>"
cabezera.Text = "<td>Factura</td>"
cabezera.Text = "</tr></table>"
rs = cn.Exec("SELECT * FROM opcionesdf")
rs.MoveFirst
enteimpuesto = rs!Ente_impuesto
riff = rs!rif
nombref = rs!nombre_f
direa = rs!direccion_a
direb = rs!direccion_b
zonapostale = rs!zona_postal
ivae = rs!iva




texto = New ReportLabel(reporte)
texto.LineStyle = Line.Dot
texto.Alignment = Align.Left
texto.Text = "\n"
texto.Text &= " D A T O S  D E L  C L I E N T E \n"
texto.Text &= " Nombre y Apellido: " " " & TextBox2.Text & " " & TextBox3.text & " \n"
texto.Text &= " RIF/CI:" " " & TextBox1.Text & " \n"
texto.Text &= " Direccion: " " " & TextBox4.Text & " \n"

texto = New ReportLabel(reporte)
texto.Alignment = Align.Center
texto.Font = Font["Arial,+2"]
texto.Text = "\n"
texto.Text &= "FACTURA\n"

contadorf = cn.Exec("Select * from  opcionesdf")
n_factura = contadorf!contador_f
n_factura = n_factura + 1
contadorf = cn.Exec("UPDATE opcionesdf SET contador_f = '" & n_factura & "' ")

texto = New ReportLabel(reporte)
texto.Alignment = Align.Left
texto.Text &= "FACTURA:" " " & n_factura



'formateando hora y fecha.'
fechar = Format(Date, "dd/mm/yyyy")
horar = Format$(Time, "h:nn:ss AM/PM")

'fecha y hora'
texto = New ReportLabel(reporte)
texto.Alignment = Align.Left
texto.Text = "FECHA: " & fechar & "                  " " HORA: " & horar



     body = New ReportVBox(reporte)
    
     body.LineStyle = Line.Solid
     body.ForeColor = Color.black
     body.Autoresize = True
  
   columnas = New ReportHBox(body)
       columnas.Autoresize = True
    columnas.Spacing = "1 cm"
  For i = 1 To TableView1.Columns.Count - 1
       texto = New ReportLabel(columnas)
        texto.Text = TableView1.Columns[i].Text
        texto.Font.Bold = True
        texto.Autoresize = True
        texto.Expand = True
        texto.Alignment = Align.Center
    
    Next
     For i = 0 To TableView1.rows.Count - 1
       columnas = New ReportHBox(body)
       columnas.Autoresize = True
       columnas.Spacing = "1 cm"
       For j = 1 To TableView1.Columns.Count - 1
       texto = New ReportLabel(columnas)
    texto.Text = TableView1[i, j].Text
       texto.Autoresize = True
       texto.Expand = True
       texto.Alignment = Align.Center
  Next
  Next

texto = New ReportLabel(reporte)
texto.LineStyle = Line.Dot
texto.Alignment = Align.Left
texto.Font = Font["Arial,+1"]
       texto.Autoresize = True

texto.Text = "\n"
texto.Text &= " SUBTTL " & monedaresult!Moneda & totalvalue.Value
  iva = CInt(totalvalue.Value) * 0.12
texto = New ReportLabel(reporte)
texto.LineStyle = Line.Dot
texto.Alignment = Align.Left
texto.Font = Font["Arial,+1"]
texto.Autoresize = True

a = CFloat(totalvalue.Value)
ivasacado = a * (ivae / 100)
totalsiniva = a - ivasacado

texto.Text = "\n"
texto.Text &= " BI  G(" & ivae & "%) " & monedaresult!Moneda & Round(totalsiniva, -2) & "\n"
texto.Text &= " IVA G(" & ivae & "%)" & monedaresult!Moneda & Round(ivasacado, -2) & "\n"



texto = New ReportLabel(reporte)
texto.LineStyle = Line.Dot
texto.Alignment = Align.Left
texto.Font = Font["Arial,+1"]
texto.Autoresize = True
texto.Text = "\n"
texto.Text &= " TOTAL " & monedaresult!Moneda & totalvalue.Value & "\n"
texto.Text &= " EFECTIVO " & monedaresult!Moneda & ValueBox1.Value & "\n"
texto.Text &= " CAMBIO " & monedaresult!Moneda & vueltovalue.Value & "\n"
reporte.Preview
mc = False
  TextBox1.Enabled = True
  TextBox2.Enabled = True
  TextBox3.Enabled = True
  TextBox4.Enabled = True
  TextBox5.Enabled = True
    TextBox1.text = ""
  TextBox2.text = ""
  TextBox3.text = ""
  TextBox4.text = ""
  TextBox5.text = ""
  totalvalue.Value = ""
  ValueBox1.Value = ""
  vueltovalue.Value = ""
   TableView1.Clear
  TableView1.Rows.Count = 0
  Button5.Enabled = False
  actividad_empleado()
  codigoarticulo.clear
  horacompra.clear
  Message.Info("Compra efectuada")
Endif
Endif

End
 


El error que me sale en muchas secciones es: Simbolo '_Free' desconocido en la clase ReportSection en Formularioparaadmin:349.  este error sale apenas se ejecuta la linea que dice:
reporte.Clear

De verdad no me esperaba este cambio de codificacion en los reportes de gambas3. Por ahi leei que gambas3 una de sus mejoras es la elaboracion mas facil de reportes, alguien me puede decir si es verdad? Saludos camaradas
 



 
última edición por Fenriz07 el Jueves, 22 Noviembre 2012, 03:39; editado 1 vez 
Fenriz07 - Ver perfil del usuarioEnviar mensaje privado 
Volver arribaPágina inferior
Mostrar mensajes anteriores:    
 
OcultarTemas parecidos
Tema Autor Foro Respuestas último mensaje
No hay nuevos mensajes BaseDato&Reporte GNUXDAR Controles/Librerías/Componentes 5 Viernes, 20 May 2011, 15:53 Ver último mensaje
Ronny
No hay nuevos mensajes Ayuda Con Reporte maria gabriela General 2 Lunes, 31 Octobre 2011, 19:33 Ver último mensaje
alan
No hay nuevos mensajes Reporte = Baucher soldadozero Controles/Librerías/Componentes 3 Martes, 23 Julio 2013, 00:23 Ver último mensaje
soldadozero
No hay nuevos mensajes Destruir Reporte Aerobacterd Controles/Librerías/Componentes 2 Domingo, 12 Abril 2015, 17:46 Ver último mensaje
Aerobacterd
 

Publicar nuevo tema  Responder al tema  Página 1 de 1
 

Usuarios navegando en este tema: 0 registrados, 0 ocultos y 1 invitado
Usuarios registrados conectados: Ninguno


 
Lista de permisos
No puede crear mensajes
No puede responder temas
No puede editar sus mensajes
No puede borrar sus mensajes
No puede votar en encuestas
No puede adjuntar archivos
Puede descargar archivos
No puede publicar eventos en el calendario



  

 

cron