Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to insert a graphic in a built report

Status
Not open for further replies.

giovamc

Programmer
Dec 8, 2003
4
PE
hi,I need a hand in this, i have a report that was built with this statement
select nombreanalista, mes, anio, NROCOLOCACIONES, montoacumulado
from consolidadocolocaciones A,analista B
WHERE MES >= :p_MESINICIO AND ANIO >= :p_ANIOINICIO
AND MES <= :p_MESFIN AND ANIO <= :p_ANIOFIN
AND CODIGOTIPOREPORTE = 1
AND a.codigopersonaanalista=b.codigopersonaanalista

and I want to show at the end of it a graphic that must be built with this statement
select mes, anio,SUM(montoacumulado)
from consolidadocolocaciones
WHERE MES >= :p_MESINICIO AND ANIO >= :p_ANIOINICIO
AND MES <= :p_MESFIN AND ANIO <= :p_ANIOFIN
AND CODIGOTIPOREPORTE = 1
GROUP BY MES,ANIO

when I tried to do it, there was a confusion, and i could not buit the graphic, what do i have to do please??
 
Hi,
You don't specify what kind of problem you have.

I suppose...
- Data Model has both queries.
- You have created a graphic in Trailer Section or at the end of Main Section.
- You have said to the graph wizard to get data from second query as you desire.

Then, it should normally work. However, I'd like to advise you of that both queries can be wrong if you are trying to get &quot;consolidadocolocaciones rows&quot; within an interval because with these WHERE-clause conditions, a row, for example, with MES = 1 and ANIO = 2003 would be rejected within the interval
P_MESINICIO = 10 P_ANIOINICIO = 2002
P_MESFIN = 10 P_ANIOFIN = 2003

When YEAR and MONTH are separated the conditions are...

((ANIO = :p_ANIOINICIO AND MES >= P_MESINICIO )
OR
(ANIO > :p_ANIOINICIO ))
AND
((ANIO = :p_ANIOFIN AND MES <= P_MESFIN )
OR
(ANIO < :p_ANIOFIN ))

Best Regards,

Enrique.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top