Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Pizza Tutorial on nuBuilder 4.5

Questions related to using nuBuilder Forte.
Post Reply
apmuthu
Posts: 249
Joined: Sun Dec 06, 2020 6:50 am
Location: Chennai, India, Singapore

Pizza Tutorial on nuBuilder 4.5

Unread post by apmuthu »

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
Customer45FF.png
2. View the table structure in nudb
Customer-v45-Table.zip
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
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
Case insensitive search but with data case changed to search string's case:
search_big.png
search_small.png
You do not have the required permissions to view the files attached to this post.
Last edited by apmuthu on Tue Jan 26, 2021 3:16 pm, edited 2 times in total.
apmuthu
Posts: 249
Joined: Sun Dec 06, 2020 6:50 am
Location: Chennai, India, Singapore

Re: Pizza Tutorial on NuBuilder 4.5

Unread post by apmuthu »

1. Create the Product Form in FastForm Builder and size it, laying it out as needed
Product-v45_1.zip
Product45FF.png
2. View the table structure and set the mandatory fields
Product-v45_2.zip

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
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
You do not have the required permissions to view the files attached to this post.
Last edited by apmuthu on Tue Jan 26, 2021 3:17 pm, edited 2 times in total.
apmuthu
Posts: 249
Joined: Sun Dec 06, 2020 6:50 am
Location: Chennai, India, Singapore

Re: Pizza Tutorial on NuBuilder 4.5

Unread post by apmuthu »

Invoice and Items
Invoice_Video.zip
Items_Video.zip
Invoice Layout 1.zip
Item Lookup.zip
InvoiceAdd.zip
The Customer ID should be shown as Customer name in the Invoice Listing:
CustomerID_not_Customer.png
Customer_Join.png
Cus_ID_to_Name.png
ID_is_now_Name.png
When finally done, the SQLs should be:
Pizza45_sqls_all_tables.zip
You do not have the required permissions to view the files attached to this post.
apmuthu
Posts: 249
Joined: Sun Dec 06, 2020 6:50 am
Location: Chennai, India, Singapore

Re: Pizza Tutorial on NuBuilder 4.5

Unread post by apmuthu »

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_2.png
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
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
3. Now Adjust the Report Layout by clicking the Report Designer button to finally become:
ReportDesigner.png
4. The Report Orientation is set using Report Properties:
ReportOrientation.png
5. Alignments are done using Adjust Objects:
AdjustObjects.png
6. Field object parameters are set in Object Properties:
ObjectProperties.png
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
8. Finally we navigate to User Home => Invoice => Choose the Invoice => Print Invoice at:
PrintInvoice.png
You do not have the required permissions to view the files attached to this post.
Last edited by apmuthu on Wed Feb 03, 2021 9:42 pm, edited 3 times in total.
apmuthu
Posts: 249
Joined: Sun Dec 06, 2020 6:50 am
Location: Chennai, India, Singapore

Re: Pizza Tutorial on NuBuilder 4.5

Unread post by apmuthu »

And the resultant Invoice is:
Invoice.pdf
The complete Pizza Tutorial's set of SQL statements is:
Pizza45_sqls_complete.zip
Invoice Table creation screenshot:
Invoice45FF.png
Item Table creation screenshot:
Item45FF.png
Item Product Lookup:
Item_Product_Price_Lookup.png
Item Total Calculations:
Item_Total_Calc.png
Invoice Total Calculations:
Inv_Total_Calc.png
Invoice Tax Calculations:
Invoice_Tax_Calc.png
Invoice Grand Total Calculations:
Invoice_Grand_Total_Calc.png
You do not have the required permissions to view the files attached to this post.
Post Reply