Please forgive me if I have missed something obvious but I am still getting my feel around Jasper and having searched many posts - I think I may be overcomplicating the issue, but we shall see. I am trying to figure out how to set a parameter value in a query based on the value of another parameter!! The situation is that I have written a report to track sales and cost on sales invoices which I would like to use with Jasper Server. After a couple of miscues I figured out that if I can design one report template and apply multiple queries using the scheduler to obtain the data to fill the report it would be the most efficient way to maintain the reports. I am trying to figure out how to set a parameter value in a query based on the value of another parameter For example I designed the report as follows: Report Name ReportStartDate to ReportEndDate InvoiceNo invoiceDate SaleAmt CostAmt I then created a parameter to calculate the date of the beginning of the month and the end of the month relative to today using the Commons-Lang as follows: BeginCurrMonth - org.apache.commons.lang.time.DateUtils.truncate(new Date(), 2) EndCurrMonth - org.apache.commons.lang.time.DateUtils.addMonths (org.apache.commons.lang.time.DateUtils.addDays (org.apache.commons.lang.time.DateUtils.truncate(new Date(), 2), -1),1) I did the same for BeginPriorMonth, BeginYear, EndPriorMonth, EndYear, etc so that I can use those parameters as needed in my SQL query. I am able to access these Parameters for use in my query below, which is great: select invoiceno,invoicedate,billto,billtoname, partscost as pcost,(partstaxable + partsnontax) as psell, ((partstaxable + partsnontax)- partscost )as pmarg, (((partstaxable + partsnontax)- partscost )/(partstaxable + partsnontax)) as pmargperc from invoicereg where (partscost <> 0 or (partstaxable + partsnontax) <> 0) and invoicedate >= $P{BeginCurrMonth} and invoicedate<= $P{EndCurrMonth} and salebranch=1 and left(saledept,1)=3 Sometimes the date variable might be $P{BeginPriorMonth}, sometimes it might be $P{BeginYear}, etc. ****************************************************************************************************************** Now for my question - in my report header I want to print the beginning and ending date selections, and sale branch which are determined in the query. I tried to set a generic parameter called ReportStartDate and ReportEndDate and I thought I could set those values in the query like this: set $P{reportstartdate}=$P{BeginCurrMonth} --- This needs to be dynamic because I run the report from scheduler and I do not want to go in and maintain these dates each month select $P{Begin_Date} = $P{BeginCurrMonth} select invoiceno,invoicedate,billto,billtoname, partscost as pcost,(partstaxable + partsnontax) as psell, ((partstaxable + partsnontax)- partscost )as pmarg, (((partstaxable + partsnontax)- partscost )/(partstaxable + partsnontax)) as pmargperc from invoicereg where (partscost <> 0 or (partstaxable + partsnontax) <> 0) and invoicedate >= $P{BeginCurrMonth} and invoicedate<= $P{EndCurrMonth} and salebranch=1 and left(saledept,1)=3 But that did not work - any suggestions on how to set parameter $P{startdate}=$P{BeginCurrMonth}, etc.? Thanks, Joe