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

Crosstab report

Status
Not open for further replies.

anjanaj

Programmer
Joined
Jan 10, 2002
Messages
17
Location
IN
I'm trying to make a crosstab report, where the summarized filed is not necessarily a Numeric Field ... and the crosstab allows only numeric fields to be shown as the data values. To be more clear of what i want is ...

I have a table (Fileds : SNo, Heading, Value) of a structure, say :-

SNo Caption Value

1 Serial No. 1
2 Name Ram Verma
3 Address XYZ City
4 Amount 10000
1 Serial No. 2
2 Name Shyam Gopal
3 Address ABC City
4 Amount 25000

Now, in the report (SNo and Caption to be given as the column headers) and Value as data in rows for the report) I want the data to look like :-

1 2 3 4
Serial No. Name Address Amount

1 Ram Verma XYZ City 10000
2 Shyam Gopal ABC City 25000

If I try taking the field 'Value' in the summarized field while making the crosstab, it only allows me ot take a count, etc. of the field, but not the filed itself.

Can u please help me in this ... ?

Thanx
Anjana
 
I'm not sure why you're using crosstab for this - it looks like a standard listing report - what am I missing? Andrew Baines
Chase International
 
How would it be a standard report ... All are columns in the table and not coming in rows !

SNo, Caption, Value are the columns !!

How can I have 1 2 3 4/ Serial No. Name Address Amount in the same row set when they are different rows in the table ?

So what I want is SNo and Caption as the headings ... that too in different columns ... and want Value underneath the column headers !

I hope you got it ...

Anjana
 
A crosstab doesn't have to show a numeric field, but it does have to be a summary field.

So if the source field is a string, you can count, or distinct count it (still a number tho') and you can also Max and min it (is that a string value you'd be able to work with?) Editor and Publisher of Crystal Clear
 
Do it as a standard listing report with 4 variables:
1) If Sno = 1 then value else null
2) if SNO = 2 then value else null
etc etc
Then just display a summary for each of those fields Max(1), MAx(2) etc.
Hide the detail section so that the values are in the summary.

Why such a dreadful database design? Andrew Baines
Chase International
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top