Calling a report from a page

In the previous paragraphs, we made a report query and a report layout. Since we want to call this report from a page within our application, we have to add something to the webpage like a button or a link. We will show you how to do this in this recipe.

Getting ready

In the previous recipes, you have created a report query and a report layout. Make sure they work as desired. You should also have a webpage based on the APP_CUSTOMERS table.

How to do it...

  1. Go to the page based on the APP_CUSTOMERS table.
  2. In the buttons section, click the Add icon to create a new button.
  3. Select the appropriate region and click Next.
  4. Select Create button in a region position and click Next.
  5. Enter a name and a label for the button and click Next.
  6. Click Next.
  7. In the action select list, select Download Printable Report Query (after selecting this option, the Report Query select list appears below the Execute Validations select list).
    How to do it...
  8. In the Report Query select list, select rq_customers.
  9. Click Create button.
  10. The button is ready. You can run the page now and click on the button to see what happens.
    How to do it...

How it works...

Like the link for CSV export, the button in this page uses a URL to call the report. It looks like the following:

http://localhost:8000/apexf?p=114:0:&SESSION.:PRINT_REPORT=rq_customers

You could copy this link and paste it in the address bar of your browser, provided you have a valid session ID that has to replace the&SESSION. variable. The 0 in the URL, just behind the application ID of 114, is an indicator that this is an internal application process. Normally, a page number should be entered at this place. The last part of the URL is the PRINT_REPORT argument. Here you can pass the name of the report query you would like to see. In this case, it is rq_customers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.142.166