customizing pontis reports with infomaker

74
Customizing Pontis Reports with InfoMaker Todd Thompson, PE September 5-6, 2007 Portland, Maine

Upload: palani

Post on 08-Jan-2016

32 views

Category:

Documents


4 download

DESCRIPTION

Customizing Pontis Reports with InfoMaker. Todd Thompson, PE September 5-6, 2007 Portland, Maine. Outline. Review Pontis Database structure Infomaker Navigation Basics Create a SQL query - simple Modify an existing report Modify an existing layout Practice, Practice, Practice. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Customizing Pontis Reports   with InfoMaker

Customizing Pontis Reports

with InfoMaker

Todd Thompson, PESeptember 5-6, 2007

Portland, Maine

Page 2: Customizing Pontis Reports   with InfoMaker

Outline

• Review Pontis Database structure

• Infomaker Navigation Basics

• Create a SQL query - simple

• Modify an existing report

• Modify an existing layout

• Practice, Practice, Practice

Page 3: Customizing Pontis Reports   with InfoMaker

Infomaker

• Assumptions– IM 9 installed already and licensed– ODBC Profile already set up– IM 9 points to that ODBC Profile already– Sample DB (or NHI Training DB)

– If not, we’ll work on this between lessons, breaks

Page 4: Customizing Pontis Reports   with InfoMaker

Pontis Database

• Relational Database

• Multiple Tables

• Each Table made of multiple rows/columns

• 3 Supported DB’s– MS SQL Server 2000– Oracle 9i and 10g– Sybase ASA 8 and 9

Page 5: Customizing Pontis Reports   with InfoMaker

Common Tables

• Inventory Tables– Bridge, roadway

• Inspection Tables– Inspevnt, eleminsp

• Planning Tables– projects

Page 6: Customizing Pontis Reports   with InfoMaker

Custom Tables

• Inventory Tables– Userbridge, userroadway

• Inspection Tables– Userinspection

• Agency can create, define, modify

• Optional

Page 7: Customizing Pontis Reports   with InfoMaker

Example columns

• Bridge Table– Brkey– Bridge_id– Struct_num– Featint– District

• 122 columns of data in bridge table

Page 8: Customizing Pontis Reports   with InfoMaker

Relational Database

• Data is stored in tables

• A set of related tables forms a database

• Key fields define relation of tables

Page 9: Customizing Pontis Reports   with InfoMaker

Relationships

• Referential integrity (aka Dr. Phil) ensures that relationships between tables remain consistent

• Integrity is enforced with primary keys and foreign keys

Page 10: Customizing Pontis Reports   with InfoMaker

Example

• Bridge Table and Roadway Table• A bridge can be in the bridge table once• A bridge can have multiple roadway records

(or can have only one roadway record)• Brkey in bridge must equal brkey in roadway• On_under key defines which roadway record

in table

Page 11: Customizing Pontis Reports   with InfoMaker

Another Example

• Inspevnt table

• A bridge can have multiple inspections– Brkey– Inspkey– Other fields to help determine what type of

inspection(s) was performed

Page 12: Customizing Pontis Reports   with InfoMaker

Schema on Pontis CD

Page 13: Customizing Pontis Reports   with InfoMaker

Schema

Page 14: Customizing Pontis Reports   with InfoMaker

QUESTIONS?

Page 15: Customizing Pontis Reports   with InfoMaker

Infomaker

• Open InfoMaker

• Navigate within InfoMaker

• Connect to a Pontis database

Page 16: Customizing Pontis Reports   with InfoMaker

Intro to InfoMaker

• InfoMaker is a software tool

• Sister product to Powerbuilder– PB was used to create Pontis– Allows seamless integration

• Reports

• Forms

• layouts

• Each agency receives a single license

Page 17: Customizing Pontis Reports   with InfoMaker

Intro to InfoMaker

• You can use InfoMaker to:– Query data, ad-hoc reports – View and edit data– Run SQL Update scripts– Customize reports and structure layouts– Add agency-specific fields and tables

Page 18: Customizing Pontis Reports   with InfoMaker

InfoMaker Navigation

• The working areas in InfoMaker are called “Painters”

• We’ll be working with two painters – database and library

Page 19: Customizing Pontis Reports   with InfoMaker

InfoMaker Navigation

Shortcut to library painter

Shortcut to database painter

Page 20: Customizing Pontis Reports   with InfoMaker

Database Painter

• Connect to a database

• View tables and columns

• Launch/run SQL statements

• Many other items – we won’t cover

Page 21: Customizing Pontis Reports   with InfoMaker

Connect to database

• Click on Database painter icon

Page 22: Customizing Pontis Reports   with InfoMaker

Connect to database

Page 23: Customizing Pontis Reports   with InfoMaker

Connect to database

Page 24: Customizing Pontis Reports   with InfoMaker

View and edit data

• Open up Tables

• Open up Right Click on Bridge, Select Edit Data, Grid

Page 25: Customizing Pontis Reports   with InfoMaker

View and edit data

Page 26: Customizing Pontis Reports   with InfoMaker

View and edit data

• View the data• Sort – go to Rows, Sort• Filter – go to Rows, Filter• Save data in various formats – go to File,

Save Rows As– Excel– Text– Comma delimited

Page 27: Customizing Pontis Reports   with InfoMaker

View and edit data

• Edit data

• Save Changes

Page 28: Customizing Pontis Reports   with InfoMaker

Run SQL statement

• Click on ISQL Session Tab

• Type or paste SQL statements

• Run the SQL

• View the data, like before

Page 29: Customizing Pontis Reports   with InfoMaker

Library Painter

• InfoMaker reports are stored in libraries

• A library has the file extension PBL

Page 30: Customizing Pontis Reports   with InfoMaker

Library Painter

Page 31: Customizing Pontis Reports   with InfoMaker

Library Painter

• Create a new library file

• Copy items from one library to another

• Many other items that we won’t cover today

Page 32: Customizing Pontis Reports   with InfoMaker

Create new library file

• Navigate in tree to where you want new library file stored

• Click on New icon

• Navigate to Library Tab

• Click on Library Icon and OK

• Name the library file

Page 33: Customizing Pontis Reports   with InfoMaker

Create new library file

Page 34: Customizing Pontis Reports   with InfoMaker

Copy item to new library file

• Navigate in tree to Pont_pcr.pbl library

• Find insp003_inspection_schedule report

• Right Click, Copy

• Select New Library and then Open

• This copies the report to the new library we created

Page 35: Customizing Pontis Reports   with InfoMaker

Safe Practices/Thoughts

• Copy reports from a production library

• Work in a “working” library

• Rename the report

• Copy to a production library

Page 36: Customizing Pontis Reports   with InfoMaker

Practice Time

• Start Infomaker

• Open Database Painter– View Data in Bridge Table and Roadway Table– Export Bridge Table to Excel spreadsheet– Open ISQL tab (we’ll run some SQL next

lesson)

Page 37: Customizing Pontis Reports   with InfoMaker

Practice Time

• Open Library Painter

• Create New Library – PUG2007.pbl

• Copy insp006_ report from pont_pcr.pbl library to our new library PUG2007.pbl

Page 38: Customizing Pontis Reports   with InfoMaker

Open Infomaker

• Start Infomaker

• Find the Database and Library Painters

• Go to Tools, Toolbars– Click on Show Text, if you want Text next to

icons– Change Font Size, Show Power Tips, etc

Page 39: Customizing Pontis Reports   with InfoMaker

Toolbars - customization

Page 40: Customizing Pontis Reports   with InfoMaker

Open Database Painter

• View Bridge table data

• Export bridge table data as Excel format

• View Roadway table data

• Navigate to ISQL tab– After Next lesson, we’ll run a SQL statement

Page 41: Customizing Pontis Reports   with InfoMaker

Open Library Painter

• Create a new library called PUG2007.pbl

• Copy report insp003_ from pont_pcr.pbl to PUG2007.pbl

Page 42: Customizing Pontis Reports   with InfoMaker

Simple SQL Query

• Work on simple SQL statements

Page 43: Customizing Pontis Reports   with InfoMaker

What is SQL?

• SQL – Structured Query Language

• Provides standard language for working with data in relational databases – Select– Sort– Count

Page 44: Customizing Pontis Reports   with InfoMaker

SQL Statement

• SELECT “some data” FROM “some table(s)” WHERE “some criteria” are met SORT BY “some data”;

Page 45: Customizing Pontis Reports   with InfoMaker

Sample SQL Statement

SELECT

bridge.bridge_id

FROM

Bridge

WHERE bridge.owner = ‘1’

ORDER BY bridge.bridge_id ASC;

Page 46: Customizing Pontis Reports   with InfoMaker

Sample SQL Statement

• Last query makes a list of all bridge id’s where the owner code = ‘1’

Page 47: Customizing Pontis Reports   with InfoMaker

SQL

• Foundation for all reports, queries, forms, structure layouts

• Four hours wouldn’t be enough time to cover everything

Page 48: Customizing Pontis Reports   with InfoMaker

FAQ

• Start with existing reports, structure layouts

• Review their SQL statements

• Add or subtract from them

• From within Pontis, right click on a data field to learn it’s table and column name

Page 49: Customizing Pontis Reports   with InfoMaker

Info from Pontis

Page 50: Customizing Pontis Reports   with InfoMaker

Test Run a SQL

• We want:– Bridge.bridge_id– Bridge.facility– Bridge.featint– Culverts

Page 51: Customizing Pontis Reports   with InfoMaker

Test Run a SQL

Page 52: Customizing Pontis Reports   with InfoMaker

SELECTbridge.bridge_id,bridge.facility,bridge.featintFROMbridgeWHEREbridge.designmain = '19'ORDER BY bridge.bridge_id ASC;

Page 53: Customizing Pontis Reports   with InfoMaker

QUESTIONS?

Page 54: Customizing Pontis Reports   with InfoMaker

Reports Outline

Page 55: Customizing Pontis Reports   with InfoMaker

Reports

• Created/modified in Infomaker

• Can be made available to be run from Pontis

• Pontis Technical Manual pages 3-36 through 3-38

Page 56: Customizing Pontis Reports   with InfoMaker

Modify Existing Report

• Start Infomaker

• Copy standard report from pont_pcr.pbl to “working” pbl

• Set “working” pbl as working pbl

• Rename report using Save As

• Customize report and save changes

• Copy to pontuser.pbl

Page 57: Customizing Pontis Reports   with InfoMaker

Reports

• Can create a report from scratch– But need to create SQL– Layout the report– Format it– Clean it up

• Why not take a similar report and just modify it?

Page 58: Customizing Pontis Reports   with InfoMaker

Reports – Design View

• Open Library Painter

• Navigate to PUG2007.pbl

• Double click on insp003_ report– Or Right Click Edit

Page 59: Customizing Pontis Reports   with InfoMaker

Report PainterDesign View

Properties

Preview View

Page 60: Customizing Pontis Reports   with InfoMaker

Report Design

• Add/remove data via SQL

• Revise data in design view

• Preview report look in preview view

Page 61: Customizing Pontis Reports   with InfoMaker

Report Exercises

• Copy insp010_ report from pont_pcr.pbl to PUG2007.pbl

• Rename insp010_ to insp210_

• Add bridge.featint to report, make report landscape instead of portraint, place bridge.featint to right of bridge.facility

Page 62: Customizing Pontis Reports   with InfoMaker

QUESTIONS?

Page 63: Customizing Pontis Reports   with InfoMaker

Layouts

• A layout is a certain type of report

• Working with layouts is very similar to working with reports

• But are some specific design details that are different

• Inspection AND Project layouts

Page 64: Customizing Pontis Reports   with InfoMaker

Layout Outline

• Open an existing layout in design view

• Add a field to the layout (or remove)

• Save the changes

• View the updated layout in Pontis

• Optional - Make formatting changes to the layout

Page 65: Customizing Pontis Reports   with InfoMaker

Pontis Layouts

Page 66: Customizing Pontis Reports   with InfoMaker

Structure Layouts

• The layout must select at least the bridge.brkey fields– But doesn’t have to be displayed

• Report must be named following the convention xl_name– Comment – important

• Pontis Technical Manual – page 3-38 thru 3-40

Page 67: Customizing Pontis Reports   with InfoMaker

Structure Layouts

• Column headings must be named correctly– Example – if the column is named facility, then

the heading must be facility_t– Allows sorting and filtering to work in Pontis

Page 68: Customizing Pontis Reports   with InfoMaker
Page 69: Customizing Pontis Reports   with InfoMaker
Page 70: Customizing Pontis Reports   with InfoMaker

Structure Layouts

• Default layouts are located in Pontuser.pbl

• Register updated layouts using the USERLIBRARY option in the Pontis Configuration module

Page 71: Customizing Pontis Reports   with InfoMaker

Layout Comments

Page 72: Customizing Pontis Reports   with InfoMaker

Project Layouts

• Same except – named as pj_name– Must select projkey from projects table

Page 73: Customizing Pontis Reports   with InfoMaker

Layout Exercise

• Use xl_material_and_type

• Copy from pontuser.pbl to PUG2007.pbl

• Add location field (bridge.location)

• Save as xl_pug2007– Comment as Material with location

• Copy back to pontuser.pbl

• Check in Pontis that it exists

Page 74: Customizing Pontis Reports   with InfoMaker

QUESTIONS?