Crosstab with string results (no real calculation)
Dear DM
I would like the crosstab to be able to handle string values, ie:
Date Med Dose
01-01-2004 A 100ml
02-01-2004 A 10ug
03-01-2004 B 5mg
05-01-2004 A 7IE
Producing a crosstab like:
Med 01-01 02-01 03-01 05-01
A 100ml 10ug 7IE
B 5mg
The dataset is generated so that there is only one value at each crosspoint.
When using Excell or SQL, I would normally use the MAX function to extract
the value, but in RB, only numerics are allowed to be values (except for
count).
I have tried rewriting parts of the source so that calculations except SUM
and AVG may be done on strings, but this is not sufficient as you do all
kind af string checking all over the routines.
Any ideas of how to accomplish this result.
I am using RBE 7.03, Delphi 6
-Rene
I would like the crosstab to be able to handle string values, ie:
Date Med Dose
01-01-2004 A 100ml
02-01-2004 A 10ug
03-01-2004 B 5mg
05-01-2004 A 7IE
Producing a crosstab like:
Med 01-01 02-01 03-01 05-01
A 100ml 10ug 7IE
B 5mg
The dataset is generated so that there is only one value at each crosspoint.
When using Excell or SQL, I would normally use the MAX function to extract
the value, but in RB, only numerics are allowed to be values (except for
count).
I have tried rewriting parts of the source so that calculations except SUM
and AVG may be done on strings, but this is not sufficient as you do all
kind af string checking all over the routines.
Any ideas of how to accomplish this result.
I am using RBE 7.03, Delphi 6
-Rene
This discussion has been closed.
Comments
The CrossTab component is a very powerful and useful tool for its specific
purpose. It was designed to only use numerical values. Unfortunately the
CrossTab components is not very easily customizable. Very quickly I can
tell you that you will probably need to create new descendents to the
TppDimention class to incorporate string values. You'll also find the
CrossTab component is very well documented in the ReportBuilder help to help
find specifics on how each object works. Reading these help files may give
you more insight on what kind of design changes you will need to make.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com