13.07.2015 Views

User Manual

User Manual

User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PrintingReport Expression window and modify the Expression directly. This wayyou won't need to create and resize multiple lines--you can simply createone and then duplicate it with the exact height and width of the otherlines!Adding Numeric or Date Type Fields to the ExpressionsAdding fields other than character fields requires slightly different syntax. It's not anymore difficult, you just have to keep in mind that numeric and date type fields must firstbe converted to a character string to print with other character fields. Thoseexpressions to convert numeric and date type fields to character strings follow:Numeric Fields - ALLT(STR(fieldname))This converts the numeric field to a character string, and then uses the "Alltrim"expression to remove any leading or trailing spaces, printing only the numerals.Date Fields – DTOC(fieldname)This converts a date field to a character expression...literally translated, it would be"Date TO Character".Using the previous example in the Table Designer, if you wanted to create a single labelline with Company (Character), Account (Numeric), and exp_date (date), then you'dneed to use the following expression. We'll use the "Alltrim" method with theconversion strings as well:ALLT(company),ALLT(STR(account)),DTOC(exp_date)That will print the company, a space, the account, another space, and then theexpiration date fields.ADVANCED EXPRESSIONS TO ADD STATIC TEXTFor the last expression modification to be found within the user's guide, we'll deal withadding something other than a space between fields. We'll stick to the previousexample, but if you wanted to add "Customer #" before the account number, and"Expiring" prior to the expiration date, you'd want to use plus signs with quotes insteadof the commas separating the fields. You'll want to put the exact text, including spaces,between the quotes, which are in turn between the plus signs. To make it sound evenmore complicated, those plus signs are between the fields and the functions. It soundstricky, but it's not when you really look at it."Functions" usually have parentheses around a field name. These functions trim acharacter field, or convert numeric fields or date fields. They can also be used to printportions of fields, among other advanced features. Any time you are printing a fieldwith a method other than the "az" method, you'll be adding a function of some sort to163

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!