19/03/2016

[Avaloq] Get task parameter value in datamart and use it in layout

When creating a new report in Avaloq, you will typically create/edit a datamart (REP DTM source) and a layout (eg: REP SCREEN scource).

If you wish to use a task parameter to enhance the functionality offered by your report, first store the value in a variable inside the DTM (it will be at TOP level):

 [Report 2.0]  
   
 report some_task.some_dtm  
   
  datamart  
   on init  
    --get the parameter passed to the task  
    my_task_param   some_datatype   assign   [task_exec.param("my_task_param").nr_val(1)] --remember to check the DDIC for more appropriate methods other than nr_val. Also pay attention to the sequence number!  
   
   connect some_ddic as dm  
        
      ...  


then access it from your layout with:

top.my_task_param

No comments:

Post a Comment

With great power comes great responsibility