Welcome! Log In Create A New Profile

Advanced

Help - WD2024 Pivot Table

Posted by sdaughtry 
Help - WD2024 Pivot Table
February 18, 2024 09:39PM
Table has a 'Country' field defined. Populated with 10,000,000 records with various values (e.g. Belize, France, Spain, USA)

I need to build a list of unique Country names and how many records exist for each Country.

Sounds simple, but I've chased my tail for 3 days trying to get a Pivot Table or a Crosstab report to do this simple output:

Belize 14
France 1,001
Spain 14,246
USA 72,339

A simple two column output that emulates what I can do in Excel with it's PivotTable function by selecting the Country column and a random second column to build the Pivot Table. There are zero examples I've found within WinDev or various Windev forums to show how to accomplish this.

HELP!
Re: Help - WD2024 Pivot Table
February 19, 2024 09:32AM
Hi,

You could use a SQL query like this:

SELECT country, COUNT(*) AS record_count
FROM your_table_name
GROUP BY country;
Re: Help - WD2024 Pivot Table
February 19, 2024 10:01PM
Hi Peter,

Its a pleasure to (virtually) meet you. That is precisely what I wound up doing after fumbling through my woeful SQL skills <g>... once I figured out that I had to create a column in the table and marry it to the SQL count output I was finally moving forward again. I so desperately want to use PivioTables and Crosstab reports in my apps, but it NEVER works and those two topics are vastly under documented.
Re: Help - WD2024 Pivot Table
March 20, 2024 09:06AM
Hi
It is quite easy. Do the bulk with a query . sql or the tool for making queries. Then select that query . then in the control you can do all kinds of things to get excatly what you want.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: