Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CROSS TABS

Status
Not open for further replies.

Angelique

Technical User
Mar 9, 2001
127
AU
Has any one ever setup crosstabs in Paradox? If so, can they give me some guidance?

Thanks in advance

Angelique
 
Crosstabs in Paradox can be a bit confusing--until you do a few of them. The easiest way to do this is to open the table you want to perform the crosstab on, then click on the "quick crosstab" button in your property toolbar. If you don't know which one this is, hold your cursor still over the various buttons until you find it.) This will bring up a dialog box that asks you to define the crosstab. This is the part that confuses a little. There are three "fields" in the crosstab definition that must be filled in: Column, Categories, and Summaries.

The Column will represent the fields across the top of your crosstab. So if you wanted a crosstab to show data across time or SIC code or product number or something, specify it here.

The Categories field(s) will be the first field (column) in your crosstab. So if you wanted to see a summary by retailers, this would be where you point to the RETAILER field in you table. This field will also accept multiple fields, so if you wanted to see retailers by city, you could also specify that here.

And finally, the Summaries filed is pretty much sel-explanatory. Whatever it is you want summarized to the other two field levels (like orders or sales), put it here.

You can save your crosstab as a table. You can do this manually by clicking on Edit->Save Crosstab, and it will automatically save the table as :pRIV:Crosstab.db.

The one thing that I had trouble finding was the ObjectPal method for automating the saving of a crosstab to a table. Just name the crosstab object by right clicking on it in the Design view in the properites dialog box (we'll call it the infamous "myCrossTab") and you can write the following method in the arrive() method on the form-- myCrossTab.action(dataSaveCrosstab)

 
CrossTabs...

Suppose you have the Answer to the query
Total Sales, per month, per State.

State Sort Month Sales
HI 1 Jan01 45
HI 2 Feb01 10
NY 1 Jan01 100
NY 3 Mar01 922

Your could get a crosstab to make this look more like a spreadsheet
State Jan01 Feb01 Mar01
HI 45 10 0
NY 100 0 922

This is what crosstabs do! :eek:)

In this case, (I'm a DOS man, so may be slightly different in Windows), if you use the XtabKey in the state field, it will use the end column (sales) for the data, the one next to it as the new column names and ignore the Sort.

Phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top