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!

Two questions... justified fields and subreport multi-column?

Status
Not open for further replies.

Tomin

Technical User
Dec 1, 2000
17
US
OK, I've got two questions here today. I've got a report that I'm using an unbound text box on that is using some VB to dynamically include fields in it and it uses the can grow feature. The report is exactly like a phone book would appear. The field looks to see if that record contains an address, if it does, it includes it. Simple enough, however the problem that I'm having is that I need to keep the actual phone number on the right side of the column. Is there any way I can justify the field so that when it was done with the name, address, and city, it would THEN right justify the phone number? Ultimately I would like it to do this AND fill in the resulting space with periods as placeholders. It would then look somthing like this:

Smith J..........688-1086
Smith John
123 Main st MP...688-2520
Smith JohnII MP..688-9876
Strauss Judy.....688-4165

Well, with a fixed width font the phone numbers would all be inline with each other but this message board won't show it that way.
Does that make sense what I'm after?

The Second problem I'm having is that this is a 3 column report and it looks great. However, now I would like to format some things on the overrall page. Specifically I want to have the name of the first name on the page in the upper right left corner and the last name on the page in the upper right corner. Open your phone book, you'll see what I mean. This is sort of an index to show the range of records on that particular page. Secondly, I want to put a webpage URL on the footer of each page. The problem that I have is that if I open the report workspace to place those things where I want to, the detail only has space (full sheet) for one column. That make sense? I've tried a subreport method but it still reacts the same way, as if the page formating is ignored on a subreport.

I truly appreciate any thoughts anybody has on this, Thanks!!

Tomin
 
Hi,
You will need to create a public function that takes a string as a parameter and after counting the characters and padding with "."'s returns the new string. This function can use a combination of the Left$(), Mid$(), InStr(), and Right$() functions. Plug the function into the query, then use a Courier font in your report as you have suggested.

Rob Marriott
rob@career-connections.net
 
Hi, Thanks for the response... unfortunately I cannot use a fixed width font for the report. Fixed width fonts are obviously space consuming and on a printed project, space means money. That's why I didn't go with a 4 row listing for each record regardless if it contained data or not. I need to find a way that the field can justify itself rather than doing it through manual calculations since those wouldn't work on a non-fixed-width font. Any other ideas?

Thanks!

Tomin
 
I played with another idea... of seperating the phone into it's own field and putting it where I wanted... however, I run into 2 problems. first off, the field stays statically on each record, so if the other field (that contains the name, address, and city) DOES grow using the can grow setting, the phone field does not "fall down" to the second line to remain at the *end* of the record. This actually wouldn't be a huge problem *IF* I could place a label that merely contained dots on it next to the phone flowing *underneath* the other record, but ONLY IF the other field could shrink width-wise, effectively 'revealing' the dots producing the desired effect. Is there any way to get a field to grow or shrink width-wise and not just to another line (keeping in mind that it would need some sort of limit on how much it could grow that way) (perhaps just shrinking and not growing would be the best method if possible.)

Thanks for helping me try and think through this.

Tomin.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top