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

help with crosstab

Status
Not open for further replies.

sirpelon

Programmer
Sep 13, 2001
19
0
0
MX
Hi everyone

I´m making a report that display the info like this

product1 product2 ....
S2 S1 S3 S2 S1 S3
defect description 0 0 0 0 0 0
defect description 0 0 0 0 0 0

I can make the info appear like this with the crosstab expert, but the problem is that when there´s no info on one of the ships the column dissapear, that´s why i decide to make a manual crosstab based on a FAQ of this site, everything going ok..... but then i think .. what if the product list is dynamic... and here is my question

What could be a good approach for make that, instead of make the list product fixed and make formulas for each one? or
Is this posible?

by the way the info is in the next tables

defects --> catalog
ID_defect
...
products --> catalog
ID_product
...
area_defects --> detail of defects on products by area
ID_area_defect
defe_ID_defect
prod_ID_product
no_shift
quantity
...

Thanks in advance
 
I'd be curious too. We have a ton of tables where the data isn't very friendly for this type of view. I've been using Running Totals to get the data I need, in the format you speak of. It is very time consumuing, but I think it looks better than the crosstab, and all the columns/rows show too :)

Again, I don't know if there is a more dynamic way of doing it. I've also done manual cross-tabs in SQL (SQL Server 2000)...but I am having issues doing them in DB2 for some reason...chokes!

Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top