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

align bottom at runtime

Status
Not open for further replies.

latwv

Programmer
Nov 19, 2001
16
US
I am using the crystal report developer 8.5 in Visual Basic 6. I have one field that can grow and one that cannot. I want to be able to align their bottoms at runtime after the first field has grown so they would look like this


Field
Title 1 Title2
-------- --------


Thanks,
Lori
 
I am a bit confused is:

Field
Title1

a single field or a "Can Grow" Field ontop of Title1

if it is a single field then you cannot align the bottoms of the Title1 & Title 2

if Field is different from Title1

Place Field in one section and Title 1 and Title2 in a subsection below it then Field affect both titles equally

If this is a column heading...one with 2 line and another with a single line...I ALWAYS break the 2 line header into 2 separate fields and stack them....then alignment problems disappear
 
The Field Title1 are one field. It is a field from the database. It can be 2 lines to 6 lines high. I was hoping for a way to do the alignment at run time after the height had been calculated.

Thanks anyway,
Lori
 
No....you cannot do that to the best of my knownledge. Crystal doesn't do that kinda pre-calculation for you.

If I had this problem and it absolutely had to be done I guess I would try this messy approach.

determine the number of characters that you want each line to have.

let us say for example we have a max of six lines with 10 characters/line

then the section where these fields belong would have 6 subsections

I would break the Field Title1 string into 10 character segments assigning them to 6 formulas

I would arrange them like this


-------------------------------------
FT1(1) subsection (a)
--------------------------------------
FT1(2) subsection (b)
--------------------------------------
FT1(3) subsection (c)
--------------------------------------
FT1(4) subsection (d)
--------------------------------------
FT1(5) subsection (e)
--------------------------------------
FT1(6) Title2 subsection (f)
--------------------------------------

FT1 (these could be parts of an array) formlas would all be initialized to "" and filled from the bottom up

eg: if Field Title1 was the string:
"abcdefghijklmnopqrstuvwxyz"

then FT1(6) would = "qrstuvwxyz"
FT1(5) would = "ghijklmnop"
FT1(4) would = "abcdef"

the others would be left null

in the section expert, check the box that says "Suppress blank section"

now when printed...the bottoms will be aligned

this is the only way I can think of to solve your problem

Hope this helps...Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top