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

Sample CrossQuery Report

Status
Not open for further replies.
Nov 6, 2002
89
CH
Dear Colleagues

Here my desperate request.

I just can't get a crossquery report with dynamic headings run. Can anyone provide me with a sample mdb (without data) so that I will just have to amend the data? I can't use the solutison.9 sample by microsoft since this is somehow linked with the Nordwind database (even if you delete the respective tables which are linked to Nordwind).

Thanks.

Stefan
 
Do you mean an Crosstab Query. If so how many row headings would you like?

You could send a db with your table in and I will knock one up for you.

Matthew
 
When I started with crosstab reports I found the sample to be very helpful, but somewhat confusing and convoluted.

The basic trick is to name your controls so they can be referenced by number (ex: Value1, Value2, Value3, Value4, etc....). So all controls that will contain values that are in column 1 will end with "1", column 2 with "2", and so on.

The sample has code for referencing controls by combining the "generic name" (ex: 'Value') with the number (ex: 3) and using the result to reference properties of the specific control.

By using code you can decide where to put the data based on whatever is appropriate. In fact, you can even create a cross tab type of report without a cross tab query by using the generically name controls with the column numbers as above and then in your code (for the details), deciding which column and control a specific data item goes in to. I've done this and based the column on the values that I would load into the column headings that I dynamically loaded at every page header. (This was needed because if I used a cross tab in that instance I had more columns of data than would fit across even a 14" page.)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top