alfa <[EMAIL PROTECTED]> writes:

> 
> 
> Hi 
> 
> Here is my sql query
> select a.rmaid, CompanyName, arrivaldate, despatchdate,
> datediff(despatchdate,arrivaldate) 'NoOfDays', Orderdate,proddesc from
> rmatable a, company b, companyorder c, product d,
> rmatable_product e where   a.companyid = b.companyid and a.rmaid = c.rmaid
> and a.companyid = c.companyid and
> a.rmaid = e.rmaid and d.prodid = e.prodid and month(despatchdate) =  
> (month(curdate())-1);
> 
> this query is working fine with i report. but when i try to display
> 'NoOfDays' field in the report i cannot generate the report. i get error
> while compiling. if i don't include this field in the report then report
> runs fine. 'NoOfDays' is alias name.
> doen anyone know the reason? please let me know.
> 
> Thanks
> --
> View this message in context: 
http://www.nabble.com/problem+with+mysql++deatediff+in+ireport-
t1679426.html#a4554225
> Sent from the JReport forum at Nabble.com.
> 
> -------------------------------------------------------
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> Fully trained technicians. The highest number of Red Hat certifications in
> the hosting industry. Fanatical Support. Click to learn more
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
> 

Hi,
I went through your query and it looks as if you are getting the problem since 
you are giving 'NoOfDays' (within single quotes). Instead try giving without 
the single quotes as below.

datediff(despatchdate,arrivaldate) NoOfDays,

In case if that was helpful mail a feedback to me...
Regards,
Vijay







-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions

Reply via email to