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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab - Hiding Columns

Status
Not open for further replies.

KatGraham

Programmer
Feb 12, 2003
58
0
0
US
Is it possible to hide columns in a crosstab?

I want to be able to have the user choose a location to view. A report will print with just that location and the total of all locations (side-by-side). But also be able to choose all locations also.

Help?
 
I woiuld suggest a 'layered' approach. Let 'ye olde' XTab just do it's thing. Have a form with the necessary coutrols to accomplish the selection (Combo boxes, Multi-select ...) and a command button for 'go'. The button uses the selections to build a query based on the XTab and displays it in your desired format.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
I do not follow?

I have figures out the combo box portion but how do I get the cross-tab to hide unwanted columns BUT also display the totals.

IE.
Age Range Dover Roch Total
<34 1 1 2
35-39 2 2 4
40-44 1 3 4
Totals 4 6 10

Want to hide: Roch but show Dover and Totals for (Dover and Roch).
 
The 'layer' refers to having a SECOND query whih uses the XTab as its SOURCE. You can display (or not) any of hte info in hte XTab. You just need to &quot;write&quot; the query (perhaps in code?) based on the selections. It is really not all that hard. Even individuals with limited training in queries and vb(A) can usually accomplish it.

Generate the XTab per normal. Gnerate a &quot;Select&quot; query based on the XTab, showing a 'typical&quot; display.

Switch the &quot;Select:&quot; query to &quot;SQL&quot; view (with the query having the focus, look at the menu bar(s) on the right you will see a &quot;comboBox&quot;. To the right of the combo down arrow is a picture - Depending on the current view, it is a Drafting Triange, a data sheet (or &quot;SQL&quot;. Select the SQL from the combo. A &quot;TextBox&quot; shows the query statement. Copy it off to somewhere and study it. You only need to change the field names depending on the &quot;Selections&quot;.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
i dont get it... do you want to hide roch on the report? or in the query... cause if you want to do that on the report its easy ??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top