Welcome to the nuBuilder Forums!

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

Column Totals?

Giu
Posts: 87
Joined: Sat Jan 25, 2014 11:01 am
Has thanked: 9 times

Column Totals?

Unread post by Giu »

I'm looking into documentation and I can't find it.

I have an application (not nuBuilder) wich has a window to search on a table using a lot of parameters. Do a complex Query to retrieve documents (orders, invoices, and so on...) and on this window you can mix a lot of parameters (Customer From .. To, or All, Invoices, Orders, Orders & Invoices, etc..)

Documents retrieved are showed on a grid, having some totals on Columns for some fields.

This feature on my aplication is a must have for my customer, and I'm looking how to replicate this behaviour on nuBuilder Pro.

Some ideas? Don't see any way to just show a grid with data retrieved from a query, with totals for columns.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Column Totals?

Unread post by admin »

Giu,

With jQuery and the Form events "Before Browse" and "Before Open", you can do nearly anything.


This is something we have done for a customer of ours..
Capture.PNG
nuBuilder Pro is only limited by your imagination.

Steven
You do not have the required permissions to view the files attached to this post.
Giu
Posts: 87
Joined: Sat Jan 25, 2014 11:01 am
Has thanked: 9 times

Re: Column Totals?

Unread post by Giu »

I can't see anything on this image :D

There are some way you can share how this browse form is builded?

And in the same topic, in documentation speaks about 2 screen model (browse -> edit -> browse -> edit..) but how to make it something like my prior example? I mean,how can use an edit form to fill data and Params to do a complex query based on Params, and show results on a browse form?

Ex:
On my app, my form shows a window where you can...
Choose a customer range, or all
Choose a date range
Using checkboxes to select if you want to filter just orders, or invoices, both and so on..

Using this data a complex query is do it, and show results on the form I mentioned on my first post.

I will try to post a screenshot later.

Regards.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Column Totals?

Unread post by admin »

Giu,

http://forums.nubuilder.cloud/viewtopic.php?f=15&t=8346 has a copy of the db that made most of the tutorials.

The Customer Form shows how to chage grid colors.

The block at the bottom was done with jQuery, you'll have to learn that yourself (its not really nuBuilder related)

My advice is try little things at a time.

BTW, I didn't want you read be able to read the graphic (its confidential) I just wanted to give you some ideas.

Steven
Giu
Posts: 87
Joined: Sat Jan 25, 2014 11:01 am
Has thanked: 9 times

Re: Column Totals?

Unread post by Giu »

admin wrote:Giu,

http://forums.nubuilder.cloud/viewtopic.php?f=15&t=8346 has a copy of the db that made most of the tutorials.

The Customer Form shows how to chage grid colors.

The block at the bottom was done with jQuery, you'll have to learn that yourself (its not really nuBuilder related)

My advice is try little things at a time.

BTW, I didn't want you read be able to read the graphic (its confidential) I just wanted to give you some ideas.

Steven
I think it's not the latest version. I don't see bottom block, or the use of Ifeames like in videos

Regards.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Column Totals?

Unread post by admin »

Giu,

Back to your original question. Can you show me a print screen of the app your client now uses?

BTW. Nice answer in the installation section

Steven
Giu
Posts: 87
Joined: Sat Jan 25, 2014 11:01 am
Has thanked: 9 times

Re: Column Totals?

Unread post by Giu »

admin wrote:Giu,

Back to your original question. Can you show me a print screen of the app your client now uses?

BTW. Nice answer in the installation section

Steven
Of course, sorry, I forgot the pic.
Captura.PNG
This is the Search Form, all params are involved on the query
Captura2.PNG
This is the resulting form. With column total, and with buttons to print (offer different reports options, grouped, not grouped, and so on..), refine search, and so on. Doble click Each element on grid opens it's own form. Invoices Form for Invoices, Orders form for Orders, and so on...
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Column Totals?

Unread post by admin »

Giu,

You can do this in php on Before Browse..

Code: Select all


$sql = "SELECT SUM(1) AS due FROM invoice ";
$qry = nuRunQuery($sql);
$obj = db_fetch_object($qry);
$due = number_format($obj->due,2);

$javascript = "
	function showTotals() {
		$('#nuStatusHolder').append('<div class=\"edittable\" id=\"due\" style=\"top:2px; left:950px; position:absolute;\"><b>Invoices Due: $due</b></div>');		
	}
";
nuAddJavascript($javascript);

Will give you this..
Capture2.PNG
Steven
You do not have the required permissions to view the files attached to this post.
Giu
Posts: 87
Joined: Sat Jan 25, 2014 11:01 am
Has thanked: 9 times

Re: Column Totals?

Unread post by Giu »

I will try, Thanks.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Column Totals?

Unread post by admin »

Good luck.
Locked