Page 1 of 2
Column Totals?
Posted: Fri Feb 21, 2014 8:46 pm
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.
Re: Column Totals?
Posted: Sat Feb 22, 2014 12:44 am
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
Re: Column Totals?
Posted: Sat Feb 22, 2014 8:51 am
by Giu
I can't see anything on this image
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.
Re: Column Totals?
Posted: Tue Feb 25, 2014 12:12 am
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
Re: Column Totals?
Posted: Thu Feb 27, 2014 10:41 am
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.
Re: Column Totals?
Posted: Thu Feb 27, 2014 10:35 pm
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
Re: Column Totals?
Posted: Fri Feb 28, 2014 3:10 pm
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...
Re: Column Totals?
Posted: Tue Mar 04, 2014 1:31 am
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
Re: Column Totals?
Posted: Thu Mar 06, 2014 8:32 am
by Giu
I will try, Thanks.
Re: Column Totals?
Posted: Thu Mar 06, 2014 10:52 pm
by admin
Good luck.