Page 1 of 2

Browse/report with accordeon

Posted: Thu Aug 13, 2015 7:22 am
by skiman
Hi,

I have some data (array) in the following form.

Code: Select all

Brand - Category - Subcategory - Sales
Sony - Audio - TV - 1000
Sony - Audio - soundbar - 500
Sony - IT - Notebook - 1000
Samsung - Audio - TV - 2000
Samsung - Audio - Soundbar - 500
...
I'm looking to create a screen which shows the following at startup:
Sony - 2500
Samsung - 2500

If you click on Sony you get the following:
Audio - 1500
IT - 1000

If you click on Audio you get:
TV - 1000
Soundbar - 500

With jQuery this is called 'accordeon'.

Any suggestions how this could be accomplished in Xbase++?

Re: Browse/report with accordeon

Posted: Thu Aug 13, 2015 9:09 am
by Auge_Ohr
hi

if you want to browse Array :
1st Column "Brand" than "SET RELATION" from 2nd Column up with Footer to Sum.

Re: Browse/report with accordeon

Posted: Thu Aug 13, 2015 10:08 pm
by Wolfgang Ciriack
Make a Treeview from your array.

Re: Browse/report with accordeon

Posted: Fri Aug 14, 2015 12:25 am
by skiman
Hi,

@Jimmy, I don't understand what you mean with the 'set relation' in an array.

@Wolfgang: Yes a treeview seems to be a logical choice, but the layout of a treeview doesn't provide columns, and also it doesn't provide totals and subtotals.

I will check the possibilities of the report-control of Codejock. That has the layout as needed.

Re: Browse/report with accordeon

Posted: Fri Aug 14, 2015 3:05 am
by Wolfgang Ciriack
but the layout of a treeview doesn't provide columns, and also it doesn't provide totals and subtotals.
You can calculate them when building your treeview (or expanding the treeview) and put the sum in the CARGO of each treeview item and showing them in on a separate static.
And your "columns" are the different childitems.

Code: Select all

+Sony-----+Audio---+TV
                   +Soundbar
     -----+IT------+Notebook
+Samsung--+Audio---+TV
                   +Soundbar

Re: Browse/report with accordeon

Posted: Fri Aug 14, 2015 6:26 am
by skiman
Hi,

I solved this problem with the codejosk reportcontrol. I has the possibility to change the order. It recalculates automatically. The user can sort on the column he/she wants with simple drag and drop.

Sorted and subtotals by brand and category:
brandcategory.PNG
brandcategory.PNG (31.72 KiB) Viewed 14788 times
Sorted and subtotals by Category and brand:
category-brand.PNG
category-brand.PNG (21.26 KiB) Viewed 14788 times
Sorted and subtotals by Category - Subcategory - Brand:
cat-subcat-brand.PNG
cat-subcat-brand.PNG (27.06 KiB) Viewed 14788 times

Re: Browse/report with accordeon

Posted: Fri Aug 14, 2015 8:24 am
by Auge_Ohr
skiman wrote:@Jimmy, I don't understand what you mean with the 'set relation' in an array.
i mean to make 2 Browse in One ...
1St Browse is only 1st Column. 2nd Browse goes into "RELATION" when Cursor of 1st Browse is moved.
have to "generate" a Array Sample if you need it.
skiman wrote:Yes a treeview seems to be a logical choice, but the layout of a treeview doesn't provide columns, and also it doesn't provide totals and subtotals.

I will check the possibilities of the report-control of Codejock. That has the layout as needed.
hm ... Codejock Report Control ... Treeview and Listview in one Control ... look nice.

Re: Browse/report with accordeon

Posted: Fri Aug 14, 2015 8:37 am
by unixkd
Hi all

Codejock CONTROLs are good IN PRINCIPLE, but in practice, you will be disapointed with the SLUGISNESS of the controls. Try to populate 5000 items on the codejock report control, you will come back home quickly. In terms of performance on large datasets nothing close to Xbase++ in the market today except you are coding in C/C++.

Joe

Re: Browse/report with accordeon

Posted: Fri Aug 14, 2015 8:37 am
by unixkd
Hi all

Codejock CONTROLs are good IN PRINCIPLE, but in practice, you will be disapointed with the SLUGISNESS of the controls. Try to populate 5000 items on the codejock report control, you will come back home quickly. In terms of performance on large datasets nothing close to Xbase++ in the market today except you are coding in C/C++.

Joe

Re: Browse/report with accordeon

Posted: Fri Aug 14, 2015 8:48 am
by Tom
You can do all that in a XbpBrowse.