Create Custom Database Views

You can create database views without basing your new view on an existing object.

You can create a database view and specify the categories to assign to the view. You can assign up to 40 categories to a view.
  1. Define a new view.
    Use the INSERT INTO statement. You must provide a view name and description.
    For example,
    insert into PS_REPORT_VIEW_PROP
    (name , description)
    values
    ('AssetReport', 'List of all assets including their ID, location, and owner')
    

    Note:

    The view name may contain only letters, numbers, and the following special characters: _, @, or #.
    Then click Run.
  2. Find the ID number of your view.
    Type select report_view_id_from PS_REPORT_VIEW_PROP where name = '<ViewName>'
    For example, select report_view_id_from PS_REPORT_VIEW_PROP where name = 'AssetReport'
    Then click Run.
    Make a note of the ID number returned by this query.
  3. Find the IDs of the categories you want to include in the view.
    Type select category_id, name from ps_category_prop.
    Then click Run.
    Make a note of the IDs of the categories you want to include in the view from the information returned by this query.
  4. Insert the categories into the view.
    Type insert into PS_REPORT_VIEW_CATEGORIES values (<ViewID>, <CategoriID>, <ColumnName>)
    Where
    • <ViewID> is the ID returned in step 2.
    • <CategoryID> is the ID of a category returned in step 3.
    • <ColumnName> is the name you want to give to the column in the database view.

    Note:

    If you want to keep the name of the category as it appears in Primavera Portfolio Management, instead of <ColumnName>, use null.
    For example, insert into PS_REPORT_VIEW_CATEGORIES values ( 1 , 17 , 'AssetID')
    Then click Run.
    Repeat this step for each of the categories you want to assign to the view.
  5. Create the view.
    Once the view is fully defined, you must create the view.
    Type PS_CREATE_RV.
    Then click Run.