Hi I have a jasper report fetching data with following query: SELECT datepart(ww, LOGDATE) AS weeks from mc_logs This works. The problem comes when I replace the 'ww' with a parameter like SELECT datepart($P{DATETYPE}, LOGDATE) AS weeks from mc_logs Has anyone tried this or have a workaround?