Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problema con sql

0 views
Skip to first unread message

dego

unread,
Aug 20, 2004, 7:38:41 PM8/20/04
to
miren tengo que mostrar un corte por fecha dentro de el por total y luego
un total general con una sql y no lo puedo hacer
yo hago esto

select mis campos
from mis tablas
where mis condiciones
group by fecha
into micursor

y el reporte con esto me queda asi
fecha1
tot1
tot2
tot3
fecha2
tot1
tot2
tot3

y tendria que llegar a esto

fecha1
tot1
tot2
tot3
total1
fecha2
tot1
tot2
tot3
total2

-----------------------------------------------
PortalFox :: Nada corre como un zorro
http://www.portalfox.com

PortalFox - NNTP Forum Gateway
-----------------------------------------------

Martin Zamudio

unread,
Aug 20, 2004, 7:07:30 PM8/20/04
to
Saludos Dego.
Para eso tienes que crear un grupo de datos en tu informe.
Este grupo de datos debe estar basado en el numero de tu factura, al cambiar
el numero
totalizas el rango en un textbox.


Martin Zamudio
Manrique Computación S.A de C.V.
Los Mochis Sinaloa Mex.
Morelos y Zaragoza 109 Sur.


-----------------------------------------------
PortalFox :: Nada corre como un zorro
http://www.portalfox.com

PortalFox - NNTP Forum Gateway
-----------------------------------------------


"dego" <tuma...@hotmail.com> escribió en el mensaje
news:equNU7wh...@TK2MSFTNGP09.phx.gbl...

david alarcon

unread,
Aug 22, 2004, 1:32:11 PM8/22/04
to
Hola

Yo pienso que mas bien el grupo del reporte debe estar basado en la fecha
y no en el numero de factura.

Saludos

David

[quote][B]Martin Zamudio Escribió:[/b]

<pre>


Saludos Dego.
Para eso tienes que crear un grupo de datos en tu informe.
Este grupo de datos debe estar basado en el numero de tu factura, al
cambiar
el numero
totalizas el rango en un textbox.


Martin Zamudio
Manrique Computación S.A de C.V.
Los Mochis Sinaloa Mex.
Morelos y Zaragoza 109 Sur.
-----------------------------------------------
PortalFox :: Nada corre como un zorro

[link]http://www.portalfox.com[/link]

PortalFox - NNTP Forum Gateway
-----------------------------------------------


"dego" <[link]tuma...@hotmail.com[/link]> escribió en el mensaje
news:[link]equNU7wh...@TK2MSFTNGP09.phx.gbl...[/link]
[i]> miren tengo que mostrar un corte por fecha dentro de el por total y
luego[/i]
[i]> un total general con una sql y no lo puedo hacer[/i]
[i]> yo hago esto[/i]
[i]>[/i]
[i]> select mis campos[/i]
[i]> from mis tablas[/i]
[i]> where mis condiciones[/i]
[i]> group by fecha[/i]
[i]> into micursor[/i]
[i]>[/i]
[i]> y el reporte con esto me queda asi[/i]
[i]> fecha1[/i]
[i]> tot1[/i]
[i]> tot2[/i]
[i]> tot3[/i]
[i]> fecha2[/i]
[i]> tot1[/i]
[i]> tot2[/i]
[i]> tot3[/i]
[i]>[/i]
[i]> y tendria que llegar a esto[/i]
[i]>[/i]
[i]> fecha1[/i]
[i]> tot1[/i]
[i]> tot2[/i]
[i]> tot3[/i]
[i]> total1[/i]
[i]> fecha2[/i]
[i]> tot1[/i]
[i]> tot2[/i]
[i]> tot3[/i]
[i]> total2[/i]
[i]>[/i]
[i]>[/i]
[i]>[/i]
[i]> -----------------------------------------------[/i]
[i]> PortalFox :: Nada corre como un zorro[/i]
[i]> [link]http://www.portalfox.com[/link][/i]
[i]>[/i]
[i]> PortalFox - NNTP Forum Gateway[/i]
[i]> -----------------------------------------------[/i]
[i]>[/i]

</pre>
[/quote]

Con Fox, todo se puede !!

Jorge Vásquez

unread,
Aug 23, 2004, 4:22:41 PM8/23/04
to
Creo que te falta ordernarlo por Fecha primero y de ahí agruparlo como lo
has estado haciendo.

Suerte

0 new messages