Hi Mariam, The problem as I understand it is that you are trying to access the values of parameters while the report is being *defined*, but the parameters don't actually have specific values until the report is *run*. At definition time you need to use the idea of "parameter mapping".
Can you send a link to the code that you're writing? I think we'll need that to be able to help. -Darius On Tue, Mar 6, 2012 at 9:34 AM, Michael Seaton <[email protected]> wrote: > ** > Hi Mariam, > > I'm not 100% I understand the question, but it sounds like you are on the > right track, where you have _defined_ a parameter called "endDate, " in > your Query, and then have used it like follows: > > select patient_id from order where.... and start_date <= :endDate > > Then, when the user is prompted for this endDate value, the framework will > pass that value into the query to use when it is evaluated. > > The Parameter value itself is available within the EvaluationContext > during the course of the evaluation, if you need to retrieve it and use it > for another purpose. And it can be mapped down to an underlying definition > by using the Mapped<Definition> construct in code. How are you trying to > use the parameter value? Can you show and example of your code and what > you are trying to do? > > Thanks, > Mike > > > > > On 03/06/2012 02:07 AM, Mariam N. wrote: > > Hi > Im working on Reporting Framework and I've seen almost all things are done > in a normal class in which Cohorts and Indicators are defined and added to > the report. > Normally, to deal with parameters the possible way is to do things like * > :endDate*,*:startDate*,.... in *sql queries*. > What if someone needs the *parameter value not the parameter definition*? > My report includes sql queries and other additional logics (as seen in the > following table, my logic was to get all regimens which have been > subscribed to the patients before *endDate *and then use reproting > cohorts/indicators/dimensions to display patients on each regimen). > Thanks. > > > My report looks like this: > [image: Inline image 1] > > > > > * > > * > > ------------------------------ > Click here to > unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from > OpenMRS Developers' mailing list > > ------------------------------ > Click here to > unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from > OpenMRS Developers' mailing list > _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

