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!

Dynamic Positioning 2

Status
Not open for further replies.

Sacheveral

Technical User
Jan 24, 2005
23
GB
Is there any way that I can dynamically position elements on a report based on their values? I am running Crystal 10.

What I want to do is list the names of our sales people ranked according to a percentage score against each one. So far so easy, but I would like to make the space between each person and the next proportional to the difference in score (i.e. if the there are three people and their scores are 20, 40 and 80 respectively, I want the gap between the first and second person to be half the size of the gap between the second and third person).

Any thoughts? If elements cannot be dynamically positioned or resized, is it possible to create the list as a block of pre-formated text using some visual basic, with say extra carriage returns to make bigger gaps, or some such thing?

Many thanks,

Joe Edwards
 
There are probabaly a couple of ways you could approach this, however as this is more of a question regarding aesthetics exactly how detailed do you want to be?

Would it not be better to use some form of chart to display the proportional ratio or are you wanting to show the data itself?

If you are wanting to list more than just persons name and percentage then you could still use a number of routes such as conditional if then else statements to space out the names to various length blank formulas, i.e.
//10%blankgap
' '
//20%blankgap
' '

etc etc

Would be interested in knowing what data you wish to present and what design you are ultimately wanting.


Thanks

J
 
You could write a formula like:

if next({@score})-{@score} = 20 then
totext({@score},0,"") + replicatestring(chr(13),2) else
if next({@score})-{@score} = 40 then
totext({@score},0,"") + replicatestring(chr(13),4) else
if next({@score})-{@score} = 60 then
totext({@score},0,"") + replicatestring(chr(13),6) else//etc.

Then you would need to format the formula to "can grow".

-LB
 
Thanks for your suggestions. The format that I want to produce is two axes as simple straight lines with the x-axis in the middle (as people can have negative scores). I then want to position just the people's names vertically, relative to their score. As an added bonus if could stagger the names when they overlap that would be great, but not essential.

If you reckon I can do this with a chart that would be much easier. However if I use the method with carriage returns above, then can I change the font size of the carriage returns to change the height, so I just have one carriage return between each pair of names and vary its point size. That way the gaps would not have to be in regular sized chunks.

All help is really appreciated.

Thanks,

Joe
 
Hi Joe,

I beleive I understand what you are saying - I'll have a play around with one of my reports on monday and replicate what you are after then post formula here.

Cheers for the feedback

J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top