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!

Fields in Cross Tab grid

Status
Not open for further replies.

Flupke

Programmer
Jun 26, 2002
94
BE
In a cross-tab grid, I want the row- and column-headers other than just a database field-name. I don't seem able to put there a text-field in which I could combine text and/or several field-names.
Is it possible to manipulate the row- and column-headers or to put there several fields?

Many thanks and greetings from Brugge (Bruges - Belgium),

Michel
 
While in the crosstab expert, highlight the row or column field->group options->customize group name->use a formula to customize name and enter the string you would like to use as the name.

If you are trying to create a label for all columns or all rows, then create a formula:

whilereadingrecords;
"Countries" //Substitute your label

Insert this as the highest order row (or column) and then go to the customize style tab and select the formula and check "Suppress row (or column) totals" so that you don't get summaries for the label.

-LB


 
Hello, I am trying to create CrossTab. And we got following requirements from the business. I have problem using first two columns in the cross tab.

This is my cross tab should look like:

Port_desc Result 1/31/2005 12/31/2004 11/30/2004
Test1 Pass 100% 20% 30%
Test2 Fail 87% 30% 60%

But my table is designed like this:
port_desc varchar(30)
result varchar(10)
r_date datetime
result_val int

My problem is I can't use port_desc & result columns in the crosstab. But I can use r_date and result_val. Is there any way I can create crosstab with this table structure?
Thanks,
RajPree.

 
What version of CR are you using? If we can assume that your records will appear in datetime order, then you could try using a formula which assigns a sequence number based on date order like the following as your row field:

whilereadingrecords;
numbervar datex := datex + 1;
stringvar result;
stringvar grpname;

if {table.result_val > .9 then //establish the criterion here
result := " Pass" else
result := " Fail";
grpname := "test "+ totext(datex,"0000") + result;

You need to format the formula with "0000" (or with zeros up to the maximum number of integers in the test number) to sort correctly, but you could change the display by using the custom name option in group options for the row field->use a formula for group name:

numbervar datex;
stringvar result;

"Test " + totext(datex,0,"") + result

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top