Pizza Tutorial on nuBuilder 4.5

Questions related to using nuBuilder Forte.

Pizza Tutorial on nuBuilder 4.5

Unread postby apmuthu » Sun Jan 17, 2021 1:43 am

This is a tutorial in several videos.

1. Create the Customer Form in FastForm Builder and size it, laying it out as needed
Customer-v45.zip
(1.12 MiB) Downloaded 40 times

Customer45FF.png
Customer45FF.png (10.63 KiB) Viewed 430 times


2. View the table structure in nudb
Customer-v45-Table.zip
(719.01 KiB) Downloaded 35 times


Since the table was created by NuBuilder, we need to set the mandatory fields manually in nudb with:
Code: Select all
ALTER TABLE `customer` CHANGE `cus_name` `cus_name` VARCHAR(1000) CHARSET utf8 COLLATE utf8_general_ci NOT NULL;


3. Insert some initial customer data records
Customer-v45-Data.zip
(847.43 KiB) Downloaded 35 times


Anatomy of the user interface interaction:
1. A Form is created
2. Browseable fields are listed
3. A tab is generated
4. Field objects with layout details are placed in the tab
5. Mandatory fields are manually set
6. Sample data is inserted

The set of SQL statements which when imported into the nubuilder4 database will recreate the entire user interaction above.
Customer_sqls.zip
(1.42 KiB) Downloaded 39 times


Case insensitive search but with data case changed to search string's case:
search_big.png
search_big.png (5.11 KiB) Viewed 430 times

search_small.png
search_small.png (5.18 KiB) Viewed 430 times
Last edited by apmuthu on Tue Jan 26, 2021 11:46 pm, edited 2 times in total.
apmuthu
 
Posts: 249
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: Pizza Tutorial on NuBuilder 4.5

Unread postby apmuthu » Sun Jan 17, 2021 3:40 am

1. Create the Product Form in FastForm Builder and size it, laying it out as needed
Product-v45_1.zip
(758.92 KiB) Downloaded 31 times

Product45FF.png
Product45FF.png (10.44 KiB) Viewed 430 times


2. View the table structure and set the mandatory fields
Product-v45_2.zip
(1.25 MiB) Downloaded 31 times

Code: Select all
ALTER TABLE `product` CHANGE `pro_code` `pro_code` VARCHAR(1000) CHARSET utf8 COLLATE utf8_general_ci NOT NULL,
                       CHANGE `pro_description` `pro_description` VARCHAR(1000) CHARSET utf8 COLLATE utf8_general_ci NOT NULL,
                       CHANGE `pro_price` `pro_price` DECIMAL(12,4) NOT NULL,
                       CHANGE `pro_group` `pro_group` VARCHAR(1000) CHARSET utf8 COLLATE utf8_general_ci NOT NULL;


3. Adjust the layout and form field sizes and insert sample records
Product-v45_3.zip
(1.25 MiB) Downloaded 30 times


Anatomy of the user interface interaction:
1. A Form is created
2. Browseable fields are listed
3. A tab is generated
4. Field objects with layout details are placed in the tab
5. Mandatory fields are manually set
6. Sample data is inserted

The set of SQL statements which when imported into the nubuilder4 database will recreate the entire user interaction above.
Product_sqls.zip
(1.37 KiB) Downloaded 33 times
Last edited by apmuthu on Tue Jan 26, 2021 11:47 pm, edited 2 times in total.
apmuthu
 
Posts: 249
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: Pizza Tutorial on NuBuilder 4.5

Unread postby apmuthu » Sun Jan 24, 2021 10:21 pm

Invoice and Items
Invoice_Video.zip
Invoice initial Table
(1.6 MiB) Downloaded 36 times

Items_Video.zip
Item Table
(1.11 MiB) Downloaded 31 times

Invoice Layout 1.zip
Initial Layout of Invoice
(1.51 MiB) Downloaded 31 times

Item Lookup.zip
Lookup Price for chosen Product
(1.31 MiB) Downloaded 31 times

InvoiceAdd.zip
Add an Invoice and adjust layout
(1.19 MiB) Downloaded 29 times


The Customer ID should be shown as Customer name in the Invoice Listing:
CustomerID_not_Customer.png
Initial state
CustomerID_not_Customer.png (6.26 KiB) Viewed 475 times

Customer_Join.png
The Name from JOIN
Customer_Join.png (10.44 KiB) Viewed 475 times

Cus_ID_to_Name.png
List to show name now
Cus_ID_to_Name.png (6.72 KiB) Viewed 475 times

ID_is_now_Name.png
Final State shows Name in listing
ID_is_now_Name.png (4.77 KiB) Viewed 475 times


When finally done, the SQLs should be:
Pizza45_sqls_all_tables.zip
Updated all Pizza Tute tables and invoice/items application.
(3.04 KiB) Downloaded 31 times
apmuthu
 
Posts: 249
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: Pizza Tutorial on NuBuilder 4.5

Unread postby apmuthu » Tue Jan 26, 2021 7:14 pm

Reports

Now that the tables are there and the form populates and does CRUD operations on them, we can look at how a report is generated (PDF) in this case, a specific Invoice Print.

1. We generate a nuSQL to populate the Invoice PDF by navigating to Home => Builders => SQL => Choose customer, product, invoice and item tables and prepare the relationships.
ReportSQL_Design.png
ReportSQL_Design.png (12.24 KiB) Viewed 442 times

ReportSQL_Design_2.png
ReportSQL_Design_2.png (13.43 KiB) Viewed 442 times

The SQL so obtained is:
Code: Select all
SELECT
customer.*,
    invoice.*,
    item.*,
    product.*

FROM
    customer
        JOIN invoice ON customer.customer_id = invoice.inv_customer_id
        JOIN item ON invoice.invoice_id = item.ite_invoice_id
        JOIN product ON product.product_id = item.ite_product_id

WHERE
    ((invoice.invoice_id = '#RECORD_ID#'))


2. Prepare a Fast Report using the nuSQL created above as the "Table"
PizzaFastReport.png
PizzaFastReport.png (12.53 KiB) Viewed 430 times


3. Build the Report by adjusting the Fast Report created above navigating to Home => Builders => Reports and choosing the Fast Report just created above as:
BuildReport.png
BuildReport.png (6.4 KiB) Viewed 441 times


3. Now Adjust the Report Layout by clicking the Report Designer button to finally become:
ReportDesigner.png
Report Designer Layout
ReportDesigner.png (6.84 KiB) Viewed 430 times


4. The Report Orientation is set using Report Properties:
ReportOrientation.png
ReportOrientation.png (4.7 KiB) Viewed 441 times


5. Alignments are done using Adjust Objects:
AdjustObjects.png
AdjustObjects.png (5.88 KiB) Viewed 441 times


6. Field object parameters are set in Object Properties:
ObjectProperties.png
ObjectProperties.png (13.48 KiB) Viewed 441 times


7. In the Invoice Form, we put in a "Print Invoice" Button by going to Home => Forms => Invoice => Form Properties and in the JS we put in:
Code: Select all
if(nuFormType() == 'edit' && !nuIsNewRecord()){
    nuAddActionButton('InvoiceButton', 'Print Invoice', 'nuRunReport("INV")');
}

Invoice_Form_Print_Invoice_Button.png
Invoice_Form_Print_Invoice_Button.png (8.11 KiB) Viewed 442 times


8. Finally we navigate to User Home => Invoice => Choose the Invoice => Print Invoice at:
PrintInvoice.png
PrintInvoice.png (6.6 KiB) Viewed 384 times
Last edited by apmuthu on Thu Feb 04, 2021 6:12 am, edited 3 times in total.
apmuthu
 
Posts: 249
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: Pizza Tutorial on NuBuilder 4.5

Unread postby apmuthu » Tue Jan 26, 2021 7:52 pm

And the resultant Invoice is:
Invoice.pdf
(7.53 KiB) Downloaded 31 times


The complete Pizza Tutorial's set of SQL statements is:
Pizza45_sqls_complete.zip
(5.09 KiB) Downloaded 31 times


Invoice Table creation screenshot:
Invoice45FF.png
Invoice45FF.png (14.64 KiB) Viewed 430 times


Item Table creation screenshot:
Item45FF.png
Item45FF.png (10.7 KiB) Viewed 430 times


Item Product Lookup:
Item_Product_Price_Lookup.png
Item_Product_Price_Lookup.png (10.01 KiB) Viewed 430 times


Item Total Calculations:
Item_Total_Calc.png
Item_Total_Calc.png (17.51 KiB) Viewed 430 times


Invoice Total Calculations:
Inv_Total_Calc.png
Inv_Total_Calc.png (19.52 KiB) Viewed 430 times


Invoice Tax Calculations:
Invoice_Tax_Calc.png
Invoice_Tax_Calc.png (18.9 KiB) Viewed 430 times


Invoice Grand Total Calculations:
Invoice_Grand_Total_Calc.png
Invoice_Grand_Total_Calc.png (19.12 KiB) Viewed 430 times
apmuthu
 
Posts: 249
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore


Return to General

Who is online

Users browsing this forum: No registered users and 15 guests