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

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

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

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

Procedure to Create Custom Report to Report on F5 Virtual Services

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.

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

Manage and Generate Reports

Microsoft Excel 2010 Part 2: Intermediate Excel

WHITEPAGES PRO DEEP LINK BUILDER

Getting Started With the Cisco PAM Desktop Software

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

Creating a Crosstab Query in Design View

Using Sitecore 5.3.1

Microsoft Access 2010

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

Creating a PDF Report with Multiple Queries

Database Design Lab: MS Access Queries

Switchboard. Creating and Running a Navigation Form

Creating Simple Report from Excel

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.

CounselLink Reporting. Designer

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

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

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

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

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

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

SPARK. User Manual Ver ITLAQ Technologies

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

Adobe Fireworks CS Essential Techniques

Management Reports Centre. User Guide. Emmanuel Amekuedi

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

Using Adobe Contribute 4 A guide for new website authors

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

A Guided Tour of Doc-To-Help

Swiiit User Guide 09/11/2016

Swiiit User Guide 03/09/2015

Center for Faculty Development and Support Making Documents Accessible

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

Creating Interactive PDF Forms

Using the ispxpga Floorplanner

Xerte. Guide to making responsive webpages with Bootstrap

Working with Macros. Creating a Macro

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.

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

Adobe Acrobat Pro DC for Windows

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

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

Table of Contents. Table of Contents

Ektron Advanced. Learning Objectives. Getting Started

Table of Contents COURSE OVERVIEW... 5

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

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

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

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

More Skills 11 Format and Position Report Controls

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

Chapter 4: Single Table Form Lab

The figure below shows the Dreamweaver Interface.

A TUTORIAL ON WORD. Katie Gregory

Forms/Distribution Acrobat X Professional. Using the Forms Wizard

OrgChart Now Getting Started Guide. OfficeWork Software LLC

ComponentOne SharePoint Web Parts User Guide

BusinessObjects Frequently Asked Questions

Free ebooks ==>

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

ArtOfTest Inc. Automation Design Canvas 2.0 Beta Quick-Start Guide

SharePoint List Booster Features

Modern Requirements4TFS 2018 Release Notes

Lesson 21 Getting Started with PowerPoint Essentials

Astra Scheduling Grids

Exercise: Contact Us Form

Creating a Simple Webpage using Microsoft FrontPage 2003

Javelin Workbench Tutorial. Version 3.0 September, 2009

Digication eportfolio Student s Guide (Last update: 8/2017)

Designing Reports. eivf Designing Reports Note Types 1

Learning More About NetObjects Matrix Builder 1

Captivating Movies! Getting Started with Captivate

GIMP ANIMATION EFFECTS

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

Act! Marketing Automation

Microsoft Access 2010

Tutorial: Input Grades in Blackboard

Contents. Xweb User Manual

FrontPage 2000 Tutorial -- Advanced

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

INDEX. Drop-down List object, 60, 99, 211 dynamic forms, definition of, 4 dynamic XML forms (.pdf), 80, 89

Aware IM Version 8.2 Aware IM for Mobile Devices

Introduction to Microsoft Access 2016

Learn how to login to Sitefinity and what possible errors you can get if you do not have proper permissions.

Microsoft Access 2013

Layout Manager - Toolbar Reference Guide

Microsoft Access 2013

Transcription:

DbSchema Forms and Reports Tutorial Introduction One of the DbSchema modules is the Forms and Reports designer. The designer allows building of master-details reports as well as small applications for Web or Swing. The forms and reports are compatible with mobile devices and tables due the use of responsive bootstrap HTML templates. They can also implement custom logic using Java-compatible Groovy scripting language. The forms and reports are innovative, in the way it use a new hierarchical structure which allow use of unlimited deepness master-detail reports. The designer is different from what you may have used with other tools. Read this tutorial to understand how they work. What you will learn in this tutorial Due this tutorial you will learn how to build two simple forms, add components and create custom logic. The same designer is used for forms as well as reports. The difference between them two is the interactivity and the HTML template. During this tutorial we will build an interactive page showing the content of a table person, 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 DbSchema project. Open it by starting 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 set-up a query for displaying the 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 panle 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 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

In the text field dialog type firstname in the id field. 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. 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 which will pop-up automatically when this line of code 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 feature in DbSchema 7 and they are released as a beta feature. Please help us to test and improve them and write us back. If we miss some information or some explanations from this tutorial are not clear, please write us on www.dbschema.com support page.