Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Reporte tipo tabla dimanica

publicado

Compañeros, estoy tratando de realizar este reporte, resulta que tengo una base de datos en este diseño

*FECHA*IDEQUIPO*DSC_EQUIPO*TIPOMTTO*COSTO*

y mi reporte final debe ser asi, este reporte se ejecutara desde un formulario

*IDEQUIPOS*MANTE CORREC*MANT PREVENTIVO*

esto trate de hacer con sentencia sql usando un left join pero me da error

En el adjunto hay un ejemplo, espero recibir sus recomendaciones,

ReporteInd.xls

Featured Replies

publicado
  • Autor

Buen dia, siguiendo con este tema he intentado usando un left join, pero me da un error de consulta, me pueden ayudar

Sub CostoTm()
Dim MC As String
Dim MP As String
Application.ScreenUpdating = False
Ult = ReportesCtm.Range("A1").End(xlDown).Row
MC = Trim(ReportesCtm.Range("C7").Value)
MP = Trim(ReportesCtm.Range("D7").Value)
Conexiones.Conectar

Consulta = "select H.IDEQUIPO,H.DSCEQUIPO,SUM(H2.COSTO),SUM(H3.COSTO) FROM [HISTORICO$] H LEFT JOIN [HISTORICO$] H2 ON H.IDEQUIPO=H2.IDEQUIPO AND H2.[TIPOMTTO]='" & MC & "' LEFT JOIN [HISTORICO$] H3 ON H.IDEQUIPO=H3.IDEQUIPO AND H3.[TIPOMTTO]='" & MP & "'"

Rst.Open Consulta, Cnx, , , adCmdText

ReportesCtm.Range("A9:D" & Ult).ClearContents
ReportesCtm.Range("A9").CopyFromRecordset Rst
ReportesCtm.Select
Conexiones.Cerrar_conexion
End Sub[/CODE]

a la espera de sus comentarios y tienen otra sugerencia de como realizarlo les agradecere mucho

Saludos,

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.