Access - Cómo puedo crear informe de access sin que pagine

 
Vista:

Cómo puedo crear informe de access sin que pagine

Publicado por Fran (11 intervenciones) el 01/09/2010 11:53:02
Hola, estoy exportando un informe de access a htm, y claramente me salen tantas páginas web como páginas se generan en el informe, y lo que me gustaría saber es si hay alguna forma de forzar el que ese informe se muestre sin paginación como si fuera papel continuo.

Gracias.
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
sin imagen de perfil

RE:Cómo puedo crear informe de access sin que pagi

Publicado por Marcelo (166 intervenciones) el 02/09/2010 14:36:26
No sé si manejas VBA. Existe una rutina que llama a un par de funciones ubicadas en un módulo que se llama ImprimeDocumentos, por código tu defines bastante bien los margenes y dimensiones de la página.

Yo creo en un formulario 1 botón de comando y al hacer clic en el invoca las funciones que te comenté:

Private Sub Boton1_Click()

DefineMargenes ("Informe1")
ImprimeGuia ("Informe1")

...

Las funciones SE DEFINEN EN UN MÓDULO Y SON LAS SIGUIENTES

Type cad_DEVMODE
RGB As String * 94
End Type

Type type_DEVMODE

cadNombreDispositivo As String * 16
entTamaño As Integer
entControladorExtra As Integer
lngCampos As Long
entTamañoPapel As Integer
entLongitudPapel As Integer
entAnchoPapel As Integer

cadNombreDispositivo As String * 16
entVersiónEspec As Integer
entVersiónControlador As Integer
entTamaño As Integer
entControladorExtra As Integer
lngCampos As Long
entOrientación As Integer
entTamañoPapel As Integer
entLongitudPapel As Integer
entAnchoPapel As Integer
entEscala As Integer
entCopias As Integer
entOrigenPredeterminado As Integer
entCalidadDeImpresión As Integer
entColor As Integer
entDúplex As Integer
entResolución As Integer
entOpciónTT As Integer
entIntercalar As Integer
cadNombreFormulario As String * 16
lngRelleno As Long
lngBits As Long
lngPW As Long
lngPH As Long
lngDFI As Long
lngDFr As Long

End Type

Type cad_PRTMIP
cadRGB As String * 28
End Type
Type type_PRTMIP

entMargenIzquierdo As Long
entMargenSuperior As Long
entMargenDerecho As Long
entMargenInferior As Long

End Type

Sub ImprimeGuia(rptNombre As String)

Dim DevString As cad_DEVMODE
Dim DM As type_DEVMODE
Dim cadModoDispositivoExterno As String
Dim rpt As Report
Dim entRespuesta As Integer

DoCmd.Echo False

DoCmd.OpenReport rptNombre, acDesign
Set rpt = Reports(rptNombre)

If Not IsNull(rpt.PrtDevMode) Then

cadModoDispositivoExterno = rpt.PrtDevMode
DevString.RGB = cadModoDispositivoExterno

LSet DM = DevString
DM.lngCampos = DM.lngCampos Or DM.entTamañoPapel Or DM.entLongitudPapel Or DM.entAnchoPapel

'AQUI SE DIMENSIONA EL TAMAÑO DEL PAPEL, ES EN PULGADAS, ESA MULTIPLICACION LO TRANSFORMA

DM.entTamañoPapel = 256
DM.entLongitudPapel = 11.02 * 254
DM.entAnchoPapel = 8 * 254

LSet DevString = DM
Mid(cadModoDispositivoExterno, 1, 94) = DevString.RGB
rpt.PrtDevMode = cadModoDispositivoExterno

End If

DoCmd.PrintOut acPages, 1, 10, acHigh
DoCmd.Close acReport, rptNombre, acSaveYes

DoCmd.Echo True

End Sub

Sub DefineMargenes(cadNombre As String)
Dim PrtMipString As cad_PRTMIP
Dim PM As type_PRTMIP
Dim rpt As Report

DoCmd.OpenReport cadNombre, acDesign
Set rpt = Reports(cadNombre)
PrtMipString.cadRGB = rpt.PrtMip
LSet PM = PrtMipString
PM.entMargenIzquierdo = 0.5 * 254 ' Establece los márgenes.
PM.entMargenSuperior = 0.5 * 254
PM.entMargenDerecho = 0.5 * 254
PM.entMargenInferior = 0.5 * 254
LSet PrtMipString = PM ' Actualiza la propiedad.
rpt.PrtMip = PrtMipString.cadRGB

End Sub

TAL CUAL, VALE LA PENA USARLAS, SON MUY PRECISAS Y PERMITEN MANEJAR LAS DIMENSIONES DEL REPORTE A VOLUNTAD, A MI ME HAN SIDO MUY UTILES. LAS ENCONTRÉ EN LA AYUDA DE ACCESS

UN SALUDO DESDE CHILE
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar