Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I place a field diagonally?
Message
De
14/02/2001 11:05:04
 
 
À
14/02/2001 07:24:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00475622
Message ID:
00475760
Vues:
22
Hello Chin

Here is a piece of code I wrote several years ago that works for most situations.

To use it just create a field in your report that is 1 character wide which contains the function XFORMAT('MyString') where mystring represents the character string you want printed. If your string is 7 characters long then just cut and paste this field 7 times. After that you can arrange the fields in any shape you like.


Hope this helps
******************************************************************************
*[139
* OVERVIEW of SWEPROC.PRG XFORMAT
* Function allows you place characters from a string any where you want on a report
* send the string you want printed to the function and it will
* return a character from the string each time the function  is called
* For example to print  l  a  r  g  e  your would use xformat('large') 5 times spaced the way you want it
* and it will return a letter each time
* You can even do    l
*                    a  
*                    r        by using this technique
*                    g
*                    e
* Cut and paste makes this function much quicker to use than it looks since you are just pasting the same expression 5 times
*]139

FUNC xformat
PARAM lcString
IF TYPE('gcKeepString')$'UL'
	RELEASE gcKeepString
	PUBLIC gcKeepString,gcPassChar
	gcPassChar=0
	gcKeepString='xxzzzz'
ENDIF

IF lcString==gcKeepString && if its still the same
	gcPassChar=gcPassChar+1
ELSE
	gcPassChar=1
	gcKeepString=lcString
ENDIF
RETURN SUBS(lcString,gcPassChar,1)
>I have a preset form to fill in. Some spaces are far too short for normal horizontal alignment of the fields, so I want to place the corresponding fields diagonally. Any help would be appreciated.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform