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 - Problem

Status
Not open for further replies.

rajpree

Programmer
May 24, 2005
18
0
0
US
Hello, I am trying to create CrossTab. And we got following requirements from the business.

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 does your data look like?

From what I see above, I'm guessing it looks like:

Test1 Pass 1/31/2005 100
Test1 Pass 12/31/2004 20
Test1 Pass 11/30/2004 30

Some knowledge of the data is going to be essential.

Peter.
 
Hi Peter,
Yes, absolutely correct my data looks exactly as you described. Only r_date & result_val columns I can use in crosstab, but how I can I implement port_desc & result column as well in Cross tab? Hope I gave you enough info.
 
Is there a unique field that distinguishes Test1 from Test2, e.g., some kind of ID field that would be available for the crosstab?

-LB
 
What is the logic of the "Result" indicator for a given Test? Is it "Fail" if any of the dates failed? If so, use a "Minimum" of outcomes (this would ensure that only if all outcomes were "Pass", you would get "Pass" rather than "Fail").

hth,
- Ido



Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top