Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Impresión
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 22-11-2021
luchifer luchifer is offline
No confirmado
 
Registrado: jul 2007
Ubicación: Santa Cruz - Bolivia
Posts: 50
Poder: 0
luchifer Va por buen camino
Problemas Maestro/Detalle

Jovenes Buenos dias:


Estoy haciendo un reporte anualizado de cuentas bajo el formato MAESTRO DETALLE. Pretendo el mismo salga asi:
ene feb mar abr may jun ........ dic total
Activo
Bancos 520 600 650 700 800 900
ctas x 600 800 550 600 700 800
total 1120 1400 1200 1300 1500 1700

La instruccion para el Query del maestro es:

select idbal, cta, descri from lplancta where (idbal='2' or idbal='3' or idbal='7') and nivel='1'

Y la instruccion para el detalle es:

select distinct c.idbal, m.cta, c.descri,
(select sum(i.debe-i.haber) from lcontmov i where i.cta=m.cta and month(i.fecha)=1 and year(i.fecha)=2021) as di1,
(select sum(i.debe-i.haber) from lcontmov i where i.cta=m.cta and month(i.fecha)=2 and year(i.fecha)=2021) as di2,
(select sum(i.debe-i.haber) from lcontmov i where i.cta=m.cta and month(i.fecha)=3 and year(i.fecha)=2021) as di3,
(select sum(i.debe-i.haber) from lcontmov i where i.cta=m.cta and month(i.fecha)=4 and year(i.fecha)=2021) as di4,
(select sum(i.debe-i.haber) from lcontmov i where i.cta=m.cta and month(i.fecha)=5 and year(i.fecha)=2021) as di5,
(select sum(i.debe-i.haber) from lcontmov i where i.cta=m.cta and month(i.fecha)=6 and year(i.fecha)=2021) as di6,
(select sum(i.debe-i.haber) from lcontmov i where i.cta=m.cta and month(i.fecha)=7 and year(i.fecha)=2021) as di7,
(select sum(i.debe-i.haber) from lcontmov i where i.cta=m.cta and month(i.fecha)=8 and year(i.fecha)=2021) as di8,
(select sum(i.debe-i.haber) from lcontmov i where i.cta=m.cta and month(i.fecha)=9 and year(i.fecha)=2021) as di9,
(select sum(i.debe-i.haber) from lcontmov i where i.cta=m.cta and month(i.fecha)=10 and year(i.fecha)=2021) as di10,
(select sum(i.debe-i.haber) from lcontmov i where i.cta=m.cta and month(i.fecha)=11 and year(i.fecha)=2021) as di11,
(select sum(i.debe-i.haber) from lcontmov i where i.cta=m.cta and month(i.fecha)=12 and year(i.fecha)=2021) as di12
from lcontmov m, lplancta c
where c.idbal=:idbal and m.cta=c.cta and year(m.fecha)=2021
order by m.cta

Y el momento de enlazar me da el erro objeto parameter mal definido.

ALGUIEN PODRIA POR FAVOR ORIENTARME Y DECIRME DONDE ME ESTOY EQUIVOCANDO
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Problemas Con Maestro Detalle nikotina Varios 6 13-06-2008 15:48:26
Problemas con Maestro Detalle FelipeDiaz Conexión con bases de datos 2 02-11-2007 17:05:37
problemas maestro-detalle DBexpress jmlifi Conexión con bases de datos 2 16-06-2006 12:27:05
Problemas con Datamodule y maestro detalle Carlex Conexión con bases de datos 3 24-04-2006 14:23:44
problemas maestro-detalle jmlifi Varios 1 28-11-2005 21:10:22


La franja horaria es GMT +2. Ahora son las 14:38:17.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi