detr820 Posted August 16, 2013 Share Posted August 16, 2013 Estoy usando Jasper Soft para crear reportes de Openerp con postgre sql.Tengo este query:select sum(account_invoice.amount_total), case to_char(date_invoice,'mm') when '01' then 'Enero' when '02' then 'Febrero' when '03' then 'Marzo' when '04' then 'Abril' when '05' then 'Mayo' when '06' then 'Junio' when '07' then 'Julio' when '08' then 'Agosto' when '09' then 'Septiembre' when '10' then 'Octubre' when '11' then 'Noviembre' when '12' then 'Diciembre' end from account_invoicegroup by case to_char(date_invoice,'mm') when '01' then 'Enero' when '02' then 'Febrero' when '03' then 'Marzo' when '04' then 'Abril' when '05' then 'Mayo' when '06' then 'Junio' when '07' then 'Julio' when '08' then 'Agosto' when '09' then 'Septiembre' when '10' then 'Octubre' when '11' then 'Noviembre' when '12' then 'Diciembre' end[/code] Lo que necesito es crear un reporte donde pueda convertir la fecha a mes, luego agrupar dicho reporte por mes (ordenado tambien), Existe una forma mas corta de hacerlo? ya probe con MONTH, DATEPART y me dice que la funcion no existe.De antemano gracias. Link to comment Share on other sites More sharing options...
djohnson53 Posted August 17, 2013 Share Posted August 17, 2013 English:I'm using Jasper Soft to create reports with postgre sql Openerp.{example sql}What I need is to create a report which can convert the date to month after that report grouped by month (ordered too), There is a shorter way to do it? and probe with MONTH, DATEPART and tells me that the function does not exist.Thanks in advance. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now