Linking the report layout to the report query

Now that we have created a layout in Word we want to use it for our report. In this paragraph, we will show you how to upload the .rtf file and link the layout to a report query.

Getting ready

  1. Make sure that you selected Advanced in the Print server settings. You can set these fields in the internal workspace logging in as admin.
  2. After successful login, click Manage Instance.
  3. In the Instance settings section, click the Instance settings link.
  4. In the Report printing section, select Advanced (requires Oracle BI Publisher) in the Print server radio button.
  5. Click the Apply changes button.
  6. This step is necessary as otherwise you won't see the named columns (RTF) option in the report layout type radio group.

How to do it...

  1. Go to Shared Components— report layouts.
  2. Click the Create button.
  3. Select Named columns (RTF). Click Next.
    How to do it...
  4. In the layout name text field, enter a name for the report, for example, cmr_layout.
  5. Click the Browse button to upload the RTF file.
  6. In the pop-up screen, select the file customers_layout from the map where you saved it and click Open.
  7. Click the Create layout button.
  8. The layout is ready. Now we must link this layout to the report query that we created in the previous recipe.
  9. Go to Shared Components | Report queries.
  10. Click on the icon of the report query rq_customers.
  11. In the report layout list box, select cmr_layout.
  12. You can now click on the test report button in the source queries section to see how the report and the layout look like. Otherwise, click the Apply changes button.
  13. The report query and the report layout are ready now.

How it works...

We made a query and a layout. And now we bring them together. We uploaded the report layout that we made in Microsoft Word and modified the settings of the report query so that it should use the uploaded layout. The query should contain at least the same columns that are used in the Microsoft Word layout, no matter in what order they are. You can use more columns in the query but if they are not in the layout file, you will not see them on the report. On the other hand, if your layout file contains a column that is not in the query, the report will show an empty column.

And just to make it more complex, if you use another column in your query and you give it an alias that is the name of one of the columns in the layout file, APEX will show a report with data from that other column.

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

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