Home
PrintList Pro™ - e-Node
Contents
1. PL White S white PL Not a file L 6 PL Black S black PL Wrong 4D version L 10 PL Magenta S magenta PL Arrays have been set L 11 PL Red S red PL Fields have been set L 12 PL Cyan S cyan PL SetFields Passed L O PL Green S green PL Not a field L 7 PL Blue S blue PL Wrong field type L 8 PL Yellow S yellow PL Maximum fields exceeded L 9 PL Gray S gray PL Save Data Passed L O PL Light gray S light gray PL Save Data Failed L 1 PL Use 4D palette color S PL Restore Data Passed L 0 PLP Patterns O PL Restore Data Failed L 1 PL Black pattern S black PL Just Default L O PL Gray pattern S gray PL Just Left L 1 PL Light gray pattern S light gray PL Just Center L2 PL Dark gray pattern S dark gray PL Just Right L 3 PL Registration Failed L 1 PL Plain L 0 PL Registration Passed L O PL Bold L 1 PL SetArrays Passed L 0 PL Italic L2 PL Not an array L 1 PL Underline L 4 PL Wrong type of array L 2 PL Outline L 8 PL Wrong number of rows L 3 PL Shadow L 16 PL Maximum number of arrays exc L 4 PL Condensed L 32 PL Not enough memory L 5 PL Extended L 64 121 PrintList Pro Constant List PL Break Level 1 L 1 PL No Headers L 0 PL Break Level 2 L 2 PL F
2. 0 1 2 3 4 5 6 format for time arrays See the 4D String command in the 4D Language Reference and the 4D Design Reference discussion of formatting for the possible values There are no time arrays in 4D as such they are in reality long integer arrays These arrays are printed as time PL SetFormat values by using the proper format The format is the two character sequence amp followed by the number given in the discussion of the String command For example one proper format for a time array would be 8 2 01 02 03 01 02 1 hour 2 minutes 3 seconds 1 hour 2 minutes 1 02 AM AUN Hf IO 36 Configuration Commands PL SetFormat format for picture arrays O the picture will be truncated if necessary and justified to the upper left default o 1 the picture will be truncated if necessary and centered in the cell 2 the picture will be scaled to fit the cell 3 the picture will be scaled to fit the cell and remain proportional to its original size e 4 the picture will be scaled to fit the cell remain proportional to its original size and centered in the cell In addition If format is not specified or out of range the value will be interpreted as 0 Formats 1 and 4 are always centered format 2 fills the whole rectangle e Only formats 0 and 3 will use the specified columnJust default alignment is centered for these two form
3. White for header background 13th color from 4D s palette for list background 1st column PL SetBackClr eNames 1 White 0 13 45 Configuration Commands PL SetBackRGBColor PL SetBackRGBOolor areaRef L hdrBackRed L hdrBackGreen L hdrBackBlue L listBackRed L listBackGreen L listBackBlue L gt areaRef longint Reference of PrintList Pro object on layout hdrBackRed longint Header back red gt hdrBackGreen longint Header back green gt hdrBackBlue longint Header back blue gt listBackRed longint List back red gt listBackGreen longint List back green gt listBackBlue longint List back blue PL SetBackRGBColor is used to specify the background colors for the header and list area using the RGB values This routine is similar to PL SetBackClr While the foreground color can be specified for each column the background color for the header or the list area can only be specified for all columns using this command You need to use PL SetColBackColor or PL SetColBackRGBColor to set the background colors of each column s header and each column itself hdrBackRed Desired header background RGB red value hdrBackGreen Desired header background RGB green value hdrBackBlue Desired header background RGB blue value listBackRed Desired list background RGB red value listBackGreen Desired list background RGB green value listBackBlue Desired list background RGB blue value The
4. eese 100 o Overflowing to the right susseus 94 P Padding oiii re n e RR x eia 55 100 Page break eene 87 90 91 Partner license seen nnne 18 PICU ee 37 Picture arrays uice ye ixXR DX chews 27 36 Picture Library cceceecceeee eee eeee eee eeaees 28 64 Picture Objects 2 iere ei x PR Rep 28 PL AddColumn enn n 11 31 PL GetBreakValue een nnn 107 126 PI Eod ME EAE E irn aPETIS 12 68 PLP5 license4Dplugin eese 15 PL ProcessArrays eene 106 PL Register 13 14 16 17 29 PL SaV6 icsiuterstkvs ipo OD OU DULU UR BURKE tata 68 PL SetArraysNam esee 32 PL SetBackClr ccccccceceeeeseeeeeeseeeeneeseaues 44 PL SetBackRGBOolor ccccscceeeeeeseeeesaeaues 45 PL SetBkHColOpt eene 104 PL SetBkHColor enm 99 PL SetBkHCOoIRGBODpt 11 12 105 PL SetBkHFunc eeeenn mem 96 PL SetBkHHeight eere 101 PL SetBkHRGBOolor enn 100 PL SetBkHStyle sees 97 PL SetBkHText o exc 95 PL SetBrkColOpt cene 102 PL SetBrkColor ci ek 97 PL SetBrkCoIRGBOpt 11 12 104 PL SetBrkF nc i2 i er hex 95 PL SetBrkHeight ccscccseeeeeeeeeeeeeaeees 100 PL SetBrkOpts ceeeeeeeen mnn 91 PL SetBrkOrder een mmm 91 P
5. verPos 2 align center offset 5 scaling 0 PL SetCellIcon ePLOutput col row iconRef iconPos horPos verPos offset scaling 65 Configuration Commands PL SetCellBorder PL SetCellBorder areaRef L cellColumn I cellRow L borderLeft I borderTop I borderRight I borderBottom I offset I width F redColor I greenColor I blueColor I areaRef longint Reference of PrintList Pro object on layout gt cellColumn integer Column cellRow longint Row gt borderLeft integer Print left border gt borderTop integer Print top border gt borderRight integer Print right border borderBottom integer Print bottom border gt offset integer Offset from cell boundary in pixels gt width real Width of line redColor integer Red gt greenColor integer Green gt blueColor integer Blue PL SetCellBorder provides the ability to set the border style and RGB color for a cell cellColumn Column of cell where border will be applied cellRow Row of cell where border will be applied borderLeft Print left border borderTop Print top border borderRight Print right border borderBottom Print bottom border offset Offset from cell boundary in pixels O if the border should be printed at cell boundary default width Width of line This parameter is a real value allowing fractional widths See Hairline Line Width redColor RGB red value
6. This parameter specifies the break level to apply this command to columnNum The column to apply this command to Use a value of zero 0 to apply the colors to all columns within that break level plpForeColor Name of the color in PrintList Pro s palette This will be the foreground color for the break If the name is not in PrintList Pro s palette or it is the empty string then 4dForeColor will be used 4dForeColor 1 to 256 Foreground color number for the break header from 4D s palette If a break header foreground color has been previously set it may be removed by setting plpForeColor to the empty string and 4dForeColor to 1 The break header foreground color may be left unchanged by setting plpForeColor to the empty string and 4dForeColor to O plpBackColor Name of the color in PrintList Pro s palette This will be the background color for the break header If the name is not in PrintList Pro s palette or it is the empty string then 4dBackColor will be used 4dBackColor 1 to 256 Background color number for the break header from 4D s palette If a break header background color has been previously set it may be removed by setting plpBackColor to the empty string and 4dBackColor to 1 The break header background color may be left unchanged by setting plpBackColor to the empty string and 4dBackColor to O Examples Set the foreground color for the break header in column 3 br
7. 37 122 In 73 Total litig 1 iori etr tra evans Ss 112 Transparency aiii esee EEEREECRR ER EXRERYR E CERE 11 127 Two dimensional array eseseeeee 32 U UniCOd6 iuis a CE VER C CR CERE OE 10 v Variable Height ierre siiani 26 Variable Height Breaks sssss 87 Variable Name for ALP area es 19 VarlatiCe sansirnir asn ainiai Re Sega 93 107 VERSION sitet debi Deu dene tunaw E 67 Vertical alignment eese 38 W esp RET 26 38 WRAPPING uictor bU au heared cei tange 84 X XM Ls cootra exa Va v Enni Ea ERE TR E ORC ER ACE 7 68 Copyrights and Trademarks All trade names referenced in this document are the trademark or registered trademark of their respective holders AreaList Pro and PrintList Pro are copyright Plugin Masters SAS and exclusively published worldwide by e Node 4th Dimension 4D and 4D Server are trademarks of 4D SAS Windows Excel and Vista are trademarks of Microsoft Corporation Macintosh MacOS and MacOS X are trademarks of Apple Inc
8. 94404 95014 95113 94107 95014 95190 19004 94306 94105 94544 95014 94039 7900 02144 97005 95014 94105 02138 55121 10018 19131 94039 7900 91302 95014 01867 92670 95014 98072 98072 94501 10016 94062 90265 Country USA France USA USA Italy Thailand USA USA England Israel ROC USA USA Italy USA Germany USA USA USA USA USA USA USA USA ROC USA USA USA USA Germany ROC USA USA USA n aSalary aCity aState aZip Examples Example 2 Multiple record current selection Example 2 Multiple record current selection Print a list of company names showing all the people who work for each company This example will illustrate the use of PrintList Pro with multiple records in the current selection For purposes of illustration the company names will be printed directly from the Companies table and the People information will be printed from a series of arrays using PrintList Pro Create the layout and draw the PrintList Pro plug in object This process is substantially the same as that explained in the first example with one exception we are going to include a field directly on the layout which will print information alongside the PrintList Pro object Our layout is illustrated below PrintList Pro Example 2 Compan Employees Salaries der 50 t xy P ompanies Company Name i 100 elist w 291 h 55 PrintList Pro v4 6b1
9. array6 array7 array8 array9 array10 array11 array12 array13 array14 array15 error PL_SetArraysNam eList 16 10 array16 array17 array18 array19 array20 array21 array22 array23 array24 array25 PL SetHeaders areaRef L columnNumber I numHeaders I header1 S headerN S gt areaRef longint Reference of PrintList Pro object on layout gt columnNumber integer Column at which to set up the first header gt numHeader integer Number of headers to set up to 15 headeri headerN string Values to print in column headers PL SetHeaders is used to specify the value to print in the header for each column Up to fifteen headers can be set at a time The size of the header value is used by the automatic column sizing algorithm If you are printing a fixed string array with an element size of 2 characters the column will be very narrow unless you specify a header which contains several characters For example states are usually stored in a database as a two character alpha and you would probably print them directly or load them into a string array sized for two characters length But if you specify a header of State the column will be sized about two and a half times wider If the header length is less than the values being printed in the column then the header length will not affect the column width A B C etc will be printed in the headers if PL SetHeaders is not used 34 Conf
10. black 100 darkgray 759 o gray 50 lightgray 25 white or none or or anything else 0 no drawing VVVVV New Configuration commands PL AddColumn areaRef L dataPointer Z insertAt L gt result L gt add column at position insertAt zero means append to the end when in Records mode dataPointer should be a pointer to a field gt when in Arrays mode dataPointer should be a pointer to an array must not be a local array D This command supports the component architecture using arrays from the host database in a component and vice versa PL Load areaRef L XML T result L D initialize an area from XML PL Save areaRef L XML T result L save the area settings into XML New RGB commands 12 PL SetBrkCoIRGBOpt areaRef L breakLevel I columnNum I showColDivider I lineWidth F dividerRed L dividerGreen L dividerBlue L PL SetBkHCoIlRGBOpt areaRef L breakLevel I columnNum I showColDivider I lineWidth F dividerRed L dividerGreen L dividerBlue L PL SetBrkRowRGBDiv areaRef L lineWidth F dividerRed L dividerGreen L dividerBlue L Upgrading from Previous Versions of PrintList Pro Additions to existing commands New Break Processing commands Computed Breaks E PL ProcessArrays callbackMethodName S breakArrays Y dataArrays Y useDetail L gt error L e PL GetBreakValue handle L column L calculation L gt value F See the Using Computed Bre
11. calculations such as sum minimum etc for the current break level or individual row and the specified column See Using Computed Breaks for details 73 Using the Callback Methods Using the Field Printing Capability Field and Record Commands PrintList Pro uses the SELECTION RANGE TO ARRAY command in 4D to get the records for printing Up to 32767 fields columns can be printed in a PrintList Pro object Using the Field Printing Capability Temporary Arrays PrintList Pro internally uses interprocess 4D arrays to get the record data from 4th Dimension These arrays do not have to be declared in 4D Arrays and Fields Arrays and fields may not be printed together in the same PrintList Pro object If arrays are printed in an object then the field commands will be ignored Conversely if fields are printed in an object then the array commands will be ignored Printing 4D Fields Fields from Related One Tables Fields from a main table and from related one tables may be printed in the same PrintList Pro object See the commands PL SetFile and PL SetFields for further information about printing fields from related one tables Sorting PrintList Pro uses 4th Dimension s sorting routines when sorting fields When printing records fields from a related one table can be included in a sort Time Data Time data will be converted to a longint since this is how it is stored internally by 4D Maximum Number of Records Printed
12. 91992 2008 Beckware LLC The only difference between this example and Example 1 is that we are printing out multiple records Since the PrintList Pro commands are executed in the On Printing Detail event of the PRINT SELECTION command we can change the People arrays on the fly The Companies file is in a One to Many relationship with the People file and the links are automatic As each Companies record is printed a new selection of People records is created This People selection is stored in arrays and printed The controlling project method is ALL RECORDS Companies OUTPUT FORM Companies Example 2 PRINT SELECTION Companies 111 Examples Example 2 Multiple record current selection The PrintList Pro area s object method is If Form event On Printing Detail Create the arrays The current selection of People changes with each new record SELECTION TO ARRAY People First Name aFname People Last Name aLname People Salary aSalary plErr 2PL SetArraysNam eList 1 3 aFname aLname aSalary set the arrays If plErr 0 PL SetHdrOpts eList 1 0 print headers at the top of the area only PL SetHeaders eList 1 3 First Name Last Name Salary set headers apply to all headers Lucida Grande 10 point bold PL SetHdrStyle eList 0 Lucida Grande 10 1 PL SetStyle eList O Lucida Grande 9 0 apply to all columns Lucida Grande 9 point plain format column 3 right ju
13. ERUURERUERE KH RERORERUUMEKR ERKKNRERU EA FEREREAUME REC AO RE RARE KR EFRC RR te 87 PAGE Breaks soir ERE ERE ERRARE CANI AENEA AEAEE LAET ARR GERNE EREMUERUXR ERA FL INKE 87 Variable Height Breaks rrt EE RH RR I EXTR RR RR REN ERR EREKR E E RET EE ORCEREEEA RA E EAR RA 87 Using Break Headers t HR A E DER ERE EIE Wa ele CPU RET FERE CRI WEEKS 88 Using Computed Breaks iieri ber ere ara ERR ER ra TRE LARa EE Te s S URL FELODV EA viet iienete tii IDEE 89 Comtnarnds 5 c dre bears ERE RERAEREREER OUR NEERUUERVe beri ated KREREULE KR REN RERRTENEWIEE ARENA CRREREEEERUREEA EE K 90 PL SetPageBreak areaRef L breakLevel I insertPageBreak I ssseeseeesne 90 PL SetBrkOpts areaRef L printLastPageBreak I esesessesessessee nemen emen 91 PL SetBrkOrder areaRef L columnNum1 I columnNumN I eeeeeeen mmn 91 Table of Contents PL SetRepeatVal areaRef L columnNum I repeatValues I sss 92 PL SetBrkText areaRef L breakLevel I columnNum I breakText T numColsToOverflow I M e puprisdg 92 PL SetBkHText areaRef L breakLevel I columnNum I breakText T numColsToOverflow I justificatioriz D aicist tener ree ae ned ta uisu ea yal ke ee eria cu RR aa dva E dies taeda ENDE eden QE FR va RR YE Visa sa ed bt 95 PL SetBrkFunc areaRef L functionName S sssssssssssssssssssn eese eene 95 PL SetBkHFunc areaRef L functionName S ssss
14. Footer Comn PL Black Hz PL Pro Break Footer Cor Hz PL Pro Break Header Comi PL Blue PL SetBrkColOpt b B PL Pro Cell Commands PL Cyan PL SetBrkColor b iz PL Pro Column Command PL Gray PL SetBrkCoIlRGBOpt gt Hz PL Pro Field Commands PL Green PL SetBrkFunc gt Hz PL Pro Misc Break Comma gt Ej Pictures PL Magenta PL SetBrkRGBColor b BE PL Pro Row Commands PL Red PL SetBrkStyle gt Z PL Pro Sort Commands PL Use 4D palette colo PL SetBrkText A E A PL Light gray PL SetBrkHeight b mZ PL Pro Misc Commands A A i DI Mihira b E DI Dro Dronak Uordar Ca l Ln26 Col0 Ch27 Z Simply select a constant or command and 4D will enter it for you at the current cursor position 21 Getting Started with PrintList Pro Developing with PrintList Pro You can also type the constant or command name directly into the method or use the Explorer s Component page PrintList Pro commands are used to initialize the PrintList Pro object in the On Printing Detail phase of the 4D layout about to be printed Typically initialization code will be contained in the PrintList Pro area object method When to use the PrintList Pro Commands The PrintList Pro commands must only be executed in the On Printing Detail phase of a form method or object method during the execution of the PRINT SELECTION or PRINT RECORD command The PRINT SELECTION command will execute a On Printing Detail phase for each re
15. Gray 0 0 0 sort column 2 Last name in descending order PL SetSort eList 2 End if End if The printed layout will appear as shown below PrintList Pro Example 1 First Name Last Name Todd Bob Jeffrey Del Curtis William Ron Ron Amy Robert Clair Joel Peter John George Steve Larry Michael Jeffrey Harry Karen Michael Mitch Sherwin Martha Steven David Doug Mike Pradeep Rich Richard Dan Jonathan 110 Zipnick Yuderman Young Yocam Wright Woodward Wong Wolf Wohl Wiggins Whitmer Weiss Watkins Warnock Voltz Vollum Tesler Tchong Tarter Sweere Sullivan Stern Stein Steffin Steffen Stansel Smith Sleeter Slade Singh Shapero Shaffer Shafer Seybold Salary 52 230 08 22 295 00 49 687 96 63 118 86 84 651 42 26 602 10 24 500 00 25 432 96 62 771 94 75 296 34 27 975 08 86 803 50 92 377 74 95 805 78 60 843 30 63 119 84 39 933 04 24 963 54 65 115 12 60 111 24 61 707 66 28 716 94 26 078 78 70 962 78 50 354 36 24 130 54 23 551 36 65 797 20 47 057 64 49 758 52 61 049 10 26 659 92 21 181 72 22 741 88 City Phoenix Paris Los Angeles San Jose Rome Bangkok San Jose Minneapolis London Jersulaem Tapei Redmond Portland Milan San Jose Munich Santa Fe Cupertino Denver Boston Portland Brooklyn Portland Cupertino Tapei San Jose Los Angeles Santa Fe Boston Munich Tapei Quincy Ft Worth Dallas State CA CA Zip 60090 94538
16. O Set cells from column 2 row 2 to column 5 row 5 to font size 14 no change in style and font PL SetCellStyle eArea 2 2 5 5 aCellSet 256 14 Set the cells in aCellSet to Times aCellSet 1 1 1 column 1 row 1 aCellSet 2 1 1 aCellSet 1 2 1 column 1 row 2 aCellSet 2 23 22 aCellSet 1 3 22 column 2 row 5 aCellSet 2 3 5 aCellSet 1 4 2 column 2 row 6 aCellSet 2 4 6 PL SetCellStyle eArea 0 0 0 0 aCellSet 256 Times 0 60 Configuration Commands PL SetCellColor PL SetCellColor areaRef L firstCellCol I firstCellRow L lastCellCol I lastCellRow L cellArray X plpForeColor S 4dForeColor 1I plpBackColor S 4dBackColor I areaRef longint Reference of PrintList Pro object on layout firstCellCol integer First cell column firstCellRow longint First cell row lastCellCol integer Last cell column lastCellRow longint Last cell row cellArray two dimensional Discontiguous cells longint array plpForeColor string Foreground color from PrintList Pro s palette 4dForeColor integer Foreground color from 4D s palette plpBackColor string Background color from PrintList Pro s palette 4dBackColor integer Background color from 4D s palette PL SetCellColor is used to set the foreground color and or background color of a specific cell range of cells or list of cells PrintList Pro has its own palette with the following colors white black blue green yellow magenta red
17. PL SetRowsStyle eList 12 3 Times O set the 12th row to print the Times font in bold italic style 49 Configuration Commands PL SetRowColor PL SetRowColor areaRef L rowNumber L plpRowForeColor S 4dRowForeColor L plpRowBackColor S 4dRowBackColor L areaRef longint Reference of PrintList Pro object on layout rowNumber longint Number of row gt plpRowForeColor string Row foreground color from PrintList Pro s palette gt 4dRowForeColor longint Row foreground color from 4D s palette gt plpRowBackColor string Row background color from PrintList Pro s palette 4dRowBackColor longint Row background color from 4D s palette PL SetRowColor is used to specify the foreground and background colors for a row It will override the foreground and background color settings for all columns in that row Any subsequent sorting using PL SetSort will cause the row color setting to be moved with the arrays This will keep the color setting in sync with the original row Keep in mind that any settings applied to a row will be moved with that row s data if the data is later sorted using PL SetSort If you do not want the row s settings to move call PL SetSort before applying the row settings PrintList Pro has its own palette with the following colors white black blue green yellow magenta red cyan gray light gray Color constants can be used rowNumber The row for which to set the foreground color Use a va
18. Pass the registration key to register your copy of PrintList Pro Only one registration key is required The key is either linked to the 4D or 4D Server serial number individual licenses or to the machine ID merged licenses or to the name of the company developer unlimited annual licenses gt forceCheck longint Check the license and return a nonzero error result in case it is invalid even if registration was successful from a previous call result longint OK Beta license has expired Invalid license The license has expired The OEM license has expired The maximum number of users has been exceeded The license is for a different environment e g the licence is for a single user version but you are using it with 4D Server The license is linked to a different 4D license Invalid merged license PL Register is used to register the PrintList Pro plug in for standalone or server use registrationCode You must call PL Register with a valid registration key otherwise PrintList Pro will operate in demonstration mode it will cease to function after 20 minutes forceCheck Optional If this parameter value is nonzero registrationCode is tested regardless of current registration state If the plugin was not previously registered and the result is O it is registered the same way as if forceCheck was zero or omitted If the plugin was previously successfully registered a regis
19. SetBrkOrder to communicate the sort order to PrintList Pro without performing another sort Also repeated values in a list can be suppressed using PL SetRepeatVal Please read the section Break Level Processing for more information If a column containing a picture array is passed to PL SetSort it will be ignored skipped 24 Configuring PrintList Pro Formatting Formatting Use PL SetFormat to control the format and justification of all array information All valid 4D formats may be used including any custom formats created in the Design Environment If you are calling PrintList Pro from a component make sure that the Design formats that you are using are defined in the component itself See Break Level Processing for information about formatting break headers and break footers Styles Column and Header Styles Styles for arrays can be set on a column by column basis using PL SetStyle to set the style for the data and PL SetHdrStyle to set the header style If a O zero is used in the columnNumber parameter the style will be applied to all columns Row Specific Styles PL SetRowStyle is used to set the font and style of a specified row and will override any column specification Do not use row specific commands to modify all rows if you want to set the whole area Set the columns instead Cell Specific Styles Individual array elements called cells can be assigned a unique font size and style This cap
20. above When 4D passes multi styled text to PrintList Pro it should be printed correctly if this option has been set If this option is set special tags can also be used in any text contained in a PrintList Pro area to display styled characters See PrintList Pro Text Style Tags 0 plain text default 1 or any non zero value attributed multi style text Note the multi style property is applied to all formatting in that column gt breaks have to account for that lineSpacing Line spacing to use real value O is substituted by 1 0 default which is also the default line spacing value used by AreaList Pro and SuperReport Pro Line spacing is used for space between lines It is computed from the font height as Ascent Descent lineSpacing In other words it is a percentage of the font height to use for advancing the text to the next line When it is 1 0 default next line starts right below the previous one For exemple if you enter 2 as lineSpacing you will get in the same cell Line 1 Line 2 Line 3 Instead of Line 1 Line 2 Line 3 38 Configuration Commands PL SetWidths Examples Format a real column 3rd column default column justification center header justification PL SetFormat names 3 4 3 s 43 4 00 0 2 0 Format a string 2nd column default column justification and default header justification PL SetFormat eContacts 2 4 0 0 0 Format a boolean co
21. breakLevel integer Break level number gt insertPageBreak integer Insert a page break after the break level PL SetPageBreak is used to set a page break after each break at the specified break level A page break can be inserted provided the rows are sorted However it is not necessary to configure a break level using PL SetBrkText or PL SetBkHText in order to insert a page break For the specified break level the break header the rows and the break footer will print if so configured prior to the page break Any subsequent break footers or rows will be printed at the top of the following page breakLevel The position in the sort order specified in PL SetSort or PL SetBrkOrder i e 1 through n where n is the number of levels of sort insertPageBreak 0 or 1 0 no page break will be inserted default 1 a page break will be inserted after each break at the specified break level Refer to PL SetBrkOpts to see how to print or suppress a page break on the last page of a PrintList report Example PL_SetPageBreak eList 1 1 force a page break after printing each break of break level 1 91 Break Level Processing PL SetBrkOpts PL SetBrkOrder PL SetBrkOpts areaRef L printLastPageBreak I gt areaRef longint Reference of PrintList Pro object on layout gt printLastPageBreak integer Print a page break on the last page PL SetBrkOpts is used to set options pertaining to break levels printLastP
22. column using the RGB values This routine is similar to PL SetColBackColor columnNumber The column for which to set the background color Use a value of zero 0 to apply the parameters to all columns hdrBackRed Desired header background RGB red value hdrBackGreen Desired header background RGB green value hdrBackBlue Desired header background RGB blue value listBackRed Desired list background RGB red value listBackGreen Desired list background RGB green value listBackBlue Desired list background RGB blue value The following example will tell PrintList Pro to print the third column using a color scheme standard for OSX PL SetColBackRGBColor xArea 3 237 254 243 237 254 243 48 Configuration Commands PL SetRowStyle PL SetRowsStyle areaRef L rowNumber L styleNum I fontName S fontSize I areaRef longint Reference of PrintList Pro object on layout rowNumber longint Number of row gt styleNum integer Style of the font gt fontName string Name of the font gt fontSize integer Size of the font PL_SetRowStyle is used to set the style and font for a particular row It will override the style and font settings for all columns in that row The size settings of each column will still apply Any subsequent sorting using PL SetSort will cause the row style setting to be moved with the arrays This will keep the style setting in sync with the original row Keep in mind that any
23. custom calculation result to print Custom Calculations in a Break Header A break header will print information just prior to the group of related values PL SetBkHFunc is used to specify the name of the break header callback function This function will be called for any break header that contains a break function Refer to PL SetBrkText and PL SetBkHText to determine how to set a break function for a break level The syntax of this command is identical to that of PL SetBrkFunc The callback function functionName is called whenever PrintList Pro encounters the string Function within the text that is to be printed for a specific break level PrintList Pro passes information needed for the custom calculation to the callback function You must use the following declarations in your callback method C INTEGER 1 2 break level column C STRING 82 3 column format C LONGINT 4 5 start row end row C TEXT 0 custom calculation result to print 71 Using the Callback Methods Calculated Column Callback Calculated Column Callback A 4D callback may be attached to a specific column When information is needed for this column PrintList Pro will execute the callback to allow you to fill the column with data This allows the printing of data calculated from one or more fields or arrays as well as any ad hoc data that is desired 1 Reference of PrintList Pro object on layout 2 Column number 3 Type
24. for printing on Windows to GDI Examples PL_SetColOpts eList 2 0 hide the last two columns PL_SetColOpts eList 0 1 1 hide the detail area show only the breaks use GDI on Windows 58 Configuration Commands PL SetCellStyle PL SetCellStyle areaRef L firstCellCol I firstCellRow L lastCellCol I lastCellRow L cellArray X styleNum I fontName S fontSize I areaRef longint Reference of PrintList Pro object on layout firstCellCol integer First cell column firstCellRow longint First cell row lastCellCol integer Last cell column lastCellRow longint Last cell row cellArray two dimensional Discontiguous cells longint array styleNum integer Style of the font fontName string Name of the font fontSize integer Size of the font PL SetCellStyle is used to set the font and or style of a specific cell range of cells or list of cells To specify a single cell if firstCellCol and firstCellRow are greater than 0 and lastCellCol or lastCellRow are less than or equal to 0 then only firstCellCol firstCellRow will be set To specify a range of cells if firstCellCol and firstCellRow are greater than O and lastCellCol and lastCellRow are greater than 0 then the range of cells from firstCellCol firstCellRow to lastCellCol lastCellRow will be set To specify discontiguous cells if firstCellCol or firstCellRow are less than or equal to 0 then the cells in cellArray will be set cellArray Two dimens
25. height which is stored with the picture when calculating the row height for the PrintList Pro area If you choose not to use the picture s height in the row height calculation and additional space is needed to print the picture the numRowLines parameter of PL SetHeight should be used to increase the row height End of Page Callback Method In 4th Dimension a callback method is a project method called from an plug in PrintList Pro makes use of a callback method to inform you when the end of a printed page is reached This enables you to perform any necessary processing associated with the end of the page for example changing information printed in the footer area of that page or the header area of the next page Use PL SetPageProc to specify the 4D method PrintList Pro is to call PrintList Pro will pass the method specified by callbackMethod two parameters the first indicates which PrintList Pro area is calling the method and the second specifies the last row printed on that page 28 Configuring PrintList Pro Performance Issues with Formatting Performance Issues with Formatting Commands PrintList Pro uses an algorithm to automatically size the columns Because of this there is usually no need to use PL SetWidths to manually size a column prior to printing a list However if the number of items in the list is very large several thousand items with many columns then the list might take a few seconds longer to generate d
26. in the Compatibility Notes PrintList Pro has its own palette with the following colors white black blue green yellow magenta red cyan gray light gray Color constants can be used colDividerWidth 0 to 1 This option controls the line width of the column dividers A value of 0 25 pixel should be used for hairlines A value of O0 means that no dividers will be printed colDividerPattern Name of the pattern transparency ratio for the column divider If a null string is used then no column divider will be printed plpColDividerColor Name of the color in PrintList Pro s palette This will be the color for the column divider If the name is not in PrintList Pro s palette or it is a null string then 4dColDividerColor will be used 4dColDividerColor 1 to 256 The color at this position in 4D s palette will be used for the column divider rowDividerWidth O to 1 This option controls the line width of the row dividers A value of 0 25 pixel should be used for hairlines A value of O0 means that no dividers will be printed rowDividerPattern Name of the pattern transparency ratio for the row divider If a null string is used then no row divider will be printed plpRowDividerColor Name of the color in PrintList Pro s palette for the row divider If the name is not in PrintList Pro s palette or it is a null string then 4dRowDividerColor will be used 4dRowDividerColor 1 to 256 The color at this p
27. is the only place where you can call PL_GetBreakValue using the handle provided as the first parameter received by the callback method Calculations are performed on the fly after fetching each data row So when you call PL_GetBreakValue on a data row not on a break you will get the current values for that row For example using empty breakArrays and useDetail 1 calling PL_GetBreakValue to get the SUM 1 the command will return the sum of rows 1 through current row See also Using Computed Breaks and Example 5 Computed Breaks 108 Break Level Processing Example 1 One record current selection Examples The examples in this section are designed to provide an overview of the use of PrintList Pro and the basic commands You may also wish to examine the PrintList Pro demo for more examples on the various PrintList Pro capabilities Example 1 One record current selection Print a list of information First name Last name Salary City State Zip Country contained in a series of seven arrays Show column headers and print dividing lines between the columns Do not print dividing lines between the rows PRINT SELECTION is used to print PrintList Pro plug in objects It is important therefore that you carefully control the current selection since a PrintList Pro plug in object will print once for each record in the current selection This example illustrates a situation where the PrintList Pro object is to b
28. main table but from a related one table Serror PL SetFields eList Table gt Companies 1 1 Field gt Companies Company Name error PL_SetFields eList Table gt People 2 3 Field gt People First Name Field gt People Last Name Field People Salary 77 Field and Record Commands Setting a Calculated Column field mode Calculated Columns PrintList Pro columns can be calculated on the fly to print the results of calculations performed in a callback method This feature is available for both field and array printing modes Setting a Calculated Column field mode The PL SetFields command is used both to set fields to be printed and to set up calculated columns If the fieldNum parameter contains an integer greater than or equal to 1 the column will print the field represented by that number If the fieldNum parameter contains an integer less than or equal to 0 the column will print calculated data The absolute value of fieldNum will determine the type of data to be printed in the column The following table shows the data types that may be printed in a calculated column in field mode Is Alpha Field Is Real Is Text Is Picture Is Date Is Boolean Is Integer Is LongInt Is Time 0030 N H IO j jpa For example to print a calculated column of type Real pass Is Real 1 in the fieldNum parameter Setting a Calculated Colum
29. of data in this column field type or array type 4 Pointer to temporary 4D array field mode or an existing sized array array mode 5 First row for which to calculate cell 6 Number of cells to calculate in column The first three parameters are not absolutely necessary to determine how to fill the column They are provided to give you more flexibility in the implementation of the callback method e The first parameter is the area long integer reference This gives you the ability to use this callback method for more than one PrintList Pro object e The second parameter is the column number This gives you the ability to use this callback method for many columns within a PrintList Pro object e The third parameter is the type of data in the column field type or array type The last three parameters are absolutely necessary In field mode the fourth parameter is a pointer to one of the temporary 4D Arrays used internally by PrintList Pro This is where you will load the data to be printed in the column In array mode this is a declared fully sized 4D array by you as the developer you have to fill the requested elements e Thefifth parameter is the number of the first cell that needs to be filled in the column This is the same as the selected number of the row that contains this cell e The sixth parameter is the number of cells rows to be filled in the column You must declare all six parameters 1 to 6 in the calculat
30. of lines regardless of the actual number of lines used by a specific text or string element Additional padding may be set using rowHeightPad to allow more space between rows ext will be centered vertically in the header or row Note that the padding applies to the entire row and not on a line by line basis within the row numHeaderLines The number of lines in the header Default is 1 headerHeightPad The extra height in pixels to give to the header Default is 2 numRowLines The number of lines to give to each row A value greater than 0 means that the height of each row is the same The fixed height will either be a function of the number of text lines specified or the height of the largest picture in a picture array if so configured refer to PL SetFormat A value of zero means that the height of each row is to be calculated automatically based on the data that is to be printed PrintList Pro examines the elements of all text string and picture arrays to determine the height of each row Default is 1 rowHeightPad The extra height in pixels to give to each row Default is O 56 Configuration Commands PL SetSort minimumHeight The minimum remaining available height in pixels for the PrintList Pro area to print on the page For example if there are several PrintList Pro areas on one form and you want to make sure that at least two rows are printed on one page for the area specified by areaRef and the row he
31. set the number of lines to be printed in a break level use PL SetBrkHeight for break footers and PL SetBkHHeight for break headers Please read the section Variable Height Breaks for more information If no calls to PL SetBrkText are made for a specific break level nothing will be displayed for any break occurring for that level regardless of the number of lines or height pad specified in PL SetBrkHeight 86 Break Level Processing Lines Displayed in a Break Lines Displayed in a Break PrintList Pro provides complete control over all the lines printed in a break as shown in the following illustration Header Separator Row Divider Frame Column Divider Break Row Divider Horizontal Break Whenever a break or group of breaks is printed the line following the last break referred to as the Break Row Divider can be configured using PL SetBrkRowDiv or PL SetBrkRowRGBDiv If the Break Row divider is not set the row divider if set will be printed by default If column dividers have been set using PL SetDividers or PL SetRGBDividers they can be printed in the break using PL SetBrkColOpt PL SetBrkCoIRGBOpt for break footers and PL SetBkHColOpt PL SetBkHCOoIRGBOpt for break headers If set the column divider will be printed in the break area to the right of each column within the break level 87 Break Level Processing Hide the Detail Area A horizontal line referred to in the illustration on the previous p
32. settings applied to a row will be moved with that row s data if the data is later sorted using PL SetSort If you do not want the row s settings to move call PL SetSort before applying the row settings rowNumber The row for which to set the style Use a value of zero 0 to apply the parameters to all rows styleNum This parameter is used to set the style for the row The different values in the table below can be added together to produce combinations of styles For example bold italic has a value of 3 Plain 0 Bold 1 Italic 2 Underline 4 Outline 8 Shadow 16 Condensed 32 Extended 64 If a row style has been previously set it may be removed by setting styleNum to 1 This may also be applied to all rows by passing a zero 0 for the rowNumber This will have no effect on rows that have not been previously set The row style may be left unchanged by setting styleNum to 256 fontName This parameter specifies the font for a row The row font may be left unchanged by setting fontName to the empty string If the font specified is not found it will be treated as an empty string and ignored fontSize This specifies the font size for a row The row font size may be left unchanged by setting fontSize to O Examples PL SetRowsStyle eNames 10 2 0 set row 10 to be italic no change in font size PL SetRowsStyle eNames 0 1 Helvetica 14 set all rows to be bold Helvetica 14
33. style code By adding the codes together you can combine styles The numeric codes for styleNum are shown below Plain 0 Bold 1 Italic 2 4 8 Underline Outline Shadow 16 Condensed 32 Extended 64 Examples PL SetStyle eNames 0 Geneva 9 0 Geneva 9 plain all columns PL SetStyle eList 4 Helvetica 12 32 Helvetica 12 point condensed 4th column PL SetStyle eNames 1 Times 9 1 Times 9 point bold 1st column 42 Configuration Commands PL SetForeClr PL SetForeCIlr areaRef L columnNumber I plpHdrForeColor S 4dHdrForeColor I plpListForeColor S 4dListForeColor I areaRef longint Reference of PrintList Pro object on layout gt columnNumber integer Column number plpHdrForeColor string Header foreground color from PrintList Pro s palette gt 4dHdrForeColor integer Header foreground color from 4D s palette gt plpListForeColor string List foreground color from PrintList Pro s palette gt 4dListForeColor integer List foreground color from 4D s palette PL SetForeClr is used to specify the foreground colors for a column header and a list area column PrintList Pro has its own palette with the following colors white black blue green yellow magenta red cyan gray light gray Color constants can be used columnNumber The column for which to set the foreground color Use a value of zero 0 to apply the parameters to all columns plpHdr
34. the background color for the column header plpListBackColor Name ofthe color in PrintList Pro s palette This will be the background color for the column If the name is not in PrintList Pro s palette or it is a null string then 4dListBackColor will be used 4dListBackColor 1 to 256 The color at this position in 4D s palette will be used for the background color for the column If PL SetColBackColor is not called the default is white for both the header and list background colors Examples Light gray for header background white for list background all columns PL SetColBackColor eNames 0 PL Light gray 0 PL White O White for header background 13th color from 4D s palette for list background 1st column PL SetColBackColor eNames 1 PL White 0 13 47 Configuration Commands PL SetColBackRGBColor PL SetColBackRGBColor areaRef L columnNumber L hdrBackRed L hdrBackGreen L hdrBackBlue L listBackRed L listBackGreen L listBackBlue L gt areaRef longint Reference of PrintList Pro object on layout gt columnNumber longint Column number gt hdrBackRed longint Header back red hdrBackGreen longint Header back green gt hdrBackBlue longint Header back blue gt listBackRed longint List back red gt listBackGreen longint List back green gt listBackBlue longint List back blue PL SetColBackRGBColor is used to specify the background colors for a column header and a list area
35. the height of the text that is to be printed in the break To set a break level to be variable height use PL SetBrkHeight for break footers and PL SetBkHHeight for break headers 88 Break Level Processing Using Break Headers Using Break Headers The ability to configure break headers is identical to that of break footers including o all calculations sum min average max count variance standard deviation and break value a callback for the break function one callback for all break headers full style font size style control for each cell within the break e horizontal and vertical line divider control foreground and background colors for each cell within the break variable height breaks Break headers can be configured using six commands PL SetBkHText PL SetBkHFunc PL SetBkHStyle PL SetBkHColor PL SetBkKHRGBColor PL SetBkHHeight and PL SetBkHColOpt PL SetBkHCoIRGBOpt These commands are identical in syntax to the break footer commands PL SetBrkColOpt PL SetBrkColRGBOpt can be called to print horizontal lines at the top of a cell with a break footer With break headers the equivalent commands PL SetBkHColOpt PL SetBkHCoIRGBODpt will print lines at the bottom of a cell within the break header Just as with break footers break headers will only be printed if the command to set the break text PL SetBkHText has been called for a particular break level Break headers can be configured to be fixed or
36. used for the border greenColor RGB green value used for the border blueColor RGB blue value used for the border 66 Configuration Commands PL SetCellFrame PL SetCellFrame areaRef L firstCellCol I firstCellRow L lastCellCol I lastCellRow L offset I width F redLightColor I greenLightColor I blueLightColor 1 redDarkColor I greenDarkColor I blueDarkColor I clearAllBorders 1 gt areaRef longint Reference of PrintList Pro object on layout gt firstCellCol integer First cell column gt firstCellRow longint First cell row lastCellCol integer Last cell column gt lastCellRow longint Last cell row gt offset integer Offset from cell boundary in pixels gt width real Width of line redLightColor integer Red light color gt greenLightColor integer Green light color gt blueLightColor integer Blue light color redDarkColor integer Red dark color greenDarkColor integer Green dark color gt blueDarkColor integer Blue dark color clearAllBorders integer Clear all borders within the frame PL SetCellFrame prints a frame around a range of cells It uses RGB colors light color for both left and top lines dark color for both right and bottom line The range of cells from firstCellCol firstCellRow to lastCellCol lastCellRow will be set offset Offset from cell boundaries in pixels O if the frame should be printed at cell boundaries defaul
37. used to set the style of the text that is to be printed in the break header The syntax of this command is identical to that of PL SetBrkStyle PL SetBrkColor areaRef L breakLevel I columnNum I plpForeColor S 4dForeColor I plpBackColor S 4dBackColor 1 areaRef longint Reference of PrintList Pro object on layout gt breakLevel integer Break level number gt columnNum integer Column number gt plpForeColor string Foreground color from PrintList Pro s palette gt 4dForeColor integer Foreground color from 4D s palette gt plpBackColor string Background color from PrintList Pro s palette gt 4dBackColor integer Background color from 4D s palette PL SetBrkColor is used to specify the color of the text to be printed in the specified columnNum and breakLevel PrintList Pro has its own palette with the following colors white black blue green yellow magenta red cyan gray light gray Color constants can be used breakLevel This parameter specifies the break level to apply this command to columnNum The column to apply this command to Use a value of zero 0 to apply the colors to all columns within that break level plpForeColor Name of the color in PrintList Pro s palette This will be the foreground color for the break If the name is not in PrintList Pro s palette or it is the empty string then 4dForeColor will be used 4dForeColor 1 to 256 Foreground color number fo
38. where breaks must occur one array for each break level Array of pointers to arrays containing the data to be processed in the callback method 0 callback method is called only on breaks 1 callback method is called on breaks and on each row gt callbackMethodName string gt breakArrays array dataArrays array useDetail longint PL ProcessArrays is used to set Computed Breaks No plugin area is needed this feature is pure computing on previously sorted arrays e g with MULTI SORT ARRAY callbackMethodName 4D project method to be called on breaks as defined by breakArrays and also on each row according to useDetail Thecallback methodiscalledas callbackMethodName handle L row L breakLevel L handle is to be used as parameter 1 when calling PL GetBreakValue for the callback row is the current row number breakLevel is the current break level 1 for data row if useDetail 1 breakArrays ARRAY POINTER containing pointers to previously sorted arrays where breaks should occur and callbackMethodName be called Local arrays are allowed First element determines break level 1 second 2 etc When breakArrays is empty the only break generated will be 0 dataArrays ARRAY POINTER containing pointers to arrays that will be passed by callbackMethodName to PL GetBreakValue in order to retrieve the computed break values Local arrays are allowed First element is column 1 for PL GetBreakValu
39. 19 Developing With PrINtLISE PIO icieeuee ehh Exe hr E Eh E RR EREXR E ERERNERRUDRAR EET RE EAR RTUENER E RET ERR EK ERA 20 Using the PrintList Pro Commands cece cece memes semen seen 20 When to use the PrintList Pro Commands sess meme menses 21 Configuring PrintList Pro No 294 Using Defined Constants with PrintList Pro 0 cece eee eee Im mmm meses enne 22 Specifying the Arrays to Print oet a RE XERRRK RR KR ARERREEERUERE RE KREER EXNTERURER KEEN 22 Table of Contents PHINGING RECOPdS TEL T 23 Headers e ck extet ane aaa AEREE E KU KA E RENE RERENA GUN NE nee tee bee Pea e ERIE RUE NRTFREAREKA 23 Sorting ALFdyS a3 vers sivee ccs vecdscxlccs EEEE AETA SE ETETE MI KRE UE NNI R RRUUN ER NRUNNN MS wees 23 FOF MACEING EE TD LI LS Mm 24 Sty rjf HR UT 24 Column and Header Styles ssssesssesseeeeees nennen nena seas a suas sea sena sea sees a sea ren 24 Row Specific Styles iiec ii eee th radi veal IRE EERR A evade CERE CERRET PR aa RESERVE YER SERA ERI ERE 24 Cell Spete StVleS dente svi EL 24 SUERTE 25 Column and Heade Colors iorsin xr tx RR INR REN XRARERERRH RN UERERA SERERE MERER a E EEERY RAT 25 Row 5pecific Colors cte tmr E EX RR XR OR ERR REN EE EERANERX iene bid dk EK ax tax EORR E da 25 Cell Specific Colors ren oa px e rex a eo tyes EIE VR e EE HARRERREMYERR KR ERRETRRFERERRERRE CERE AEAN 25 Multiple Linesin each R
40. 5 Examples Example 4 Break Level Processing Break level Configuration PL SetRepeatVal eList 0 1 suppress repeating values in all columns PL SetBrkFunc eList Break Function set the callback function PL SetBrkRowDiv eList 0 25 Black Black 0 print a Break Row divider Configure break level 3 city PL SetBrkHeight 6eList 3 6 4 print 6 lines for break level 3 Print the calculation labels in the column to the left of the salaries PL SetBrkText eList 3 2 Sum Char 13 Average Char 13 Minimum Char 13 Maximum Char 13 Standard Dev Char 13 Bonus 0 3 PL_SetBrkStyle eList 3 2 Lucida Grande 9 1 make the labels bold Print the Sum Minimum Average Maximum Standard Deviation and Bonus for salaries PL_SetBrkText eList 3 3 Sum Char 13 Minimum Char 13 Average Char 13 Maximum Char 13 Dev Char 13 Function 0 0 Show the number of people in this city PL_SetBrkText eList 3 5 Char 13 Count people in breakValue 1 2 PL_SetBrkStyle eList 3 5 Lucida Grande 10 3 make the city count info 10 points bold PL_SetBrkColOpt eList 3 3 0 0 25 Black Black 0 print a subtotal line in the salary column End if End if The Break Function callback method for the Bonus custom calculation is as follows C_INTEGER 1 2 break level column C_STRING 82 3 column format C LONGINT 4 5 start row end row C_TEXT 0 custom calculat
41. 6 Los Angeles CA USA David Smith 23 551 36 Los Angeles CA USA Scott Schwarts 24 334 38 Los Angeles CA USA Stephen Saltzman 62 937 56 Los Angeles CA USA Bill Gates 26 287 52 Los Angeles CA USA Bruce Davis 57 186 92 Los Angeles CA USA Raines Cohen 29 784 16 Los Angeles CA USA Paul Brainerd 59 952 48 Los Angeles CA USA Lofty Becker 85 627 50 Los Angeles CA USA Sum 419 349 84 Minimum 23 551 36 9 people in Los Angeles Average 46 594 42 Maximum 85 627 50 Standard Dev 20 581 37 Bonus 2 329 00 Christopher Robert 51 063 88 San Francisco CA USA Regis McKenna 57 916 04 San Francisco CA USA Bob Leff 87 341 52 San Francisco CA USA Mike Kramer 21 337 54 San Francisco CA USA Ed Bogas 51 108 96 San Francisco CA USA Page 1 2 sept 2013 117 Examples Example 5 Computed Breaks Example 5 Computed Breaks Computed breaks are a powerful array utility module which does not require printing The demonstration database includes an example under PrintList Pro Configuration options Check the Compute breaks without print box V Compute breaks without print then click the Print With PrintList Pro button Print With PrintList Pro We will perform a similar action using the same arrays as in Example 4 then call PL ProcessArrays and PL GetBreakValue to retrieve the results and build a break summary We will create a text variable containing all break results without printing anything then copy it into the p
42. COlOPE EET 102 PL SetBrkColRGBOpt areaRef L breakLevel I columnNum I showColDivider I lineWidth F dividerRed L dividerGreen L dividerBlue L eeessesseeseeeeee enne 104 PL SetBkHColOpt areaRef L breakLevel I columnNum I showColDivider I lineWidth F pattern S plpColorzS 4dCOlOE D as use sendin SE exbusax recu thea e danced wie NUR REN AFRd E MATE PUNK E EUM utalbus KE KR Gul baa D 104 PL SetBkHCoIRGBOpt areaRef L breakLevel I columnNum I showColDivider I lineWidth F dividerRed L dividerGreen L dividerBlue L esses nnns 105 PL ProcessArrays callbackMethodName S breakArrays Y dataArrays Y useDetail L gt error L106 PL GetBreakValue handle L column L calculation L gt value F eee 107 EM AMDIGS scsancicsasasasaiacnsacadnieuitndadniatausenascnaisnaacsancnedeundaceiwusduinieioaamicnesanerg Oe Example 1 One record current selection esie enar en heh Rx RR REA EA REEXERRI ERAN ERERYEKUERAKXE teas 108 Example 2 Multiple record current selection ssssssssssssem m memes 110 Example 3 Adding a total line to the liSt 0 cece eee eee eee eee ee mmm 112 Example 4 Break Level Processing csssssssssssssssssesss sse emen menie senes 114 Example 5 Computed Breaks sssssesisseesesseesesasue hen ha nhau aua nua a sd sena aaa o naa sd auae a 117 Table of Contents PrintList Pro Constant LISSE irc ss uin Qi RASME EU BR
43. EEEEEEEERYL CURRERE QURNE ND QUE UCUBM KE dER 120 PrintList Pro Text Style Tags issseassuusunuxvnsuEERSESENREERRSEERSERPESSERSENVEEVARFEEAEESERE 122 Index E TTC 124 What is PrintList Pro and what can I do with it About PrintList Pro What is PrintList Pro and what can I do with it PrintList Pro is an easy to use tool for printing arrays and records on 4th Dimension layouts It lets you print arrays or fields PrintList Pro is the perfect complement to AreaList Pro providing a full featured plug in which can be used to print columns of data You can use PrintList Pro for any standard columnar output arrays or fields and it be configured to easily print a PrintList Pro object retaining all formatting features Because PrintList Pro is a plug in it is very fast and provides capabilities not available to you using native 4D arrays or report printing tools such as automatic column sizing custom formatting robust break level processing calculated columns and more Data is passed to PrintList Pro using 4D arrays or field numbers If only two columns need to be printed create two arrays or specify two fields and pass them as parameters to PrintList Pro No string parsing or other contortions are needed PrintList Pro can be used with just one command no special formatting is required For those cases when more control is needed several optional commands give you complete control over the appearance of the area Special to
44. ForeColor Name of the color in PrintList Pro s palette This will be the foreground color for the column header If the name is not in PrintList Pro s palette or it is a null string then 4dHdrForeColor will be used 4dHdrForeColor 1 to 256 The color at this position in 4D s palette will be used for the foreground color for the column header plpListForeColor Name of the color in PrintList Pro s palette This will be the foreground color for the column If the name is not in PrintList Pro s palette or it is a null string then 4dListForeColor will be used 4dListForeColor 1 to 256 The color at this position in 4D s palette will be used for the foreground color for the column If PL SetForeCir is not called the default is black for both the header and list foreground colors Examples Red for column header foreground light gray for column foreground all columns PL SetForeClr eNames 0 Red O Light Gray 0 Green for column header foreground 13th color from 4D s palette for column foreground 4th column PL SetForeClr eNames 4 Green 0 13 43 Configuration Commands PL SetForeRGBColor PL SetForeRGBOColor areaRef L columnNumber L hdrForeRed L hdrForeGreen L hdrForeBlue L listForeRed L listForeGreen L listForeBlue L areaRef longint Reference of PrintList Pro object on layout gt columnNumber longint Column number hdrForeRed longint Header fore red hdrForeGr
45. Jose Mercury News First Name Last Name Salary Jim Bartimo 21 418 88 Rory O Connor 63 409 92 Ron Wolf 25 432 96 110 261 76 Think Educational Software In First Name Last Name Salary Gregory Berkin 62 239 80 62 239 80 Page 1 114 Mon Feb 11 2008 Examples Example 4 Break Level Processing Example 4 Break Level Processing Print the same list of information shown in Example 1 and add some break level information for all the people in the same city The break will show a sum minimum average maximum and standard deviation of the people s salaries in each city Labels for each of the calculations will be printed in the adjacent column to salary The break will also show the number of people in the city and the city name A custom calculation is included along with the other calculations to calculate an end of year bonus based on 5 of the average salary The list is sorted by country state city and last name This allows the suppression of repeated values for each of these columns In order to set break information for the city we must configure break level 3 because the city array is 3 in the sort order Each of the calculations mentioned will be printed on a separate line so the height of the break is set to 6 lines Carriage returns are inserted between the labels and calculations so that each will start on a new line The code for the callback function follows the object method to the PrintList Pro
46. L SetBrkRGBOolor eeennen mn 98 PL SetBrkRowbDiv eennn mnn 101 PL SetBrkRowRGBDiv eeee 11 102 PL SetBrkStyle een nn 96 PLE SetBEKTeXE cutus ve E v a eus 92 PL S tCalcCall eA be ERE tenens 80 PL SetCellBorder een 65 PL SetCellColor een 60 PL SetCellFrame eem 66 PL S tCellICODk 2 ce rex x D adit nenas 63 PL SetCellRGBOolor een nnn 62 PL SetCellStyle eene 58 PL SetColBackColor enn 46 PL SetColBackRGBOolor eene 47 PL SetColOpts esie erneut 12 57 PL SetDividers eeenn mnn 51 PL SetFields eiecti eeepa e eden 76 PE SetFile i roiisis iini eda exam ada edo Eae TE sees 75 PL SetFotreGClPa iii isset iiixfine eif a kd roig 42 PL SetForeRGBOolor eene 43 PL SetForrmat inde rk a y ERR ct 12 34 PL SetFrame een mmm 53 PL SetHdrOpts seseeeeen nnn 40 PL_SetHdrStyle ccccccceceeseeeseeeeseeeeeeeees 39 PL SetHeaders eeee mmn 33 PL_SetHeight ccccsceseeceeeeeeeeetseeesenaees 55 PL SetMiscOptions eere 40 PL SetPageBreak eeeeen nnn 90 Index PL SetPageProc eese 67 PL_SetRepeatVal cccccceseeeseeeeseeeeeeeees 92 PL SetRGBDividers een nn 52 PL SetRGBFrame eee nnnm 54 PL SetRowOColor e meme 49 PL SetRowRGBOolor ee
47. OW v scccc2es neers cava eit t Leva v Ea YR I4 DR RIPYRD XR eIKR X Y IR D YR A aR 26 Variable Height ROWS cxx cx Ioa ER WERE EE ERE E REDE RIRRERRN E ERE ONERE ELEC ERU ER E 26 Colum Widths REPE 26 Dividing Lines Frame and Header Separator LINES ssprsiscs iie E aE a 26 Hairline Line Width c cox oianean ae E AEA AT ai 27 BIA E EAEN EE A AN 27 Using PictUre Abray Suriin E E E E E 27 End of Page Callback Method tert EL rettet era O Aa AA NOANA EANN E 27 Performance Issues with Formatting Commands sss 28 Borders and Frames iue pha ERE iniaa QRISRANKELARNEARENOCREREARARE cabaecaensdsa caddies CR EMUREIR EE RR NN 28 Header Cell Icon Support eer eee IRR REX RAE REX RREREX ER ests ERRARE RR URN ERA EA ATE ERA V KA 28 Picture Objects im Cells cien exu ex ie Eye po E RERRQR M EREFE RREYRRANELRERERREN TAA FRA CRELRERRERE EM e REA 28 Picture Objects in Headers eite eer ben kr ven ER ie ERR ER KE EE E EXER EROR KR REC G 28 Configuration Commands 2 5 52552xissaz a uE RR RSR SREAERREEARAYRRRNGURRSRSRERRARERARENEARSERRRERERRA GE DR PL Register registrationCode T forceCheck L gt result L sessesseeeeeeen menn 29 Example with multiple calls cccccccccec sce eee eee ence eee nnnm menm nennen nnn 30 wolxghiiEtig M M 30 PL AddColumn areaRef L dataPointer Z insertAt L gt result L esee 31 PL SetArraysNam areaRef L columnNumber I numArrays I array1
48. PrintList Pro User Manual Version 5 2 Manuel revision 23 July 2014 e Node 30 rue de la R publique 33150 Cenon France www e node net Table of Contents Contents About PrintList Pro iui nossauqasudesaqeaudemUNNNDMRUNUNSMIMMEPSMIEPIM IP ME MINE EONMMMMGNEU ENSEM d What is PrintList Pro and what can I do with it sssssessssssssssseeen nemen meme nnns 7 Technical Details ciet reme ex ea evene v e Ure DN ve ted add meia a Tur kdel uberi 7 Compatibility InformatiOn recie exte rt RR pix E RR aa Y KR ARR AY XX REX X LT ERR sees 7 Technical Support eee reor Ex e nee kem Roe Meanie Fen erit cec encender ERR er 7 Using the PrintList Pro Mantial erae Rea E RERK ERE ERRSRNRR RARE MARKE CERRAR ARE PARK ERAN EAR RORRNE KE EMUEA 8 Cross Referencing Format 5 cites einge ev tee ae aue ei Xe a ER cate a XE PERDERE PRA RR EAE TR P ERE Hd ER beens 9 Command Descriptions and SYNtAX rR NN I NU UI UII namens nn nnn nnn nnn 9 Upgrading from Previous Versions of PrintList Pro 10 Two major differences with previous VEIrSiONS cceee cece eect eee tenet eee emen mene 10 Compatibility Notes seremoniene rubr enr tay ec eee ewe Blew ee ed aed och ERR ET E 10 New Configuration commands eh t srk ertereubees takes NEEE eis sane ernie Saeed ele EK KNEE KOREA TE 11 NEW RGB comtirnafids id en nein eR EK RR REEXEARIATRKEELARRARREKEREIERAEE LUE ERRRRAEKRA ERA MERE ERNEREERA 11 New Brea
49. S arrayN S gt result L 32 PL SetHeaders areaRef L columnNumber I numHeaders I header1 S headerN S 33 PL SetFormat areaRef L columnNumber I format S columnJust I headerJust I usePictureHeight I attributed T lineSpacing F VertAllgnmeh iL 2e teer eere ttr tut ceeds t rro tu pen eR ER Eher rn n PR RI E kA Re niens 34 PL SetWidths areaRef L columnNumber I numWidths I width1 I widthN I 38 PL SetHdrStyle areaRef L columnNumber I fontName S size I styleNum I 39 PL SetHdrOpts areaRef L printHeaders I printPixelWidth I sssseenmm 40 PL SetMiscOptions areaRef L escapeChar S useEllipsis I seeee 40 PL SetStyle areaRef L columnNumber I fontName S size 1 styleNum I esesssese 41 PL SetForeCIr areaRef L columnNumber I plpHdrForeColor S 4dHdrForeColor 1 plpListForeColor S 4dListForeColor L o i ececesaeze amata nume tutae aa NE PEREENUME Fea n RRER KR PU E FEY D MERE EEA RR EM EOE ER CER RE 42 PL SetForeRGBColor areaRef L columnNumber L hdrForeRed L hdrForeGreen L hdrForeBlue L listForeRed L listForeGreen L listForeBlue L sees nnn 43 Table of Contents PL SetBackCIr areaRef L plpHdrBackColor S 4dHdrBackColor I plpListBackColor S 4dListBackKCOlOF 1 PE 44 PL SetBackRGBColor areaRef L hdrBackRed L hdrBackGreen L hdrBackBlue L listBackRed L listBackGreen L listBac
50. SetColOpts areaRef L hideLastColumns I hideDetailArea I drawingEngine I areaRef longint Reference of PrintList Pro object on layout gt hideLastColumns integer Number of columns from the right to hide gt hideDetailArea integer Hide the list and just show the breaks gt drawingEngine integer drawing engine ignored on Mac GDI better rendering no transparency no horizontal scaling limited text rotation features GDI allows the three features above but may affect precise rendering on Windows PL SetColOpts is used to hide columns from being printed and to hide the entire detail area to show just break level information hideLastColumns This parameter specifies the number of arrays from the right to not print This parameter is useful for keeping many arrays in sync when sorting but only a subset are to be printed Default is O hideDetailArea 0 or 1 O0 print the array values in the list default 1 do not print the array values in the list this is useful for printing a summary of break level information without printing the actual list drawingEngine ignored on Mac GDI better rendering no transparency no horizontal scaling limited text rotation features GDI allows the three features above but may affect precise rendering on Windows This parameter is only meaningful on Windows The two possible values are O use GDI default 1 change the engine used
51. The maximum number of PrintList Pro records printed in a PrintList Pro object is only limited by 4D s own limitations and available memory 74 Field and Record Commands Printing 4D Fields Performance Issues When Printing Fields When PrintList Pro prints fields the automatic column sizing algorithm uses only the first 20 records or less if the selection contains less than 20 records in the selection These records are always read regardless of whether the columns are automatically or manually sized Therefore there is no performance penalty using the automatic column sizing algorithm when printing fields See Performance Issues with Formatting Commands for more information 75 Field and Record Commands PL SetFile Commands PL SetFile areaRef L tableNum I resultCode L areaRef longint Reference of PrintList Pro object on layout gt tableNum integer Number of 4D table resultCode longint Result code PL SetFile tells PrintList Pro what table is the main table from which to print records This command is only necessary if the field to be printed in column one is not from the main table but from a related one table PL SetFile must be called before any fields have been set otherwise it will be ignored If this command is not called then PrintList Pro will use the table of the field printed in column one as the main table resultCode The possible values are PL SetFile Passed PL Not enough mem
52. Width 0 to 1 This option controls the line width of the column dividers A value of 0 25 pixel should be used for hairlines A value of 0 means that no dividers will be printed colDividerPattern String name of the pattern transparency ratio for the column divider If a null string is used then no column divider will be printed colDividerRed Column divider RGB red value colDividerGreen Column divider RGB green value colDividerBlue Column divider RGB blue value rowDividerWidth O to 1 This option controls the line width of the row dividers A value of 0 25 pixel should be used for hairlines A value of O0 means that no dividers will be printed rowDividerPattern String name ofthe pattern transparency ratio for the row divider If a null string is used then no row divider will be printed rowDividerRed Row divider RGB red value rowDividerGreen Row divider RGB green value rowDividerBlue Row divider RGB blue value 53 Configuration Commands PL SetFrame If neither PL SetDividers nor PL SetRGBDividers are called then no column or row dividers will be printed The following example will set the column row dividers using the PL SetRGBDividers routine Print column and row dividers in a hairline gray pattern PL SetRGBDividers eNames 0 25 Gray 209 209 209 0 25 Gray 209 209 209 PL SetFrame areaRef L frameLineWidth F frameLinePattern S plpFrameLineColor S 4dFrameLin
53. a PrintList Pro command or displaying a PrintList Pro area PrintListPro PrintListPro is the command used to identify the PrintList Pro plug in area when you create a plug in area object on a layout This command is only used in the object definition for a PrintList Pro object and should never be used as a command in a method 31 Configuration Commands PL AddColumn PL AddColumn areaRef L dataPointer Z insertAt L result L areaRef longint PrintList Pro area reference gt dataPointer pointer Pointer to an array or a field gt insertAt longint Position where to insert the column result longint 0 if successful PL AddColumn adds a column at the specified position areaRef PrintList Pro area reference dataPointer This parameter specifies the data to print in the inserted column when in Records mode this parameter must be a pointer to a field when in Arrays mode this parameter must be a pointer to an array not a local array insertAt Position where to insert the column Zero means append to the end This command supports the component architecture using arrays from the host database in a component and vice versa This command can be used as an alternative to PL_AddColumn but requires one line per array See the Calculated columns Array mode example Examples error PL_AddColumn eList gt aState 0 add a column containing aState array at the end error PL_A
54. ability can be used to provide special formatting to design more attractive and useful reports You can use PL SetCellStyle to set the font size and style configuration for an individual cell a range of cells or a selection of discontiguous cells You can choose to set all or just one of the style attributes of this command PrintList Pro will keep the cell and row specific style settings with a row when the list is sorted If you do not want the cell and row style settings to move when the list is sorted you should use the cell and row style routines after the call to PL SetSort 25 Configuring PrintList Pro Color Color When using color or grayscale printers many PrintList objects can be given color settings Be sure to set the printer Color Grayscale option to obtain the proper results Column and Header Colors Foreground and background colors can be specified for a PrintList Pro object using PL SetForeClr and PL SetBackcClr The foreground color can be specified for each column and column header and the background color can be specified for the list and header areas In addition PL SetForeRGBColor and PL SetBackRGBColor can be used to perform similar settings with standard RGB values Row Specific Colors PL SetRowColor is used to set the foreground and background color of a specified row and will override any column specification You can revert to the original column settings by setting the plpRowForeColor or pl
55. ack 115 Break headers 83 88 95 99 Break level eene 84 91 Break Level Processing 81 114 Break level text ccccsccseeeseeeeeeeetseeeaeteaes 96 Breaks esee esi xax xxr ERR 81 83 85 Break text a sicuri exe eoa va XAR ERA XEERAR REGERE 92 Break Value Insertion essss 93 Built in Calculations sees 84 C Calculated column 71 76 77 80 Calculation strings sseeessseseses 93 eras 69 Callback JUNCO sisine 95 Callback method 27 67 78 80 89 118 Cell Specific Colors irs 25 COlOF sioe 60 62 85 97 99 101 102 Column and Header Colors 25 Column dividers 102 104 105 Column Widths ort iere RR ee 26 Command Scisma 20 21 Compatibility sinasara 7 10 Compiler PLP isori exe xr e aure rr xREES 10 Computed breaks 12 69 72 89 106 107 117 125 CONSCANS cee eecee eee ences eee tease eee 22 120 Gp ni tava Ea 93 107 Custom calculations 70 84 94 95 D Demo mode eeeeeeen enn 13 14 Discontiguous cells sssse 58 60 Divider colors eeeeenn n 52 Divider line eeeseessse 26 101 102 DIVIGEFS PR 51 52 Double lines eeeeennnnm ne 27 Drawing engine eeeeeeeeeeenen
56. aderLinePattern S headerLineRed L headerLineGreen L headerLineBlue L areaRef longint Reference of PrintList Pro object on layout gt frameLineWidth real Width of the frame line gt frameLinePattern string Pattern of the frame line gt frameLineRed longint Frame line Red gt frameLineGreen longint Frame line Green gt frameLineBlue longint Frame line Blue headerLineWidth real Width of the header separator headerLinePattern string Pattern of the header separator headerLineRed longint Header separator Red headerLineGreen longint Header separator Green headerLineBlue longint Header separator Blue PL SetRGBFrame functions the same as the PL SetFrame routine except that the frame and header separator colors use standard RGB values frameLineWidth 0 to 1 This option controls the line width of the frame A value of 0 25 pixel should be used for hairlines A value of 0 means that no frame will be printed frameLinePattern Name of the pattern transparency ratio for the frame If a null string is used then no frame will be printed frameLineRed Frame line RGB red value frameLineGreen Frame line RGB green value frameLineBlue Frame line RGB blue value headerLineWidth O to 1 This option controls the line width of the header separator A value of 0 25 pixel should be used for hairlines A value of O means that no header separator will be print
57. age as the Horizontal Break line may be printed within the break areas as well e for break footers use PL SetBrkColOpt PL SetBrkCoIlRGBOpt to print a line at the top of the cell within the break footer area for break headers use PL SetBkHColOpt PL SetBkHCoIRGBOpt to print a line at the bottom of the cell within the break header area Hide the Detail Area The detail area the list of array data can be hidden to show only the break level information on the page using PL SetColOpts This is ideal for giving a summary of the array information Page Breaks PL SetPageBreak tells PrintList Pro whether or not to force a page break on any given break level The page break will occur immediately after the break footer is printed for that break level However a page break can be set for a break level regardless of whether a break level is configured to print a break footer PL SetBrkOpts can be called with the parameter printLastPageBreak to print or suppress a a page break if it occurs on the last page This option is used to avoid the printing of an unneeded blank page at the end of a PrintList Pro report Variable Height Breaks Any given break level can be set to be a variable height The same rules apply to breaks as to the rows in that a break can be of no height or up to the height of an entire page When a break level is set to be variable height PrintList Pro will perform the necessary break level calculation s to determine
58. ageBreak 0 or 1 O the page break will be suppressed default 1 if there is a page break on the last page it will be printed Refer to PL SetPageBreak for configuring page breaks Example PL SetBrkOpts eList 0 don t print the last page break PL SetBrkOrder areaRef L columnNum1 I columnNumN I integer areaRef gt columnNum1 columnNumN Reference of PrintList Pro object on layout Column s that reflects the sort order PL SetBrkOrder is used to communicate the sort order of a previously sorted list to PrintList Pro The sort information is used by PrintList Pro to determine where breaks occur within the sorted list The syntax of this call is identical to that of PL SetSort columnNum A value greater than O indicates that an ascending sort was performed upon that column while a value less than 0 indicates a descending sort If a columnNum is O then all successive columns will be ignored PL SetBrkOrder does not perform a sort Examples PL SetBrkOrder eContacts 3 4 7 was sorted on columns 3 4 and 7 all ascending PL SetBrkOrder eContacts 1 3 2 was sorted on columns 1 descending 3 ascending 2 descending 92 Break Level Processing PL SetRepeatVal PL SetBrkText PL SetRepeatVal areaRef L columnNum I repeatValues I areaRef longint Reference of PrintList Pro object on layout columnNum integer Column number gt repeatValues intege
59. aks for details about these powerful new commands which can be used as array utilities without need to print anything or set up a plug in area Additions to existing commands PL SetColOpts has a new integer parameter at the end ignored on Mac 0 use GDI plus for drawing default anything else use GDI for drawing PL SetColOpts areaRef L hideLastColumns I hideDetailArea I drawingEngine 1 PL SetFormat has three new parameters at the end integer O plain text default anything else attributed multi style text Note the multi style property is applied to all formatting in that column breaks have to account for that real line spacing to use O is substituted by 1 default integer vertical alignment O default 1 top 2 center 3 bottom PL SetFormat areaRef L columnNumber I format S columnJust I headerJust I usePictureHeight I attributed I lineSpacing F Double lines typical in accounting are now supported in breaks just use 2 0 as the lineWidth 5 parameter to PL SetBrkColOpt PL SetBrkColRGBOpt PL SetBkHColOpt PL SetBkHCoIRGBOpt Two 0 25 point lines will be printed New break features In break calculations War will compute variance and Dev will compute standard deviation Printing an AreaList Pro area To print AreaList Pro areas just call AL Save and PL Load they use the same XML UTF 8 format Then set row cell options and you are done Or add break processing opt
60. al space above and below the row s contents to give more spread out rows vertically Variable Height Rows All rows can be printed with a varying height depending on the data that is to be printed For rows PrintList Pro will examine each row s text string and picture element using the applied font and style settings to determine the tallest cell of each row Any given row can be of no height i e no data up to the height of an entire page For any row that is larger than a page PrintList Pro will attempt to show as much of it as possible by starting the row at the top of the page The row will be truncated to a page no one row can span two pages To set all rows to be variable height use PL SetHeight and set the numRowLines parameter to zero Setting an individual row or cell font size may cause PrintList Pro to override a fixed height row setting and print the row using a larger height In order to accommodate the larger font PrintList Pro uses the variable height calculation to determine the height of the row based upon the font size setting When variable row height is used Picture columns are used for row height calculation too even when usePictHeight in PL SetFormat was set to zero Column Widths Columns are automatically sized by default however a column size can be programmed using PL SetWidths All widths are given in pixels Dividing Lines Frame and Header Separator Lines Dividing lines can be added betwe
61. assed 0 PL Not enough memory 5 Increase 4D s RAM partition PL Not a file 6 Check to make sure that the table represented by tableNum does exist PL Not a field 7 The fieldNum passed is not a valid 4D field number DL Wrong field tune 8 The field passed cannot be used by PrintList because the field s type is not supported PL Maximum fields exceeded PL Wrong 4D version 10 obsolete You ve attempted to set fields or a table when arrays have already been set 9 32767 fields is the maximum PL Arrays have been set 11 Examples Set up the eList PrintList Pro object with 5 fields all from the same table error PL_SetFields eList Table gt People 1 5 Field People First Name Field gt People Last Name Field gt People Salary Field gt People Arrival Field gt People Male Set up the eList PrintList Pro object with 4 fields the third one from a related table Serror PL_SetFields eList Table gt People 1 2 Field People First Name Field gt People Last Name error PL_SetFields eList Table gt Companies 3 1 Field gt Companies Company Name Serror PL SetFields eList Table gt People 4 1 Field gt People Salary Set up the eList PrintList Pro object with 4 fields the first one from a related table error PL_SetFile eList Table gt People set the main table since the field to be set in column one is not from the
62. asteboard We could also display the text variable like in the demonstration database or use it otherwise C TEXT vBrkComputeResult ARRAY TEXT TbreakText R O C_LONGINT i Create the arrays from the data ALL RECORDS People SELECTION TO ARRAY People First Name aFname People Last Name aLname People Salary aSalary People City aCity People State aState People Country aCountry Sort by Country descending State City and Last Name descending MULTI SORT ARRAY aCountry aState aCity aLname aFname aSalary Declare the data array pointing on the actual arrays on which to perform calculations in our callback we include all arrays in case we ll need them someday even though we will only use aSalary here ARRAY POINTER dataArrays 0 APPEND TO ARRAY dataArrays gt aCountry APPEND TO ARRAY dataArrays gt aState APPEND TO ARRAY dataArrays gt aCity APPEND TO ARRAY dataArrays gt aLname APPEND TO ARRAY dataArrays gt aFname APPEND TO ARRAY dataArrays gt aSalary Declare the break array pointing on the arrays where to catch breaks in our callback according to our MULTI SORT ARRAY above sorted arrays ARRAY POINTER breakArrays 0 APPEND TO ARRAY breakArrays gt aCountry APPEND TO ARRAY breakArrays gt aState APPEND TO ARRAY breakArrays gt aCity APPEND TO ARRAY breakArrays gt aLname 118 Examples Example 5 Computed Breaks No
63. ats columnJust and headerJust The justification for a column and its header can be controlled independently The possible values are 0 Default 1 Left 2 Center 3 Right By default headers are left justified unless the column elements are center justified In that case the header will default to center justification The default column justifications for the different column types are Integer right Long Integer including Time right Real right Boolean left Date right String left Text left depending on the format parameter Picture The columnJust parameter is only used for picture columns where the format parameter is set to O or 3 or not specified or out of range Other values will use the format parameter to justify picture columns 37 Configuration Commands PL SetFormat usePictHeight O ignore the picture height when calculating the row height default 1 use height of the largest picture when calculating the row height If the column columnNumber does not have a picture column this parameter will be ignored If the list is configured to automatically calculate variable height rows then picture array elements are always included in the automatic calculation and this parameter is ignored See PL_SetHeight and Variable Height Rows for more information attributed PrintList Pro supports the multi styled text feature of 4D v12 and
64. ay 0 J H SSS NN NNNM nnns PL SetBrkRowRGBDiv areaRef L lineWidth F dividerRed L dividerGreen L dividerBlue L gt areaRef longint Reference of PrintList Pro object on layout gt lineWidth real Width of the break row divider line gt dividerRed longint Divider line Red gt dividerGreen longint Divider line Green gt dividerBlue longint Divider line Blue PL_SetBrkRowRGBDiv is used to set the line width and color of the break row divider line which is drawn between any all break level information and the rows of list data detail area that immediately follow This routine works in the same manner as PL SetBrkRowDiv except it allows you to specify the colors using standard RGB values PL SetBrkColOpt areaRef L breakLevel I columnNum I showColDivider I lineWidth F pattern S plpColor S 4dColor I gt areaRef longint Reference of PrintList Pro object on layout gt breakLevel integer Break level number gt columnNum integer Number of column showColDivider integer Show column divider if any in the break gt lineWidth real Width of the horizontal break line gt pattern string Pattern of the horizontal break line gt plpColor string Color from PrintList Pro s palette for the horizontal break line gt 4dColor integer Color from 4D s palette for the horizontal break line PL SetBrkColOpt is used to control the printing of col
65. ay See the Patterns item in the Compatibility Notes plpColor Name of the color in PrintList Pro s palette This will be the color for the horizontal break line If the name is not in PrintList Pro s palette or it is a null string then 4dColor will be used 4dColor 1 to 256 The color at this position in 4D s palette will be used for the horizontal break line PL SetBkHCoIRGBOpt areaRef L breakLevel I columnNum I showColDivider I lineWidth F dividerRed L dividerGreen L dividerBlue L areaRef longint Reference of PrintList Pro object on layout gt breakLevel integer Break level number gt columnNum integer Number of column showColDivider integer Show column divider if any in the break gt lineWidth real Width of the horizontal break line gt dividerRed longint Horizontal break line Red gt dividerGreen longint Horizontal break line Green gt dividerBlue longint Horizontal break line Blue PL_SetBkHCoIRGBOpt is used to control the printing of column dividers and horizontal lines within a break header cell This routine works in the same manner as PL SetBkHColOpt except it allows you to specify the colors using standard RGB values 106 Break Level Processing PL ProcessArrays PL ProcessArrays callbackMethodName S breakArrays Y dataArrays Y useDetail L error L Name of the Computed Break callback project method Array of pointers to arrays
66. back is a 4D project method which is executed by a plug in Field and Record Commands PrintList Pro can either display arrays or fields Calculated Columns PrintList Pro columns can be calculated on the fly to print the results of calculations performed in a callback method both in field and array printing modes Break Level Processing this powerful set of features makes the whole difference when using PrintList Pro compared to other printing tools Examples detailed step by step examples on how to use PrintList Pro s various features PrintList Pro Constant List a full list of PrintList Pro constants organized by theme with each constant s actual value PrintList Pro Text Style Tags special tags can be used in any text contained in a PrintList Pro area to print styled characters Index Items that are new or modified in PrintList Pro version 5 x are displayed in pink magenta characters About PrintList Pro Cross Referencing Format Cross Referencing Format Each time a command or section is mentioned a cross reference is given through hyperlinks to let you quickly find the definition for the command Command Descriptions and Syntax Each PrintList Pro command or routine has a syntax or rules that describe how to use the command in your 4D database For each command the name of the command is followed by the command s parameters The parameters are enclosed in parenthesis and separated by semicolons Followi
67. background colors for the header and list area While the foreground color can be specified for each column the background color for the header or the list area can only be specified for all columns using this command You need to use PL SetColBackColor or PL SetColBackRGBColor to set the background colors of each column s header and each column itself PrintList Pro has its own palette with the following colors white black blue green yellow magenta red cyan gray light gray Color constants can be used plpHdrBackColor Name of the color in PrintList Pro s palette This will be the background color for the column header If the name is not in PrintList Pro s palette or it is a null string then 4dHdrBackColor will be used 4dHdrBackColor 1 to 256 The color at this position in 4D s palette will be used for the background color for the column header plpListBackColor Name ofthe color in PrintList Pro s palette This will be the background color for the column If the name is not in PrintList Pro s palette or it is a null string then 4dListBackColor will be used 4dListBackColor 1 to 256 The color at this position in 4D s palette will be used for the background color for the column If PL SetBackClr is not called the default is white for both the header and list background colors Examples Light gray for header background white for list background all columns PL SetBackClr eNames 0 Light Gray 0 White 0
68. but greater than zero PrintList Pro will ignore it and use 3 PrintList Pro will not let a column be wider than the width of the list area minus 20 If not called the default width for all columns is determined based on the type of array or field printed in the column Example Serror PL SetArraysNam eNames 1 5 aFN aLN aCity aState aZip PL SetWidths eNames 1 5 150 50 0 100 0 0 forces autosizing for that column 39 Configuration Commands PL SetHdrStyle PL SetHdrStyle areaRef L columnNumber I fontName S size I styleNum I areaRef longint Reference of PrintList Pro object on layout gt columnNumber integer Column for which to set the header style gt fontName string Name of the font to use gt size integer Size of the font styleNum integer Style of the font PL_SetHdrStyle is used to control the appearance of the PrintList Pro column headers The columns can be controlled individually or as a group columnNumber This parameter specifies what column header to apply the style to Use a value of zero 0 to apply the parameters to all columns fontName Use this parameter to specify the font for the specified columnNumber If not called or the specified font name is not found the header s will be printed in the OS defined System Font If the font is not installed then the System Font will be used styleNum This parameter is a font style code By adding the codes together you can
69. calculation string s into breakText as described below Text can overflow to adjacent columns using the numColsToOverflow parameter The text is justified within a column s using the justification parameter If no call to PL SetBrkText is made for breakLevel no break information will be printed for that break level 93 Break Level Processing PL SetBrkText breakLevel The position in the sort order specified in PL SetSort or PL SetBrkOrder i e 1 through n where n is the number of levels of sort Use a value of 0 to specify the total line to be printed at the end of the list columnNum The column number at which the specified text will be placed for the specified breakLevel breakText The text to be shown in columnNum whenever a break occurs for breakLevel The text may automatically wrap to multiple lines or carriage returns can be embedded to force text wrapping Use PL SetBrkHeight or PL SetBkHHeight to set the number of text lines for a break level if more than 1 line is anticipated A calculation may be performed on all the values in columnNum since the last break for breakLevel breakText can include embedded calculation strings which inform PrintList Pro to perform the desired calculation using the array values associated with columnNum The result of the calculation is formatted into a string which replaces the calculation string at its location within breakText The following table shows a list of the calcula
70. column types Text columns can only be formatted using styled text with the attributed parameter set to d Additionally null time and date values can be set to print a blank by appending a dash character to the format string parameter The defaults for the different column types are Integer 0 Long Integer EGER EV HHO Real 4 0 00 Boolean True False Date o Picture 35 Configuration Commands PL SetFormat format for string arrays Any formatting characters supported for 4D are allowed Pre defined styles i e those saved in the Design environment are not allowed format for text arrays Not supported except for attributed text according to the value set by the attributed parameter format for numeric arrays See the 4D command String in the 4D Language Reference for the possible values Any valid 4D numeric format may be used format for boolean arrays The string contains two formats one for the True value the other for the False value separated by a semicolon Examples Male Female and MacOS Windows format for date arrays See the 4D command String in the 4D Language Reference for the possible values Any valid 4D date format may be used Examples 0 or 3 are valid formats 09 20 07 default 9 20 07 Thu Sep 20 2007 Thursday September 20 2007 09 20 07 or 09 20 1997 September 20 2007 Sep 20 2007
71. combine styles The numeric codes for styleNum are shown below Plain 0 Bold 1 Italic 2 4 8 Underline Outline Shadow 16 Condensed 32 Extended 64 Examples PL SetHdrStyle eList 1 Geneva 12 1 Geneva 12 point bold column 1 PL SetHdrStyle Names 3 New York 12 3 New York 12 point bold italic column 3 PL SetHdrStyle Names 0 Palatino 10 3 Palatino 10 point bold italic all columns 40 Configuration Commands PL SetHdrOpts PL SetMiscOptions PL SetHdrOpts areaRef L printHeaders I printPixelWidth I areaRef longint Reference of PrintList Pro object on layout gt printHeaders integer Print the headers above the list gt printPixelWidth integer Print column widths in the header PL_SetHdrOpts is used to control several PrintList Pro options pertaining to column headers printHeaders 0 no headers will be printed default 1 headers will be printed only on the first page 2 headers will be printed on all pages printPixelWidth Used during development to allow you to easily determine what pixel width looks best for each column e 0 the normal header text will be printed default 1 the width of the column will be printed in each header Examples PL_SetHdrOpts eList 2 0 print headers on all pages no pixel widths PL_SetHdrOpts eList 1 1 print headers on first page and pixel widths PL SetMiscOptions areaRef L
72. commands that affect the arrays Also the callback method should preserve the current selection of the printing layout s file by saving and restoring the selection if necessary The value returned by the callback method will then be printed at the embedded position within the break text 85 Break Level Processing Suppressing Repeated Values in the List Suppressing Repeated Values in the List Repeated values in a sorted list can be suppressed using PL SetRepeatVal The repeated value is shown on the first occurrence and at the top of each page thereafter PL SetRepeatVal works on any sorted list regardless of whether any break level information is shown or not Style and Color in Breaks Style and color settings can be provided for each column within each break level using PL SetBrkColor for break footers and PL SetBkHColor for break headers to set foreground and background colors using PrintList Pro s palette or 4D s palette PL SetBrkRGBColor for break footers and PL SetBkHRGBColor for break headers to set foreground and background colors using standard RGB values PL SetBrkStyle for break footers and PL SetBkHStyle for break headers to set text style settings If no style or color information is given PrintList Pro will use the corresponding column settings from the list Multiple Lines in a Break Both break headers and footers can be configured to be a fixed number of lines per break or a variable number of lines To
73. cord in the current selection and requires at least one record in the current selection to be executed at all PrintList Pro will print the array s in any PrintList Pro object once for every record in the current selection If you wish to use PRINT SELECTION to print an array only once ensure that there is only one record in the current selection of the table used for printing the one that holds the layout which doesn t have to be related to the data that is actually printed If you wish to use PRINT RECORD ensure that there a current record in the table used for printing the one that holds the layout which doesn t have to be related to the data that is actually printed 22 Getting Started with PrintList Pro Using Defined Constants with PrintList Pro Configuring PrintList Pro A PrintList Pro object is initialized in the On Printing Detail phase as the record is about to be printed This initialization will be contained in the PrintList Pro plug in area object method or in the form method Using Defined Constants with PrintList Pro There are defined constants that may be used as values for many parameters in the PrintList Pro commands See the Constants tab of the Explorer in the 4D Design environment These constants are categorized according to the type of command that they are associated with such as PLP Break Levels PLP Colors etc Specifying the Arrays to Print 4D arrays are passed to PrintList Pro via the PL Se
74. cuis uet o p edis suene nalsd Fox OR CR E A 52 PL SetFrame areaRef L frameLineWidth F frameLinePattern S plpFrameLineColor S 4dFrameLineColor I headerLineWidth F headerLinePattern S plpHeaderLineColor S AdHeaderLineColors pM 53 PL SetRGBFrame areaRef L frameLineWidth F frameLinePattern S frameLineRed L frameLineGreen L frameLineBlue L headerLineWidth F headerLinePattern S headerLineRed L headerLineGreen L headerLineBlue D 12 eines eer one nh nemen tang e naa e hu rh pen e Pea da santa ainei 54 PL SetHeight areaRef L numHeaderLines I headerHeightPad 1 numRowLines I rowHeightPad 1 MINIMUM SIGMUND 25 5 uci xa Dort vba er e iteub Da exo nobedel se lnd A cR bon KR epe a Dua RU DR UR 55 PL SetSort areaRef L columni1 I columnN I eessesseeseeeeee enne 56 PL SetColOpts areaRef L hideLastColumns I hideDetailArea I drawingEngine I 57 PL SetCellStyle areaRef L firstCellCol I firstCellRow L lastCellCol I lastCellRow L cellArray X styleN m lI fontNaime S fontSize T aici ea ease e ces since eate skr rta un an da A ea Ple ea ed sae CE asda reas iad E 58 PL SetCellColor areaRef L firstCellCol I firstCellRow L lastCellCol I lastCellRow L cellArray X plpForeColor S 4dForeColor I plpBackColor S 4dBackColor I sss 60 PL SetCellRGBColor areaRef L firstCellCol I firstCellRow L lastCellCol I lastCellRow L cellArray X cellForeRed L cellForeGreen L cellForeBlu
75. cyan gray light gray Color constants can be used To specify a single cell if firstCellCol and firstCellRow are greater than 0 and lastCellCol or lastCellRow are less than or equal to 0 then only firstCellCol firstCellRow will be set To specify a range of cells if firstCellCol and firstCellRow are greater than O and lastCellCol and lastCellRow are greater than 0 then the range of cells from firstCellCol firstCellRow to lastCellCol lastCellRow will be set To specify discontiguous cells if firstCellCol or firstCellRow are less than or equal to 0 then the cells in cellArray will be set cellArray Two dimensional long integer array The first dimension must be two The first array is for the column indices and the second array is for the row indices The second dimension must be the same as the number of cells that are to be selected See the following illustration 61 Configuration Commands PL SetCellColor plpForeColor Name of the color in PrintList Pro s palette This will be the foreground color for the cell If the name is not in PrintList Pro s palette or it is the empty string then 4dForeColor will be used 4dForeColor 1 to 256 Foreground color number for the cell from 4D s palette If a cell foreground color has been previously set it may be removed by setting plpForeColor to the empty string and 4dForeColor to 1 The cell foreground color may be left unchanged by setting plpForeColor to th
76. d 2 passed to this callback method are areaRef and columnNumber Therefore if desired the same callback can be used for more than one PrintList Pro object and for many columns in an object For information on how to write a calculated column callback see the section Calculated Column Callback Example Set calculated callback method for column 3 PL SetCalcCall eArea 3 CalcColCallback 81 Calculated Columns About PrintList Pro Break Level Processing Break Level Processing About PrintList Pro Break Level Processing The PrintList Pro break level processing routines provide the functionality of 4D s Quick Report capabilities and much more You can choose to display a variety of information for any break level and any column within that break including static text Quick Report calculations custom calculations or break data insertion for each break Each piece of information can be shown in different fonts sizes and styles as well as different colors You can also control the display of repeated values When Do Breaks Occur When a list is sorted often some of the sorted array elements will have groups of identical values For example if the membership of a club that consisted of members from many different countries was sorted by country the membership list would likely consist of many members that were from the same country Because the list is sorted all the members from the same country would be grouped together
77. ddColumn eList gt aCity 1 insert a column containing aCity array at position 1 32 Configuration Commands PL SetArraysNam PL SetArraysNam areaRef L columnNumber I numArrays I array1 S arrayN S gt result L areaRef longint PrintList Pro area reference gt columnNumber longint Column at which to set the first array gt numArrays longint Number of arrays to set up to 15 gt arrayl arrayN string Names of 4D arrays 4 me ongin i oe el PL SetArrays Passed PL Not an array 1 Check to make sure all arrays are correctly typed PL Wrong type of array 2 Pointer and two dimensional arrays are not allowed PL Wrong number of 3 Make sure that all rows arrays have the same number of elements PL Maximum number of 4 32767 arrays is the arrays exc maximum PL Not enough memory 5 Unlikely these days PL_SetArraysNam tells PrintList Pro what arrays to print Up to fifteen arrays can be set at a time Any 4D array type can be used except pointer and two dimensional arrays Since PrintList Pro can print up to 32767 arrays this command may have to be used more than once There are three very important points to note about this command e This command must be called first before any of the other commands in the On Printing Detail phase e The columns must be added in sequential order unless the particular column has already been added In other words to s
78. e second is 2 etc When dataArrays is empty no calculations are performed useDetail set to 0 for callbackMethodName to be called only with break information set it to 1 to call the callback method with every data row and with breaks PL ProcessArrays operates on a copy of the arrays you can freely modify them in the callback 107 Break Level Processing PL GetBreakValue PL GetBreakValue handle L column L calculation L gt value F gt handle string Identification of the current PL ProcessArrays call gt column array Index of the column to be processed in the dataArrays array set by PL ProcessArrays gt calculation array Calculation type PL_GetBreakValue is called from the callback method set by PL ProcessArrays to perform usual break level processing calculations such as sum minimum etc for the current break level or individual row and the specified column The calculation result is returned in value by PL GetBreakValue handle is an identification of the current PL ProcessArrays call This is actually the process ID Make sure not to call PL ProcessArrays in the callback column is the index from the dataArrays pointer array defined by PL ProcessArrays When column is out of range zero is returned calculation can be one of the following values Sum Minimum Average Maximum Count Variance NIOSI AJI Nje Standard deviation callbackMethodName
79. e 57 E End of Page cei eie x e etd ger ix 27 End of Page Callback sese 69 F Field Printing eina c br er RE RR ERR 73 gg 73 76 dece c TEM 58 elec IET 10 gelu 82 87 Foreground esee etn emere a ca n esa va 62 Foreground color 42 60 99 FORME 1 EPIS 35 123 Forrriatting ecce cereo ea ooa aeree ta edes 24 rinm IP 26 28 53 54 66 G Cip 57 GDI DE 57 Getting Started aoireiirensi smoar anen 13 H Hairline Line Width esses 27 Header Colors een nn 25 Headers 23 28 33 36 39 40 44 45 46 47 69 82 86 87 101 104 Header separator ssessusss 26 53 Height retreat ana 26 55 56 Index Height pad iere annt rera tan ieee 100 Hide the Detail Area eeseeee 87 Horizontal lines 102 104 105 l ICOM ET 28 63 64 Installation eese nnn 13 J J stificationi eoi Re e iE eIS 36 84 L Licence M 13 Licence registering ree ceed 13 Licenses folder eeeeenee 30 License CYPES rsrsrsrsrs ihanin iinn enn 18 Line SPACING zeiten xe hene uh Ene RR 37 M MAXIMUM m 93 107 MERGED iere oet AL er HERR Ee 17 Merged licenses cce oo e ERR ERR nnn 17 MINIMUM ecc 93 107 Multiple Lines eene 26 85 Multiple records eeeeeeeeeeeee 110 Multi styled text eec ee ie ee ran eins 37 N Number of lines
80. e L cellBackRed L cellBackGreen L cellBackBlue L 62 PL SetCellIcon areaRef L cellColumn I cellRow L pictRef P iconAlignment I horPosition I vertPositiorizI offsetOrWidth le scallngsD 3 1 sie Xe ceu Doce x RU ERG ale dine ac ca PETER dS 63 PL SetCellBorder areaRef L cellColumn I cellRow L borderLeft I borderTop I borderRight I borderBottom I offset I width F redColor I greenColor I blueColor I eeeeeeeeeee 65 PL SetCellFrame areaRef L firstCellCol I firstCellRow L lastCellCol I lastCellRow L offset I width F redLightColor I greenLightColor I blueLightColor I redDarkColor I greenDarkColor I blueDarkColor I clearAllBordersi Ijne tens 66 PL SetPageProc areaRef L callbackMethod S c cceeeee eect eee eee eee eee meme 67 PL GetVersion gt Versioni T 421i oca a ese exo oe desde Meads vorago RES RR TUER ten eel db E EAA 67 PL Load areaRef L XMLE T s result Larungo cusa xeu Dc E Ri ei sapete ie da Gao DX ON E 68 PE Save areaRef L XML T gt resulti Lesini ana be eer Dey cte p oper one cit lunga Dl idi E DX X 68 Using the Callback Methods ius usussaus naui nsunAsc a gRE as REA nES REED rA FMRDE FERA R LEE REFER Rosada OR SUM MAM ESL I UL anna seach came fatan E 69 FD 69 End of Page Callback err rar ERR ERU RI ER cass AR XX EXER RE KR DONE HN ERE Ek o ERE KR EEERE NR ERROR Kex E ERA FREE KR 69 Custom Calculati
81. e after the end of each list of people The total line will contain a sum of the salaries for all the people working for that company A total line requires us to use PrintList Pro s Break Level commands While most break levels require the list to be sorted a total line is the exception The total line is is configured by passing O for the break level parameter The object method for the PrintList Pro area in Example 2 has been modified to include the Break Level calls needed as shown below If Form event On Printing Detail Create the arrays The current selection of People changes with each new record SELECTION TO ARRAY People First Name aFname People Last Name aLname People Salary aSalary plErr 2PL SetArraysNam eList 1 3 aFname aLname aSalary set the arrays If plErr 0 PL SetHdrOpts eList 1 0 print headers at the top of the area only PL SetHeaders eList 1 3 First Name Last Name Salary set headers apply to all headers Lucida Grande 10 point bold PL SetHdrStyle eList 0 Lucida Grande 10 1 PL SetStyle eList O Lucida Grande 9 0 apply to all columns Lucida Grande 9 point plain format column 3 right justified header and column PL SetFormat eList 3 2 4 33 3 33 3 00 3 3 solid black hairline frame hdr line PL SetFrame eList 0 25 Black Black 0 0 25 Black Black 0 PL SetWidths eList 1 3 80 80 100 set the column widths Configure the total line PL_SetBrkText
82. e break level number for which the break has occurred the column number the format of that column and the starting and ending indexes of the corresponding array The function should return as formatted text the result of the calculation The return variable 0 should be of type text and should be 255 characters or less Example PL SetBrkFunc eList Break Function custom calculation callback See Example 4 Break Level Processing for an example of a custom calculation callback function 96 Break Level Processing PL SetBkHFunc PL SetBrkStyle PL SetBkHFunc areaRef L functionName S areaRef longint gt functionName string Reference of PrintList Pro object on layout Function name to be called back PL SetBkHFunc is used to specify the name of the break header callback function This function will be called for any break header that contains a break function Refer to PL SetBrkText and PL SetBkHText to determine how to set a break function for a break level The syntax of this command is identical to that of PL SetBrkFunc PL SetBrkStyle areaRef L breakLevel I columnNum I fontName S size I styleNum I areaRef longint Reference of PrintList Pro object on layout gt breakLevel integer Break level number gt columnNum integer Column number gt fontName string Name of the font gt size integer Size of the font styleNum integer Style of the font PL SetBrkStyle i
83. e empty string and 4dForeColor to 0 plpBackColor Name of the color in PrintList Pro s palette This will be the background color for the cell If the name is not in PrintList Pro s palette or it is the empty string then 4dBackColor will be used 4dBackColor 1 to 256 Background color number for the cell from 4D s palette If a cell background color has been previously set it may be removed by setting plpBackColor to the empty string and 4dBackColor to 1 The cell background color may be left unchanged by setting plpBackColor to the empty string and 4dBackColor to 0 Keep in mind that any settings applied to a cell will be moved with that cell s data if the data is later sorted using PL SetSort If you do not want the cell s settings to move call PL SetSort before applying the cell settings Example ARRAY LONGINT aCellArray 2 0 MUST initialize a two dimensional long integer array Set the foreground color of the cell at column 1 row 3 to blue PL SetCellColor eList 1 3 0 0 aCellArray blue 0 0 Set background color of cells from column 2 row 2 to column 5 row 5 to green PL SetCellColor eList 2 2 5 5 aCellArray 0 Green 0 Set all negative values in the third column a real array to have a foreground color of red For i 1 Size of array aRevenue check each element in the array If aRevenue1 i 0 is the value in this element negative PL SetCellColor eList 3 i 0 0 aCellArra
84. e not been previously set 50 Configuration Commands PL SetRowRGBColor Examples PL SetRowColor eNames 10 Blue O Light gray 0 set row 10 to foreground blue background light gray PL SetRowColor eNames 0 Blue 0 Yellow 0 set all rows to blue foreground yellow background PL SetRowColor eNames 0 1 1 reset all row colors to use the column color settings PL SetRowColor eList 10 Blue O Light Gray 0 set the 10th row to print a foreground color of blue and background color of light gray PL SetRowColor eList 12 Green 0 0 set the 12th row to print a foreground color of green and the current background color PL SetRowRGBOColor areaRef L rowNumber L rowForeRed L rowForeGreen L rowForeBlue L rowBackRed L rowBackGreen L rowBackBlue L areaRef longint Reference of PrintList Pro object on layout gt rowNumber longint Row number gt rowForeRed longint Foreground red gt rowForeGreen longint Foreground green rowForeBlue longint Foreground blue rowBackRed longint Background red rowBackGreen longint Background green gt rowBackBlue longint Background blue PL SetRowRGBColor provides the ability to set the foreground and background colors for an individual row using standard RGB colors This routine is similar to PL SetRowColor except that it uses RGB color values rowForeRed Desired foreground RGB red value rowForeGreen Desired foreground RGB green
85. e printed once so we can use the PRINT RECORD command regardless of the current selection First we need to create the layout and draw the PrintList Pro plug in object We ll name the object eList Our layout now looks something like this PrintList Pro Example 1 50 100 eList w 549 h 55 PrintList Pro v4 6b1 The project method which controls the printing is ALL RECORDS Layouts OUTPUT FORM Layouts Example 1 PRINT RECORD Layouts We ll use the On Printing Detail event to configure our PrintList Pro area 109 Examples Example 1 One record current selection Here is the PrintList Pro area s object method If Form event On Printing Detail ALL RECORDS People Create the arrays from the data SELECTION TO ARRAY People First Name aFname People Last Name aLname People Salary aSalary People City aCity People State aState People Zip aZip People Country aCountry plErr PL_SetArraysNam eList 1 7 aFname aLname aCountry set the arrays If plErr 0 PL SetHdrOpts eList 2 0 print headers on all pages PL SetHeaders eList 1 7 First Name Last Name Salary City State Zip Country apply to all headers Lucida Grande 10 point bold PL SetHdrStyle eList 0 Lucida Grande 10 1 PL SetStyle eList O Lucida Grande 9 0 apply to all columns Lucida Grande 9 point plain print only column dividers solid gray hairlines PL SetDividers eList 25 Black
86. e that merged licenses will keep working if your 4D Server serial information is modified upgrading or 4D Partner yearly updates or if any client workstation hardware is changed It will only have to be updated if the 4D Server hardware is changed or if the plugin itself requires a new key paid upgrades upon major version changes You may want to register your merged server without having to turn off the database to modify the code This is possible using any 4D setup on the server machine such a a standard developer single user 4D Keeping your production server alive open the Get Serial Info Database with 4D on the same server machine Ignore the demonstration mode dialog if your single user 4D is not registered for the plugin and wait for the next Alert Alert The following information has been copied to your clipboard Key 204998519 User Company e Node Max users 1 4D Local Mode F0011320 build 122395 type 0 UUID 93A47C40 30A2 5FF4 AC8D DDA872C6A380 Machine ID 114681 A text file is also saved with the same information The last line Machine ID is the number that you need to send in order to receive your merged server registration key For current pricing please see the ordering page on our website 18 Getting Started with PrintList Pro Registration 19 License types Like all e Node plug ins PrintList Pro offers several license types There are no such things as MacOS vs Windo
87. e the color for the frame If the name is not in PrintList Pro s palette or it is a null string then 4dFrameLineColor will be used 4dFrameLineColor 1 to 256 The color at this position in 4D s palette will be used for the frame headerLineWidth 0 to 1 This option controls the line width of the header separator A value of 0 25 pixel should be used for hairlines A value of O means that no header separator will be printed headerLinePattern Name of the pattern transparency ratio for the header separator If a null string is used then no header separator will be printed 54 Configuration Commands PL SetRGBFrame plpHeaderLineColor Name ofthe color in PrintList Pro s palette for the header separator If the name is not in PrintList Pro s palette or it is a null string then 4dHeaderLineColor will be used 4dHeaderLineColor 1 to 256 The color at this position in 4D s palette will be used for the header separator If neither PL SetFrame nor PL SetRGBFrame are called then no frame or header separator line will be printed Examples Print 1 pixel wide solid gray header separator and no frame PL SetFrame eNames 0 0 1 Black Gray 0 Print hairline solid black frame and header separator line PL SetFrame eNames 0 25 Black Black 0 0 25 Black Black 0 esses PL_SetRGBFrame areaRef L frameLineWidth F frameLinePattern S frameLineRed L frameLineGreen L frameLineBlue L headerLineWidth F he
88. eColor I headerLineWidth F headerLinePattern S plpHeaderLineColor S 4dHeaderLineColor I areaRef longint Reference of PrintList Pro object on layout frameLineWidth real Width of the frame line frameLinePattern string Pattern of the frame line plpFrameLineColor string Color from PrintList Pro s palette for the frame 4dFrameLineColor integer Color from 4D s palette for the frame headerLineWidth real Width of the header separator headerLinePattern string Pattern of the header separator plpHeaderLineColor string Color from PrintList Pro s palette for the header 4dHeaderLineColor integer Color from 4D s palette for the header separator PL SetFrame is used to set the pattern transparency ratio and color of the frame and header separator lines These are the available patterns white black gray light gray and dark gray See the Patterns item in the Compatibility Notes PrintList Pro has its own palette with the following colors white black blue green yellow magenta red cyan gray light gray Color constants can be used frameLineWidth 0 to 1 This option controls the line width of the frame A value of 0 25 pixel should be used for hairlines A value of 0 means that no frame will be printed frameLinePattern Name of the pattern transparency ratio for the frame If a null string is used then no frame will be printed plpFrameLineColor Name of the color in PrintList Pro s palette This will b
89. eList 0 3 Sum 0 0 calculate the sum in the total line PL SetBrkHeight 6eList 0 1 4 add some padding to the total line PL SetBrkColOpt eList 0 3 0 0 25 Black Black 0 draw a line above the total End if End if 113 Examples Example 3 Adding a total line to the list The total line now appears in the list as is shown below PrintList Pro Example 3 Company Employees Salaries Addison Wesley Publishing Co First Name Last Name Salary Mike Erickson 1 000 00 Steven Stansel 24 130 54 25 130 54 Apple Computer Inc First Name Last Name Salary Barbara Anderson 68 484 36 Samir Arora 63 847 98 Randy Battat 26 898 06 Bill Coldrick 42 369 32 Debi Coleman 71 092 14 Moira Cullen 69 613 32 David Eyes 28 964 88 Jonathan Fader 30 048 76 Jim Floyd 25 055 66 Linda Glish 63 990 08 Russ Havard 20 953 38 Mike Homer 46 056 08 Barbara Krause 41 832 28 Tim Kreps 80 500 14 Jon Magill 59 917 20 John Sculley 25 392 78 Doug Sleeter 65 797 20 Martha Steffen 50 354 36 Larry Tesler 39 933 04 Peter Watkins 92 377 74 Ron Wong 24 500 00 1 037 978 76 National Apple Professional In First Name Last Name Salary Mike Bailey 83 410 74 83 410 74 CompuServe First Name Last Name Salary Sharon Jones 90 019 86 90 019 86 Affinity Microsystems Ltd First Name Last Name Salary Rick Barron 59 908 38 59 908 38 San
90. eak level 1 to red no background color PL SetBkHColor eList 1 3 red 0 0 Set the background color for the break header in column 3 break level 1 to blue no foreground color PL SetBrkColor eList 1 3 0 Blue O 100 Break Level Processing PL SetBkHRGBColor PL SetBrkHeight PL SetBkHRGBOColor areaRef L breakLevel I columnNum I brkHdrForeRed L brkHdrForeGreen L brkHdrForeBlue L brkHdrBackRed L brkHdrBackGreen L brkHdrBackBlue L gt areaRef longint Reference of PrintList Pro object on layout gt breakLevel integer Break level number columnNum integer Column number gt brkHdrForeRed longint Foreground red gt brkHdrForeGreen longint Foreground green gt brkHdrForeBlue longint Foreground blue brkHdrBackRed longint Background red gt brkHdrBackGreen longint Background green brkHdrBackBlue longint Background blue PL SetBkHRGBColor is used to specify the color of the text to be printed in the break header for the specified columnNum and breakLevel This routine works in the same manner as PL SetBkHColor except it allows you to specify the colors using standard RGB values PL SetBrkHeight areaRef L breakLevel I numBreakLines I breakHeightPad I gt areaRef longint Reference of PrintList Pro object on layout gt breakLevel integer Break level number gt numBreakLines integer Number of text lines in the break gt breakHeightPad
91. ed 55 Configuration Commands PL SetHeight If a null string is used then no header separator will be printed headerLineRed Header separator RGB red value headerLineGreen Header separator RGB green value headerLineBlue Header separator RGB blue value If neither PL SetFrame nor PL SetRGBFrame are called then no frame or heade separator line will be printed he following example sets the frame and header separator line using PL SetRGBFrame Print frame and header separator line in a hairline gray pattern PL SetRGBFrame eNames 0 25 Gray 209 209 209 0 25 Gray 209 209 209 PL SetHeight areaRef L numHeaderLines I headerHeightPad I numRowLines I rowHeightPad I minimumHeight 1 Parameter Type Description o areaRef longint Reference of PrintList Pro object on layout numHeaderLines integer Number of text lines in the header headerHeightPad integer Extra height for the header numRowLines integer Number of text lines in each row rowHeightPad integer Extra height for each row minimumHeight integer Minimum pixel height remaining on the page PL SetHeight is used to set the number of lines of text along with additional height padding in the header and in the rows Only text and string columns can wrap to more than one line If numRowLines is set to 2 or more text and string elements will be able to wrap into the number of lines specified for each row Note that all rows will be given the same numbe
92. ed column callback If any of these parameters are not declared you will get an error when compiling the database You must use the following declarations in your callback method C_LONGINT 1 2 3 5 6 C_POINTER 4 See Calculated Columns for details 72 Using the Callback Methods Computed Breaks Computed Breaks This powerful feature makes all break calculations available for subtotals or other calculated values in any break level as well as any individual row sub selection from the top These values are returned by PrintList Pro without need for actual printing PL ProcessArrays is used to specify the name of the computed break callback function This function will be called for the break levels and the columns specified by the breakArrays and dataArrays parameters In addition the useDetail parameter allows calling the callback only on breaks or for each individual row as well The Computed Break callback method receives three parameters a handle needed to call PL GetBreakValue the current row number and the current break level or 1 if individual rows are set to call the callback with PL ProcessArrays You must use the following declarations in your callback method C LONGINT 1 handle to pass over to PL GetBreakValue C LONGINT 2 current row number C LONGINT 3 break level or 1 for an individual row PL GetBreakValueis called from the callback method to perform usual break level processing
93. ee Multiple Lines in a Break and Variable Height Breaks for more information Carriage returns may be embedded into the text to force wrapping Text Overflow and Justification in Breaks Unlike a Quick Report information to be printed in a cell can overflow into adjacent columns depending on the justification As specified in the call to PL SetBrkText or PL SetBkHText the area used to print the text is taken from the column specified and adjacent columns to the right for left justification columns to the left for right justification and columns on both sides for center justification Built in Calculations in a Break Calculations may be embedded into the text passed to PL SetBrkText or PL SetBkHText Built in functions sum minimum average maximum count variance standard deviation and break value can be inserted into the text at any desired location These are identical to 4D s QuickReport calculations except for break value which inserts the value from the array that caused the break Custom Calculations in a Break You may create custom calculations to be used with or instead of the built in calculations When PrintList Pro sees the custom calculation delimiter it will execute a callback method specified using PL SetBrkFunc for break footers and PL SetBkHFunc for break headers that performs the custom calculation The callback method may use most 4D commands but should not call any PrintList Pro commands or any 4D
94. een longint Header fore green gt hdrForeBlue longint Header fore blue gt listForeRed longint List fore red gt listForeGreen longint List fore green gt listForeBlue longint List fore blue PL SetForeRGBColor is used to specify the foreground colors for a column header and a list area column using the RGB values This routine is similar to PL SetForeClr hdrForeRed Desired header foreground RGB red value hdrForeGreen Desired header foreground RGB green value hdrForeBlue Desired header foreground RGB blue value listForeRed Desired list foreground RGB red value listForeGreen Desired list foreground RGB green value listForeBlue Desired list foreground RGB blue value The following example will tell PrintList Pro to print the third column using a color scheme standard for MacOS X PL SetForeRGBColor xArea 3 237 254 243 237 254 243 44 Configuration Commands PL SetBackClr PL_SetBackClr areaRef L plpHdrBackColor S 4dHdrBackColor I plpListBackColor S 4dListBackColor 1 areaRef longint Reference of PrintList Pro object on layout gt plpHdrBackColor string Header background color from PrintList Pro s palette gt 4dHdrBackColor integer Header background color from 4D s palette gt plpListBackColor string List background color from PrintList Pro s palette gt 4dListBackColor integer List background color from 4D s palette PL SetBackClr is used to specify the
95. en rows and columns using PL SetDividers or PL SetRGBDividers The line width pattern transparency ratio and color of the lines can be specified The default is no dividing lines The PrintList Pro frame and header separator the line between the headers and the list or detail area lines can be set using PL SetFrame You or the database end user must be sure to set the Color Grayscale option in the print dialog when using colors 27 Configuring PrintList Pro Using Picture Arrays Hairline Line Width Lines can be printed a fraction of the line width seen on screen 1 pixel Typically 1 4 25 pixel produces the best results All the lines that PrintList Pro prints may be given a fractional line width Double lines Double lines typical in accounting are now supported in breaks just use 2 0 as the lineWidth 5 parameter to PL SetBrkColOpt PL SetBrkColIRGBOpt PL SetBkHColOpt SetBkKHCoIRGBOpt Two 0 25 point lines will be printed Using Picture Arrays PrintList Pro supports the printing of picture arrays The format parameter of PL SetFormat will cause the picture to be printed in one of five ways e truncated and justified to the upper left of the cell e truncated and centered in the cell e scaled to fit the cell scaled proportionally to fit the cell scaled proportionally to fit the cell and centered The usePictHeight parameter of PL_SetFormat will tell PrintList Pro whether to use a picture s original
96. ension of a two dimensional array may be passed to PL SetArraysNam e g My2DArray 1 may be passed as array1 In addition PL AddColumn can be used to add or insert and array or field column through a pointer Printing Records PrintList Pro provides the capability to print 4D records directly rather than using arrays Please read the section Field and Record Commands for more information Headers The column header labels are set using PL SetHeaders The headers can be printed on all pages the first page or not at all using PL SetHdrOpts The font size and style of each header may be set individually using PL SetHdrStyle The justification may be set using PL SetFormat and the color of the headers using PL SetForeClr or PL SetForeRGBColor Multiple lines of text may be shown in the headers using PL SetHeight Sorting Arrays PrintList Pro can perform multi level sorting upon all the arrays using PL SetSort Up to 15 levels of sorting are available and each column specified in the sort order can be sorted in either ascending or descending order While 15 columns can be used for the sorting critera all the arrays passed to PrintList will stay in sync and reflect the new sort order Some of the arrays can be hidden from printing using PL SetColOpts which allows all the arrays to be kept in sync for sorting purposes yet hides them during actual printing If the arrays passed to PrintList Pro are already sorted use PL
97. er linked to the 4D product number the workstation or the company name as described on the License types page Registering your PrintList Pro Licence Once you have purchased your licence you will receive a registration key This code must be registered each time the database is started There are three ways to register your license in your 4D code with a command or using the Demo mode dialog Register button or though a text file Using PL Register 1 Openthe On Startup database method 2 Callthe PL Register function with your registration key for example result PL Register YourRegistrationKey result 0 means registration was successful If you have several licenses for different 4D setups you can call PL Register multiple times in a row without further testing See the Example with multiple calls 14 Getting Started with PrintList Pro Registration The Demo mode dialog The Demo mode dialog is displayed upon first call to PrintList Pro through a command Note that calling PL Register with any key valid or invalid is the only call to PrintList Pro that will not display the dialog To trigger this display and enable your users to register without actually calling a command or setting up an area pass an empty string to PL Register and the dialog will show C LONGINT result result PL Register display the dialog The Demo mode dialog includes all relevant information to obtain your license as wel
98. ers which need to be declared as documented below End of Page Callback PrintList Pro makes use of a callback method to inform you when the end of a printed page is reached This enables you to perform any necessary processing associated with the end of the page for example changing information printed in the footer area of that page or the header area of the next page Use PL SetPageProc to specify the 4D project method PrintList Pro is to call PrintList Pro will pass the method specified by callbackMethod two parameters the first indicates which PrintList Pro area is calling the method and the second specifies the last row printed on that page You must use the following declaration in your callback method C LONGINT 1 2 70 Using the Callback Methods Custom Calculations in a Break Custom Calculations in a Break PL SetBrkFunc is used to specify the callback function for use with custom calculations The callback function functionName is called whenever PrintList Pro encounters the string NFunction within the text that is to be printed for a specific break level Refer to PL SetBrkText for details on how to embed the custom calculation string PrintList Pro passes information needed for the custom calculation to the callback function You must use the following declarations in your callback method C INTEGER 1 2 break level column C STRING 82 3 column format C LONGINT 4 5 start row end row C TEXT 0
99. es semen 77 Setting the Callback Method i nte rte RR HORE RUE REESE EK RRERKARE aa R RR ER KNRREKK E REREE eden KA 78 Field mode example rtr rx exer RoxRREEKEREEKUNVARITEXTAaR E A KR RE REE hes 78 Array mode example center ERE RRERAKARRRIEAERIEKERE EE ERRAERRCEEKRDREKAER IARE RE KR ER EHE RRER ERA 79 COMMANAS tee EE 80 PL SetCalcCall areaRef L columnNumber I calcCallback S een 80 Break Level Processihig iisisss eru sisdE iun x P ELS D MEPMERME MENFE UNE ELM ME MENFE ERN E About PrintList Pro Break Level Processing ssssssssssssssssss nmm 81 When Do Breaks OCCUE xir E I EERERRERUER KOH ER KAY RUNE KR RE VAS FUTT thee REC RR Rer Ene reeds 81 Using PrintList Pro Break Level Processing ccceee eee eee e eee eee Immer 83 Setting a Break Level LTEM 84 Text Overflow and Justification in Breaks ssssssssssssssssessesses A eese 84 Built in Calculations in a Break eiie etr edere ar ARA AREE ee er aea E aD 84 Custom Calculations ini a Break reno anise REN XE RICH AR XS RR RR RE XAEE Re ER ERR Rd 84 Suppressing Repeated Values in the LiSt ce cecee cece m memes 85 Style and Color in Breaks erro Dueh nnn ERRARE SEDARERREE AEE REX PNIS RE EEA 85 Multiple Lines in a Break a ctr cet rr xa ak idee CERRAR erner dese CERE NEAR RA YR we odes Cela 85 Lines Displayed in a Bfeak c iioi eere eb ae bbe ues AOU A RT esu Pe denen ae ovg DEUS 86 Hide the Detail Area eee n
100. escapeChar S useEllipsis I areaRef longint Reference of PrintList Pro object on layout gt escapeChar string Escape character obsolete gt useEllipsis integer Use ellipsis PL SetMiscOptions is used to control miscellaneous PrintList Pro options escapeChar Obsolete ignored useEllipsis Determines if auto ellipsis is used when columns are smaller than the printed data 0 use ellipsis in header and column data 1 don t use ellipsis in header and column data default 41 Configuration Commands PL SetStyle PL SetStyle areaRef L columnNumber I fontName S size I styleNum I areaRef longint Reference of PrintList Pro object on layout gt columnNumber integer Column for which to set the style gt fontName string Name of the font to use gt size integer Size of the font styleNum integer Style of the font PL SetStyle is used to control the appearance of the PrintList Pro columns The columns can be controlled individually or as a group columnNumber This parameter specifies what column to apply the style to Use a value of zero 0 to apply the parameters to all columns fontName Use this parameter to specify the font for the specified columnNumber If not called or the specified font name is not found the column s will be printed in the OS defined System Font If the font is not installed then the System Font will be used styleNum This parameter is a font
101. et 30 arrays you must set arrays 1 through 15 prior to setting arrays 16 through 30 e All arrays set with this command must have the same number of elements as each other and as any other arrays previously set You can pass process arrays and interprocess arrays to PrintList Pro but not local arrays a local array has a name that starts with a character an interprocess array has a name that starts with a characters One dimension of a two dimensional array may be passed in the array1 arrayN parameters For example my2DArray 1 may be passed as array1 33 Configuration Commands PL SetHeaders areaRef PrintList Pro area reference columnNumber This parameter specifies the column number to set the first array being passed by this call of PL SetArraysNam numArrays This parameter specifies the number of columns being set with this call to PL SetArraysNam Examples Case of Form event On Printing Detail SELECTION TO ARRAY Contacts FN aFN Contacts LN aLN Contacts City aCity Contacts State aState load the arrays error PL SetArraysNam eNameList 1 4 aFN aLN aCity aState starting at column 1 set 4 arrays to print through the plug in area eNameList End case Set up the eList PrintList Pro object with 25 arrays two calls must be made since only 15 arrays can be passed each time error PL SetArraysNam eList 1 15 array1 array2 array3 array4 array5
102. evel parameter used in many break level routines is the position of a particular column within the sort order given For example if a list of people were to be sorted by state county and city respectively the calls to set and sort the arrays would be PL SetArraysNam eList 1 4 aPeople aCity aCounty aState PL SetSort eList 4 3 2 Break level 1 is state column 4 break level 2 is county column 3 and break level 3 is city column 2 The following commands are used to configure breaks PL SetBrkColOpt PL SetBrkCoIRGBOpt PL SetBrkColor PL SetBrkRGBColor PL SetBrkFunc PL SetBrkHeight PL SetBrkStyle PL SetBrkText The following commands are used to configure break headers PL SetBkHColOpt PL SetBkHCoIRGBOpt PL SetBkHColor PL SetBkHRGBColor PL SetBkHFunc PL SetBkHHeight PL SetBkHStyle PL SetBkHText PL SetBrkRowDiv and PL SetBrkRowRGBDiv are not specifically break footer or header routines These commands specify the line that are drawn between a break footer and the following break header or group of rows 84 Break Level Processing Setting a Break Level Setting a Break Level To show information for a break level you will need to use PL SetBrkText for break footers and PL SetBkHText for break headers A text variable containing the information to be printed is passed in for a particular cell within the break Because a break can consist of more than one text line the supplied text may wrap into several lines S
103. following example will tell PrintList Pro to print the list using a color scheme standard for MacOS X PL SetBackRGBColor xArea 237 254 243 237 254 243 46 Configuration Commands PL SetColBackColor PL SetColBackColor areaRef L columnNumber I plpHdrBackColor S 4dHdrBackColor I plpListBackColor S 4dListBackColor 1 areaRef longint Reference of PrintList Pro object on layout gt columnNumber integer Column number plpHdrBackColor string Header background color from PrintList Pro s palette gt 4dHdrBackColor integer Header background color from 4D s palette gt plpListBackColor string List background color from PrintList Pro s palette gt 4dListBackColor integer List background color from 4D s palette PL SetColBackColor is used to specify the background colors for a column header and a list area column PrintList Pro has its own palette with the following colors white black blue green yellow magenta red cyan gray light gray Color constants can be used columnNumber The column for which to set the background color Use a value of zero 0 to apply the parameters to all columns plpHdrBackColor Name of the color in PrintList Pro s palette This will be the background color for the column header If the name is not in PrintList Pro s palette or it is a null string then 4dHdrBackColor will be used 4dHdrBackColor 1 to 256 The color at this position in 4D s palette will be used for
104. g Using PrintList Pro Break Level Processing Using PrintList Pro Break Level Processing Any break level routine that accepts a column number requires that the column array be set using PL SetArraysNam or PL AddColumn prior to calling that routine PrintList Pro provides up to 15 break levels and a total line at the end of list For any given list the number of break levels can be no greater than the number of sorted arrays PrintList Pro will only print a break for a break level that has been configured using PL SetBrkText for break footers or PL SetBkHText for break headers A break level can be configured regardless if lower breaks have been configured This is different than 4D s Quick Report Editor that requires the users to stack break levels upon lower closer to 0 break levels and hide the break levels that are not desired With PrintList Pro a break level can be configured regardless if lower breaks have been configured therefore there is no need to hide a break In the people example information can be shown for a group of people in the same city without necessarily showing any information for the state In conjunction with PL SetArraysNam PrintList Pro uses the information in PL SetSort to determine where the breaks occur within the arrays If the arrays passed to PrintList Pro are pre sorted PL SetBrkOrder should be used to notify PrintList Pro of the sort order without forcing an unnecessary sort The break l
105. ger Break level number gt columnNum integer Column number gt breakForeRed longint Foreground red gt breakForeGreen longint Foreground green gt breakForeBlue longint Foreground blue breakBackRed longint Background red gt breakBackGreen longint Background green gt breakBackBlue longint Background blue PL SetBrkRGBColor is used to specify the color of the text to be printed in the specified columnNum and breakLevel This routine works in the same manner as PL SetBrkColor except it allows you to specify the colors using standard RGB values 99 Break Level Processing PL SetBkHColor PL SetBkHColor areaRef L breakLevel I columnNum I plpForeColor S 4dForeColor I plpBackColor S 4dBackColor I Reference of PrintList Pro object on layout Break level number Column number Foreground color from PrintList Pro s palette areaRef gt breakLevel gt columnNum gt plpForeColor Foreground color from 4D s palette Background color from PrintList Pro s palette Background color from 4D s palette 4dForeColor plpBackColor 4dBackColor integer string integer PL SetBkHColor is used to specify the color of the text to be printed in the break header for the specified columnNum and breakLevel PrintList Pro has its own palette with the following colors white black blue green yellow magenta red cyan gray light gray Color constants can be used breakLevel
106. he column s format Otherwise the calculations results will use PrintList Pro s real and integer default formats where appropriate The result of the custom calculation is formatted by the callback function which returns text numColsToOverflow Number of adjacent columns to use when overflowing to the right when left justified or left when right justified or both when center justified of columnNum A value of zero which is the default indicates that breakText will only be printed within the column justification The justification of breakText within the column or columns if numColsToOverflow is greater than 0 O0 default justification of columnNum in the list detail area will be used E 1 left e 2 center 3 right Examples Break level 1 column 3 overflow 2 columns to the right left justified PL_SetBrkText eList 1 3 Company Subtotals 2 1 Break level 3 column 6 no column overflow use default justification PL_SetBrkText eList 3 6 Sum 0 0 Break level 4 column 3 overflow into 1 column on both sides of this column center justified PL SetBrkText eList 4 3 There are Count people in this department 1 2 95 Break Level Processing PL SetBkHText PL SetBrkFunc PL SetBkHText areaRef L breakLevel I columnNum I breakText T numColsToOverflow I justification 1 areaRef longint Reference of PrintList Pro object on layout gt breakLevel integer B
107. ight is 12 points you can set this parameter to 24 PrintList Pro will test if it has 24 pixels two rows left available on the page before printing the area If not it will proceed onto the following page You should specify at least the height of one row in this parameter Examples PL SetHeight eList 1 4 1 2 pad the header by 4 pixels and the rows by 2 PL SetHeight eList 2 5 2 0 set header lines to 2 pad to 5 pixels set row lines to 2 no padding PL SetHeight eList 1 4 1 2 12 check that 12 pixels one row height here are available before printing PL SetSort areaRef L column1 I columnN I areaRef longint Reference of PrintList Pro object on layout gt column1 integer Column s to perform sort upon columnN PL_SetSort is used to perform a multi level sort column These parameters specify the columns to use for the sort criteria A column greater than O causes an ascending sort to be performed upon that column while a column less than O causes a descending sort to be performed upon that column If a column is O then all successive columns will be ignored If the arrays are already sorted use PL SetBrkOrder instead to communicate the sort order to PrintList Pro Examples PL SetSort eNames 3 4 7 sort on columns 3 4 and 7 all ascending PL SetSort eContacts 1 3 2 sort on columns 1 descending 3 ascending and 2 descending 57 Configuration Commands PL SetColOpts PL
108. iguration Commands PL SetFormat Examples Serror PL SetArraysNam eNameList 1 4 aFN aLN aCity aState PL SetHeaders eNameList 1 4 First Name Last Name City State Serror PL SetArraysNam eNames 1 2 aFN aLN PL SetHeaders eNames 1 2 Field name People FirstName Field name People LastName PL SetFormat areaRef L columnNumber I format S columnJust I headerJust I usePictureHeight I attributed I lineSpacing F vertAlignment I areaRef longint Reference of PrintList Pro object on layout gt columnNumber integer Column at which to set the format and justification gt format string Format to use gt columnJust integer Justification for column list items gt headerJust integer Justification for column header gt usePictHeight integer Use the picture height in the row height calculation gt attributed integer Use attributed multi style text 0 no 1 yes gt lineSpacing real Line spacing to use gt vertAlignment integer Vertical alignment 0 default 1 top 2 center 3 bottom PL SetFormat is used to control the format and justification of a column being printed You can control the format of string integer long integer real date boolean and picture columns with the format parameter Time values can be formatted also since they use long integer arrays Any valid 4D format including custom formats created in the Design environment may be used with these
109. in the list A break would occur in the list anytime the group changes the country is different Multiple break levels occur when the list is sorted on multiple criteria The number of any break level is determined by its position in the sort order If the same membership list is sorted by country first and then by city a break for break level one country would occur whenever the country changes in the list and a break for break level two city would occur whenever the city changes in the list When a break occurs for a certain level every break level higher than it will occur as well In the club example break level 2 city will always break whenever a break for break level 1 country occurs You may want to show leading or summary information for the groups of information within the list In PrintList Pro these areas are called break headers and break footers respectively A break header will print information just prior to the group of related values while a break footer will print information immediately after the group 82 Break Level Processing When Do Breaks Occur The following is an illustration of the location of break headers and footers within a list R ows A break for break level 2 occurs Footer break level 2 Header break level 2 Rows A break for break level 1 Rows Break level O Rows occurs Footer break level 2 Footer break level 1 Footer break level 0 83 Break Level Processin
110. ingle user mode the Demo mode dialog will be displayed on a client workstation when one of the following conditions are met Calling a PrintList Pro command other that PL_Register with a non empty parameter Calling PL Register with an empty string Use the Copy eMail and Register buttons just as above and your server will be registered for all workstations Note that any other workstations previously connected before registration occurred will need to re connect to the server to be functional 17 Getting Started with PrintList Pro Registration Registering on 4D Server To directly register the server and all workstations from the server machine itself you need to display the Demo mode dialog on the server Call PL Register with an empty string in the On Server Startup base method C LONGINT result result PL Register display the dialog Use the Copy eMail and Register buttons just as above and your server will be registered for all workstations Note that the dialog will automatically be dismissed on the server after one minute in order not to block client connections the server is only available to client workstations once the On Server Startup method has completed Merged licenses notes Both methods can be either used with regular or merged servers and client workstations Regular licenses are linked to the 4D Server serial information Merged licenses are linked to the 4D Server machine ID Not
111. integer Extra height for the break PL SetBrkHeight is used to set the number of lines of text along with additional height pad for breakLevel If no calls to PL SetBrkText are made for breakLevel nothing will be displayed for any break occurring for that level regardless of the number of lines or height pad specified in PL SetBkHeight numBreakLines The number of lines to give to each break of the specified break level A value greater than 0 means that the height of each break is the same The fixed height will be a function of the number of text lines specified A value of zero means that the height of each break is to be calculated automatically based on the data that is to be printed Default is 1 breakHeightPad The extra height to give to the break level An additional padding may be set using breakHeightPad to allow more space around the break Text will be centered vertically within the break Default is O The padding applies to the entire break and not on a line by line basis within the break Examples Allocate 5 lines and no pad for break level 3 PL SetBrkHeight 6eList 3 5 0 Break level 2 Pad by 4 pixels only 1 line PL SetBrkColor eList 2 1 4 101 Break Level Processing PL SetBkHHeight PL SetBrkRowDiv PL SetBkHHeight areaRef L breakLevel I numBreakLines I breakHeightPad I areaRef longint Reference of PrintList Pro object on layout gt breakLevel integer Break level number gt
112. ion result to print C_LONGINT i count C REAL result average Calculate the average For i 4 5 result result aSalary i End for count 5 44 1 average result count result Int average 0 05 596 rounded 0 String result 3 116 Examples Example 4 Break Level Processing Here is a sample of the list containing the breaks PrintList Pro Demo Break Level Processing First Name Last Name Salary City State Country Bill Goodhew 23 275 98 Podunk AR USA Stan Getz 60 956 00 Podunk AR USA Yogen Dalal 41 491 24 Podunk AR USA Bill Coldrick 42 369 32 Podunk AR USA Sum 168 092 54 Minimum 23 275 98 4 people in Podunk Average 42 023 13 Maximum 60 956 00 Standard Dev 13 325 83 Bonus 2 101 00 Todd Zipnick 52 230 08 Phoenix AZ USA Michelle Preston 31 782 38 Phoenix AZ USA John Markoff 20 416 34 Phoenix AZ USA Sum 104 428 80 Minimum 20 416 34 3 people in Phoenix Average 34 809 60 Maximum 52 230 08 Standard Dev 13 163 11 Bonus 1 740 00 Michael Tchong 24 963 54 Cupertino CA USA Sherwin Steffin 70 962 78 Cupertino CA USA Jonathan Fader 30 048 76 Cupertino CA USA Mary Evslin 46 685 24 Cupertino CA USA Moira Cullen 69 613 32 Cupertino CA USA Ed Cheffetz 53 588 36 Cupertino CA USA Sum 295 862 00 Minimum 24 963 54 6 people in Cupertino Average 49 310 33 Maximum 70 962 78 Standard Dev 17 654 11 Bonus 2 465 00 Jeffrey Young 49 687 9
113. ional long integer array The first dimension must be two The first array is for the column indices and the second array is for the row indices The second dimension must be the same as the number of cells that are to be selected See the following illustration 59 Configuration Commands PL SetCellStyle styleNum This parameter is used to set the style for the specified cells The values shown below can be added together to combine styles Plain Bold Italic Underline Outline Shadow 16 Condensed 32 Extended 64 If a cell style has been previously set the style may be removed by setting styleNum to 1 The cell style may be left unchanged by setting styleNum to 256 fontName This specifies the font for a cell The cell font may be left unchanged by setting fontName to the empty string If the specified font is not found it will be treated as an empty string and ignored fontSize This specifies the font size for a cell The cell font size may be left unchanged by setting fontSize to O Keep in mind that any settings applied to a cell will be moved with that cell s data if the data is later sorted using PL SetSort If you do not want the cell s settings to move call PL SetSort before applying the cell settings Example ARRAY LONGINT aCellSet 2 4 Set cell at column 1 row 3 to bold Helvetica no change in font size PL SetCellStyle e6 rea 1 3 0 0 aCellSet 1 Helvetica
114. ions Using this feature will allow you to indirectly apply AreaList Pro v9 numerous formatting options using the v9 property based API to a PrintList Pro area using an AreaList Pro area as the source Note that this feature is only available for persistent AreaList properties Refer to AreaList Pro manual for property persistency 13 Upgrading from Previous Versions of PrintList Pro Installation Getting Started with PrintList Pro Installation PrintList Pro is provided as a bundle for both Windows and Mac OS there is just one version for both platforms To install it simply copy the file PLP bundle into your Plugins folder Plugins folders can be located in one of two locations In the 4D application folder 4th Dimension or 4D Server When plugins are installed in this location they will be available to every database that is opened with that application Next to the database structure file for your project In this case the plugin will only be available to that database On Mac OS this means that the Plugins folder must be placed within the database package To open the package ctrl click on the package and choose Show Package Contents from the contextual menu Registration Using PrintList Pro in Demo mode You can use PrintList Pro in Demo mode for 20 minutes after which time it will cease to work When this becomes annoying it s time to buy a license which you can do on our website Licenses are eith
115. irst Page Header L 1 PL Break Level 3 L 3 PL Print All Headers L 2 PL Break Level 4 L 4 PL Suppress Pixel Width L O PL Break Level 5 L 5 PL Print Pixel Width L 1 PL Break Level 6 L 6 PL Print Array L O PL Break Level 7 L 7 PL Hide Array L 1 PL Break Level 8 L 8 PL Print All Records L 1 PL Break Level 9 L 9 PL Print Page Breaks L 1 PL Sum S Sum PL Suppress Page Breaks L O PL Average S Average PL Print Last Page Break L 1 PL Minimum S MMinimum PL Suppress Last Page Break L O PL Maximum S MMaximum PL Print Repeated Values L O PL Count S Count PL Suppress Repeated Values L 1 PL Variance S War PL Print Column Divider L O PL Deviation S Dev PL Suppress Column Divider L 1 PL Break Value Insertion S BreakValue PL Suppress Detail Area L 1 PL Custom Calculation S Function PLP Break Valves 00 PL Break Value Sum L 1 PL Break Value Minimum L 2 PL Break Value Average L 3 PL Break Value Maximum L 4 PL Break Value Count L 5 PL Break Value Variance L 6 PL Break Value Deviation L 7 122 PrintList Pro Constant List PrintList Pro Text Style Tags PrintList Pro Text Style Tags If the attributed option has been set in PL SetFormat special tags can be used in any text contained in a PrintList Pro area to print styled characters These tags work just like HTML tags lt tag gt styled text lt tag gt Bold b Italic i Underline u or ins Strike through del Set font size to points s gt Inc
116. irst PrintList Pro Area It s easy to create your first PrintList Pro list area 20 1 2 Create a new form or open an existing one that you want to add a list to Choose Plug in Area from the Plugin Subform Web Area button in the object bar Your cursor will turn into a crosshair Draw a box on the form in the size that you want your list to be This will create a rectangular box named Plugin Area In the Property List window choose PrntListPro from the Type popup menu If the PrintListPro option is not available please refer to the installation instructions Enter a name for your new area in the Variable Name field in the Property List window Your area will now show the PrintListPro version area variable name and dimensions Getting Started with PrintList Pro Developing with PrintList Pro Developing with PrintList Pro PrintList Pro provides the ability to print up to 32767 columns subject to memory limitations Using the PrintList Pro Commands The PrintList Pro Commands are used in the same way that a 4D command is used Parameters are separated by the semicolon character Note when calling a plugin command all omitted parameters are initialized to the NULL of the respective types 0 0 0 00 00 00 You can access the PrintList Pro commands in the method editor list Near the bottom of the list below the area which contains the project methods there are several PrintList Pr
117. ivider will be printed along the right side of the column specified The line characteristics are identical to the column divider shown in the list detail area PL SetBkHColOpt may be called to show a horizontal line at the bottom of the break specified in breakLevel in the column specified by columnNum If PL SetBkHColOpt is not called for any columns in a given break level then no column dividers or horizontal break lines will be shown for that break level 105 Break Level Processing PL_SetBkHCoIRGBOpt PrintList Pro has its own palette with the following colors white black blue green yellow magenta red cyan gray light gray Color constants can be used showColDivider 0 or 1 e 0 don t show a column divider default 1 show the column divider along the right side of the column specified in the columnNum parameter whenever a break for the break level specified in breakLevel occurs lineWidth O to 1 This option controls the line width of the horizontal break line A value of 0 25 pixels should be used for hairlines A value of 0 means that no line will be printed Double lines typical in accounting are supported in breaks just use 2 0 as the lineWidth two 0 25 point lines will be printed pattern Name of the pattern transparency ratio for the horizontal break line If a null string is used then no line will be printed These are the available patterns white black gray light gray and dark gr
118. k Processing commands Computed Breaks essem 12 Additions to existing commands inci xk er eh eR e RR ERR E ERE E RE coe ER RR E ERR E 12 New break features cete irri tette eer Des Ox Rd ETE TRECE UU TRA QVRA DA MEE TRI tee TERR NEL EYE 12 Printing an AreaList Pro area enc coit te ea t xa Che Ex ERR EE ERE CEN ER EOX ER ERR EX Xen X RA EO Re d 12 Getting Started with PrintList Pro ee eroe enne nnn 13 InStall ations eis eT TTL 13 REGIST AU ON Gisetiscanecsicthsceuesadosscuataeetsentane tans aeuensiensiuekadiness Set cabandtereatantueaaedceusanueteanaseeace cece 13 Using PrintList Pro in Demo mode rtr ee ren RR tes HERREN KEEXERKRERRRKERKRRR AE 13 Registering your PrintEisb Pro LICENCE ssepe ua hx R ERO UE RR er INE ana ME IM REA NREERE EEUU ree 13 Using BE REDISIBE sient eerte tat eut ele nel erarbeiten etl Uie ta 13 The Demo mod dialog oes ier i inaa A veces NEREHRMEERRR RR MAR ER AATE 14 Using the Register bUttOnucesiie ene ee n Fen ORGR ARR RR RR X REREEE ANUS KE KR ERa causa dene at ven EA Fa 15 Using a text Tle v x a A T E OE 15 Mixing methods i2 eire rece ig ae tutta yx cava EE INA RE RR Pervecnezent ete reser E IY eH aa TANEN 16 Registering Server licenses recie rr hr Ee EX RE ER vea tw CERRAR ERR Eau a DEP ERR Ea pace 16 LICENSE LY DES EPTTEELITILLILLILLI D OLIL ILLI LTEM 18 Creating your first PrintList Pro Area scere Re IR HER ER ERERIENRRE HRRRNERX RERUEE CER EIE
119. kBlue L 5 cuarteto tien tegunt mal e RE RUE RD R Ra d ra ha a PA RR E o 45 PL SetColBackColor areaRef L columnNumber I plpHdrBackColor S 4dHdrBackColor I plpListBackCGolor S 4dListBackColOE 1 ius teoxoce ee E Peer t o eX ooo rinde C au emitir UK DI RE 46 PL SetColBackRGBColor areaRef L columnNumber L hdrBackRed L hdrBackGreen L hdrBackBlue L listBackRed L listBackGreen L listBaCkKBIUC L cece cee cece eee eee eee a eaten nns 47 PL_SetRowStyle areaRef L rowNumber L styleNum I fontName S fontSize I 48 PL_SetRowColor areaRef L rowNumber L plpRowForeColor S 4dRowForeColor L plpRowBackColor S 4dROWBACKCOIOFIL sii scerinseredanateanec teak ecadaswaews dp Peu e sedi nag died tae deredaa utes sp FEAREEEMEMEAIMSECRIE KARMA 49 PL SetRowRGBColor areaRef L rowNumber L rowForeRed L rowForeGreen L rowForeBlue L rowBackRed L rowBackGreen L rowBackBlue L eeeseeeeeeeeeeen nennen nnn nnn 50 PL SetDividers areaRef L colDividerWidth F colDividerPattern S plpColDividerColor S 4dColDividerColor I rowDividerWidth F rowDividerPattern S plpRowDividerColor S 4dRowDividerColor T 1 iicsa sue seta saec k rr rege eux es an tuna E RSES pike camer NE TEANTA AARRE RET ERINREE 51 PL SetRGBDividers areaRef L colDividerWidth F colDividerPattern S colDividerRed L colDividerGreen L colDividerBlue L rowDividerWidth F rowDividerPattern S rowDividerRed L rowDividerGreen zL rowDividerBlue L
120. l as a Copy button to put this information into your clipboard or a text file an eMail button to email the information to e Node s registration system and a Register button to enter your license key once received PrintList Pro 5 1 Welcome to the demonstration version of PrintList Pro The plugin will be fully functional for 20 minutes www e node net PLP Your 4D serial number is 1287332727 Copy eMail Register OK 15 Getting Started with PrintList Pro Registration Using the Register button Clicking on this button will display a standard 4D request to enter your registration key Please enter your registration license key hoor Creer Paste or drag and drop your registration key and if correct the plug in will be registered for all future uses on this workstation PrintList Pro 5 is now registered Note if 4D does not activate the Edit gt Paste menu item click Abort and Register again Using a text file Alternately you can place a plain text file into your 4D Licenses folder To open this folder from 4D use the 4D Menu Help gt Update licenses then the Licenses folder button Lees Licenses Folder Done The text file must be called PLP5 license4Dplugin and be a plain text type file Just paste all your licenses for PrintList Pro v5 x one per line e g MyLicense1 MyLicense2 MyLicense3 Any license type can be included i
121. l break line gt dividerRed longint Horizontal break line Red gt dividerGreen longint Horizontal break line Green gt dividerBlue longint Horizontal break line Blue PL SetBrkCoIlRGBOpt is used to control the printing of column dividers and horizontal lines within the breakLevel for each columnNum and to print a horizontal line within a column for this break level This routine works in the same manner as PL SetBrkColOpt except it allows you to specify the colors using standard RGB values PL SetBkHColOpt areaRef L breakLevel I columnNum I showColDivider I lineWidth F pattern S plpColor S 4dColor I areaRef longint Reference of PrintList Pro object on layout breakLevel integer Break level number columnNum integer Number of column showColDivider integer Show column divider if any in the break lineWidth real Width of the horizontal break line yids yy yi ta pattern string Pattern of the horizontal break line plpColor string Color from PrintList Pro s palette for the horizontal break line gt 4dColor integer Color from 4D s palette for the horizontal break line PL_SetBkHColOpt is used to control the printing of column dividers and horizontal lines within a break header cell This command is identical to PL SetBrkColOpt except PL SetBkHColOpt will print the horizontal lines at the bottom of the cell instead of at the top If showColDivider is 1 a column d
122. lculates an employee s one year anniversary by adding one year to their hire date using the 4D Add to date function CalcColCallback 1 Area reference PrintList Pro longint reference 2 Column number 3 Type of data in this column 4 Pointer to temporary 4D array 5 First record for which to calculate cell 6 Number of cells to calculate in column Declare the parameters C_LONGINT 1 2 3 5 6 these must be declared C POINTER 4 this must be declared C LONGINT i ARRAY DATE aHireDate O local array can be used since we only need it here for calculation SELECTION RANGE TO ARRAY 5 5 6 1 Employee Hire Date aHireDate For i 1 6 4 gt i Add to date aHireDate i 1 0 0 End for 79 Calculated Columns Setting the Callback Method Array mode example The following is an example of a calculated callback method in array mode using the same simple calculation as above but with 4D arrays being printed These arrays have been initially declared and included in the PrintList Pro area with the same command either PL SetArraysNam or PL AddColumn for both non calculated and calculated arrays Declare the arrays ARRAY TEXT aName 0 ARRAY DATE aHireDate 0 not printed but needed for calculation SELECTION TO ARRAY Employee Name aName Employee Hire Date aHireDate ARRAY DATE aAnniversary Size of array aName this is our calculated array must be of same size Arra
123. lue of zero 0 to apply the parameters to all rows plpRowForeColor Name of the color in PrintList Pro s palette This will be the foreground color for the row If the name is not in PrintList Pro s palette or it is a null string then 4dRowForeColor will be used 4dRowForeColor 1 to 256 Foreground color number for the row from 4D s palette The row foreground color may be left unchanged by setting plpRowForeColor to the empty string and 4dRowForeColor to 0 If a row color has been previously set it may be removed by setting plpRowForeColor to an empty string and 4dRowForeColor to 1 This may also be applied to all rows by passing a zero 0 for the rowNumber This will have no effect on rows that have not been previously set plpRowBackColor Name of the color in PrintList Pro s palette This will be the background color for the row If the name is not in PrintList Pro s palette or it is the empty string then 4dRowBackColor will be used 4dRowBackColor 1 to 256 Background color number for the row from 4D s palette The row background color may be left unchanged by setting plpRowBackColor to the empty string and 4dRowBackColor to 0 If a row background color has been previously set it may be removed by setting plpRowBackColor to the empty string and 4dRowBackColor to 1 This may also be applied to all rows by passing a zero 0 for the rowNumber This will have no effect on rows that hav
124. lumn 4th column right column justification and left header justification PL SetFormat eList 4 Male Female 3 1 0 Format style 3 for a date column default justification 5th column default column and header justification suppress null dates PL SetFormat eNames 5 3 Format style 2 for a time column right justification for header and column 7th column PL SetFormat eList 7 8 2 3 3 0 Custom format style default justification for column center header 5th column attributed text compatible line spacing PL SetFormat eNames 5 Dollars 0 2 0 1 1 Scale picture column to fit proportionally 1st column use default header justification use picture size in row height calculation PL SetFormat eList 1 3 0 0 1 vertAlignment Vertical alignment 0 default e 1 top 2 center 3 bottom PL SetWidths areaRef L columnNumber I numWidths I width1 I widthN I areaRef longint Reference of PrintList Pro object on layout gt columnNumber integer Column at which to set the first width gt numWidths integer Number of widths to set up to 15 gt width1 widthN integer Pixel widths of columns PL SetWidths is used to set the pixel width for one or more columns Up to fifteen widths can be set at a time A width of zero forces a column to be sized automatically based on its data type A column cannot be less than 3 pixels wide If you pass a value of less than 3
125. n array mode The PL SetCalcCall command is used to set up calculated columns in array mode To make a column calculated create a regular array based column and then use PL SetCalcCall area column methodName The callback parameters are expected to be declared as area L column L type L ptr W first L count L This callback method has the same parameters as a column callback in fields mode but the array is fully sized by you as developer you have to fill the requested elements 78 Calculated Columns Setting the Callback Method The type is the actual array type not a field type e g Integer Array instead of Is Integer The following table shows the data types that may be printed in a calculated column in array mode Real array 14 Integer array 15 LongInt array 16 Date array 17 Text array 18 Picture array 19 String array 21 Boolean array 22 Setting the Callback Method In both field mode and array mode use the PL SetCalcCall command to set the Calculated Column Callback for a column In field mode PrintList Pro will dimension the temporary array before invoking the calculated column callback There is no need to do it in the callback itself In array mode the arrays used to place the calculated values must be declared and sized just as the other displayed arrays Field mode example The following is an example of a calculated callback method in field mode It merely ca
126. n 50 PL SetRowStyle een ne 48 PL SCS Ort anainn baa vti sext idURU CU ERE 56 PL SetStylG i ceret kr ER inate VERA MER cela 41 PL SetWidths ceeeesenn mmn 38 Plug in Area creating ssessusse 19 Printing 4D Fields eese 73 R Records i see castes eee 23 73 75 REGISTE jes cccchinccuidiaesAinvteastavscssagers Mee E 15 Registering in Remote mode 16 Registering on 4D Server sss 17 Registering Server licenses 16 Registering your PrintList Pro Licence 13 Registratore iiias aa enara i 13 29 Related One eeeeeenen enn nnn 73 Remote Modenie ieia a aana 16 Repeated values eeeeeeeee 85 92 RGB commands eee nnn 11 ROW 3s exeun xke exi eh Ea pee CERRAR ons 48 49 50 Row Specific Colors eese 25 S Separator lines srecan 26 53 Single user license eesesseesses 18 SOM cei ee I RE ERR RE ERARAEXETT RT 56 91 92 SONIM pL 23 Standard deviation ssssus 93 107 Styled text ccrto 122 Styles ees 10 24 41 58 85 97 StylecTdgS rapsie GER E ER PER Ea eta 122 Subtotals ccsa iyn ev Ro kh Ey cede 72 SUIM susce EI P A Kx EE EUER 93 107 SUppOFL cx oem EURO EUIS 7 T Technical SUPPOFt ccceeeeeee eee eee eeae eee eaeeas 7 Text Overflow ceeeeeeeeen nennen 84 Text Style Tags eere 8
127. n right of cell horPosition One the following options O default left for left icon right for right icon 1 align left 2 align center 3 align right vertPosition One the following options O default top 1 align top left 2 align center 3 align bottom Configuration Commands PL SetCelllcon offsetOrWidth when horizontal alignment in horPosition is zero default position left for left icon right for right icon the offsetOrWidth is the offset i e the distance in pixels between the text and the icon left or right K offset gt K offset gt horPosition 0 Otherwise the offsetOrWidth is the pixel width that the icon will use the icon will be aligned in this space horPosition 2 centered scaling One the following options e 0 truncated 1 scaled The cell content text is printed into the space that is left once the icon is printed For example if the column width is 100 pixels and you print a 15 pixel icon the remaining width can be calculated as 100 minus the padding default horizontal indent is 3 for header and data rows on both sides 6 points minus the column divider if shown 1 point 100 6 1 15 78 points where the text will be printed The following example will print an icon in r3c2 using an item ID 1717 from the 4D Picture Library col 2 row 3 iconRef 1717 iconPos 1 right horPos 0 default
128. ng the command syntax description an explanation of the command s parameters is provided For each parameter the type of the parameter and a description is shown Examples are provided showing the syntax as well as how the various commands are used together The first parameter for most commands is the long integer reference of the PrintList Pro object on the layout This parameter is required to allow the commands to operate on the correct object Some routines are actually functions which return a long integer result value Unless otherwise indicated the value is O when no error occurred or 50 paramErr when a wrong parameter has been received 10 About PrintList Pro Two major differences with previous versions Upgrading from Previous Versions of PrintList Pro PrintList Pro version 5 is compatible with 4t Dimension versions 11 and above To upgrade to PrintList Pro version 5 simply install it as described in the Installation section of this manual replacing your older version Two major differences with previous versions As opposed to v4 x and earlier releases PL Register returns O if registration was successful e The 4D project method Compiler PLP is no longer needed Compatibility Notes PrintList Pro version 5 supports Unicode for printing Styled text is supported e PrintList Pro version 4 x commands are still here your previous code should work fine give or take the few changes and minor deprecated feat
129. nting are supported in breaks just use 2 0 as the lineWidth two 0 25 point lines will be printed pattern Name of the pattern transparency ratio for the horizontal break line If a null string is used then no line will be printed These are the available patterns white black gray light gray and dark gray See the Patterns item in the Compatibility Notes plpColor Name of the color in PrintList Pro s palette This will be the color for the horizontal break line If the name is not in PrintList Pro s palette or it is a null string then 4dColor will be used 4dColor 1 to 256 The color at this position in 4D s palette will be used for the horizontal break line Examples Break level 2 column 3 print column divider and a hairline wide solid Blue horizontal line in column PL SetBrkColOpt eList 2 3 1 0 25 Black Blue 0 Break level 4 print the column dividers in all columns no horizontal break lines PL SetBrkColOpt eList 4 0 1 0 0 104 Break Level Processing PL SetBrkColRGBOpt PL SetBkHColOpt PL SetBrkCoIRGBOpt areaRef L breakLevel I columnNum I showColDivider I lineWidth F dividerRed L dividerGreen L dividerBlue L areaRef longint Reference of PrintList Pro object on layout gt breakLevel integer Break level number gt columnNum integer Number of column showColDivider integer Show column divider if any in the break gt lineWidth real Width of the horizonta
130. nto this document except unlimited single user OEM and Partner licenses Note the Demo mode dialog Register button actually does this create the text file and include the license key or add the license key to the existing document if any 16 Getting Started with PrintList Pro Registration Mixing methods When such a file exists in the Licenses folder PrintList Pro will check for valid licenses from this document as a first action before anything else including checking any PL Register command If a valid license is included into the PLP5 license4Dplugin document any calls to PL Register will return zero for OK Therefore you can mix modes and use the text file or Register button as well as the command Unlimited single user OEM temporary and Partner licenses can only be entered through the PL Register command Registering Server licenses Similarly server licenses can be registered from the demonstration mode dialog without having to modify your code and use PL Register which of course you can do with any license type In this case the 4D Licenses folder serial information or machine ID used will only be the 4D Server information not the client workstation s Server licenses can be registered on any client workstation remote mode or on 4D Server itself Registering in Remote mode The server and all workstations can be registered from any single client workstation connected to the server As in S
131. numBreakLines integer Number of text lines in the break gt breakHeightPad integer Extra height for the break PL SetBkHHeight is used to set the number of lines of text along with additional height pad for the specified break header level The syntax of this command is identical to that of PL SetBrkHeight numBreakLines The number of lines to give to each break of the specified break level A value greater than 0 means that the height of each break is the same The fixed height will be a function of the number of text lines specified A value of zero means that the height of each break is to be calculated automatically based on the data that is to be printed Default is 1 breakHeightPad The extra height to give to the break level An additional padding may be set using breakHeightPad to allow more space around the break Text will be centered vertically within the break Default is O The padding applies to the entire break and not on a line by line basis within the break PL SetBrkRowbDiv areaRef L lineWidth F pattern S plpColor S 4dColor I areaRef longint Reference of PrintList Pro object on layout gt lineWidth real Width of the break row divider line gt pattern string Pattern of the line gt plpColor string Color from PrintList Pro s palette for the line gt 4dColor integer Color from 4D s palette for the line PL SetBrkRowbDiv is used to set the line width pattern transparency ratio and color
132. o constant and command topics as shown below 0 9 Method SetupPLCellDemo me i o9 t Tr PT 9 WE ges okma amp ma amp ee E E 2igP it d D EP HS HS O Eee 26 ARRAY LONGINT aCellSe 2 90 27 ARRAY LONGINT aCellBold 2 0 28 v For i 1 4 129 ArrayPtr Get pointer aReg String i 30 For j 1 4 131 VIf ArrayPtr gt j lt 0 132 INSERT IN ARRAY aCellSel 1 1 1 133 INSERT IN ARRAY aCellSel 2 1 1 34 aCel1Sel 1 1 i 1 135 aCellSet 2H1 5j 136 End if 137 VIf ArrayPtr gt j gt 500000 138 INSERT IN ARRAY aCe11Bold 1 1 1 139 INSERT IN ARRAY aCellBold 2 1 1 140 aCellBold 1 1 i 1 141 aCellBold 2H1 j 42 End if 43 End for 44 End for 145 PL SetCellColor PL 0bject 0 0 0 0 aCellSel 23 9 146 PL_SetCellStyle PL_Object 0 0 0 0 aCellSe1 2 0 147 PL SetCellStyle PL 0bject 0 0 0 0 aCellBold 1 0 148 ARRAY LONGINT aCellSel 2 0 149 PL_SetCellColor PL_Object 6 1 6 5 aCellSel 0 Light Gray 50 PL SetHdrStyle PL_Object 1 Helvetica 12 1 151 PL SetHdrOpts PL 0bject 2 0 152 PL SetBrkHeight PL 0bject 0 1 5 153 PL SetFrame SPL 0bject 0 0 2 Black Gray 0 54 PL SetHeight PL 0bject 1 2 1 3 All tables and fields M Constants All plug in commands PrintList Pro gt B Big File JA PL Variance Y any PrintList Pro b Biz PL Pro Array Commands gt E Companies Y PLP Colors gt Z PL Pro Array Command gt Hz PL Pro Break
133. object In addition two header lines are shown to demonstrate the ability for multiple lines in a header The object method for the PrintList Pro plug in area in Example 1 has been modified to include the Break Level calls needed as shown below If Form event On Printing Detail Create the arrays from the data ALL RECORDS People SELECTION TO ARRAY People First Name aFname People Last Name aLname People Salary aSalary People City aCity People State aState People Country aCountry plErr PL SetArraysNam eList 1 6 aFname aLname aSalary aCity aState aCountry set the arrays If plErr 0 PL SetHdrOpts eList 2 0 print headers on all pages PL SetHeight eList 2 4 1 0 2 hdr lines 4 hdr pad 1 row line 2 row pad PL SetHeaders eList 1 6 First Name Last Name Salary City State Country PL SetHdrStyle eList 0 Lucida Grande 10 1 all headers Lucida Grande 10 point bold PL SetStyle eList O Lucida Grande 9 0 all columns Lucida Grande 9 point plain PL SetFormat eList 3 3 E 3 3 3 3 3 00 3 3 format column 3 right justified header and column PL SetFrame eList 0 25 Black Black 0 0 25 Black Black 0 print solid black hairline frame PL SetWidths eList 1 6 76 80 89 79 80 48 set the column widths PL SetBackClr eList Light Gray 0 White O sort by Country descending State City and Last Name descending PL SetSort eList 6 5 4 2 11
134. of the break row divider line which is drawn between any all break level information and the rows of list data detail area that immediately follow PrintList Pro has its own palette with the following colors white black blue green yellow magenta red cyan gray light gray Color constants can be used lineWidth O to 1 This option controls the line width of the break row divider line A value of 0 25 pixels should be used for hairlines A value of 0 means that no line will be printed pattern Name of the pattern transparency ratio for the break row divider line If a null string is used then no line will be printed These are the available patterns white black gray light gray and dark gray See the Patterns item in the Compatibility Notes plpColor Name of the color in PrintList Pro s palette This will be the color for the break row divider line If the name is not in PrintList Pro s palette or it is a null string then 4dColor will be used 102 Break Level Processing PL SetBrkColOpt 4dColor 1 to 256 The color at this position in 4D s palette will be used for the break row divider line If PL SetBrkRowDiv is not called then the settings for the detail area row dividers if any will be used Examples Print 1 pixel wide solid Red break row divider line PL SetBrkRowbDiv eList 1 Black Red 0 Print hairline width solid gray break row divider line PL SetBrkRowDiv eList 0 25 Black Gr
135. ols are implemented if you wish to customize the appearance and configuration of PrintList Pro allowing the customization to be implemented rapidly PrintList Pro s break level processing includes the ability to apply a variety of built in calculations as well as the ability to perform custom calculations Complete control over style color and formatting of all break level information is given Technical Details Compatibility Information PrintList Pro version 5 is compatible with 4 Dimension v11 v12 v13 and above for both Macintosh and Windows including 4D Server 64 bits It requires MacOS 10 5 or higher and Windows XP SP3 or better Technical Support Technical support for PrintList Pro is provided electronically via e mail or our online support reporting system You are encouraged to use the online web reporting form as it will be correctly routed to the appropriate support personnel www e node net 8 About PrintList Pro Using the PrintList Pro Manual Using the PrintList Pro Manual This manual is organized into the following sections 1 2 4 9 10 LL 12 13 Introductory section explains what PrintList Pro can do and gets you started Upgrading from Previous Versions compatibility notes and new features Getting Started installation registration and development overview Configuring PrintList Pro how to set up a PrintList Pro area Configuration Commands Using the Callback Methods a call
136. onfiguration Commands PL SetCelllcon PL SetCellIcon areaRef L cellColumn I cellRow L pictRef P iconAlignment I horPosition I vertPosition I offsetOrWidth L scaling I areaRef longint Reference of PrintList Pro object on layout cellColumn integer Column at which to set the icon cellRow longint Row at which to set the icon 0 to set the header gt iconRef longint Reference of the icon or picture to use gt iconAlignment integer Position of icon gt horPosition integer Horizontal position gt vertPosition integer Vertical position gt offsetOrWidth longint Pixel offset or icon width depending on horPosition gt scaling integer Scaling PL_SetCellIcon provides the ability to procedurally print icons in individual cells One or two icons may be used left and right You can customize the icon s using items from the 4D Picture Library see details below cellColumn Desired cell column number cellRow Desired cell row number or O0 to set the header iconRef Reference of the icon or picture to use from the Picture Library To associate an icon to the cell pass the reference number of a picture from the Design environment Picture Library Pass zero 0 if you do not want any icon for the cell See Header Cell Icon Support for examples iconAlignment Position of icon each cell can contain up to two icons O places icon on left of cell 1 places icon o
137. ons ina Break oec exit eran ka ex Exe went ERR ERR ob Ek C VERA VERE a ore 70 Custom Calculations in a Break Header sssssssssssssssssessse senses mene enemies 70 Calculated Column Callback etra e e e e GO COLO CD C EX a cea COGO OD CR T OR RH Z1 Table of Contents Computed Breaks seed espe etc d tutelae cipes Ses cocus ache Mou Lobo n ER IAS e RT MU EY IRL NC ERE IDEE 72 Field and Record Commands eec onnnhunuusunuuuuuuuusssuuuuuuuuussasussuseseses Z B Using the Field Printing Capability 1 0 0 0 0c eee mmm emnes sene 73 Temporary ArtayS ccce sext a SU ERES ERES NSDURKERARERE RR SCRAR ERU ERN IDRCDEEKN M ME ERE 73 Arrays and Fields oie ine sovk tereti esetecent i oe4 sod ee SER oT Y EUER Pa E be cede eh canes aha OPI 73 Printing 4D Fields te rex ER Fr yb E ER ERRAT ERR ante VERA RERKUEE ERES EUR RENEEURSERREE Kad aia 73 COMMANAS RE m 75 PL SetFile areaRef L tableNum I gt resultCode L ssssssssssseeenmememm menm 75 PL SetFields areaRef L tableNum I columnNumber I numFields I fieldNum1 fieldNumN I resultCodes rus ecosistemas terat aa sisi cas uo oua anat at aic ue ue samne ecc eun d tS AS 76 Calculated CO lain ii aus sauduqESRRENESNFSEMERUNPEUNMEGERAMASE EMEN NDS IURE UNE M NM UN M NM EA MEAS di 7 Setting a Calculated Column field Mode iseis oiia mmm mese 77 Setting a Calculated Column array mode ssssssssssssssssssssseeem
138. ory PL Not a file 6 Increase 4D s RAM partition Check to make sure that the table represented by tableNum does exist PL Wrong 4D version 10 obsolete You ve attempted to set fields or a table when arrays have already been set PL Arrays have been set 11 PL Fields have been set 12 You ve attempted to set arrays when fields have already been set Example result PL SetFile eList Table gt People 76 Field and Record Commands PL SetFields PL SetFields areaRef L tableNum I columnNumber I numFields I fieldNum1 fieldNumN I gt resultCode L gt areaRef longint Reference of PrintList Pro object on layout tableNum integer Number of 4D table gt columnNumber integer Column at which to set the first field numFields integer Number of fields to set up to 15 gt fieldNum integer Number of 4D field lt resultCode longint Result code PL_SetFields tells PrintList Pro what fields to print Up to fifteen fields can be set at a time Any 4D field type can be used Fields from related one tables may also be printed see PL SetFile A separate call to PL SetFields must be made to set these fields To print a related one field pass the table number of the related one table in the tableNum parameter This command is also used to print calculated columns See Calculated Columns resultCode The possible values are PL SetFile P
139. osition in 4D s palette will be used for the row divider If neither PL SetDividers nor PL SetRGBDividers are called then no column or row dividers will be printed 52 Configuration Commands PL SetRGBDividers Examples Print solid gray column dividers and no row dividers PL SetDividers eNames 1 Black Gray 0 0 0 Print column and row hairline dividers in a gray pattern PL SetDividers eNames 0 25 Gray Black 0 0 25 Gray Black 0 PL SetRGBDividers areaRef L colDividerWidth F colDividerPattern S colDividerRed L colDividerGreen L colDividerBlue L rowDividerWidth F rowDividerPattern S rowDividerRed L rowDividerGreen L rowDividerBlue L areaRef longint Reference of PrintList Pro object on layout gt colDividerWidth real Width of the column divider line gt colDividerPattern string Column divider pattern string gt colDividerRed longint Column divider Red gt colDividerGreen longint Column divider Green colDividerBlue longint Column divider Blue rowDividerWidth real Width of the row divider line gt rowDividerPattern string Row divider pattern string gt rowDividerRed longint Row divider Red gt rowDividerGreen longint Row divider Green gt rowDividerBlue longint Row divider Blue PL SetRGBDividers functions the same as the PL SetDividers routine except that the column and row divider colors use standard RGB values colDivider
140. pRowBackColor parameter to the empty string and the 4dRowForeColor or 4dRowBackColor parameter to 1 PL SetRowRGBOColor can be used to perform similar settings with standard RGB values Use this command to override all row specific color settings by passing 0 for the rowNumber parameter Do not use row specific commands to modify all rows if you want to set the whole area Set the columns instead Cell Specific Colors Individual array elements called cells can be assigned a unique foreground color and background color This capability can be used to set negative numbers in red provide special formatting to show the current selected or enterable cell and design more attractive and useful lists You can use PL SetCellColor or PL SetCellRGBColor to set the color configuration for an individual cell a range of cells or a selection of discontiguous cells PrintList Pro will keep the cell and row specific color setting with a row when the list is sorted If you do not want the cell and row color settings to move when the list is sorted be sure to call the cell and row color routines after the call to PL SetSort 26 Configuring PrintList Pro Multiple Lines in each Row Multiple Lines in each Row Multiple lines of text can be shown for each row using PL SetHeight All rows will be printed with the number of lines specified or with a variable height for each row PL SetHeight can also be used to give each row addition
141. r Hide print repeated values for this column PL SetRepeatVal is used to control the printing of repeated values within a sorted column Use PL SetSort to sort the arrays or if already sorted use PL SetBrkOrder to communicate the sorted order to PrintList Pro columnNum The column number to apply this command to Use a value of zero 0 to apply the repeat settings to all columns in the list repeatValues 0 or 1 0 print all repeated values default 1 only print the first occurence of a repeated value after reaching a break and at the top of each page thereafter Examples PL_SetRepeatVal eList 3 0 show repeat values for column 3 PL SetRepeatVal eList 0 1 hide repeat values for all columns PL SetBrkText areaRef L breakLevel I columnNum I breakText T numColsToOverflow I justification I areaRef longint Reference of PrintList Pro object on layout gt breakLevel integer Break level number gt columnNum integer Column number gt breakText integer Text to be printed when a break occurs integer Number of adjacent columns to overflow into integer Justification of the break text numColsToOverflow gt justification PL SetBrkText is used to specify the text passed in as breakText to be printed in the breakLevel and columnNum specified Calculations can be performed upon the corresponding values in the list A calculation is performed by embedding a special
142. r the break from 4D s palette If a break foreground color has been previously set it may be removed by setting plpForeColor to the empty string and 4dForeColor to 1 The break foreground color may be left unchanged by setting plpForeColor to the empty string and 4dForeColor to 0 98 Break Level Processing PL SetBrkRGBColor plpBackColor Name of the color in PrintList Pro s palette This will be the background color for the break If the name is not in PrintList Pro s palette or it is the empty string then 4dBackColor will be used 4dBackColor 1 to 256 Background color number for the break from 4D s palette If a break background color has been previously set it may be removed by setting plpBackColor to the empty string and 4dBackColor to 1 The break background color may be left unchanged by setting plpBackColor to the empty string and 4dBackColor to 0 Examples Set the foreground color for the break in column 3 break level 1 to red no background color PL_SetBrkColor eList 1 3 red 0 0 Set the background color for the break in column 3 break level 1 to blue no foreground color PL_SetBrkColor eList 1 3 0 Blue 0 PL_SetBrkRGBColor areaRef L breakLevel I columnNum I breakForeRed L breakForeGreen L breakForeBlue L breakBackRed L breakBackGreen L breakBackBlue L areaRef longint Reference of PrintList Pro object on layout gt breakLevel inte
143. reak level number gt columnNum integer Column number gt breakText integer Text to be printed when a break occurs gt numColsToOverflow integer Number of adjacent columns to overflow into gt justification integer Justification of the break text PL SetBkHText is used to specify the text that is to be printed in the break header The syntax of this command is identical to that of PL SetBrkText PL SetBrkFunc areaRef L functionName S areaRef longint Reference of PrintList Pro object on layout gt functionName string Function name to be called back PL SetBrkFunc is used to specify the callback function for use with custom calculations The callback function functionName is called whenever PrintList Pro encounters the string Function within the text that is to be printed for a specific break level Refer to PL SetBrkText for details on how to embed the custom calculation string PrintList Pro passes information needed for the custom calculation to the callback function The callback function should be created using the following interface Function MyBreakFunction breakLevel column colFormat startRow endRow C INTEGER 1 2 break level column C STRING 82 3 column format C LONGINT 4 5 start row end row C TEXT 0 custom calculation result to print perform the custom calculation 0 String customCalc 3 format the string using the column format The callback function is passed th
144. rease font size by quarters 1 4 of current size lt s gt Decrease font size by quarters 1 4 of current size s gt Set font by name f font name needs to be quoted if the name contains more than one word Set color any format can be used e g c OxFFFF0000 c color name gt c 1 0 0 0 c P123 c dark orange 4D v12 and above internal format for styled text is stored as SPAN STYLE style attributes where the style attributes used by PrintList Pro are e font family font size e font weight bold normal font style italic normal text decoration underline line through none e color RRGGBB It is also possible to set the format as attributed and specify the style attributes using the PL_SetFormat command Example for an integer column C_TEXT format format lt c blue gt lt c gt lt i gt lt c red gt lt c gt lt i gt lt s 1 gt lt c green gt lt b gt ZERO lt b gt lt c gt lt s gt PL SetFormat area 1 column 0 0 1 1 1 0 right aligned it is a number default of zero will use 2 auto sized height because ZERO is bigger attributed with compatible line spacing and default vertical alignment 123 PrintList Pro Text Style Tags PrintList Pro Text Style Tags With the above settings E Positive numbers will be printed in blue roman characters with a plus sign Negative numbers will be printed in red italic characte
145. roc eList MyCallback PL GetVersion gt version T version text Version of the PrintList Pro plugin Note that getting this property will not trigger the registration dialog if PrintList Pro is not registered allows to check version before registering Example C TEXT version version ZPL GetVersion 68 Configuration Commands PL Load PL Save PL Load areaRef L XML T result L areaRef longint Reference of PrintList Pro object on layout XML text XML data that was saved using the PL Save command result longint 0 if the XML was loaded OK 1 if not Initialize an area from an XML using UTF 8 text that was saved to a text field or variable using the PL Save command or AL Save from AreaList Pro PL Load can be used without any other command use e g no defined columns they will be read from the XML Do not call PL Load more than once for the same area it is not intended for that and many properties are not reinitialized to defaults Example This example initializes a PrintList Pro area using settings that were saved into a field in the database S err zPL Load area Settings PLP template D PL_Save areaRef L XML T gt result L gt areaRef longint Reference of PrintList Pro object on layout gt XML text A variable or field to save an area s XML settings into lt result longint 0 if the XML was saved OK 2 if not Save an area s settings as XML using UTF 8 in a te
146. rs with a minus sign e Zeros will be printed in green bold font size increased by 25 with the text ZERO Here is the result 16 238 5 526 31 880 21 940 4 137 100 ZERO 27 512 9 330 21 250 707 28 936 30 953 24 692 24 109 24 352 Note that if the number format is too small to hold the number 4D and PrintList Pro will display it as lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt lt which will interfere with the opening tag character lt if the column is attributed multi styled In the example above using as a number format this will be the case for all numbers exceeding 99 999 Make sure that the format used will not cause the number to overflow lest unexpected results might ensue 124 PrintList Pro Text Style Tags Index Index AD Licenses folder eese 15 4D Picture Library cece cee eee eee eens 28 63 4D Server ooo cece cc ccceeeeeece ee esaeeeeneaeaeenenaaens 17 9oPrintListPro eeeeeeennn nnn 30 A AL SAVE ive eer ce LO re Vw A a EA D dn 12 AreaLISE PEO ip dcebebixd t psv ve bb egle 12 68 Area s settings oriniai riada 68 ar ETT 22 23 Attributed sisri ecccee eee ee eee eenees 34 37 122 j pz o m 93 107 B Background ieiiieeisi t eere eren able 62 Background color 44 45 46 47 60 99 shln irn e sade ccctee 28 65 Break direc ri reta eteneiess 69 86 Break Function callb
147. s development interpreted mode or deployment interpreted or compiled mode including merged on any number of single user 4D application s This is a yearly license which expires after the date when it is to be renewed The expiration only affects interpreted mode Compiled applications using an obsolete license will never expire Unlimited OEM This license allows development interpreted mode or deployment interpreted or compiled mode including merged on any number of 4D Servers any number of users 4D Standalone 4D SQL Desktop or merged copies that run your 4D application s This is a yearly license which expires after the date when it is to be renewed The expiration only affects interpreted mode Compiled applications using an obsolete license will never expire Partner license This license matches 4D s annual Partner subscription and covers AreaList Pro SuperReport Pro PrintList Pro and CalendarSet A single registration key allows development interpreted mode or deployment interpreted or compiled mode except merged on all 4D Standalones and 4D Servers 2 users provided by your 4D Partner license No merged applications This is a yearly license which expires on February 1 same date as your 4D Partner licenses The expiration only affects interpreted mode Compiled applications using an obsolete license will never expire Getting Started with PrintList Pro Creating your first PrintList Pro Area Creating your f
148. s used to control the appearance of the break level text for the breakLevel and columnNum specified The columns can be controlled individually or as a group breakLevel This parameter specifies the break level to apply this command to columnNum The column to apply this command to Use a value of zero 0 to apply the parameters to all columns within that break level fontName This specifies the font for the break The break font may be left unchanged by setting fontName to the empty string If the font specified is not found it will be treated as an empty string and ignored fontSize This specifies the font size for the break The break font size may be left unchanged by setting fontSize to O styleNum This parameter is a font style code By adding the codes together you can combine styles The numeric codes for styleNum are shown below Plain 0 Bold 1 Italic 2 4 8 Underline Outline Shadow 16 Condensed Extended 97 Break Level Processing PL_SetBkHStyle PL SetBrkColor PL SetBkHStyle areaRef L breakLevel I columnNum I fontName S size I styleNum I areaRef longint Reference of PrintList Pro object on layout gt breakLevel integer Break level number gt columnNum integer Column number gt fontName string Name of the font gt size integer Size of the font styleNum integer Style of the font PL SetBkHStyle is
149. ssssssssssssssssssn eene nennen nnne 96 PL SetBrkStyle areaRef L breakLevel I columnNum I fontName S size I styleNum 96 PL SetBkHStyle areaRef L breakLevel I columnNum I fontName S size I styleNum I 97 PL SetBrkColor areaRef L breakLevel I columnNum I plpForeColor S 4dForeColor I plpBackCGolor S 4dBackColor cessisset norte x RR HX eeu FR RR E CX CUN DA RO EROR PINO R DX RUM 97 PL SetBrkRGBColor areaRef L breakLevel I columnNum I breakForeRed L breakForeGreen L breakForeBlue L breakBackRed L breakBackGreen L breakBackBlue L eese 98 PL SetBkHColor areaRef L breakLevel I columnNum I plpForeColor S 4dForeColor I plpBackCGolor S 4dBackColOr 1 dert ce our Dor dete eae ree cece dade A DOOR RR 99 PL SetBkHRGBColor areaRef L breakLevel I columnNum I brkHdrForeRed L brkHdrForeGreen L brkHdrForeBlue L brkHdrBackRed L brkHdrBackGreen L brkHdrBackBlue L 100 PL SetBrkHeight areaRef L breakLevel I numBreakLines I breakHeightPad 1 100 PL SetBkHHeight areaRef L breakLevel I numBreakLines I breakHeightPad I 101 PL SetBrkRowDiv areaRef L lineWidth F pattern S plpColor S 4dColor I 101 PL SetBrkRowRGBDiv areaRef L lineWidth F dividerRed L dividerGreen L dividerBlue L 102 PL SetBrkColOpt areaRef L breakLevel I columnNum I showColDivider I lineWidth F pattern S PIPCOIOKES 4A
150. stified header and column PL_SetFormat eList 3 4 00 3 3 solid black hairline frame hdr line PL SetFrame eList 0 25 Black Black 0 0 25 Black Black 0 End if End if A portion of our resulting printout appears below PrintList Pro Example 2 Company Employees Salaries Addison Wesley Publishing Co First Name Last Name Salary Mike Erickson 1 000 00 Steven Stansel 24 130 54 Apple Computer Inc First Name Last Name Salary Barbara Anderson 68 484 36 Samir Arora 63 847 98 Randy Battat 26 898 06 Bill Coldrick 42 369 32 Debi Coleman 71 092 14 Moira Cullen 69 613 32 David Eyes 28 964 88 Jonathan Fader 30 048 76 Jim Floyd 25 055 66 Linda Glish 63 990 08 Russ Havard 20 953 38 Mike Homer 46 056 08 Barbara Krause 41 832 28 Tim Kreps 80 500 14 Jon Magill 59 917 20 John Sculley 25 392 78 Doug Sleeter 65 797 20 Martha Steffen 50 354 36 Larry Tesler 39 933 04 Peter Watkins 92 377 74 Ron Wong 24 500 00 National Apple Professional In First Name Last Name Salary Mike Bailey 83 410 74 CompuServe First Name Last Name Salary Sharon Jones 90 019 86 Affinity Microsystems Ltd First Name Last Name Salary Rick Barron 59 908 38 112 Examples Example 3 Adding a total line to the list Example 3 Adding a total line to the list Print the same list of company names and people as Example 2 and add a total lin
151. t width Width of line This parameter is a real value allowing fractional widths See Hairline Line Width redLightColor greenLightColor blueLightColor RGB values used for both left and top lines colors redDarkColor greenDarkColor blueDarkColor RGB values used for both right and bottom lines colors clearAllBorders It this parameter value is 1 then all cells inside the frame will have their borders removed 67 Configuration Commands PL SetPageProc PL SetPageProc areaRef L callbackMethod S areaRef longint Reference of PrintList Pro object on layout gt callbackMethod string Name of the page callback project method PL SetPageProc is used to specify a 4D project method to be called at the end of PrintList Pro s processing on every page Keep in mind that a PrintList Pro page is not necessarily equivalent to a physical page It is possible to have several occurrences of a PrintList Pro object for a single page Each occurrence will invoke the callback method at the end of its page callbackMethod The name of the callback method that is called at the end of every PrintList Pro page You must use the following declaration in your callback method C LONGINT 1 2 PrintList Pro will pass the method specified by callbackMethod two parameters the first indicates which PrintList Pro area is calling the method and the second specifies the last row printed on that page Example PL SetPageP
152. t breakText Minimum String PL_GetBreakValue 1 dataArray 2 format Char Carriage return breakText breakText Average String PL_GetBreakValue 1 dataArray 3 format Char Carriage return breakText breakText Maximum String PL_GetBreakValue 1 dataArray 4 format Char Carriage return breakText breakText Standard Dev String PL_GetBreakValue 1 dataArray 7 format Char Carriage return we perform the 5 calculation right here breakText breakText Bonus String Round PL_GetBreakValue 1 dataArray 3 0 05 0 format Char Carriage return breakText breakText Char Carriage return APPEND TO ARRAY TbreakText R breakText 324 break on last name End case Else this is a row because 3 lt 0 do something End if 119 Examples Example 5 Computed Breaks Here is the resulting text There are 4 people in Podunk Sum 168 092 54 Minimum 23 275 98 Average 42 023 13 Maximum 60 956 00 Standard Dev 13 325 83 Bonus 2 101 00 There are 3 people in Phoenix Sum 104 428 80 Minimum 20 416 34 Average 34 809 60 Maximum 52 230 08 Standard Dev 13 163 11 Bonus 1 740 00 There are 6 people in Cupertino Sum 295 862 00 Minimum 24 963 54 Average 49 310 33 Maximum 70 962 78 Standard Dev 17 654 11 Bonus 2 466 00 120 Examples PrintList Pro Constant List
153. tArraysNam command PL SetArraysNam must be called before any other PrintList Pro commands are executed This is necessary to provide PrintList Pro with an opportunity to allocate the data structures necessary to store formatting information for each column These data structures are allocated on a per column basis and PL SetArraysNam for a given column must be executed before any property of that column can be specified If the PL SetArraysNam command is incorrectly used an error code indicating the problem will be returned PL SetArrays Passed 0 PL Not an array 1 Check to make sure all arrays are correctly typed PL Wrong type of array 2 Pointer and two dimensional arrays are not allowed PL Wrong number of rows 3 Make sure that all arrays have the same number of elements PL Maximum number of arrays exc 4 32767 arrays is the maximum PL Not enough memory 5 Unlikely these days Up to 32767 arrays can be printed by PrintList Pro with up to fifteen columns specified in each call to PL SetArraysNam The position of the first array columnNumber and the number of arrays numArrays are also specified in this command All array types except for pointer are allowed and all arrays must have the same number of elements 23 Configuring PrintList Pro Specifying the Arrays to Print The maximum number of rows is only limited by available memory Aternately to standard single dimension arrays one dim
154. tions and the associated strings not case sensitive that can be included in breakText Sum Sum Minimum Minimum Average Average Maximum Maximum Count Count Variance AVar Standard deviation Dev Break Value Insertion ABreakValue Sum Minimum Average Maximum Count and Standard deviation are identical to that of 4D s QuickReport editor Break Value Insertion will use the array value from the sorted column that is associated with breakLevel for insertion into breakText Custom Calculation will execute the callback function specified in PL SetBrkFunc or PL SetBkHFunc to retrieve a string for insertion into breakText See PL SetBrkFunc and PL SetBkHFunc for details of performing custom calculations using the callback function 94 Break Level Processing PL SetBrkText Not all calculations are available on all array types The following table lists the possible calculations for the various array data types and the resulting type of the calculation numeric Sum same as column numeric Minimum same as column numeric Average real numeric Maximum same as column all Count integer numeric Variance same as column numeric Standard deviation same as column all Break Value Insertion same as break column all Custom Calculation formatted text When the resulting value s data type is the same as the columnNum data type the value is formatted using t
155. tration error will be returned in result in case registrationCode is invalid but the plugin will remain registered Multiple calls to PL Register are allowed The plug in will be activated if at least one valid key is used and all subsequent calls to PL Register will return 0 unless forceCheck is set to 1 30 Configuration Commands PrintListPro Example C_LONGINT result result PL Register YourRegistrationKey Case of result 2 ALERT The PrintList Pro licence is invalid result 3 ALERT The PrintList Pro licence has expired etc End case Alternately to PL_Register you can place a plain text file into your 4D Licenses folder or use the Demo mode dialog Register button This is only valid for non unlimited licenses Please see the Licence Types section for detailed information about the licencing options available for PrintList Pro Example with multiple calls C LONGINT result ignored in this case result PL Register Registration key one result PL Register Registration key two result PL Register Registration key three etc If result 0 registration failed ALERT PrintList Pro could not be registered End If When PL Register is called with an empty string the license dialog will be displayed if PrintList Pro is not registered and the dialog was not yet displayed This allows you to show the registration dialog to your users without effectively calling
156. ue to the automatic sizing calculation If this is the case using PL SetWidths will improve the generation time of the list Text and string arrays will take the longest to automatically size Since you can use PL SetWidths on just some of the columns if you are printing very large arrays but only one is text or string you could use PL SetWidths on just the text or string array and let PrintList Pro automatically calculate the other column widths PL SetFormat does not affect the performance of PrintList Pro regardless of the size of the arrays being printed Borders and Frames PL SetCellBorder provides the ability to set the border style for a cell PL SetCellFrame prints a frame around a range of cells Both commands use RGB colors Header Cell Icon Support Picture Objects in Cells PL SetCellIcon uses 4D Picture Library items to place icons into individual cells This routine includes an iconRef parameter which is the reference number of a picture from the Design environment Picture Library Pass zero 0 if you do not want any icon for the cell Picture Objects in Headers In addition PL SetCellIcon provides the ability to procedurally place icons in column headers using 4D Picture Library objects Pass zero 0 in the cellRow parameter to set the header 29 Configuring PrintList Pro PL Register Configuration Commands PL Register registrationCode T forceCheck L gt result L registrationCode text
157. umn dividers and horizontal lines within the breakLevel for each columnNum and to print a horizontal line within a column for this break level 103 Break Level Processing PL SetBkHColOpt If showColDivider is 1 a column divider will be printed along the right side of the column specified The line characteristics are identical to the column divider shown in the list detail area PL SetBrkColOpt may be called to show a horizontal line at the top of the break specified in breakLevel in the column specified by columnNum This horizontal line could be used as a subtotal line to separate a column of values from a sum or average that is calculated in the break If PL SetBrkColOpt is not called for any columns in a given break level then no column dividers or horizontal break lines will be printed for that break level PrintList Pro has its own palette with the following colors white black blue green yellow magenta red cyan gray light gray Color constants can be used showColDivider 0 or 1 e 0 don t show a column divider default e 1 show the column divider along the right side of the column specified in the columnNum parameter whenever a break for the break level specified in breakLevel occurs lineWidth O to 1 This option controls the line width of the horizontal break line A value of 0 25 pixels should be used for hairlines A value of 0 means that no line will be printed Double lines typical in accou
158. ures below e The PL Register command takes just one parameter and it returns O for OK and an integer between 1 and 8 if not OK e The 4D project method Compiler PLP is no longer needed In addition PrintList Pro uses native drawing Not all fonts contain italic or bold variations and those technologies do not synthesize styles For example Geneva on most Macs has only the Regular typeface Arial has Regular Bold Italic and Bold Italic typefaces If any styles are not present in the OS PrintList Pro will print regular plain characters e The following features are removed picture escapes in text outline shadow e The following commands are removed gt PL GetAdvProps did nothing in PrintList Pro 4 7 anyway gt PL SetArrays must use PL SetArraysNam gt gt PL SetHeaderIcon use PL SetCellIcon with cellRow 0 gt PL SetSubSelect gt PL SaveData was documented as obsolete use the new PL Save in XML gt PL RestoreData was documented as obsolete use the new PL Load in XML 11 Upgrading from Previous Versions of PrintList Pro New Commands PL SetCellIcon now only supports pictures from the Picture Library cicn and PICT resources are no longer supported Escape characters 1234 in cell data or headers are no longer supported including the first parameter to PL SetMiscOptions Patterns are no longer supported They are interpreted by PrintList Pro version 5 as transparency ratios
159. value rowForeBlue Desired foreground RGB blue value rowBackRed Desired background RGB red value rowBackGreen Desired background RGB green value rowBackBlue Desired background RGB blue value The following example will tell PrintList Pro to print the third row using a color scheme standard for MacOS X PL SetRowRGBColor xArea 3 237 0 243 0 254 0 51 Configuration Commands PL SetDividers PL SetDividers areaRef L colDividerWidth F colDividerPattern S plpColDividerColor S 4dColDividerColor I rowDividerWidth F rowDividerPattern S plpRowDividerColor S 4dRowDividerColor 1 gt areaRef longint Reference of PrintList Pro object on layout colDividerWidth real Width of the column divider line colDividerPattern string Pattern of the column divider gt plpColDividerColor string Color from PrintList Pro s palette for the column divider gt 4dColDividerColor integer Color from 4D s palette for the column divider gt rowDividerWidth real Width of the row divider line gt rowDividerPattern string Pattern of the row divider gt plpRowDividerColor string Color from PrintList Pro s palette for the row divider 4dRowDividerColor integer Color from 4D s palette for the row divider PL_SetDividers is used to set the pattern transparency ratio and color of the column and row dividers These are the available patterns white black gray light gray and dark gray See the Patterns item
160. variable height and have full background color control as is now available with break footers 89 Break Level Processing Using Computed Breaks Using Computed Breaks These powerful commands can be used as array utilities without need to print anything or set up a plug in area PL ProcessArrays is used to specify the name of the computed break callback function This function will be called for the break levels and the columns specified by the breakArrays and dataArrays parameters pointers to arrays In addition the useDetail parameter allows calling the callback only on breaks value 0 or for each individual row as well value 1 PL ProcessArrays operates on a copy of the arrays you can freely modify them in the callback The callback method is called by PrintList Pro as callbackMethodName handle L row L breakLevel L PL GetBreakValue can only be called from the callback method with the specified handle that was received This command performs any break level processing calculation sum minimum average maximum count variance standard deviation for the current break level or individual row and the specified column from the list previously defined by the dataArrays parameter See Example 5 Computed Breaks 90 Break Level Processing PL SetPageBreak Commands PL SetPageBreak areaRef L breakLevel I insertPageBreak I areaRef longint Reference of PrintList Pro object on layout gt
161. w we process the arrays using the PlpComputeBreak project method for computing If PL ProcessArrays PlpComputeBreak breakArrays dataArrays 0 0 4th parameter is O for each break or 1 for each row Now TbreakText R has been populated by PlpComputeBreak concatenate breaks into a text variable vBrkComputeResult z For i 1 Size of array TbreakText R vBrkComputeResult vBrkComputeResult TbreakText_R i Char Carriage return End for SET TEXT TO PASTEBOARD vBrkComputeResult or do something else with vBrkComputeResult End if Here is our PlpComputeBreak callback method C LONGINT 1 2 3 handle row break level breakArrays C LONGINT dataArray position of the array to feed computed break in dataArrays from the calling method third parameter to PL ProcessArrays C TEXT format breakText If 32 20 is it a break dataArray 6 aSalary format 00 Case of 3 1 break on aCountry 3 2 break on aState 3 3 break on aCity breakText Hello I am the break at level String 3 after row String 2 Char Carriage return 2 we could do this to use 2 Concatenate the text for the current break breakText breakText breakText There are String PL_GetBreakValue 1 dataArray 5 people in aCity 2 1 Char Carriage return 2 breakText breakText Sum String PL_GetBreakValue 1 dataArray 1 format Char Carriage return breakTex
162. ws or Development vs Deployment Single user license This license allows development interpreted mode or deployment interpreted or compiled mode except merged on 4D Standalone or 4D SQL Desktop Since the registration key is linked to a specific 4D license you need to provide the number returned by the Copy or eMail buttons from the plugin demonstration mode alert this number is actually the 4D command GET SERIAL INFORMATION first parameter A new license will be supplied for free at any time if you change your 4D version and or get a new 4D registration key provided that your previous licenses match the current public version at the exchange time Note that if you are using several concurrent versions of 4D you will need one plugin license for each version Server licenses These licenses allow development interpreted mode or deployment interpreted or compiled mode except merged servers on 4D Server with up to 10 users small server 11 to 20 users medium server or more large server The registration key is linked to your 4D Server license just as above Merged licenses These licenses are designed for single user compiled merged applications built with 4D Volume Desktop one license per workstation or for merged server and related client applications one license per server They are linked to the machine ID server or single user workstation not the 4D serial number Unlimited Single User This license allow
163. xt variable or field Use PL Save after configuring the area but before printing PrintList Pro modifies properties during printing you would not get the original settings Example Save a PrintList Pro area s settings into a field in the database C TEXT SSettings S err PL Save area Settings Settings PLP template Settings 69 Configuration Commands Summary Using the Callback Methods A callback is a 4D project method which is executed by a plug in PrintList Pro lets you make use of callbacks when printing a PrintList Pro object Summary PrintList Pro provides five different callback methods when the end of a printed page is reached callbackMethod parameter of PL SetPageProc e custom calculations in a break functionName parameter of PL SetBrkFunc custom calculations in a break header functionName parameter of PL SetBkHFunc e calculated columns calcCallback parameter of PL SetCalcCall in field display or array display mode computed breaks with or without printing callbackMethodName parameter of PL ProcessArrays Warnings e Callback methods may use most 4D commands but should not call any PrintList Pro commands or any 4D commands that affect the arrays Note this limitation does not apply to computed break callbacks Callback methods should preserve the current selection of the printing layout s file by saving and restoring the selection if necessary e All callbacks receive paramet
164. y Red 0 0 if so then print it in red End if End for 62 Configuration Commands PL SetCellRGBColor PL SetCellRGBColor areaRef L firstCellCol I firstCellRow L lastCellCol I lastCellRow L cellArray X cellForeRed L cellForeGreen L cellForeBlue L cellBackRed L cellBackGreen L cellBackBlue L areaRef longint Reference of PrintList Pro object on layout gt firstCellCol integer First cell column gt firstCellRow longint First cell row lastCellCol integer Last cell column gt lastCellRow longint Last cell row gt cellArray two dimensional Discontiguous cells longint array cellForeRed longint Foreground red cellForeGreen longint Foreground green cellForeBlue longint Foreground blue cellBackRed longint Background red gt cellBackGreen longint Background green gt cellBackBlue longint Background blue PL SetCellRGBColor is used to set the foreground and or background color of a specific cell range of cells or list of cells This routine works in the same manner as PL SetCellColor except it allows you to specify the colors using standard RGB values cellForeRed Desired foreground RGB red value cellForeGreen Desired foreground RGB green value cellForeBlue Desired foreground RGB blue value cellBackRed Desired background RGB red value cellBackGreen Desired background RGB green value cellBackBlue Desired background RGB blue value 63 C
165. ys to print Serror PL_AddColumn eList gt aName 0 no need to specify colum number Serror PL AddColumn eList aAnniversary O Set calculated callback method for column 2 PL SetCalcCall eList 2 CalcColCallbackArray Now we use the callback as previously to populate the array on the fly CalcColCallbackArray 1 2 3 4 5 6 Area reference PrintList Pro longint reference Column number Type of array in this column Pointer to the printed array First row for which to calculate cell Number of cells to calculate in column Declare the parameters C LONGINT 1 2 3 5 6 these must be declared C_POINTER 4 this must be declared C LONGINT i For i1 5 5 6 1 4 gt i Add to date aHireDate i 1 0 0 End for 80 Calculated Columns PL SetCalcCall Commands PL SetCalcCall areaRef L columnNumber I calcCallback S areaRef longint Reference of PrintList Pro object on layout gt columnNumber integer Column number gt calcCallback string 4D method called ot fill row s of a calculated column PL SetCalcCall is used to set a callback method for a calculated column columnNumber This parameter specifies the column on which to attach the calcCallback method calcCallback This method will be called whenever row s need to be filled in a calculated column If this is an empty string then no method will be called The first two parameters 1 an
Download Pdf Manuals
Related Search
Related Contents
Tornado 2000 sistema de manguera digital 48 canales/16 LevelOne 4-slot Modularized L2 SNMP Combo Switch Lexium Controller (IAD) Web Service - Earth and Planetary Remote Sensing Laboratory Workshop Manual, 394 XP, 1994-12, Chain Saw Bedienungsanleitung - micro Copyright © All rights reserved.
Failed to retrieve file