Book Image

ADempiere 3.6 Cookbook

Book Image

ADempiere 3.6 Cookbook

Overview of this book

Table of Contents (16 chapters)
ADempiere 3.6 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface

Developing a new report using view


This recipe describes the steps involved in creating a database view and using it to generate reports.

Getting ready

Complete Chapter 2, ADempiere Customization Part I and Chapter 3, ADempiere Customization Part II and keep the final MOM-related schema handy, as we will be using it in this recipe.

How to do it...

  1. 1. Create the following database view:

    CREATE VIEW adempiere.c_mom_v AS
    SELECT
    a.*,
    b.item_nbr,b.discussion_desc,b.ad_user_id AS actioned_by,b.c_momstatus_id,
    c.ad_user_id AS participant,c.company,
    d.name AS status
    FROM
    adempiere.c_mom a
    JOIN adempiere.c_mom_discussionline b ON a.c_mom_id=b.c_mom_id
    JOIN adempiere.c_mom_participantsline c ON c.c_mom_id=b.c_mom_id
    JOIN adempiere.c_momstatus d ON b.c_momstatus_id=d.c_momstatus_id;
    
  2. 2. Log in as System/System with the System Administrator role.

  3. 3. Open Application Dictionary | Table and then the Column window. Then create a new record for the newly created view—c_mom_v.

  1. 4. Click on the Create Columns from...