DbSchema Forms and Reports Tutorial

Similar documents
DbSchema Forms and Reports Tutorial

Access Review. 4. Save the table by clicking the Save icon in the Quick Access Toolbar or by pulling

Microsoft Power BI Tutorial: Importing and analyzing data from a Web Page using Power BI Desktop

PHPRad. PHPRad At a Glance. This tutorial will show you basic functionalities in PHPRad and

Report Designer Report Types Table Report Multi-Column Report Label Report Parameterized Report Cross-Tab Report Drill-Down Report Chart with Static

To complete this database, you will need the following file:

Procedure to Create Custom Report to Report on F5 Virtual Services

Getting Started With the Cisco PAM Desktop Software

Note that you must have the Curriculum Map Admin permission to create curriculum map templates. Please contact your IU to obtain this permission.

If this is the first time you have run SSMS, I recommend setting up the startup options so that the environment is set up the way you want it.

Documentation Tool Tutorial Tutorial for Creating a Documentation Tool Interactive in the Texas Gateway

Virto SharePoint Forms Designer for Office 365. Installation and User Guide

Using Sitecore 5.3.1

Manage and Generate Reports

Imagine. Create. Discover. User Manual. TopLine Results Corporation

CounselLink Reporting. Designer

Creating a Crosstab Query in Design View

Introduction. Table Basics. Access 2010 Working with Tables. Video: Working with Tables in Access To Open an Existing Table: Page 1

ekaizen Lessons Table of Contents 1. ebook Basics 1 2. Create a new ebook Make Changes to the ebook Populate the ebook 41

Microsoft Access 2010

Using Adobe Contribute 4 A guide for new website authors

Working with Macros. Creating a Macro

Cascade User Guide. Introduction. Key System Features. User Interface

Database Design Lab: MS Access Queries

Creating a PDF Report with Multiple Queries

Swiiit User Guide 03/09/2015

Microsoft Excel 2010 Part 2: Intermediate Excel

Switchboard. Creating and Running a Navigation Form

Swiiit User Guide 09/11/2016

GoLive will first ask you if your new site will be for one individual or a work group; select for a Single User, and click Next.

Dashboards. created by others because they have given you permission to view.

Creating Simple Report from Excel

Creating Interactive PDF Forms

Astra Scheduling Grids

Forms/Distribution Acrobat X Professional. Using the Forms Wizard

Virto SharePoint Forms Designer for Office 365. Installation and User Guide

NiceForm User Guide. English Edition. Rev Euro Plus d.o.o. & Niceware International LLC All rights reserved.

SPARK. User Manual Ver ITLAQ Technologies

Adobe Fireworks CS Essential Techniques

WHITEPAGES PRO DEEP LINK BUILDER

DB2 for z/os Stored Procedure support in Data Server Manager

Management Reports Centre. User Guide. Emmanuel Amekuedi

Table of Contents COURSE OVERVIEW... 5

Pinterest. Contents. Create Pinterest buttons and widgets that you can add to your WebShop

Free ebooks ==>

Center for Faculty Development and Support Making Documents Accessible

SQL Server Reporting Services (SSRS) is one of SQL Server 2008 s

Using the ispxpga Floorplanner

2 Getting Started. Getting Started (v1.8.6) 3/5/2007

Xerte. Guide to making responsive webpages with Bootstrap

SharePoint Cheat Sheet

Figure 1 Forms category in the Insert panel. You set up a form by inserting it and configuring options through the Properties panel.

Adobe Acrobat Pro DC for Windows

FORMS. The Exciting World of Creating RSVPs and Gathering Information with Forms in ClickDimensions. Presented by: John Reamer

Unit 8. Lesson 8.1. Microsoft FrontPage. Introduction. Microsoft FrontPage-1. Microsoft FrontPage

2. In the Start and End Dates section, use the Calendar icon to change the Displayed Start Date to 1/1/2015 and the Displayed End Date to 5/31/2015.

Website Administration Manual, Part One

Table of Contents. Table of Contents

This Tutorial is for Word 2007 but 2003 instructions are included in [brackets] after of each step.

No Programming Required Create web apps rapidly with Web AppBuilder for ArcGIS

Links to Activities ACTIVITY 4.1. Links to Activities Links to Activities

3. Click the Change Case button. 4. On the menu, click the desired case option. Managing Document Properties

More Skills 11 Format and Position Report Controls

Text box. Command button. 1. Click the tool for the control you choose to draw in this case, the text box.

Chapter 4: Single Table Form Lab

A Guided Tour of Doc-To-Help

Using MindManager 8 for Windows with Microsoft SharePoint 2007 October 3, 2008

Poet Image Description Tool: Step-by-step Guide

The figure below shows the Dreamweaver Interface.

The following instructions cover how to edit an existing report in IBM Cognos Analytics.

Book IX. Developing Applications Rapidly

OrgChart Now Getting Started Guide. OfficeWork Software LLC

Use signatures in Outlook 2010

A TUTORIAL ON WORD. Katie Gregory

ComponentOne SharePoint Web Parts User Guide

D3000.Lite User s Guide

BusinessObjects Frequently Asked Questions

REQUIRED Coach Registration Set Up. Using the pre-loaded folder set up from US Soccer Connect

Website Management with the CMS

SPECIFICATIONS Insert Client Name

SharePoint List Booster Features

Lesson 21 Getting Started with PowerPoint Essentials

Modern Requirements4TFS 2018 Release Notes

Javelin Workbench Tutorial. Version 3.0 September, 2009

Exercise: Contact Us Form

Designing Reports. eivf Designing Reports Note Types 1

Creating a Simple Webpage using Microsoft FrontPage 2003

Simple sets of data can be expressed in a simple table, much like a

GIMP ANIMATION EFFECTS

Learning More About NetObjects Matrix Builder 1

Captivating Movies! Getting Started with Captivate

Act! Marketing Automation

Microsoft Access 2010

MIS Cases: Decision Making With Application Software, Second Edition. Database Glossary

Contents. Xweb User Manual

OpenForms360 Validation User Guide Notable Solutions Inc.

FrontPage 2000 Tutorial -- Advanced

Access. Basics PRESENTED BY THE TECHNOLOGY TRAINERS OF THE MONROE COUNTY LIBRARY SYSTEM

Telerik Corp. Test Studio Standalone & Visual Studio Plug-In Quick-Start Guide

NVU Web Authoring System

Transcription:

DbSchema Forms and Reports Tutorial Contents Introduction... 1 What you will learn in this tutorial... 2 Lesson 1: Create First Form Using Wizard... 3 Lesson 2: Design the Second Form... 9 Add Components to Panel... 10 Back to the List Persons... 16 Edit Person... 18 List Persons... 18 Input Variables... 20 HTML Templates... 21 Execute the application as Swing native... 22 DbSchema Management Applications... 23 End... 23 Introduction The Forms and Reports designer is tool inside DbSchema. Use it to design master-details reports as well as small applications for Web or Swing. They are innovative: The generated reports are compatible with mobile devices and tables by using responsive bootstrap HTML templates. The reports are organized hierarchical, allowing an unlimited number of master-detail sections. The reports can use of custom logic based on Java-compatible Groovy language. The designer is different from what you may know from other tools. Read this tutorial to understand how they work.

What you will learn in this tutorial We will build together a form and a report. We will create components and add custom logic to them. We will use the same designer for forms as well as reports, as they are similar. The report has no interactivity and uses a different HTML template. We will build an interactive page showing the content of the person table, with navigation and edit buttons. Data can be edited Page is navigable Pressing the edit button will open another page for editing the person name. Edit data and submit the changes into the database.

Lesson 1: Create First Form Using Wizard For creating our forms we will use the sample project from DbSchema. Start DbSchema and close any open project (if any). The welcome screen will show up. Choose the sample project. Sample projects The sample project is connected to an embedded H2 database. The interface should look like bellow.

Right-click the table PERSONS and choose New Form or Report from pop-up. New Form or Report A wizard dialog should appear. Type List Persons in the form name field, keep the other settings as they are and press the Continue button.

In the next screen will open the forms designer on top and a query builder on the bottom. We will use the query builder to create a query for the displayed data. Form Designer Query Builder In the query builder select all checkboxes (right-click the table header for an option). Run the query and the result pane will show up. From the result pane choose Continue Wizard. 1) Run Query 2) Press Continue Wizard

The dialog bellow should appear. Here we can choose a component to place for each of the database fields. Leave the personid and clubid unselected and choose labels for all the others. Our first form is ready. The form will look like bellow. Let s execute the form by pressing the play button from the menu. Execute form

The page bellow should show up in the Web browser. Let s compare the form in the designer and the output we got. The form is build out of panels (the rounded corner rectangles). We have three panels: navbar, page and table panels. Each panel contains one or more cells. The navbar is for menu components, now is empty and won t show in the output. Page Panel Navbar ( menu ) Panel Table Panel The page panel is the page itself, the header and first, previous and next buttons on the bottom belongs to it. The table panel is showing the data.

Table Panel The table panel has associated a data source script which is the SQL query created using the query builder. The data source is returning the rows which are getting displayed as a table in the output. The first row in the panel with the blue background is a header row and will show only one time in the output. The second row is a body row and will repeat for each data record in the output. Data Source Header row Body row

Lesson 2: Design the Second Form In this lesson we will build the second form called Edit Person. This form will be used for editing any of the persons first and last name. The form will show as dialog on top of the previous form. We will create the components by ourselves, will add custom logic to the form and interconnect the two forms using buttons. The form will look like bellow. To create it choose from the DbSchema main menu Forms the option New Form or Report. Start New Form The wizard will show up. Enter form name Edit Person, select Skip Editing option and press continue. Skip Wizard

An empty form is created. The page panel has 12 columns because is preset to use a bootstrap grid template. The bootstrap grid used for responsive pages compatible with mobile devices is using twelve ( 12 ) columns of equal size. Add Components to Panel We will add components to panel one by one, without wizard. For this click the first cell and press the label button in the menu. Alternative you can right-click the cell you can choose the label from the pop-up menu. 1. Click a cell 2. Click the label button from menu 2 1 The label dialog will show up. Enter First Name in the text field and press Ok.

The label is created: The label editor can be reopened by double-clicking the label. Double-click to edit The label can be moved to another cell by drag and drop of the label text. Drag & drop text to move label to a different cell One component can cover multiple cells. Drag and drop the grip on the bottom-right side to resize it. Drag & drop the corner to resize label over 3 cells Now the label should cover 3 cells. Let s continue and create a text field in the next cell. Click the cell and choose the text field from the menu. Text Field

Type firstname in the id field of the text field editor. Drag & drop from the bottom grip to resize the text field to cover all left cells. Resize text field to cover all left cells Next we will add label and text field for the last name as well. For this we are going to add one more row to the panel. Right-click the text field and choose Insert Row or Column.

Choose Insert row down to insert the row below the current cell row. The row is created. Now create one more label and text field for the last name. Use lastname for the text field id. Resize them accordingly.

Add one more row and create a button. Choose button Use Save as button text. In the action field we can choose what will be done when the button is clicked. Choose to open the List Persons form when the button is clicked. We want to inform as well the List Persons form that an editing was done, so that the List Persons will apply the editing in the database. In HTML the database is first being updated first in the next page called after the edit page. This is the List Persons page, and a script inside this page will check for the operation variable to know if an edit was done or not. Therefore type in the variables the text operation=edit. Later we will explain variables in detail. Press Ok. Now we are done with the components. We want to open the Edit Persons as a dialog on top of the List Persons. To do this we have to edit the form properties.

Click the form title The form properties dialog will open. Here choose Dialog for the view in field and for the template as well. Press Ok. Open forms as dialog Use dedicated HTML template for dialogs. At this point we should have created two forms. They should be both visible as distinct tab in the current layout.

If you close any of the tabs they can be later reopen the forms from the application menu. All created forms will be saved in DbSchema project file. Similar you can create different other components from the menu. Input Fields Combo-box Panels Charts Label Check-boxes, radio buttons Hyperlink and buttons Back to the List Persons At this point we will create a button in the List Persons form to access the Edit Person. Open the Edit Person form, add one column to the right and place a hyperlink button inside. Create a hyperlink button

Type Edit in the button text field. On click choose to open the Edit Person form and in the variables field enter the text below: lastname=${lastname}&firstname=${firstname}&personid=${personid} The application is using variables to send data between pages. A variable has a name and a value. DbSchema is using a similar way as in HTML URLs to communicate data between pages. The application will replace the ${ } with the given variable names and send it to the target form. We added here the firstname, lastname and personid because they are provided by the data source and there is no input field to store them in the interface. If our form would contain a text field, combo, radio, list, etc. with one of these variables, there would be no need to add them here. The values provided by one of this input fields are send automatically to the next form. Remember that labels do not belong to input fields; they only show some data but are not sent between pages.

Look the image bellow to see which variables are sent between pages. personid firstname lastname List Persons Initialization Script Edit Person personid firstname lastname operation= edit We will implement the logic to apply the changes in the database in the initialization script of the List Persons. Press the form title to access the form properties dialog. Press Form Title to edit properties Here click the Initialization script button. Initialization Script

The Groovy editor will open. Copy & paste the text bellow into the editor. Press if ( the 'edit'.equals( initialization script operation link to )){ open the Groovy Editor. Fill in the text println "Going to update ${personid}" sql.executeupdate( "UPDATE persons SET firstname=?, lastname=? WHERE personid=?", [firstname, lastname, personid] ) } sql.commit() The script is checking if the variable operation has the value edit, and if this is true a database update is executed. The sql is the connection to the database. You can close the Groovy editor by pressing the x on the tab, the text is auto-saved into the project. Now is the time to test the created pages. Press run in the List Persons form. Run form

In the initialization script there is a println command. We use this to debug the script. The command output will show in the DbSchema Output Logs dialog. The dialog pop-ups automatically when the println is reached. All script exceptions are show in the Output Logs dialog accessible from the Help main menu. Input Variables Input variables are declared in the form properties dialog. Two input variables there are already created in the List Persons form properties dialog. Input Variables

The input variables listpersonspagenumber and listpersonsrecordsperpage were created by the wizard in first lesson. They are used to implement the pagination. Double-click any of them to edit. Input variables are used to ensure a certain variable is present when the form is open or to set-up a variable default value if is not present. Each panel with a data source script is checking if the variables <panelid>pagenumber and <panelid>recordsperpage exists. If yes then the data source will consider showing only the given number of records and will scroll to the given page. HTML Templates The form and each component apart have its own HTML template. The templates are generating the HTML. This means you can modify the look of a component or you can add new representation for a component. Each component can have multiple templates. All templates together are groped in a bundle and your application can choose the bundle to use. The template manager is accessible from the DbSchema main menu. A detailed presentation of the template manager is done in the application help.

Execute the application as Swing native DbSchema can execute the created forms as swing applications as well. Switch to swing from the designer menu. Switch to Swing Positioning arrows For Swing the designer will show small arrow icons on top of each column or row. They are responsible for setting the space distribution between columns when the window is resized. The left arrow means the column is taking minimal space to fit the components inside. The right arrow means the column is filling the space, which means it takes all the space left in the window when the window size increase. Components like text areas placed inside will get more space when the window size is increased. A special Swing table layout is used to implement this. Please notice some components as the table in the image above are rendered as HTML even if the main dialog is Swing. The table panel has a setting for this, allowing to embed HTML in Swing.

DbSchema Management Applications Based on the forms and reports module we started implementing database management applications showing information about the database space usage, database activity and locks, management of user roles and rights, etc. The applications are now available from the forms menu (now available only for MySql). The management applications are open source. Please feel free to contribute on development. Please write us on support@dbschema.com about this. End The forms and reports are a new in DbSchema 7. Please help us to improve them by writing us back on www.dbschema.com support page.