4
votes

I am new to Oracle APEX 5 and I am looking for a link or tutorial to achieve below.

  1. Create a custom report with a parameter (date).

    • Go to shared components > report queries (add your sql statement with parameter. Test report with Bind Variables and works fine)
    • Under manage instance settings I have done the required configurations to print report in PDF
    • Go to share components > reports layouts (add rtf layout)
  2. Add an item (date picker) on a page so that user can select a date.

    • Go to page and add date picker as an item. It works fine
  3. Pass the date selected as a parameter to the custom report and generate output in PDF.

    • Under report query > session state, I have enabled include application and session information. There I selected the item I created on my page. The item name is the same name as the parameter name in my SQL script.

    • On my page I have also include a button that will trigger the report. The button is linked to the report by the URL.

This part fails and I am unable to get a report based on the date I selected in the date picker item.

I have done numerous research but could not find a single place where they explain how to proceed.

Any explanation, link or tutorial would be greatly appreciated.

1
Check that bind variable in the Report Query has the same name on the page. Also, What kind of error message do you receive? Does your PDF reader attempts to open the report?Raúl Castro

1 Answers

0
votes

For instance your page item which stores the date parameter is P9_DATE, you have to pass the page item P9_DATE as a parameter to redirect URL on button click as https://example.com/apex/f?P=&APP_ID.:0:&SESSION.:PRINT_REPORT=<REPORT_NAME>:::P9_DATE:&P9_DATE.