Help with displaying inputparams value in report

ccoutsouve
edited February 11, 2022 in Analytics #1

Good afternoon all

I create a report that reflexes the data range parameter based on the current date/time and now I am having a hard time display the inputParams["START_DATE"]  and inputParams["END_DATE"] values as either a text element or dynamic text element. I've tried using global variables based on searches online but I cannot get it to work. I am new to this and any help will be appreciated thank you.

beforeOpen dataset script:

if (params["RDR"].value == 1){

inputParams["START_DATE"] = Formatter.format(priormonth_start, 'dd-MMM-yyyy HH:mm:ss');

inputParams["END_DATE"] = Formatter.format(priormonth_end, 'dd-MMM-yyyy HH:mm:ss');

}else{

inputParams["START_DATE"] = Formatter.format(params["SDATE"].value, 'dd-MMM-yyyy HH:mm:ss');

inputParams["END_DATE"] = Formatter.format(params["EDATE"].value, 'dd-MMM-yyyy HH:mm:ss');


Comments

  • I am not sure what you are trying to do with the code.  You mentioned displaying parameter values as Text elements on the report.  You can display the parameter values simply by dragging the parameters from the Data Explorer editor pane onto the report body.  
    Typically, code is not placed in beforeOpen of the data set unless you are trying to dynamically change the query before running it. 
    What is your goal?
    Warning No formatter is installed for the format ipb
  • the code is for a date flex, its to allow the user to select 1, for example, and it will pull the start date and end date of the month automatically and insert those dates into the data set parameters. if that option is not selected then the default dates selected will be used. I am trying to also have those dates appear on the report as the selected time frame under a report title header label in the report
  • Hopefully the attached example will be helpful.  There is a note on the report describing what was done.
    Warning No formatter is installed for the format ipb