Home

List & Label Programmer`s Manual

image

Contents

1. See also LIStgsysDestroyMetafile LIStgsysGetPageOptionString Syntax INT L1lStgsysGetPageOptionString HLLSTG hStg INT nPageIndex INT nOption LPTSTR pszBuffer UINT nBufSize Task Returns character strings that are stored in the preview file Parameter hStg The handle returned by L StgsysStorageOpen 324 Managing Preview Files nPagelndex Page index 1 L StgsysGetPageCount nOption Chooses the meaning of the return value pszBuffer Address of the buffer for the string nBufSize Length of the buffer including the terminating O character Return value Error code Hints You can use the following values for nOption LS_OPTION_PROJECTNAME Returns the name of the project file that has been used to create this page LS_OPTION_JOBNAME Returns the name of the job see L PrintWithBoxStart LS_OPTION_USER Returns the user specific string see L StgsysSetPage OptionString LS_OPTION_CREATION Creation date time LS_OPTION_CREATIONAPP Application that created this file LS_OPTION_CREATIONDLL DLL that created this file LS_OPTION_CREATIONUSER User and computer name of the person that created this file LS_OPTION_PRINTERALIASLIST See also LL_OPTIONSTR_PRINTERALIASLIST this represents the printer alias list valid at the time of the creation of the preview file This is one string lines separated by a line break n LS_OPTION_USED_PRTDEVICE Returns the device of the orig
2. Example HLLJOB hJob hJob LlJobOpen 0 L1SetOptionString hJob LL OPTIONSTR_FAX_RECIPNAME combit L1SetOptionString hJob L_ OPTIONSTR_FAX_ RECIPNUMBER 497531906018 L1SetOptionString hJob LL OPTIONSTR_FAX_SENDERNAME John Doe L1SetOptionString hJob LL OPTIONSTR_FAX_SENDERCOMPANY Sunshine Corp L1SetOptionString hJob LL OPTIONSTR_ FAX SENDERDEPT Development L1SetOptionString hJob LL OPTIONSTR_FAX _SENDERBILLINGCODE A7T11 E LlJobClose hJob If these options are not set and the user has not entered any expressions in the fax parameters dialog export to MS FAX will not be available This module has no programming interface Various established fax applications can be used from List amp Label with the corresponding printer fax driver If the fax application supports passing of the fax number by the document the number input dialog can be suppressed in most cases To use e g David from the company Tobit you can use the command Place a text object in the Designer and insert the line NUMBER lt fax number resp field name gt 388 Programming Reference The fax driver knows the syntax and sends the print job without any user interaction with the placed fax number Other fax applications offer similar possibilities we recommend taking a look at the documentation of your fax application 7 3 14 Word Export Overview
3. Verbosity Text Configures how text typed columns should be exported Value Meaning 0 Ignore cell 1 Cell as text Default 1 Verbosity RTF Configures how RTF typed columns should be exported Value Meaning 0 Ignore cell 1 As RTF stream 2 As unformatted text Default 2 Verbosity Table Contigures how table objects should be exported Value Meaning 0 Ignore object 1 As a table object Default 1 Verbosity Table Cell Configures how table cells should be exported Value Meaning 0 Ignore cell 1 As a cell object using the verbosity settings of the object types specified in the cell Default 1 Export Path Path where the exported files should be saved 385 The Export Modules Export File File name of the document If this option is empty a file selection dialog will always be displayed default export txt Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 0 Export with user interaction dialogs 1 No dialogs or message boxes will be displayed only if Export Path was specified Default 0 Export ShowResult Specifies whether the export result will be displayed automatically The program that displays the result will be determined by the associated file type Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with Export File Default 0 Export ShowResultAvailable Enables you to hide the respecti
4. cccccceesceeeeeeeeeteeneeeeeeeeteeenaes 36 2 3 7 Objects in the DeSIQNEl ccccccceeceeeeeeeeceecneeeeeeeeeseneneeeetenes 37 2 3 8 ReporiConta ine reises ieat eee a e ages 39 23 9 Object Model DOM i iseeon ccs e A 40 2 3 10 List amp Label in WPF Applications cccceccecccceeceeeeeeeeeeetteteeeees 41 2 3 11 Error Handling With Exceptions 00 cece ceeeeeececceeeeeeeeeeeeeeeteeeeeees 41 2 312 Debuggen pienia an A N 42 2 4 Usage in Web Applications cccccccccccccccceeeeeeeeeeeeaeeeeeeeeeeeeeeaeeeeaeaees 43 2 4 1 Web REDO mrtg e e ra eaa aN Eaa ead atacand eae 43 2 4 2 Web Designer ccccccecceeeceeeeeeeeeeeeceecneeeeeeeeecentneeeeesetesstsneeeess 44 25 EXAMPI ES e eaka taen tots devs e e ea aa ae e see kedan vet neatevetadas a a 48 2 5 1 Simple Label 5 4 haste resend Meenas des Sev en celvoos A nateelane 49 2 5 2 SIMPle WSU is seta ieee ha ata ested a betas eg ates rea eget tare 50 2 5 3 IAVOLCE MEG Gif th YAS NA ate center a a gute aah Manton atten sadness toteat 50 2 5 4 Print Card With Simple Placeholders 0 c ccccceeeesteseeeeeeeeees 51 2 5 5 SUD Reports ished heel atin tne each oid ac Aloe ta tlc OAN 52 2 5 6 Chansen nantin et a is teeta E tadadnc ota iae 53 25 7 Cross Tabe S arae ar ate enaa aR aa E E EEE ERE ERER et a 53 2 5 8 Database Independent Contents 0 0 ceeeceeeceeeeeeeeeeeeeeeeeteeenaes 53 2 5 9 3810 p A E EE E E TE E E TE 56 2 5 10 Extend De
5. RTF texts are embedded as pictures As this increases the file size remarkably we recommend that you use normal text wherever possible Tabs will be replaced by blanks The option Separators fixed in the table object is not supported The option Fixed size in the table object is not supported Fill patterns available in List amp Label cannot be transformed to XLS All fillings are solid Chart and HTML objects are exported as pictures and thus cannot appear transparently The print order of lines and rectangles is disregarded lines and rectangle frames always appear in the foreground The print order of texts and rectangles is disregarded text always appears in the foreground Texts partially overlapping filled rectangles are filled completely Overlapping text and picture objects are ignored Lines that are neither horizontal nor vertical are ignored Picture objects are rendered with a white frame 345 The Export Modules e Large filled areas in projects with many different object coordinate values can decrease the speed remarkably e _ Line widths are ignored e Rotated RTF objects and pictures are not supported e Objects exported as pictures should fit into their rectangle important for e g barcodes e f the coordinates of two objects are only slightly different i e a fraction of a millimeter frame lines might become invisible as Excel is not capable of displaying them correctly e Gradient f
6. hJob LlJobOpen 0 v L1GetVersion VERSION MAJOR LlJobClose hJob L1DebugOutput 1 done prints the following to the debug screen Get version number L1JobOpen 0 1 L1GetVersion 1 21 L1lJobClose 1 done See also LISetDebug Debwin LIDefineChartFieldExt Syntax INT L1lDefineChartFieldExt HLLJOB hJob LPCTSTR lpszName LPCTSTR lpszCont INT 1Para LPVOID lpPara Task Defines a chart field and its contents Parameter hJob List amp Label job handle IpszName Pointer to a string with the name of the field IpszCont Pointer to a string with the contents of the field IPara Field type LL_TEXT LL NUMERIC pPara For future extensions must be NULL Return Value Error code 152 Function Reference Hints Please note the general hints in the section Variables and Fields in List amp Label See also LIDefineChartFieldStart LIDefineField Syntax INT L1DefineField HLLJOB hJob LPCTSTR lpszName LPCTSTR lpszCont Task Defines a list table field and its contents Parameter hJob List amp Label job handle IpszName Pointer to a string with the name of the field IpszCont Pointer to a string with the contents of the field Return Value Error code Hints Please note the general hints in the section Variables and Fields in List amp Label This function defines a text field and can be mixed with the other L DefineField functions LiDefineFie
7. 200 200 192 206 208 157 111 216 237 221 NO NN NNN NY N 93 415 95 227 96 97 98 99 99 201 257 202 202 203 203 204 206 422 208 237 Q R 209 Ww UU NNNO P 422 N N N w LIPrintGetPrinterlnfo LIPrintGetProjectParameter PrintGetT extCharsPrinted PrintlsChartFieldUsed PrintlsFieldUsed PrintlsVariableUsed LIPrintOptionsDialog LIPrintOptionsDialogTitle PrintResetProjectState PrintSelectOffsetEx PrintSetBoxT ext PrintSetOption LIPrintSetOptionString LIPrintSetProjectParameter PrintStart PrintUpdateBox PrintVariableStart PrintWillMatchFilter LIPrintWithBoxStart RT RT DDD DD Se Se Se Se Se Se Se Se Se Se Se LIProjectClose ProjectOpen LIProjectSave FCopyToClipboard TFCreateObject TFDeleteObject TFDisplay FEditObject TFEditorlnvokeAction TFEditorProhibitAction TFGetTex TFGetTextLength TFSetText ectFileDlgTitleEx Debug DefaultProjectParameter FileExtensions NotificationCallback NotificationCallbackExt NotificationMessage OptionString PrinterDefaultsDir PrinterlnPrinterFile 225 157 227 164 228 218 228 231 237 235 236 104 90 252 117 120 Option 101 105 191 192 257 422 105 192 253 224 415 422 226 422 422 229 230 23 42 232 234 415 423 237 228 237 ND N N A RA oe N S anoaoaoaontnoonaoark BwWwWBNH O
8. Another way of creating hyperlinks is via the object name The names of text and picture objects are parsed for the string LINK lt url gt Whenever this string is found a hyperlink is generated Thus if you name your picture object combit 357 The Export Modules LINK http Awww combit net this would create a picture hyperlink during export to HTML HTML Form Creation The HTML module supports a special mode for creating HTML forms The module converts objects with certain names to input controls This mode can be activated using the option HTML Form Header Example L1XSetParameter hJob LL_LLX_EXTENSIONTYPE_EXPORT HTML HTML Form Header lt form method POST action http www xyz de x cgi gt The specified HTML code will also be exported and all object names will then be investigated for the following values Text Objects Value EDIT lt Value gt MULTIEDIT lt Value gt LISTBOX lt Value gt COMBOBOx lt Value gt RADIOBUTTON lt Group name gt lt Value gt CHECKBOX lt Group name gt lt Value gt BUTTON lt Value gt 358 Meaning Creates a single line edit control with lt Value gt as control name in the form The contents of the first paragraph of the object will be the default text of the edit field Creates a multi line edit control with lt Value gt as control name in the form The contents of the first paragraph of the object will be the default
9. PRN_PIXELSPHYSICAL_X PRN_PIXELSPHYSICAL_Y 335 188 ENUID TXT 72 169 246 247 325 325 325 327 325 326 326 322 327 326 326 326 326 326 327 327 327 327 325 322 325 408 336 337 337 338 338 339 408 281 288 169 288 117 231 363 363 32 216 420 56 N NULL values Numerical Variables O Object model ObjectDataProvider ObjectReportContainer Objects Barcode HTML Picture RTF Text Text ObjectText OCX component data transfer Designer functions Designer objects Events ntegration Language selection Preview control Preview files print and design methods OCX Event BtnPress LoadFinished PageChanged OCX Method GetOptionString GotoLast GotoNext GotoPrev PrintAllPages PrintCurrentPage PrintPage RefreshToolbar SaveAs SendTo SetOptionString SetZoom 414 94 40 27 40 37 40 38 39 38 38 37 40 65 68 70 66 64 66 67 67 64 73 74 74 73 73 73 72 73 73 73 73 73 73 73 73 ZoomReset ZoomRevert ZoomTimes2 OCX Properties AsyncDownload BackColor CanClose CurrentPage Enabled FileURL Pages SaveAsFilePath ShowThumbnails ToolbarButtons ToolbarEnabled Version OCX Viewer Control OleDbConnectionDataProvider Oracle OracleConnection OracleC
10. The preview is a window that can be started independently of the Designer and shows the data that has been printed by the preview print process LiPreviewDisplay calls LiPreviewDisplayEx with LL PRVOPT_PRN_ASK PRINTERIFNEEDED See also LIPrintStart LIPrintWithBoxStart LIPreviewDeleteFiles LIPrintEnd LIPreviewSetTempPath LIPreviewDisplayEx LIPreviewDisplayEx Syntax INT LlPreviewDisplayEx HLLJOB hJob LPCTSTR lpszObjName LPCTSTR lpszPath HWND hWnd UINT nOptions LPVOID pOptions Task Starts the preview Additional options can define the behavior Parameter hJob List amp Label job handle IpszObjName Valid file name without path name IpszPath Valid path of the preview files ending with a backslash hWnd Window handle of the calling program nOptions Value Meaning LL_PRVOPT_PRN_ Preview uses the system s default printer USEDEFAULT LL_PRVOPT_PRN_ If the printer that is stored in the preview ASKPRINTERIFNEEDED file i e the printer that has been used for the preview print process is not found in the current computer s printers a printer dialog is shown so that the user can select the printer LL_PRVOPT_PRN_ A printer dialog will allow the user to ASKPRINTERALWAYS choose his default printer for the preview pOptions Reserved set to NULL or Return Value Error code 207 API Reference Hints The preview is a window that can be started independently of the Designer It shows t
11. e Microsoft Access e ODBC data sources e g Excel data e Microsoft SQL Server also file based e Oracle databases Once configured the data source is available in the selection window for the DataSource of the ListLabel component and can therefore be directly assigned By clicking the link Open report designer in the SmartTags of the ListLabel component the Designer can also be directly opened from within the development environment requiring not a single line of code to access the data of a DataSource This data provider automatically supports a single level sorting by any field ascending or descending DbCommandSetDataProvider Allows combination of multiple IDbCommand implementations into one data source It can be used e g to access multiple SOL tables and define relations between them Another possibility is to combine data from e g SOL and Oracle databases into one data source This data provider automatically supports a single level sorting by any field ascending or descending ObjectDataProvider This data provider can be used to access object structures It can work with the following types interfaces e Enumerable requires at least one record though e Enumerable lt T gt e ListSource In order to influence the property names and types you may either implement the ITypedList interface on your class or use the DisplayNameAttribute To suppress members use the Browsable false attribute on the members
12. hJob List amp Label job handle IpszFieldName Field name Return Value Value Meaning 1 Variable is used 0 Variable is not used LL ERR_UNKNOWN Variable is not defined Hints This function can only be called after L PrintStart or L PrintWithBoxStart This function needs LL OPTION_NEWEXPRESS IONS to be set to true default As calling L DefineVariableStart clears the used flags this function will return LL ERR_UNKNOWN or 0 afterwards regardless of whether the field is actually used or not Therefore do not use L DefineVariableStart after L Print WithBox Start Instead of using a specific variable name wildcards can be used For further information see L PrintlsFieldUsed Example if L1PrintIsVariableUsed hJob Name 1 L1lDefineVariableExt hJob Name lt gt See also LIPrintStart LIPrintWithBoxStart LIPrintlsFieldUsed LIPrintOptionsDialog Syntax INT L1PrintOptionsDialog HLLJOB hJob HWND hWnd LPCTSTR lpszText Task Calls a print option selection window and enables the user to select print specific settings 228 Function Reference Parameter hJob List amp Label job handle hWnd Window handle of the calling program IpszText Text to be passed in the dialog e g Only 55 labels will be printed Return Value Error code Hints This function is equivalent to L PrintOptionsDialogTitle with NULL as dialog title See this section for further h
13. API Reference Example case LL _CMND_ EDIT USEROBJ pSCE PSCLLEDITUSEROBJ pSC gt _1Param lpszNewParas MyDialog pSCE gt _hWnd if strlen lpszNewParams lt pSCE gt _lpszParameters strcpy pSCE gt _lpszParameters lpszNewParas else pSCE gt _lpszParameters lpszNewParas break LL_CMND_ENABLEMENU Task Allows the host application to disable menu items Activation Always activated Parameters Meaning of the parameter Param Param menu handle Hints This callback is called when List amp Label changes or updates the menu The application can then enable or disable menu items previously inserted by LL_CMND_MODIFYMENU Example case LL CMND_ENABLEMENU if lt whatever gt EnableMenultem hMenu IDM MYMENU MF_ENABLED MF_BYCOMMAND else EnableMenultem hMenu IDM _MYMENU MF_DISABLED MF_GRAYED MF_BYCOMMAND break LL_CMND_EVALUATE Task Asks the program for the interpretation of the contents of the function External in an expression Activation While printing when using an Externa function 286 Callback Reference Parameters Param is a pointer to an scL ExtFct structure _nSize Size of the structure sizeof scL ExtFct _lpszContents Parameter of the function Externa _bEvaluate TRUE if the contents are to be evaluated FALSE if only a syntax test is to be carried out _szNewValue Array where the result is stored as a zero terminated string Default em
14. Dim Car As New Car Car Model Passat Car Brand VW Cars Add Car Car New Car Car Model Cayenne Car Brand Porsche Cars Add Car 28 Other Important Concepts LL DataSource New ObjectDataProvider Cars LL AutoProjectType L1lProject List LL Design LL Dispose OleDbConnectionDataProvider Allows binding to an OleDbConnection e g Access database file This data provider automatically supports a single level sorting by any field ascending or descending Example C OleDbConnection conn new OleDbConnection Provider Microsoft Jet OLEDB 4 0 Data Source DatabasePath OleDbConnectionDataProvider provider new OleDbConnectionDataProvider conn ListLabel LL new ListLabel LL DataSource provider LL Design LL Dispose VB NET Dim conn As New OleDbConnection Provider Microsoft Jet OLEDB 4 0 Data Source DatabasePath Dim provider As New OleDbConnectionDataProvider conn Dim LL As New ListLabel LL DataSource provider LL Design LL Dispose OracleConnectionDataProvider Allows binding to an OracleConnection This provider is not available if the target platform is the NET Client Profile This data provider automatically supports a single level sorting by any field ascending or descending SqlConnectionDataProvider Allows binding to a SqiConnection This data provider automatically supports a single level sorting by any field ascending or d
15. LIDefineFieldStart LIDefineFieldExt LIDefineFieldExtHandle LIGetFieldContents LIGetNotificationMessage Syntax UINT L1GetNotificationMessage HLLJOB hJob Task Returns the message number for callbacks 190 Function Reference Parameter hJob List amp Label job handle Return Value Current message number Hints The default message number has the value of the function RegisterWindowMessage cmbtLLMessage The callback function has higher priority if it is defined no message is sent This function may not be used when List amp Label s VCL VBX or OCX control is used Example HLLJOB hJob UINT wMsg L1SetDebug TRUE hJob LlJobOpen 0 v L1GetNotificationMessage hJob L1JobClose hJob See also LISetNotificationMessage LISetNotificationCallback LIGetOption Syntax INT PTR LlGetOption HLLJOB hJob INT nMode Task Requests various switches and settings see below from List amp Label Parameter hJob List amp Label job handle nMode Option index see L SetOption Return Value The value of the corresponding option Hints The option indices are listed in the description of L SetOption In addition there are some new or with regard to the function L SetOption modified options 191 API Reference LL_OPTION_LANGUAGE Returns the currently selected language See JLi obOpen and LiJobOpenLCID LL_OPTION_HELPAVAILABLE LOWORD See L SetOption HIWORD Ch
16. Note Only entries whose object size is large enough to be printed by List amp Label can be exported This means that e g if you have a text object that will become a combobox in the exported form it must be large enough for all paragraphs to be printed 7 3 3 JOM Export Overview The JOM jQuery Mobile export creates HTML formatted reports using the jQuery Mobile framework and Javascript The created files are optimized for display on mobile devices Information about JOM can be found on www jquerymobile com The framework is loaded from a CDN Content Delivery Network therefore an active internet connection is required for display Limitations There are several limitations due to the target format The most important are e The created pages are optimized for display on mobile devices e Only tables are exported and therefore only list projects are supported e Table of contents and index are not supported e Text RTF text and HTML text in table cells are specially supported All other objects will be exported as picture e Only footer lines of the last page or the last ones of a table are supported as this export is not page based 359 The Export Modules e With local access the according rights IE have to exist to be able to load the pages With some browsers access to file can cause problems As soon as the pages are accessed via http the problem should not occur anymore e Issue print is not supp
17. Parameter hDomObj DOM handle for the object to be altered pszName Name of the desired property e g Condition for setting the appearance condition of an object pszValue New value of the property Return value Error code See also Chapter DOM Functions 177 API Reference LIEnumGetEntry Syntax HLISTPOS LlEnumGetEntry HLLJOB hJob HLISTPOS hPos LPSTR pszNameBuf UINT nNameBufsize LPSTR pszContBuf UINT nContBufSize _LPHANDLE pHandle _LPINT pType Task Returns the name and contents of a variable or chart field Parameter hJob List amp Label job handle hPos The handle of the current field iterator pszNameBuf nNameBufsize Buffer where the name should be stored pszContBuf nContBufSize Buffer where the contents should be stored pszContBuf can be NULL to ignore the contents string PHandle Pointer to a handle where the handle value should be stored Can be NULL to ignore the handle value See L DefineVariableExtHandle and L DetineFieldExtHandle pType Pointer to an INT in which the type LL_7EX7 will be stored May be NULL to ignore the type Return Value Error code Hints During the L Enum functions a call to L DefineVariableStart or L DefineFieldStart is prohibited The iterator functions can be used to enumerate variables and or fields and to get their names contents and types See chapter Important Remarks on the Function Parameters of DLL
18. See also LIRTFCreateObject LIRTFCreateObject Syntax HLLRTFOBJ LIRTFCreateObject HLLJOB hJob Task Creates an instance of a List amp Label RTF object to be used in stand alone mode Parameter hJob List amp Label job handle Return Value RTF object handle or NULL in case of an error 243 API Reference See also LIRTFGetText LIRTFDeleteObject LIRTFDeleteObject Syntax INT LIRTFDeleteObject HLLJOB hJob HLLRTFOBJ hRTF Task Destroys the instance of the stand alone RTF object Parameter hJob List amp Label job handle ARTF RTF object handle Return Value Error code See also LIRTFCreateObject LIRTFDisplay Syntax INT LIRTFDisplay HLLJOB hJob HLLRTFOBJ hRTF HDC hDC _PRECT pRC BOOL bRestart LLPUINT pnState Task Paints the contents of the RTF object in a device context DC Can be used to display the RTF contents in a window or print them to the printer Parameter hJob List amp Label job handle ARTF RTF object handle ADC DC for the device If NULL the standard printer will be used PRC Pointer to the rect with logical coordinates mm 10 inch 100 etc in which the contents will be printed May be NULL for a printer DC in which case the whole printable area of the page will be used bRestart f TRUE the output will start at the beginning of the text Otherwise it will be continued after the point where the previous print ended thus enabling
19. Test dataSource Number1 1 234 Dim LL As New ListLabel LL DataSource New ObjectDataProvider dataSource LL AutoProjectType L1lProject Card Call Designer LL Design Print LL Print LL Dispose 2 5 5 Sub Reports Structuring of reports by using the report container is a pure Designer feature Therefore there is no difference from the normal list as shown in section Simple List For using sub tables it is required that parent and child data are relationally linked So the first step is to design a table element for the parent table in the report container The next step will be to add a sub element with the child data by the toolbar in the Objects window 52 Examples At print time the corresponding child sub report will be automatically added for each record of the parent table For example the List amp Label Sample Application in the start menu s root level demonstrates this under Design gt Extended Samples gt Sub reports and relations 2 5 6 Charts The chart function is also automatically supported by the report container See section Simple List The List amp Label Sample Application in the start menu s root level contains a variety of different chart samples under Design gt Extended Samples 2 5 7 Cross Tables Not surprisingly cross tables will be implemented the same way as described in section Simple List The List amp Label Sample Application in the start menu s
20. The methods implement a standardized print loop that can be used directly for most of the simpler applications if you do not pass the data via DataBinding In the case of this method the data is passed within the events DefineVariables and DefineFie ds to List amp Label This allows any data source to be connected individually The event arguments allow access to useful information such as user data that has been copied the Design mode etc The property sLastRecord is used to notify the print loop that the last data record has been reached As long as this is not the case each event is invoked repeatedly in order to retrieve the data The Design method shows the Designer in a modal pop up window on top of your application window You can specify additional options in the LLSetPrintOptions event Internally this event is triggered after invoking L PrintWithBoxStart but before the actual printing One very simple implementation of the Print method looks like this Delphi procedure TForm1 LLDefineVariables Sender TObject UserData Integer IsDesignMode Boolean var Percentage Integer var IsLastRecord Boolean var EventResult Integer var i integer begin For i to DataSource FieldCount 1 do begin LL L1DefineVariableFromTField DataSource Fields i end if not IsDesignMode then begin Percentage Round DataSource RecNo DataSource RecordCount 1 DataSource Next if DataSource EOF True then IsLastRecord true
21. Under ASP NET MVC C MVC Web Reporting Sample MVC Web Reporting Sample Views Home Designer cshtml C MVC Web Reporting Sample MVC Web Reporting Sample Controllers HomeController cs Step 2 Configure Data Provider for Real Time Data Preview The Web Designer also supports a real time data preview just as in the normal locally installed List amp Label Designer To do so it connects to a regular Server side LL DataProvider after it starts which will need to be provided by your application in an event For this to take place add this function at a location of your own choosing public static void WebDesignerConfig OnRequestDataProvider object sender RequestDataProviderEventArgs e e DataProvider new AdoDataProvider DataAccess CreateDataSet This function needs to be registered as an event handler for the Web Designer WebDesignerConfig OnRequestDataProvider Designer WebDesignerConfig OnRequestDataProvider It is recommended that this instruction be added to the Application _Start method of the Global asax file because it is a global setting In particular pay attention that this event handler is only bound once to the OnRequestDataProvider event In order to be able to differentiate between different data providers despite the global event handler you have the option of passing one or more IDs of your own choosing when rendering the DesignerContro object or when calling Htm ListlabelMvcW
22. case 112 don t allow one page print return 1 break LL_CMND_HELP Task Enables the programmer to use an external help system instead of List amp Labels own help system Activation L1SetOption hJob LL OPTION CALLBACKMASK lt other Flags gt LL_CB_HELP Parameters HIWORD lParam Value Meaning HELP_CONTEXT LOWORD lParam is then the context number of the help topic HELP_INDEX the user wants to see the index of the help file HELP_HELPONHELP the user queries the help summary Return Value _IResult 0 Return to List amp Label to display its help 1 List amp Label should do nothing 288 Callback Reference Example case LL_CMND_HELP WinHelp hWnd my hlp HIWORD 1Para LOWORD 1Para pSC _1Result 1 break LL_NTFY_EXPRERROR Task Allows the host application to indicate whether an expression error is found when the project is loaded Parameters Param points to the error string that the wizard should display Return Value _IResult ignored always 0 LL_CMND_HOSTPRINTER Task Allows the user to define one or two device contexts for the printer which are then used by List amp Label instead of its own printer management Activation L1SetOption hJob LL OPTION _USEHOSTPRINTER 1 Parameters Param is a pointer to a struct of type scLIPrinter _nSize sizeof of the structure sizeof scLIPrinter _bFirst BOOL indicates whether the printer for page 1 or
23. ccccceeeceeceeeeeeeeteeeeeeeeteees 344 7 2 6 Querying the Export Results cccccecceeceeeeceeceeeeeeeeeeteeeeeeeteees 344 7 3 Programming Reference ccccceeeeeeeeeeeeeeeeeeeeeeessaaeeeeeeeeeeensnaeeees 345 7 3 1 EX 6l EXPO ne area ea aaa SME a a tc mk atta 345 32 EET MILS EXP OIE iss fd cons hea eataueeabeldi E ENE 351 TIS SOM EXD OM eea tetas eater aden ta cape aves A 359 7 3 4 FITMIX 011 a i225 it Sati E can Gane e E teeavane eaten 363 7 3 5 Picture EXPOTE pp AA det seael daa a n a a a a 363 7 3 6 PDF E O r ra ies teeta ain a a Olea 365 7 3 7 PowerPoint Exports aia e e e adaese li oe eae 369 7 3 8 RT BBX POM ite t ase seegas a cesses or Aa E a A a a aE EEN 373 7 3 9 SVG EXPOR Bis iret tle Se Pei ol Mie at tan alee Meni eh baad oh face ah 377 Fe VO TEXt GSVEXD OMG wiahen tec heinnoathetiierke Mabaleulhentteembapetuneevemuabenes 382 7341 Text Layout Exportstise tcc sct hageeitded mn a aaa aiana ana Sees 384 Pid M2 TEX DOT E hee Mic hte od etal ative de duc gate A saceedsninn atthe 387 EBiV3 VWVINGDOWS FIX EX POM iiaiai datas mea eA 388 JS lA Word EXPO a a A e alae OA AE 389 73 15 XATML CSS EXPO fies i a a a vxedaxdoncitivtes 393 FINO XML EXPO ae ae atara rna Eai i TAa indeed aea iaie i ti ian 399 EAL XPS EXPO naera a tacts a aha a a aa ha 403 7 4 Digitally Sign Export Results ccc cccceeeeeeceeceeeeeeeeeeeennaeeeeeeeeeeeenaaeeees 404 7 4 SLAMS IG MALU Aa e ee a a E aust tence ATS 405 7 4 2 P
24. mi Programmer s Manual List amp Label 21 Full powered Reporting Functionality The information in this document is subject to change without notice Companies names and data used in examples herein are fictitious unless otherwise noted The availability of functions described in this manual depends on the version the release level the installed service packs and other features of your system e g operating system word processing software email software etc as well as the general configuration No part of this document may be reproduced or transmitted in any form or by any means electronic or mechanical for any purpose without the express written permission of combit GmbH The license agreement can be found at www combit net and is displayed in the setup application JPEG coding and encoding is done with help of the JPEG Library of the IJG Independent JPEG Group Avery and all Avery brands product names and codes are trademarks of Avery Dennison Corporation PDF creation utilizes wPDF3 c wpCubed GmbH www pdfcontrol com DataMatrix and QRCode generation is done using RDataMatrix abd QRCode c J4L Components Aztec Barcode creation utilizes free code from Hand Held Inc Not all features are available in all editions Please note the hints on LL_ERR_LICENSEVIOLATION Copyright combit GmbH 1991 2015 Rev 21 001 http Awww combit net All rights reserved Contents Contents Ta
25. 252 254 255 256 423 270 278 279 LISetPrinterloDefault LLStaticTable LiStgsys Append Convert DeleteFiles DestroyMetafile DrawPage GetAPIVersion GetFilename GetFileVersion GetJobCount GetJobOptionStringEx GetJobOptionValue GetLastError GetPageCount GetPageMetafile GetPageOptionString GetPageOptionValue GetPagePrinter Print SetJob SetJobOptionStringEx SetPageOptionString SetUlLanguage StorageClose StorageConvert StorageOpen StoragePrint LLVIEW EXE LIViewerProhibitAction LIXGetParameter LIXSetParameter LoadFinished Localization Lock functions Lock menu items Lock objects Locked objects LS OPTION BOXTYPE COPIES CREATION 108 314 317 322 323 325 331 328 329 330 334 332 332 332 333 334 427 281 281 282 71 277 36 36 36 268 322 326 325 443 Index CREATIONAPP CREATIONDLL CREATIONUSER SSUEINDEX JOBNAME PAGENUMBER PHYSPAGE PRINTERCOUNT PRN_INDEX PRN_ORIENTATION PRN_PIXELS X PRN_PIXELS Y PRN_PIXELSOFFSET X PRN_PIXELSOFFSET_Y PRN_PIXELSPERINCH _X PRN_PIXELSPERINCH_Y PROJECTNAME UNITS USER LsMai LSsiVla ConfigurationDialog GetOptionString JobClose LSWvla LsMailJobOpen LsMailSendFile LsMailSetOptionString LsSetDebug M API enu enu ID enu items essages eter dialog HTML export ulti Mime HTML ultiple print ultiple tables e Itithreading ySOQL 444
26. API Reference 272 LL_OPTIONSTR_EXPORTS_ALLOWED This property can be used to restrict the output list presented to the user in the L PrintOptionsDialog Title dialog Also only the allowed export formats can be configured in the designer Pass a semicolon separated list of allowed export IDs see LL_OPTIONSTR_ EXPORTS AVAILABLE Example L1PrintStart hJob LL_PRINT_EXPORT allow only printer and preview EXPORT sets all bits L1SetOptionString hJob LL_OPTIONSTR_EXPORTS_ ALLOWED PRN PRV Default should be preview L1PrintSetOptionString hJob LL_PRNOPTSTR_EXPORT PRV printer dialog allows user to change L1PrintOptionsDialog hJob get the final medium L1PrintGetOption hJob LL _PRNOPTSTR_EXPORT sMedium sizeof sMedium ff ve te BETRh FOB ess finished L1PrintEnd hJob 0 if strcmp sMedium PRV 0 LL_OPTIONSTR_EXPORTS_ALLOWED_IN_PREVIEW This property can be used to restrict the list of possible output formats in the preview dialog Pass a semicolon separated list of allowed export IDs see LL_OPTIONSTR_ EXPORTS AVAILABLE LL_OPTIONSTR_EXPORTS_AVAILABLE This is a read only property This function returns a semicolon separated list of all output media usually PRN PRV FILE and the list of the export modules if any are loaded by LL_OPTIONSTR_LLXPATHLIST for example PRN PRV FILE HTML RTF The following IDs are predefined if the corr
27. Logical values Date and time values DateTime Drawing Generally the file name is passed Directly passing a memory handle is possible for Bitmaps and EMF files Databinding automatically checks the content of Byte fields and declares them as drawing if a suitable format is found Data type LIFieldType Barcode LiFieldType HTML 2 3 3 Events Other Important Concepts Usage Barcode Barcodes are most easily passed as instances of the LIBarcode class directly in the Add methods of the Variables and fields property HTML The content of the variable is a valid HTML stream a file name or an URL The following table shows some important events of the ListLabel component A full reference can be found in the component help for NET Event AutoDefineField AutoDefineVariable AutoDefineNewPage AutoDefineNewLine DrawObject DrawPage DrawTableLine DrawTableField VariableHelp Text Usage These events are called for each field or variable before passing it to List amp Label With the event arguments you can manipulate the name and content or completely prevent the declaration of the element Examples can be found in section Database Independent Contents This event is triggered for every new page when using databinding Here you can register additional required page specific variables for the application which are not part of the data source by using LL Variables Add Examples can be found in section
28. See Hints on the use of GDl objects Example case LL CMND_TABLELINE pSCL PSCLLTABLELINE pSC gt _1Param if pSCL gt _nPageLine 2 1 FillRect pSCL gt _hPaintDC pSCL gt _rcPaint GetStockObject LTGRAY_BRUSH pscCallback gt _lReply 0 break LL_CMND_VARHELPTEXT Task Assigns a context help string for a variable or field This string is displayed if the variable field is selected in the expression wizard 302 Callback Reference Activation Always activated Parameters Param points to a string containing the variable or fieldname Return Value _ Reply must point to the description string Caution this must remain valid after return of this function so do not use an automatic stack variable Example case LL_CMND VARHELPTEXT sVariableDescr LPCSTR pscCallback gt _1Param Check routines for variable strcpy szHelpText Variable x for task y pscCallback gt _1lReply LPARAM szHelpText break LL_INFO_METER Task Notification that a possibly lengthy operation is taking place Activation Always activated Parameters Param points to a structure of type scLIMeterInfo _nSize Size of the structure _hWnd Handle of the List amp Label main window _nTotal Total count of objects _nCurrent ndex of object currently being processed _nJob Job ID tells you what LL is doing Value Meaning LL_ METERJOB_SAVE saving the objects LL_ METERJOB_LOAD load
29. Syntax INT L1DefineFieldExt HLLJOB hJob LPCTSTR lpszName LPCTSTR lpszCont INT 1Para LPVOID lpPara Task Defines a list table field and its contents Parameter hJob List amp Label job handle IpszName Pointer to a string with the name of the field IpszCont Pointer to a string with the contents of the field Para Field type LL_TEXT LL NUMERIC if necessary combined with or see below pPara For future extensions must be NULL Return Value Error code 154 Function Reference Hints Please note the general hints in the section Variables and Fields in List amp Label List amp Label predefines the fields listed in L DefineFie d Para or ed with LL_ TABLE _FOOTERFIELD supplies field definitions only for the list footer The footer is dynamically linked to the list body and is suitable for e g dynamic calculations as the line for totals or sub totals Para ored with LL TABLE HEADERFIELD supplies field definitions only for the list header Para ored with LL TABLE _GROUPFIELD supplies field definitions only for the group IPara ored with LL TABLE GROUPFOOTERFIELD supplies field definitions only for the group footer Para ored with LL TABLE BODYFIELD supplies field definitions only for the list body If none of these flags is used the fields appear in all field selection dialogs in the table object Example HLLJOB hJob hJob LlJobOpen 0 L1lDefineFieldStart hJob LlDe
30. Task Enables the programmer to draw something before or after List amp Label into or near the object rectangle or to hide the object during printing This function allows many modifications to objects and is the so called do it all for object representations 294 Callback Reference Activation L1SetOption hJob LL_OPTION_CALLBACKMASK lt other Flags gt LL_CB_ OBJECT Parameters IParam points to an scLlObject structure _nSize Size of the structure sizeof scLlObject _nType Type of object Object Meaning LL _OBJ_TEXT Text LL_OBJ_RECT Rectangle LL_OBJ_LINE Line object LL _OBJ_BARCODE Barcode object LL_OBJ_DRAWING Drawing object LL_ OBJ TABLE Table LL_OBJ_RIF RTF object LL_OBJ_TEMPLATE Template bitmap LL OBJ ELLIPSE Ellipse Circle _IpszName Name of the object Either the name given in the Designer or a text like TABLE lt Rectangle measures gt the text which is printed in the status line of the Designer for this object if it is selected _bPreDraw TRUE for a call before List amp Label draws the object FALSE for a call after List amp Label has drawn the object _hPaintDC Device Context for the print _hRefDC Device Context for references _rcPaint Rectangle in which the object is drawn The mapping mode is in the normal drawing units mm 10 inch 100 or inch 1000 Return Value _IResult Value of bPreDraw _ Result TRUE 0 okay 1 object is not to be drawn in this case hidd
31. Typical use is in connection with L DesignerAddAction in order to automate certain application workflows See also LIDefineLayout LIDesignerAddAction LIDesignerProhibitAction Syntax INT LlDesignerProhibitAction HLLJOB hJob INT nMenuIndex Task Hiding of menu items in the Designer and their respective toolbar buttons Parameter hJob List amp Label job handle nMenu ndex Menu function index The function index can have the following values Value Meaning 0 All function exclusions are deleted the menu item list is reset default menu is restored This is automatically called by LiJobOpen and LUobOpenLC D This function needs to be used for several L DetineLayout calls with different lock entries otherwise the lock entries will be added LL SYSCOMMAND The Designer window cannot be minimized MINIMIZE iconized LL SYSCOMMAND The Designer window cannot be MAXIMIZE maximized other The menu IDs of the deleted menus can be given here The IDs of the menu items in List amp Label can be found in the file MENUID TXT included in your package Return Value Error code 169 API Reference Hints If this function is used it must be called before the function L DefineLayout This call can be made several times in turn for different function index values as the entries are added to a lock entry list which is evaluated at the call of L DefineLayout They can even be called during the LL_
32. 1 Displays a search filter bar and filters the data accordingly Default 1 JQM UseDividerLines Configures the usage of divider lines Value Meaning 0 All lines of a table are output as a normal data line 1 Header lines footer lines and group lines are output as special divider lines with an own style Default 1 JQM BreakLines Configures the wrapping behavior of texts in the result Value Meaning 0 Text won t be wrapped but marked with at the end if the width is insufficient 1 Text is automatically wrapped Default 1 JQM BaseTheme Theme of the data lines Values a b c d e See http jquerymobile com test docs lists lists themes html Default d JQM HeaderTheme Theme of the headers Line with navigation and header Values a b c d e See http querymobile com test docs lists lists themes html Default a JQM DividerTheme Theme of the divider lines see JOM UseDividerLines Values a b c q e See http jquerymobile com test docs lists lists themes html Default b 362 Programming Reference 7 3 4 MHTML Export Overview The MHTML Multi Mime HTML export module functions analogously to the XHTML export module However pictures are embedded MIME encoded into the export file Thus the result is only one file MHT This is most useful for sending invoices by mail as the recipient can open the file directly and does not need any access to further
33. 279 API Reference Due to the possibility to define layout regions in the Designer the practical benefit of this function has been quite limited We recommend to use the LL object model according to chapter Using the DOM API Professional Enter prise Edition Only to access the layout regions and the associated printers Example HLLJOB hJob hJob LlJobOpen 0 LlSetPrinterInPrinterFile hJob LL PROJECT_LABEL test lbl 1 Label Printer NULL Shee ELE neS LlJobClose hJob See also LISetPrinter oDefault LIPrintStart LIPrintWithBoxStart LIPrintCopyPrinter Configuration LIPrintSetPrinterDefaultsDir GetPrinterFromPrinterFile LISetPrinterToDefault Syntax INT LlSetPrinterToDefault HLLJOB hJob UINT nObjType LPCTSTR lpszObjName Task Deletes the printer definition file so that List amp Label uses the default printer set in the project the next time the project is used Parameter hJob List amp Label job handle nObjType LL PROJECT LABEL LL PROJECT_CARD or LL PROJECT LIST IpszObjName The file name of the project Return Value Error code Example HLLJOB hJob hJob LlJobOpen 0 L1SetPrinterToDefault hJob LL PROJECT LIST test 1lst if L1PrintStart hJob LL_PROJECT_LIST test LL_PRINT_NORMAL 0 Sieh ALCS asi L1PrintEnd hJob else MessageBox NULL Error List amp Label MB OK LlJobClose hJob 280 Function Reference See also LI
34. 335 API Reference Value Meaning LS MAILCONFIG_USER User specific data LS MAILCONFIG_GLOBAL Computer specific data LS MAILCONFIG_PROVIDE Provider selection SMAPI SMTP R All data also the computer specific data is saved user specifically the flags just define a logical separation for the dialog server settings and user information nLanguage Language for the dialog Value Meaning CMBTLANG_DEFAULT System language CMBTLANG_GERMAN German CMBTLANG_ENGLISH English Other values can be found in the declaration files Return value Error code See also LsMailGetOptionString Syntax INT LsMailGetOptionString HLSMAILJOB hJob LPCTSTR pszKey LPTSTR pszBuffer UINT nBufSize Task Queries the email settings from List amp Label Parameter hJob List amp Label email API job handle pszKey Option name For valid options see LsMai SetOptionString pszBuffer Pointer to a buffer for the value nBufSize Size of the buffer Return value Error code See also LsMailSetOptionString 336 Managing Preview Files LsMailJobClose Syntax INT LsMailJobClose HLSMAILJOB hJdob Task Close the DLL Job Parameter hJob List amp Label email API job handle Hints This function must be called after using the email functions or when terminating your application paired with LsMailJobOpen Example HLSMAILJOB hMailJob hMailJob LsMailJobOpen CMBTLANG DEFAULT LsMailJobCl
35. 56 ERR_CFGFOUND 59 ERR_SAVECFG 60 USER_ABORTED 99 BAD _DLLS 100 NO LANG DLL 101 NO_MEMORY 102 EXCEPTION 104 LL_ERR_LICENSEVIOLATION 105 LL_WRN_TABLECHANGE 996 LL_WARN_PRINTFINISHED 997 LL_WRN_REPEAT_DATA 998 A call would require a user interaction however the application is running on a web server The database structure at design time and runtime does not match The property is not supported by the object The selected project already exists or is write protected Error saving the project file The user aborted the print The DLLs required by List amp Label are not on the required level The required language DLL was not found and a CMLL21 LNG is not available Not enough free memory An unhandled Exception happened inside a List amp Label call List amp Label might be unstable Returned if the action L DefineLayout is not allowed with the current standard license or if the program passes wrong licensing information in LL_OPTIONSTR_LICENSEINFO The table name is changed in a hierarchical layout See also chapter Printing Relational Data Return value of L R7FDisplay no more data to print This is just a hint present data record did not fit onto the page This return value is required to remind the programmer that he can for example bring the number of pages up to date The record pointer may not be moved 9 2 Additional Error Codes of the Storage
36. Error code Hints It is important that all 9 file extensions are different Please call this function before L DefineLayout and before the functions LIPrint Start preferably directly after LJobOpen or Li iobOpenLCiD You can also get and set these extensions with L SetOptionString Example HLLJOBhJob int Vi hJob LlJobOpen 0 v LlSetFileExtensions hJob LL_PROJECT_LIST rpt rptp rptv Pie Rees LlJobClose hJob 253 API Reference LISetNotificationCallback Syntax FARPROC LlSetNotificationCallback HLLJOB hJob FARPROC lpfnNotify Task Definition of a procedure which will be called for notifications Parameter hJob List amp Label job handle IpfnNotify The address of a function see below Return Value Hints Address of the procedure if successful NULL otherwise The callback function has higher priority than the message if It is defined no message is sent but the callback function is called This function cannot be used if the NET component OCX or VCL controls are used The callback function has the following definition LPARAM STDCALL MyCallback UINT nFunction LPARAM lParam and must be an exported function The definition of the parameter nFunction and IParam can be found in chapter Callbacks and Notifications Example v a PARAM STDCALL MyCallback UINT nFunction LPARAM 1Param MET E a HLLJOB hJob unsigned int wMsg E 1S
37. G Code will be returned LL_DESFILEOPEN_CREATE File will always be newly created If file ALWAYS already exists then file content will be deleted LL_DESFILEOPEN_CREATE NEW File will always be newly created if not already existing If file already exists an error code will be returned LL_DESFILEOPEN_OPEN ALWAYS f file exists it will be opened otherwise new file will be created LL_DESFILEOPEN_OPEN_IMPORT mports an existent file into an already opened project Value Meaning LL_DESFILEOPENFLAG _ The currently opened project will SUPPRESS_SAVEDIALOG automatically saved without user 166 Function Reference Value Meaning interaction before loading a new project LL_DESFILEOPENFLAG_ The currently opened project will be closed SUPPRESS_SAVE automatically without being saved All changes after the last save will therefore be lost LL_DESFILEOPENFLAG_DEFAULT The currently opened project will be saved or closed as selected by the user if necessary before the new project is loaded Return Value Error code Hints The function can only be used within a designer event Typical use is in connection with L DesignerAddAction in order to automate certain application workflows See also LIDesignerFileSave LIDesignerFileSave Syntax INT L1DesignerFileSave HLLJOB hJob UINT nFlags Task Saves the currently opened project file when the Designer is open Parameter hJob List amp
38. HLLDOMOBJ hDOMObj INT nPosition LPCTSTR pszType PHLLDOMOBJ phDOMSubOb Task Creates a new subobject within the specitied DOM list Detailed application examples can be found in chapter DOM Functions 173 API Reference Parameter hDomOBj DOM handle for the list nPosition ndex 0 based of the element to be inserted All following elements are moved back one position pszType Desired element type e g Text for creating a new text object in the object list phDOMSubObj Pointer to DOM handle for return Return value Error code See also Chapter DOM Functions LIDomDeleteSubobject Syntax INT L1DomDeleteSubobject HLLDOMOBJ hDOMObj INT nPosition Task Deletes a subobject from the specified DOM list Detailed application examples can be found in chapter DOM Functions Parameter hDomOBj DOM handle for the list nPosition ndex 0 based of the element to be deleted All following elements are moved forward one position Return value Error code See also Chapter DOM Functions LIDomGetObject Syntax INT L1DomGetObject HLLDOMOBJ hDOMObj LPCTSTR pszName PHLLDOMOBJ phDOMSubOb j 174 Function Reference Task Provides a subobject of the specified DOM object and is used e g to request the object list from the project Detailed application examples can be found in chapter DOM Functions Parameter hDomObj DOM handle for the parent object pszName Name of the de
39. HLLJOB hLlJob LPCTSTR pszParameter LPCTSTR pszValue UINT nFlags Task Sets the default value of a project parameter see Project Parameter chapter Parameter hJob List amp Label job handle pszParameter Parameter name If this parameter is NULL all USER parameters will be deleted from the internal list pszValue Parameter value nFlags Parameter type See Project Parameters chapter for valid values Return Value Error code Hints This function should be called before JL DefineLayout and LIPrint WithBox Start See also LIGetDefaultProjectParameter LIPrintSetProjectParameter LIPrintGetProject Parameter LISetFileExtensions Syntax INT L1lSetFileExtensions HLLJOB hJob INT nObjType LPCTSTR lpszProjectExt LPCTSTR lpszPrintExt LPCTSTR lpszSketchExt Task Setting of user defined file extensions Parameter hJob List amp Label job handle nObjType Project type 252 Function Reference Value Meaning LL_ PROJECT LABEL for labels LL_ PROJECT_CARD for cards LL_ PROJECT LIST for lists IpszProjectExt Extension Type Default LL PROJECT LABEL Ibl LL_PROJECT_CARD crd LL_ PROJECT LIST Ist IpszPrintExt Extension for printer definitions file Type Default LL_ PROJECT LABEL Ibp LL_PROJECT_CARD crp LL PROJECT LIST Isp IpszSketchExt Extension for file dialog sketch Type Default LL_ PROJECT LABEL bv LL_ PROJECT CARD crv LL_ PROJECT LIST Isv Return Value
40. L1DefineFieldExtHandle lt print line gt L1PrintFields lt as long as warning repeat gt L1Print L1PrintFields lt next data record in DataTable gt lt until last data record in DataTable reached gt lt print footer line gt Ret L1lPrintFieldsEnd lt as long as warning page full repeat gt Ret L1PrintFieldsEnd lt result Ret gt The return value specifies whether another table follows L PrintFieldsEnd returns LL_WARN_TABLECHANGE or if the print can be finished return value 0 With this function the second part of the print the part after the initialization of the first page can be coded as follows lt repeat gt lt get current table name gt L1PrintDbGetCurrentTable lt get current sorting gt L1PrintDbGetCurrentTableSortOrder lt generate a corresponding DataTable object gt lt Ret PrintTable DataTable gt lt until Ret lt gt LL_WRN_TABLECHANGE gt lt finish printout gt L1PrintEnd If you have declared the LLStaticTable table for free contents and L PrintDbGet CurrentTable provides this table as the current table your printing loop must react to it by printing a single data line via LIPrintFields In the above example 111 Programming Using the API you could simply generate a DataTable object with just one data record for the case of LLStaticTable and printing will then automatically run correctly This code already allows an arb
41. LL DataSource CreateDataSet Products as data source LL DataMember Products Select label as project type LL AutoProjectType L1lProject Label Call Designer LL Design Print LL Print LL Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Products as data source LL DataMember Products Select label as project type LL AutoProjectType L1lProject Label Call Designer LL Design Print LL Print LL Dispose 49 Programming With NET 2 5 2 Simple List Print and design of simple lists is the default and can be started with just a few lines of code C ListLabel LL new ListLabel LL DataSource CreateDataSet Call Designer LL Design Print LL Print LL Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Call Designer LL Design Print LL Print LL Dispose 2 5 3 Invoice Merge An invoice merge is an implicit merge print The head or parent data contains one record for each document which is linked 1 n with the detail or child data To design and to print such a document the parent table has to be passed to List amp Label by the DataMember property Furthermore the AutoMasterMode property has to be set to AsVariables as shown in the following example C ListLabel LL new ListLabel LL DataSource CreateDataSet Order data as variables LL DataMember In
42. LL_ERR_USER_ABORTED from the print functions This error code must therefore be processed in any case If L PreviewDisplay is called at the end of printing this API will only return when the user closes the preview window FALSE The preview is not displayed immediately the application must explicitly call L PreviewDisplay for display Default TRUE 261 API Reference 262 LL_OPTION_INTERCHARSPACING TRUE the space between the characters for block justified text will vary FALSE only the width of spaces between words will be varied default LL_OPTION_INCLUDEFONTDESCENT TRUE the logfont member LOGFONT IfDescent is considered when calculating the line distances This leads to a wider line space but prevents extreme font descents from being cut off Default FALSE compatible mode LL_OPTION_LCID When you set this option the default values for locale dependent parameters are set accordingly inch metric unit decimal point thousands separator currency symbol and fonts see LL_ OPTION_FORCEFONTCHARSET It also defines the default locale for the Loc and Date functions Default LOCALE _ USER DEFAULT LL_OPTION_LOCKNEXTCHARREPRESENTATIONCODE Character code of the character that represents a line break lock in the Designer This value might have to be changed for code pages other than standard western code page as the default might be used for a printable character In most cases you can also use the
43. LL_PRNOPT_DEFPRINTERINSTALLED Returns a flag indicating whether the operating system has a default printer LL_PRNOPT_JOBID Use this option after L Print to determine the job number of the print job from the spooler This ID can be used with the Windows API functions to control the execution of the print job See also LIPrintSetOption LIPrintOptionsDialog LIPrintGetOptionString 223 API Reference LIPrintGetOptionString Syntax INT L1lPrintGetOptionString HLLJOB hJob INT nIndex LPTSTR pszBuffer UINT nBufSize Task Returns various print option string settings Parameter hJob List amp Label job handle niIndex See L PrintSetOptionString pszBuffer Address of buffer for the string nBufSize Maximum number of characters to be copied Return Value Error code Hints See LIPrintSetOptionString See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIPrintSetOption LIPrintGetPrinterInfo Syntax INT L1lPrintGetPrinterInfo HLLJOB hJob LPTSTR lpszPrn UINT nPrnBufSize LPTSTR lpszPort UINT nPortBufSize Task Returns information about the target printer Parameter hJob List amp Label job handle IpszPrn Address of buffer for the printer name nPrnBufSize Length of the buffer lpszPrn pszPort Address of buffer for the printer port nPortBufSize Length of the buffer IpszPort 224 Function Reference Return Value Err
44. LPTSTR pszBuffer INT nBufSize _LPUINT pnFlags Task Returns the default value of a project parameter see Project Parameters chapter Parameter hJob List amp Label job handle pszParameter Parameter name May be NULL see hints pszBuffer Address of buffer for contents May be NULL see hints nBufSize Size of the buffer in TCHARs pnFlags Pointer to an UINT defining the type of the parameter for valid values see L SetDefaultProjectParameter May be NULL if the value is not required Return Value Error code or required buffer size Hints If pszParameter is NULL a semicolon separated list of all USER parameters is returned If pszBuffer is NULL the return value equals the size of the required buffer in TCHARS including the termination 188 Function Reference See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LISetDefaultProjectParameter LIPrintSetProjectParameter LIPrintGetProject Parameter LiGetErrortext Syntax INT L1GetErrortext INT nError LPTSTR lpszBuffer UINT nBufSize Task Provides a localized error message for the passed error code Parameter nError Error code IpszBuffer Pointer to buffer in which the message is to be stored nBufSize Size of buffer Return value Error code or required buffer size Hints This function can be used to display an error message More frequent errors are e g LL_ERR_
45. Programming Reference Value Meaning 1 No file selection dialog for the target path is displayed in case Export Path is set and no Overwrite query is made Also no summary of overlapping objects that were ignored is displayed Default 0 Export ShowResult Specifies whether the export result will be displayed automatically The program that displays the result will be determined by the registered file extension Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with Export File so that normally a web browser is started Default 0 Verbosity RTF Defines the way how RTF objects should be exported Value Meaning 0 Ignore object 1 As formatted RTF text converted to HTML 2 As unformatted text Default 1 Verbosity LLXObject HTMLObj Configures how the HTML object should be exported Value Meaning 0 Ignore object 1 Object as embedded HTML Only the HTML text between the lt BODY gt and lt BODY gt tags will be exported Please note the hint on exporting limitations Default 1 JQM CDN CDN provider of the CSS and JS files Content Distribution Network Value Meaning jQuery http code jquery com Microsoft http ajax aspnetcdn com Default jQuery 361 The Export Modules JQM Title Title of the generated HTML files Default JOM ListDataFilter Specifies if a search filter bar should be displayed in the result Value Meaning 0 No display of the search filter bar
46. TIcon After adding this component to your form you can define the properties of the new object in the Properties window of the component The table provides an overview Property Name Description Icon Description The unique name of the object This description appears in the Designer It is allowed to contain spaces but should not be more than 30 characters long The icon of the object that will be shown in the toolbar and menu in the Designer It should be a 16x16 pixel icon The component has three types of events First the On nitial Creation event is triggered when the user creates a new object If desired you can have an initial dialog appear on the user s screen For example this can be a wizard that helps the user to more easily configure the new object If it is not necessary to use this in a particular case simply skip handling the event The following lines initialize the object as soon as the new object is placed on the workspace for the first time 87 Programming With the VCL Component Delphi procedure TDesExtForm GradientFillObjectInitialCreation Sender TObject ParentHandle Cardinal begin with Sender as TL121XObject do begin Properties AddProperty Color1 255 Properties AddProperty Color2 65280 end end The OnEdit event is triggered when the user double clicks the newly inserted object or selects Properties from the context menu After you are finished editing the object
47. The Word export module creates documents in Microsoft Word format The creation is executed independently from the installation of the product it is therefore natively supported A full layout preserving export is executed Tables are created on continuous pages to support editing later Limitations Please note the following limitations and hints for the Word export module e Requires NET Framework 3 5 e Compatible with Microsoft Word 2007 and higher e It is recommended that the width of all columns of a line matches the total width of the report container During the design try to always justify the borders of different cells that occur in multiple table sections header line data line etc or multiple line definitions Otherwise the result can be falsified in Microsoft Word e Table lines that contain a picture will be exported with a fixed height e A mix of different page formats is not supported To achieve an export of e g portrait and landscape format all pages of the same format can be each exported to a separate document e Due to format restrictions it might be necessary to adapt the report s layout before exporting to DOCX We suggest to thoroughly test the output before redistribution Also note the options DOCX CellScalingPercentageHeight and DOCX CellScalingPercentageWidth e Tabulators are not supported e Issue print is not supported e The fit option compress in the properties of a column is not sup
48. The component is integrated using a package If you are using a version of Delphi earlier than version 6 use the package ListLabel21PreDelphi6 dpk For Delphi versions 6 and higher use the package ListLabel21 dpk You will find both files in your List amp Label installation directory under Programmable Samples and Declarations Delphi For more information on installing the packages in your IDE refer to the online help documentation for your development environment After installing the package several icons are automatically created in the component area of the toolbar Now you can begin customizing List amp Label to suit your needs by configuring the available properties and implementing the required programming logic There are three different ways to do this e Data binding e The simple print and design methods e A separate iterative print loop The first two options are described below The iterative approach is for the most part the same as the direct use of the DLL and is thus covered by the general description of the List amp Label API 4 2 Data Binding An extra control exists for data binding using the List amp Label VCL component This control inherits all of the properties from the normal component and adds options for direct data binding Using the DataSource property you can now specify a data source of the type TDataSource 4 2 1 Binding List amp Label to a Data Source The data binding is perfor
49. The field content is interpreted as numerical value Use of this function usually conflicts with a user who can edit a layout as the sum variable will not have the value he expects Example HLLJOB hJob hJob LlJobOpen 0 eran OC Taea LlDefineSumVariable hJob Sum01 14 159 API Reference Se es OES eee LlJobClose hJob See also LIGetSumVariableContents LIDefineVariable Syntax INT L1lDefineVariable HLLJOB hJob LPCTSTR lpszName LPCTSTR lpszCont Task Defines a variable of the type LL_7EX7 and its contents Parameter hJob List amp Label job handle IpszName Pointer to a string with the name of the variable IpszCont Pointer to a string with the contents of the variable Return Value Error code Hints Please note the general hints in the section Variables and Fields in List amp Label This function defines a text variable and can be mixed with the other L DefineVariable functions L iDefineVariable is identical to L DefineVariableExt LL_TEXT NULL List amp Label predefines the following variables Field Meaning LL CountDataThisPage Numerical footer field defined data records per page LL CountData Numerical footer field defined data records total LL CountPrintedDataThisPage Numerical footer field printed data records per page LL CountPrintedData Numerical footer field printed data records total LL SortStrategy String sort e
50. The provider can also parse empty enumerations as long as they are strongly typed Otherwise at least one element is required in the enumeration and this first element determines the type that is used for further parsing The provider automatically supports sorting as soon as the data source implements the BindingList interface You may also use this data provider to access LINO query results as they are lEnumerable lt T gt When using EntityCollection lt T gt objects as data source the ObjectDataProvider first checks the state of the sub relation by the IsLoaded property and dynamically calls Load if necessary The data is provided when needed with it Example 27 Programming With NET C class Car public string Brand get set public string Model get set List lt Car gt cars new List lt Car gt cars Add new Car Brand VW Model Passat cars Add new Car Brand Porsche Model Cayenne ListLabel LL new ListLabel LL DataSource new ObjectDataProvider cars LL Design LL Dispose VB NET Public Class Car Dim _brand As String Dim _model As String Public Property Brand As String Get Return _brand End Get Set ByVal value As String _brand value End Set End Property Public Property Model As String Get Return _model End Get Set ByVal value As String _model value End Set End Property End Class Dim LL As New ListLabel Dim Cars As New List Of Car
51. amp Label and not from any third party picture editors anymore Default FALSE JPEG files will be embedded as bitmap records into the preview meta files which will result in significantly larger file sizes 269 API Reference LL_OPTION_VARSCASESENSITIVE TRUE Variable and field names are case sensitive FALSE Variable and field names are not case sensitive Name defines the same variable as NAME This option results in a slightly lower speed Default LL_OPTION_XLATVARNAMES TRUE Special characters in variable and field names will be converted to Default FALSE Variable and field names will not be modified This has a speed advantage but you must make sure that the field and variable names do not contain these characters Should be switched to FALSE when using MBCS Example HLLJOB hJob L1SetDebug TRUE hJob LlJobOpen 0 v L1SetOption hJob LL_OPTION_NEWEXPRESSIONS TRUE IL swiss LlJobClose hJob See also LIGetOption LIGetOptionString LISetOptionString LISetOptionString Syntax INT LlSetOptionString HLLJOB hJob INT nMode LPCTSTR pszValue Task Sets string options in List amp Label Parameter hJob List amp Label job handle nMode Mode index see below pszValue New value Return Value Error code 270 Hints Function Reference Most of the options need to be set before L DefineLayout and before the functions L Print Start preferably dire
52. cannot be correctly written if you e g add further columns to a table The content of this section is left unchanged when saving The same applies for the case where a new table which has not previously been used is inserted in a report container Therefore LL_PRJOPEN_ EM_IGNORE_FORMULAERRORS must not be set for such cases If the flag is not set LL NTFY_EXPRERROR can be used to collect the error messages for display Example See chapter DOM Functions See also LIProjectSave LIProjectClose LIDomGetProject LIProjectSave Syntax HLLDOMOBJ L1ProjectSave HLLJOB hJob LPCTSTR pszObjName Task This function is only available starting with the Professional Edition Saves an open project Detailed application examples can be found in chapter DOM Functions Parameter hJob List amp Label job handle pszObjName Project file name with path May be NULL see notes Return value Error code 242 Function Reference Hints If pszObjName is NULL the file is saved under the same name as when it was opened Example See chapter DOM Functions See also LIProjectOpen LIProjectClose LIRTFCopyToClipboard Syntax INT LIRTFCopyToClipboard HLLJOB hJob HLLRTFOBJ hRTF Task Copies the contents of the RIF object to the clipboard Several clipboard formats are available CF_TEXT CF_TEXTW and CF_RTF Parameter hJob List amp Label job handle ARTF RTF object handle Return Value Error code
53. card projects L PrintFields in this mode does not have any influence on the charts the analogous command in the enhanced mode is L PrintDeclareChartRow This API call passes the data currently defined to the chart objects Which chart objects are addressed can be determined by the parameter Value Meaning LL DECLARECHARTROW The data is passed to all chart objects not FOR_OBJECTS contained in table columns LL_ DECLARECHARTROW The data is passed to all chart objects in FOR_TABLECOLUMNS table columns For charts within a label project the following pseudo code would apply lt print start gt L1PrintStart L1PrintWithBoxStart 132 Using the DOM API Professional Enterprise Edition Only lt while no error and not finished gt lt define variables gt lt while no error or not finished ex i 1 12 gt lt define chart fields ex Month MonthName i gt lt send data to chart controls gt L1PrintDeclareChartRow LL_DECLARECHARTROW_FOR_OBJECTS lt print objects gt L1Print lt no warning no abortion next record gt lt done gt L1PrintEnd Of course all chart fields used must also be declared before calling the Designer in order to enable your users to use them at all 5 8 Using the DOM API Professional Enterprise Edition Only This chapter is only required if you re not working with one of the components NET VCL where a type safe object model for accessing the D
54. cmll21 lib In order to use the API for managing preview files see chapter Managing Preview Files you need to include the declaration file for cmsl21 dll C cmbtls21 h and if neccessary link to the corresponding LIB file C cmsl21 lib Dynamic loading of the DLLs is also possible you will find a description in the online knowledge base under http support combit net Important Remarks on the Function Parameters of DLLs Returning strings from the DLL to the application is always performed by returning a pointer to a memory area and as a further parameter an integer value for the length The buffer size in characters must be passed so that buffer overflows are impossible The string is always 0 terminated If for example the buffer is too short the returned string will be shortened and may result in incomplete return values This is indicated by the API function s return value LL ERR_BUFFERTOOSMALL will be returned in these cases The parameters are checked for correctness as far as possible While developing a program it is therefore worth switching on the debug mode see L SetDebug and checking the return values You can switch off the parameter check later using LL_OPTION_NOPARAMETERCHECK Please note that with Delphi the routines require O terminated strings just like the Windows API functions It may be necessary to use the Pascal string to C string conversion routines With Visual Basic it may i
55. hJob List amp Label job handle IpszName Pointer to a string with the name of the sum variable 197 API Reference pszBuffer Address of buffer for contents nBufSize Maximum number of characters to be copied Return Value Error code LL_ERR_UNKNOWN_FIELD or 0 Hints This function can be used in callback routines to ask for the contents of user variables The variable type can be requested with JL GetVariableType or L GetFieldType See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIGetSumVariableContents LIGetVariableContents LIGetVariableContents Syntax INT L1GetVariableContents HLLJOB hJob LPCTSTR lpszName LPTSTR lpszBuffer UINT nBufSize Task Returns the contents of the corresponding variable Parameter hJob Job handle IpszName Pointer to a string with the name of the variable pszBuffer Address of buffer for contents nBufSize Maximum number of characters to be copied Return Value Error code LL_ ERR_UNKNOWN or 0 Hints This function can be used in callback routines to ask for the contents of variables See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value 198 Function Reference See also LIDefineVariableStart LIDefineVariableExt LIDefineVariableExtHandle LIGet VariableType LIGetVariableType Syntax INT L1GetVariableType HLLJOB hJob LPCTST
56. representing the highest quality least compression Takes effect only when the source graphic is not the JPEG format as encoding of JPEG to JPEG would result in a quality loss Default 75 Picture BitsPerPixel Defines the color depth of the generated picture Please note that the picture files will quickly get very large with higher color depths Value Meaning 1 Black amp White 24 24bit True Color Default 24 Verbosity Rectangle Configures how rectangle objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG and also as a complete rectangle for objects with colored background Default 1 Verbosity Barcode Configures how barcode objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Verbosity Drawing Configures how picture objects should be exported Value Meaning 353 The Export Modules 0 Ignore object 1 Object as JPEG Default 1 Verbosity Ellipse Configures how ellipse objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Verbosity Line Configures how line objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Verbosity Text Configures how text objects should be exported Value Meaning 0 Ignore object 1 Object as text object 2 Object as JPEG Default 1 Verbosity Text Frames Configures how text object frames should be exported Value Meaning 0 Single frames fo
57. you are prompted by List amp Label to show the object The OnDraw event is triggered for this purpose The event arguments are responsible for generating the 7Canvas as well as a 7Rect for the object Using the usual methods you can now draw in the workspace Here of course it is also possible or useful to access the stored object properties 88 Programming Interface 5 Programming Using the API Besides reading this chapter we recommend to have a look at the source code samples that are provided with List amp Label for various programming languages to get started quickly You will find them in the Examples and Declarations folder in the List amp Label start menu Declaration files for many programming languages are additionally available in order to ease the integration of List amp Label even if there are no samples available In this case a look at the samples for other programming labguages might help to set up the neccessary code The source code snippets in this chapter are using C C as programming languages but the syntax should be easily adaptable to other languages too 5 1 Programming Interface 5 1 1 Dynamic Link Libraries Basics A DLL Dynamic Link Library is a collection of routines in a file which is loaded on demand by the Windows kernel The DLL principle allows the routines procedures contained within it to be bound linked to the executable at the time the application is run Furthermore sever
58. 0 0 CMLL210 0cx and the line Module CMLL20 CMLL20 BAS with the line Module CMLL21 CMLL21 BAS After saving your changes load the form frm in a text editor which contains the List amp Label OCX Replace the line Object 2213E183 16BC 101D AFD4 040224009C14 20 0 0 CMLL200 0CX with the following Object 2213E183 16BC 101D AFD4 040224009C15 21 0 0 CMLL210 0CX If you wish to convert older List amp Label versions change the corresponding entries analogously If you use the UNICODE OCX control you need to adapt the control GUID The new GUID is 2213E280 16BC 101D AFD4 040224009DF4 You can now load your projects in Visual Basic The source code must be significantly adapted according to the original version From VB 5 the BAS declaration file is not necessary because the List amp Label constants are contained in the OCX control Please note that it s not possible to host differently versioned OCXes e g OCX version 20 and 21 within the same application 12 2 4 Updating Projects Using the VCL e g Delphi See the hints in the Delphi online help 433 Update Information for Version 21 12 2 5 Updating Projects Using the API e g C C Generally the only thing to do is to replace the reference to the import library e g cmll20 lib and declaration file e g cmbtlI20 h with a reference to the files corresponding to the current version 434 Updating to List amp Label 21 13 Help a
59. 1 4 2 Integration With NET Please refer to the section Programming With NET for further information Afterwards we recommend further reading starting from section The Export Modules if applicable 1 4 3 Integration With Visual Basic For integration of List amp Label with Visual Basic we recommend using the OCX Activex component Please refer to the OCX online help If you wish to use direct DLL access via API and no OCX component add the file cmll21 bas where you will find the necessary declarations Please refer to the section Programming Using the API for further information in this case 1 4 4 Integration With Delphi Please refer to the online help for the VCL component s use 1 4 5 Integration With C Builder Please refer to the online help for the VCL component s use 1 4 6 Integration With C C Integration of List amp Label with C C is typically done by directly using the API Please refer to the section Programming Using the API for further information Getting Started With Programming 1 4 7 Integration With Java Integrating List amp Label into a Java application is done by adding the combit package which is located in each of the provided programming samples for Java Programming is done by calling the API directly See chapter Programming Using the API for further information Please also note that the provided Java Native Interface JNI Wrapper DLL has to be located in the List amp L
60. 11 False True L1StgsysAppend hStgOrg hStgAppend L1StgsysStorageClose hStgOrg L1StgsysStorageClose hStgAppend end 4 8 3 Debugging The debugging of the VCL component allows you to either directly activate the component by setting the property DebugMode to 1 or alternatively in the source code For example LL DebugMode LL_DEBUG_CMBTLL For more information about the Debwin debugging tool please refer to the chapter Debug Tool Debwin 4 9 Extending the Designer List amp Label offers a variety of options for extending the Designer These include among other things the various events of the component such as a menu operation and the various features that are available Yet there are numerous other possibilities 84 Extending the Designer 4 9 1 Using the Formula Wizard to Add Your Own Functions The formula wizard and its features are among the most important and powerful capabilities of Designer Using a special List amp Label component for the VCL you can also integrate fully customized functions into Designer To add a new function insert this component on a form in the development environment You can now set the necessary parameters in the Properties window of this component Object Inspector RomanNumber Properties Events Action Visible Linkage ParentComponent LL Miscellaneous Description Returns the roman equivalent FunctionName RomanNumber GroupName Sample Functions MaximumPa
61. 12 2 3 Updating Projects Using the OCX e g Visual Basic 433 12 2 4 Updating Projects Using the VCL e g Delphi 433 12 2 5 Updating Projects Using the API e g C C ccccceee 434 Help and Suppomtin c nhc tea ee ee 435 ASX actetesatet est A S a E sathoen stn oueantiN 436 Before Installation 1 Introduction Congratulations on your purchase of List amp Label List amp Label is a high performance tool for printing reports lists labels and barcodes With this tool you will have no problems enabling your programs to print professionally and with an attractive design 1 1 Before Installation 1 1 1 System Requirements List amp Label operates under Windows XP Windows Vista Windows 7 Windows 8 1 and Windows 10 as well as under the corresponding Windows Server operating systems You also need a Windows standard printer driver with a resolution of at least 300 dpi even if you are not printing Some of the described functions or the way these are accessed depend on version release patch level etc of your system operating system and its configuration Some functions may not be able to be used in all operating systems You will find such limitations documented in the corresponding chapters If you want to use the Word DOCX export the NET Framework 3 5 is required on the developer as well as the end user machine 1 1 2 Licensing List amp Label is being offered in various editions which
62. 143 API Reference Task Creates a sketch that can later be displayed in the file selection dialogs The color depth can be set using LL_ OPTION_SKETCHCOLORDEPTH Parameter hJob List amp Label job handle nObjType Project type Value Meaning LL_ PROJECT LABEL for labels LL_ PROJECT CARD for cards LL_ PROJECT LIST for lists IpszObjName Pointer to project s file name with path Return Value Error code Hints This API function can be used to create the sketches on the fly automatically so that you do not need to include the sketch files in your setup See also LISelectFileDlgTitleEx LIDbAddTable Syntax INT L1DbAddTable HLLJOB hJob LPCTSTR pszTablelID LPCTSTR pszDisplayName Task Adds a table or schema for designing and printing This table is available in the Designer and List amp Label can request it at print time Parameter hJob List amp Label job handle pszTablelD Unique name of the table It is returned by the L PrintDbGetCurrentTable function at print time If you pass an empty string or NULL the table buffer will be deleted pszDisplayName Name of the table as displayed in the Designer If no name is given the display name and the unique name are identical 144 Function Reference Return Value Error code Hints If a table name contains a a schema will be used See the hints in chapter Printing Relational Data Example HLLJOBhJob hJob LlJobOpen 0
63. 2 HTTP PUT Default 1 UploadRequiresAuthentication in out BOOL This property defines if the input of user name and password should be done when uploading The data will only be queried for this session Usually that makes only sense with HTTP PUT Default FALSE 3 10 4 Methods Save Saves the current project file 3 10 5 CAB Files Packaging A separate CAB file for each license type can be found online under http www combit net de products II21ddemo ent cmll21id cab and http www combit net de products II121ddemo stdpro cmll21id cab 3 10 6 Inserting the OCX Into Your Internet Page As aforementioned the control can be placed on an internet page The properties can be managed by the lt PARAM gt tags however you can also access the control with script languages 76 The Designer OCX Control lt object id InplaceDesigner classid CLSID 438BF0A4 E7B0 4119 ABAC 933505CC675C codebase http www combit net de products 11 121ddemo stdpro cm1121id cab 5 lt param name UploadType value 2 gt lt object gt 77 Programming With the VCL Component 4 Programming With the VCL Component In parallel with the OCX component and NET assembly List amp Label includes the VCL component s for integration into the IDE from Embarcadero The following section exclusively discusses working with this component If you do not work with the VCL component you can skip this section 4 1 Integration of the Component
64. ALREADY PRINTING 6 NOT YET PRINTING 7 NO_PROJECT 10 NO_PRINTER 11 PRINTING 12 Meaning A function is called with a job handle not generated with LU obOpen or the job was closed Only one Designer window can be open for each application you have tried to open a second window only if hWnd in L DefineLayout is NULL An invalid type was passed to a function which requires the type of object as a parameter Valid types LL PROJECT LABEL LL_PROJECT_ LIST LL PROJECT CARD A print function was called although no print job had been started LIPrintSetBoxText was called and the print job was not opened with L PrintWithBoxStart The current operation cannot be performed while a print job is open LIPrint G SJetOption String L PrintResetProject State The print job has not started yet LIPrint WithBox Start There is no object with the given object name Identical to LL_ ERR_NO_ OBJECT LIPrint WithBox Start Printer job could not be started as no printer device could be opened List amp Label requires a printer driver to be installed An error occurred during print Most frequent cause print spooler is full Other reasons no sufficient disk space paper Jam general printer failure 421 Error Codes EXPORTING 13 NEEDS _VB 14 BAD_PRINTER 15 NO_PREVIEWMODE 16 NO_PREVIEWFILES 17 PARAMETER 18 BAD_EXPRESSION 19 BAD_EXPRMODE 20 CFGNOTFOUND 22
65. API The return codes of the StgAPI functions are provided below They also start with LL_ERR_ The values in brackets are the decimal numbers that are written in the debug output Value STG_NOSTORAGE 7000 STG_BADVERSION 1007 STG_READ 1002 STG_WAITE 1003 424 Meaning The file is not a List amp Label preview file The version number of the preview file is incompatible Error reading preview file Error writing preview file STG_UNKNOWNSYSTEM 1004 STG_BADHANDLE 1005 STG_ENDOFLIST 1006 STG_BADJOB 1007 STG_ACCESSDENIED 1008 STG_BADSTORAGE 1009 STG_CANNOTGETMETAFILE 1070 STG_OUTOFMEMORY 1011 STG_SEND_FAILED 1012 STG_DOWNLOAD_PENDING 1073 STG_DOWNLOAD_FAILED 1074 STG_WARITE_FAILED 1015 STG_UNEXPECTED 1016 STG_CANNOTCREATEFILE 1017 STG_INET_ERROR 1079 WRN_STG_UNFAXED_PAGES 1100 Additional Error Codes of the Storage API Unknown preview file format for the storage system Bad parameter invalid metafile handle LiStgsysGetFilename page not found LiStgsysxxx job not found Storage has been opened with ReadOnly flag and cannot permit write access Internal error in preview file or empty file LiStgsysDrawPage metafile could not be created possibly defective preview file Not enough memory for current operation Error whild sending mail Further information can be found in the debug logfile An action could not be compled because the fil
66. Code 160 NO BREAK SPACE LL_OPTION_MAXRTFVERSION Windows or Microsoft applications are supplied with different RTF controls version numbers currently 1 2 3 4 and 4 1 that support different features and show a different behaviour Using this option you can set the maximum version number of the RTF control to use in the first step For example setting the option to 0x100 causes List amp Label to load RTF control version 1 if it exists Setting the option to 0x401 causes List amp Label to try loading RTF control version 4 1 If no control with a version smaller or equal the selected version can be loaded a control with a higher version will be used instead to avoid a loss of data To not load any RTF control you should set this option to 0 Advantage is a faster start up and using less resources This option must be called with job handle 1 before the fist List amp Label job has been opened Function Reference LL_OPTION_METRIC TRUE List amp Label Designer is set to metric system FALSE List amp Label Designer is set to inches Default value depends on the system s setting See LL_OPTION_UNITS LL_OPTION_NOAUTOPROPERTYCORRECTION FALSE Setting interdependent properties mutually influences each other Default TRUE Interdependent properties can be set independently This option is sometimes required when working with the DOM object model to prevent automatic property switching If e g the font of a paragrap
67. Designer from the perspective of this sample application is now available to you LL List amp Label Sample Application ka ace Fie Design Print Web Options Welcome to the List amp Label Sample Application You ll find different templates showcasing the features of List amp Label Just click on the links below to quickly navigate to the topic of interest B B Ye D amp E Extended Labels Reports Barcodes Samples Invoice Mail Merge Form gt Design gt Design gt Design gt Design gt Design gt Design gt Design gt Print gt Print gt Print gt Print gt Print gt Print gt Print ersion 21 0 0 0 combit GmbH In addition the List amp Label sample application allows you to print existing or newly created projects using sample data records or to use one of the export formats for output Select one of the Items in the Print menu In the subsequent print options dialog you can choose the output destination or export format 1 2 3 Programming Samples In order to ensure quick familiarization with the List amp Label concept a wide variety of programming examples are supplied with the installation You will find these in the start menu group under Examples and Declarations 10 Important Concepts You will find many different programming examples in the directories depending on the installed development environment Further information on the individual examples as well as ex
68. Export File Default 0 Export ShowResultAvailable Enables you to hide the respective checkbox in the dialog Value Meaning 0 Checkbox will be hidden 1 Checkbox will be available Default 1 Hyperlinks Hyperlinks can be embedded in text table and RTF objects directly in the Designer using the Hyperlink function Dynamic hyperlinks and formulas can be realized in this way Another way of creating hyperlinks is via the object name The names of text and picture objects are parsed for the string LINK lt url gt Whenever this string is found a hyperlink is generated Thus if you name your picture object combit LINK http Awww combit net this would create a picture hyperlink during export to SVG 7 3 10 Text CSV Export Overview The CSV Export exports data from table objects to a text format The separator and framing character can be optionally set The result is one single text file containing the data from all table objects Please note that the layout is not preserved in any way this is purely a data conversion export Limitations e Issue print is not supported e Nested tables are not supported 382 Programming Reference Programming Interface You can find a description of all options used in the TXT export module in this chapter The options can be modified using the methods L XSetParameter TXT and read by calling L XGetParameter 7XT Export Path Path where the exported files sh
69. LIDbAddTable hJob NULL LIDbAddTable hJob Orders NULL LIDbAddTable hJob OrderDetails NULL LIDbAddTable hJob HumanResources Employee NULL schema info Ke dene CEC nice LlJobClose hJob See also LIDbAddTableSortOrder LIDbAddTableRelation LIPrintDbGetCurrentTable LIPrintDbGetCurrentTableSortOrder LIPrintDbGetCurrentTableRelation LIDbAddTableEx Syntax INT LlDbAddTableEx HLLJOB hJob LPCTSTR pszTableID LPCTSTR pszDisplayName UINT nOptions Task Adds a table or schema for designing and printing and supports additional options This table is available in the Designer and List amp Label can request it at print time Parameter hJob List amp Label job hand oO pszTablelD Unique name of the table It is returned by the L PrintDbGetCurrentlable function at print time If you pass an empty string or NULL the table buffer will be deleted pszDisplayName Name of the table as displayed in the Designer If no name is given the display name and the unique name are identical nOptions a combination of one of the following flags Value Meaning 145 API Reference LL ADDTABLEOPT Support stacked sort orders in the SUPPORTSSTACKEDSORTO designer If the user chooses multiple RDERS stacked sortings these are returned tab separated in L PrintDbGetCurrentlableSortOrder LL ADDTABLEOPT Support the translation of filter expressions SUPPORTSADVANCEDFILT to native syntax See
70. LIPrintStart LIPrintWithBoxStart LIPrintGetOption LIPrintOptionsDialog LIPrintSetOptionString Syntax INT L1lPrintSetOptionString HLLJOB hJob INT nIndex LPCTSTR pszValue Task Sets various print options for List amp Label Parameter hJob List amp Label job handle nindex See below pszValue The new value Return Value Error code Hints Values for nlndex LL_PRNOPTSTR_EXPORT Sets the default export destination for example RTF HTML PDF etc to be used or shown in the print dialog LL_PRNOPTSTR_ISSUERANGES A string containing default settings for the issue range for example 1 3 4 10 LL_PRNOPTSTR_ PAGERANGES A string containing default settings for the range s like shown in the printer options dialog for example 1 3 4 10 Further variations are possible e g 1 3 for uneven pages or 2 4 for every second page When using the pattern will be automatically continued accordingly LL_PRNOPTSTR_PRINTDST_FILENAME The default file name that the print should be saved to if print to file has been chosen LL_PRNOPTSTR_PRINTJOBNAME You can set the job name to be used for the print spooler with this option 234 Function Reference You need to set it before the print job starts that is before the first call to L Print Example HLLJOBhJob hJob LlJobOpen 0 L1PrintStart L1PrintSetOptionString hJob LL_PRNOPTSTR_PRINTDST_ FILENAME co
71. LLEXPR2HOSTEXPR_ARG_BINARY_ OPERATOR _DIVIDE LLEXPR2HOSTEXPR_ARG_BINARY_ OPERATOR_MODULO LLEXPR2HOSTEXPR_ARG_ LOGICAL OPERATOR_XOR LLEXPR2HOSTEXPR_ARG_ LOGICAL OSTEXPR_ARG_ LOGICAL LLEXPR2 LLEXPR2 N_EQUAL LLEXPR2ZHOSTEXPR_ARG_RELATIO N_NOTEQUAL LLEXPR2HOSTEXPR_ARG_RELATIO N_LARGERTHAN LLEXPR2HOSTEXPR_ARG_RELATIO N_LARGEREQUAL LLEXPR2HOSTEXPR_ARG_RELATIO N_SMALLERTHAN LLEXPR2HOSTEXPR_ARG_RELATIO N_SMALLEREQUAL LLEXPR2HOSTEXPR_ARG_FUNCTIO OSTEXPR_ARG_RELATIO LLEXPR2HOSTEXPR_ARG_FIELD he sign operator he negation operator he operator he operator he operator he operator he operator he logical xor operator he logical or operator he logical and operator he operator he lt gt operator he gt operator he gt operator he lt operator he lt operator a designer function _pvName contains the function name _pv1 _pv4 contain the function s arguments a database field Depending on the target syntax it might be necessary to escape or frame an identifier name Managing Preview Files _pvRes a VARIANT to receive the resulting expression Set the pointer to NULL or the VARIANT type to VT_EMPTY if no suitable translation is available The whole or in case of an AND operator the current branch of the expression is not translated _nAr
72. Label Regions The regions purpose is to split the project into multiple page regions with different properties Typical fields of use are e g different printers for first page following pages and last page Further applications are mixing Portrait and landscape format within the same report You can see a demonstration e g in the List amp Label Sample Application in the start menu s root level under Design gt Extended Samples gt Mixed portrait and landscape Issues and Copies Both issues and copies purpose is to output multiple copies of the reports Copies are real hardware copies meaning that the printer is assigned to create multiple copies of the output Of course all copies are identical and will be created with the same printer settings If the output is to have different properties e g Original from tray 1 copy from tray 2 or a Copy watermark is to be output issues are the way to go The property Number of Issues in the Designer has to be set to a value greater than one Then the function Issuelndex is available for all regions so that a region with the condition lssuelndex 1 Original and another with he condition Issuelndex 2 Copy can be created The objects in the Designer get a new property Display Condition for Issue Print with which the printing of a watermark can be realized in a similar way You can see a demonstration e g in the List amp Label Sample Applica
73. Label Job Handle nFlags For future extension must be 0 LL_DESFILESAVE_DEFAULT Return Value Error code Hints The function can only be used within a designer event Typical use is in connection with L DesignerAddAction in order to automate certain application workflows See also LIDesignerFileOpen 167 API Reference LIDesignerGetOptionString Syntax INT L1lDesignerGetOptionString HLLJOB hJob INT nMode LPTSTR pszBuffer UINT nBufSize Task Queries various settings when the Designer is open Parameter hJob List amp Label Job Handle nMode Option index see L DesignerSetOptionString pszBuffer Buffer for return value may be NULL nBufSize Size of buffer Return value Error code or buffer size needed if pszBuffer is NULL Hints Valid values for the mode parameter can be found at the description of L DesignerSetOptionString See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIDesignerSetOptionString LIDesignerInvokeAction Syntax INT L1lDesignerInvokeAction HLLJOB hJob INT nMenuIndex Task Activates the action menu item if the Designer is open Parameter hJob List amp Label Job Handle nMenulndex ndex of function Available functions can be found in file MENUID TXT Return Value Error code 168 Function Reference Hints If the function is to be utilized it must be used within a designer event
74. MAPI MSMAPI The provider is selected by either setting it explicitly using this option or letting the user choose in the LsMai ConfigurationDialog List amp Label first of all tries to retrieve the application specific mail settings from the registry These can be set using LsMailConfigurationDialog f your application wants to support sending report results by email then you should provide the end user a menu item or similiar in which s handler you call LsMai ConfigurationDialog to enable the end user to specify the mail settings Export Mail To Recipient for the email Export Mail CC CC Recipient for the email Export Mail BCC BCC Recipient for the email Export Mail From Sender of the email Export Mail ReplyTo Target for reply email if different to From SMTP only Export Mail Subject Mail subject Export Mail Body Mail body text 408 Send Export Results via E Mail Export Mail Body text plain Mail body text in plain text format Identical to Export Mail Body Export Mail Body text html Mail body text in HTML format Export Mail Body application RTF Mail body text in RTF format only for XMAPI Export Mail AttachmentList Additional attachments besides the export results as tab separated list t ASCII code 9 Export Mail ShowDialog Selection for sending the mail without any further user interaction Value Meaning 0 The mail is sent directly without any further user inte
75. Merging Multiple Preview Files 0 ccccceeeceeceeeeeteeeteeeeeeeeeetees 67 3 7 3 PEDUG GING ea eben cer aor E E E E NT 68 3 8 Extending the DeSIQner cccccccceeeeeeeeeneeeeeeeeeeeeeeaeeeeeeeeeeeesnaeeeeeeeeeess 68 3 8 1 Using the Formula Wizard to Add Your Own Functions 68 3 8 2 Adding Your Own Objects to the Designet ccceeeeeeeees 70 3 9 The Viewer OCX Control sssssssssssssseeesssseseseseseesessseesesseesseeseeeeess 70 Contents 3 9 1 OVEIVIGW Ashtanga IN a thc A Oa tad a accel 70 3 9 2 REGISH ATION ie cu at n e ia aiead des telecine i ace 71 3 9 3 ELON EAE sence Atctt ata sac taanenc E caauaticreiceals lola ee tenecilse date tteaese aaa 71 3 9 4 GUN OAS satiana a insta a ohne aR eit n 72 3 9 5 EVENTS metian naa n O EA nes A 73 3 9 0 Visual CFA HNES a a E A A R a 74 3 9 7 CAB Files Packaging ssesssesssessseeerrressrerrrrssssetrttrnssssterernrnnsreeerra 75 3 9 8 nserting the OCX Into Your Internet Page 75 3 10 The Designer OCX Control e ee cceeeceeeeeeeeecenceeeeeeeeeeeeeaaeeeeeeeeeeenaaeeees 75 Bel Qal OVERVNIGW 12 05 E A E odode A E toga ceca tetas 75 3 10 2 SREGISHALION s2 c0eeips dsuang er ened ead en aoe genehangadecuasedeaai tea nedcnacedeiabe gate sens 75 S10 3 PROPS iets untied ote os wince aetna ta aaah ah eh 75 3 10 4 CUNOAS tenses Seti a eas iecinratietineens a ed ote 76 3 10 5 CAB Files PackaginG a 0 cic coer a e ack pede Reed
76. Parameter1 As Variant ByVal Parameter2 As Variant ByVal Parameter3 As Variant ByVal Parameter4 As Variant ResultValue CDb1 Parameter1 CDb1 Parameter2 ResultType ParamType Double End Sub Two additional events also give you the option to further modify the function DesFunc_Add_ CheckFunctionSyntax lets you perform a syntax check Here you can check the data types of the parameters and for example make sure the parameters fall within a certain range DesFunc_Add_ParameterAutoComplete allows you to define several suggested values for the AutoComplete feature of the formula wizard 69 Programming With the OCX Component 3 8 2 Adding Your Own Objects to the Designer Similar to the way you add functions to the Designer you can also define your own object types and register them in List amp Label The user can access the new objects in the usual way on the left toolbar and menu Here there is also a special component for adding objects To use this you must include the file cmll210x ocx in your IDE After adding this component to your form you can define the properties of the new object in the Properties window of the component The table provides an overview Property Description Name The unique name of the object Description This description appears in the Designer It is allowed to contain spaces but should not be more than 30 characters long Icon The icon of the object that will be shown in the toolbar and me
77. Professional Enter prise Edition Only to access the layout regions and the associated printers See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LISetPrinterlnPrinterFile LIGetProjectParameter Syntax INT L1GetProjectParameter HLLJOB hJob LPCTSTR lpszProjectName LPCTSTR lpszParameter LPTSTR lpszBuffer UINT nBufSize Task Returns the value of the project parameter for the given project file If the project parameter contains a formula it is returned as is without being evaluated Parameter hJob List amp Label Job Handle IpszProjectName Pointer to a string with the project name pszParameter Pointer to a string with the parameter name pszBuffer Address of buffer for contents nBufSize Maximum number of characters to be copied Return Value Error code 194 Function Reference Example HLLJOB hJob TCHAR Buffer 1024 hJob LlJobOpen 0 L1lSetDefaultProjectParameter hJob QueryString SELECT FROM PRODUCTS LL_PARAMETERFLAG SAVEDEFAULT call up designer then before print starts L1GetProjectParameter hJob c repository report 1lst QueryString Buffer 1024 Se ELS ese LlJobClose hJob Hints This API is especially useful if the project parameter is queried before printing to offer report parametrization to the user See chapter Important Remarks on the Function Parameters of DLLs concerning
78. Programming With the OCX Component LL LIStgsysStorageClose hStgOrg LL LIStgsysStorageClose hStgAppend 3 7 3 Debugging You can enable debugging for the OCX component by setting the DebugMode property in the source code to 1 e g LL L1SetDebug 1 For more information about the Debwin debugging tool please refer to the chapter Debug Tool Debwin 3 8 Extending the Designer List amp Label offers a variety of options for extending the Designer These include among other things the various events of the component such as a menu operation and the various features that are available Yet there are numerous other possibilities 3 8 1 Using the Formula Wizard to Add Your Own Functions The formula wizard and its features are among the most important and powerful capabilities of the Designer Using a special List amp Label component for the OCX you can also integrate fully customized functions into the Designer To use the control you must include the file cmll21fx ocx in your IDE To add a new function insert this component on a form at the time of design You can now set the necessary parameters in the Properties window of this component Property Description Name The unique name of the designer function Description An additional description of the function for the formula wizard GroupName The group in which the function is displayed in the formula wizard Visible Indicates whether or not the function will be disp
79. RTF Send via E Mail SVG Tex Tex TTY Wi Wo HT x x XX ZIP Expor Expor Expor PS CSV Layout hout user interaction rd IML CSS media modules options Extended MAPI Extern F Fax exi Faxing Fields Filter First p Font al port File Extension File extensions File selection dialog File types FileExtensions FINALIZE event age Footer Index 404 345 388 23 351 359 363 365 363 369 57 373 407 377 382 384 387 56 389 393 399 403 412 272 272 282 344 408 286 388 273 13 24 30 34 428 252 24 21 21 215 237 128 233 259 261 271 219 437 Index Free content G Group header option H Help file HTML HTML export DbCommand Enumerable lt T gt ListSource mport Libraries nstantiation ntegration nteractive Sorting nvoice nvoice Merge ssues TypedList J Java Job Handle Job number JOM export L Label Labels Landscape Language Languages Last page Licensing LINO List List lt T gt 438 108 111 261 192 33 96 337 351 27 27 27 90 18 18 131 32 50 35 27 15 421 223 359 49 34 35 192 13 233 19 27 50 27 ListLabe 17 ListLabelDocument 17 ListLabelPreviewControl 17 ListLabelRTFControl 17 ListLabelWebViewer 18 Lists 34 LL_ DESIGNEROPTSTR _ PROJECTDESCRIPTION 172 PROJECTFILENAME 172 W
80. Return Value Setting chosen by the user Hints In addition to the constants listed for L PrintSetOption there are several modified or additional read only settings LL_PRNOPT_COPIES_SUPPORTED Returns a flag indicating whether the currently selected copies count is supported by the printer this is usually important for list projects only Important This function will if successful set the printer copies in the driver If it is not successful the LL PRNOPT_COPIES must be set to 1 and the copies must be made manually if needed 222 Function Reference LL_PRNOPT_UNIT This option returns the measurement units set in the system settings Returned values are one of the following constants Value Meaning LL_ UNITS MM_DIV_10 1 10 mm LL UNITS MM DIV 100 1 100 mm default on metric systems LL UNITS MM_DIV_1000 1 1000 mm LL_UNITS_INCH_DIV_100 1 100 inch LL UNITS _INCH_DIV_1000 1 1000 inch default on imperial systems LL_UNITS_SYSDEFAULT Default low resolution on the system LORES LL_UNITS_SYSDEFAULT Default high resolution on the system HIRES LL_UNITS_SYSDEFAULT Default resolution on the system LL_PRNOPT_USE2PASS Returns if the printing process uses the two pass method because the TotalPages function has been used LL_PRNOPT_PRINTORDER Returns the print order of the labels file cards in the project Default LL_PRINTORDER_HORZ_LTRB horizontal from top left to bottom right
81. Syntax HLISTPOS LlEnumGetNextEntry HLLJOB hJob HLISTPOS hPos UINT nFlags 180 Function Reference Task Returns the next field variable if any The iteration starts with LlEnumGetFirstVar or LlEnumGetFirstField and is continued with this function Parameter hJob List amp Label job handle hPos Iterator of the current variable or field nFlags Flags for the allowed types of fields to be or ed LL TEXT LL BOOLEAN LL BARCODE LL DRAWING LL NUMERIC LL DATE LL_RTF LL HTML Return Value terator for the next variable field or NULL if no further variable field exists Hints During the L Enum functions a call to L DefineVariableStart or LIDefineFieldStart is prohibited See also LIEnumGetFirstVar LIEnumGetFirstField LIEnumGetEntry LIExprError Syntax void LIExprError HLLJOB hJob LPTSTR lpBuffer UINT nBuffer Size Task Returns the reason for the error in plain text Parameter hJob List amp Label job handle IpBuffer Address of buffer for error text nBufferSize Maximum number of characters to be copied Return Value Error code Hints The function must be called immediately after L ExprParse returns an error See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value 181 API Reference Example See LIExprParse See also LIExprParse LIExprEvaluate LIExprType LIExprFree LIExprEvaluate Syntax INT L1LEx
82. XPS RTF PICTU PICTU PICTU PICTU PICTU PICTU FILE HTML JOM TTY PPTX TXT TXT_LAYOUT XML E MULTITIFF _TIFF PNG _JPEG _BMP EMF J J D D D WD The other options e g font embedding encryption etc can also be preset with default values directly from code This is done as in the example above by using the ExportOptions class the LlExportOption enumeration contains all supported options as values 23 Programming With NET Most frequently these are required to execute a silent export It is more convenient to use the Export method of the component Please see the Export sample for C and VB NET 2 2 7 Important Properties of the Component The behavior of print design and export can be controlled by some of the component s properties of the component The most important are listed in the following table Property Function AutoProjectFile Name of the project file to use This is the default name for the project if a file selection dialog is provided Otherwise it is the name of the project to use Default empty AutoDestination Output format If desired a format can be forced for the user by this property e g Print is only allowed to printer or preview Default LIPrintWode Export If a selection of export formats is to be allowed it can be done by setting LlOptionString ExportsAllowed An example can be found in section Restriction of Export Formats AutoFileAlsoNew Sets if the u
83. _nSize Size of the structure _hLIJob Job handle of the job that started the print _szDevice Printer name _dwJobID Job ID not the job ID of the printer but a global one created by List amp Label _dwState Combination of state flags JOB STATUS constants in WINSPOOL H Please make sure to set LL_ OPTION_NOPRINTJOBSUPERVISION to FALSE to enable this callback The detail depth depends on the print spooler Please note that all machines in the transmission chain i e print server and client need to run NT based operating systems Windows NT4 and higher The dwState flags are defined as follows define JOB_STATUS_PAUSED 0x00000007 define JOB_STATUS_ERROR 0x00000002 define JOB_ STATUS DELETING 0x00000004 define JOB_STATUS_SPOOLING 0x00000008 define JOB_STATUS_ PRINTING 0x00000070 define JOB_STATUS_OFFLINE 0x00000020 define JOB_STATUS_PAPEROUT 0x00000040 define JOB_STATUS_PRINTED 0x00000080 define JOB_STATUS_ DELETED 0x00000700 define JOB_STATUS_BLOCKED_DEVQ 0x00000200 define JOB_STATUS_USER_INTERVENTION 0x00000400 define JOB_STATUS_RESTART 0x00000800 LL_NTFY_DESIGNERPRINTJOB Task Via callback LL N7TFY_DES GNERPRINTJOB List amp Label informs you about the task that has to be performed This callback will always be called up in the context of the designer thread this is the thread from which L DefineLayout was called Parameters The callback parameter is a pointer to a scL DesignerPrintJob struc
84. a PDF export from the control You can also customize the control to meet your specific needs by displaying hiding the toolbar buttons with the properties of the control It is also possible to respond to the click events of the buttons and store any separate handling routines that may be necessary 3 7 Working With Preview Files The List amp Label Storage API allows access to the LL preview files You can query general information or the specific pages merge several files and save user data To use the Storage API you must include the Unit cmls21 bas in your project or invoke the functions from the OCX Control 3 7 1 Opening a Preview File You can open the preview file with the L StgsysStorageOpen function General information about the file can now be accessed using a whole series of other functions Visual Basic Dim hStgOrg As Long hStgOrg LL L1IStgsysStorageOpen C Test 11 False True 3 7 2 Merging Multiple Preview Files You can merge multiple preview files To do this you must first open the target file Since write access is required you must pass a false value for the second parameter ReadOnly Using the L StgSysAppend function you can then merge the files Visual Basic Dim hStgOrg As Long Dim hStgAppend As Long hStgOrg LL L1IStgsysStorageOpen C Test1 11 False True hStgAppend LL L1StgsysStorageOpen C Test2 11 False True LL L1IStgsysAppend hStgOrg hStgAppend 67
85. a scl DesignerPrint job structure will be passed specifing all neccessary information for the respective task There are only a few changes necessary compared to a regular print export Preparation In order to enable the direct preview or export functionality within the designer you have to set one or both of the following options e LL OPTION_DESIGNERPREVIEWPARAMETER for preview of real data 121 Programming Using the API e LL OPTION_DESIGNEREXPORTPARAMETER for the export from the designer The value that you pass via these options can be defined by yourself for example a pointer to an internal data structure or object You receive this back unchanged in the callback scL DesignerPrintjob nUserParam mportant for List amp Label is that it is not 0 or 1 Via callback LL_NTFY DESIGNERPRINTJOB List amp Label informs you about the task that has to be performed This callback will always be called in the context of the designer thread this is the thread from which L DefineLayout was called When you use structure members e g like _nUserParam please ensure that the thread has evaluated or copied them before you pass control back to List amp Label as the structure will no longer be valid then this is true for all Callbacks Tasks Now to the individual tasks that will be put to you via the callback being indicated by various values of scL DesignerPrint ob _nFunction The symbolic constants for them all start wi
86. and formulas can be realized in this way Another way of creating hyperlinks is via the object name The names of text and picture objects are parsed for the string LINK lt url gt Whenever this string is found a hyperlink is generated Thus if you name your picture object combit LINK http Awww combit net this would create a picture hyperlink during export to XHTML 7 3 16 XML Export Overview The XML export module creates XML files This allows flexible editing by other applications All available object properties are exported If you require you may export data from tables only and ignore all further object properties Limitations e Issue print is not supported Programming Interface You can find a description of all options used in the XML export module in this chapter These options can be modified read using the methods LIXSetParameter XML and LiIXGetParameter XML Resolution Defines the resolution in dpi for the transformation of the coordinates and the generation of pictures Default 96 dp screen resolution Picture JPEGQuality Specifies the quality and the corresponding compression factor of the generated JPEG graphic The value lies between 0 700 with 700 representing the highest quality least compression Takes effect only when the 399 The Export Modules source graphic is not the JPEG format as encoding of JPEG to JPEG would result in a quality loss Default 75 Picture
87. anguage IDs appended to the file name are a hex representation of the CMBTLANG_xxxx language codes found in the header H BAS PAS ile Example HLLJOBhJob hJob L1lJobOpen CMBTLANG ENGLISH L1DefineVariableStart hJob L1DefineVariable hJob Name Smith L1DefineVariable hJob forename George Renee SE Ct tee L1JobClose hJob See also LIJobOpenLCID LlJobClose LISetOption LIDesignerProhibitAction LlSetFile Extensions 201 API Reference LIJobOpenLCID Syntax HLLJOB LlJobOpenLCID _LCID nLCID Task See LVobOpen Parameter nLCID Windows locale ID for user interactions dialogs Return Value See LlJobOpen Hints Calls LWobOpen with the respective CMBTLANG _ value Example HLLJOB hJob hJob LlJobOpenLCID LOCALE_USER_DEFAULT L1lDefineVariableStart hJob L1lDefineVariable hJob Name Smith L1lDefineVariable hJob forename George Se Sree F2 gt LlJobClose hJob See also LlJobOpen LlJobClose LISetOption LIDesignerProhibitAction LISetFile Extensions LlJobStateRestore Syntax INT LlJobStateRestore HLLJOB hLlJob _PISTREAM pStream UINT nFlags Task This API is used e g by the NET DesignerControl to restore the state of a job previously saved on one machine on a different other machine Depending on the flags passed the variables fields and database structure are deserialized from the stream Thus a following call to
88. application with List amp Label _pszExportFormat Preselected export format required in Ribbon mode only see chapter Direct Print and Export From the Designer _bWithoutDialog Print export without dialog required in Ribbon mode only see chapter Direct Print and Export From the Designer Return Value Return LL DESIGNERPRINTTHREAD_STATE_ RUNNING if your thread is working otherwise LL_ DES IGNERPRINTTHREAD_STATE_STOPPED 306 Callback Reference Hints See chapter Direct Print and Export From the Designer LL_NTFY_EXPRERROR Task Notifies the application of an expression error found by the parser Activation Always active Parameters Param Pointer to an error text Return Value 0 Hints As L ExprError does not reliably return an incorrect formula after a call to L PrintStart this event can be used to collect errors and present them to the user when L PrintStart fails because of formula errors LL_NTFY_FAILSFILTER Task Notification that the data record which has just been passed to List amp Label was not printed as it did not comply with the filter requirement Activation Always active Parameters Meaning of the parameter IParam none Return Value 0 Hints In this callback no List amp Label function may be called which will produce output L Print etc Serves to set a global variable but can be made superfluous with L PrintDia MatchFilter 307 API Reference Exa
89. apply to this function If the function L PrintlsFieldUsed is used in your application L DefineFie ldStart may not be used after the call to L Print WithBox Start otherwise the used flag will be reset and L PrintlsFieldUsed returns always FALSE We recommend the usage of L GetUsed dentifiers anyway Important This function must not be called within the print loop Example HLLJOB hJob hJob LlJobOpen 0 L1DefineFieldStart hJob L1DefineField hJob Name Smith L1DefineField hJob forename George ea 6 Cr eee LlJobClose hJob See also LIDefineField LIDefineFieldExt LIDefineFieldExtHandle 157 API Reference LIDefineLayout Syntax Task Parameter INT LlDefineLayout HLLJOB hJob HWND hWnd LPCTSTR lpszTitle UINT nObjType LPCTSTR lpszObjName Calls the interactive Designer that will be displayed as a modal pop up window overlapping your application window hJob List amp Label job handle hWnd Handle of the application window which will be disabled while the Designer is being displayed IpszTitle Window title nObjType Project type Value Meaning LL_ PROJECT LABEL for labels LL_ PROJECT CARD for cards LL_ PROJECT LIST for lists if necessary combined with or with Value Meaning LL_FIXEDNAME Deletes the menu items new and load preferred L DesignerProhibitAction LL_NOSAVEAS Deletes the menu item save as preferred L DesignerProhibitAct
90. be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 SVG Title Specifies the title of the generated SVG document Default Title used with L PrintWithBoxStart Export Path Path where the exported files should be saved If this option is empty a file selection dialog will always be displayed Export File File name of the first SVG page Default index svg You may also use printf format strings like d in the file name ex Export Page d svg In this case the Tiles for the pages will be named by replacing the placeholder with the correctly formatted page number Otherwise you will get a simple page numbering for the result files Export AllinOneFile Configures the export result format Value Meaning 0 Every printed page will be exported in a single SVG file 1 The result is a single SVG file Export File containing all printed pages Default 1 Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 0 Export with user interaction dialogs 1 No dialogs or message boxes will be displayed only if Export Path was specified Default 0 381 The Export Modules Export ShowResult Specifies whether the export result will be displayed automatically The program that displays the result will be determined by the registered file extension Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with
91. bitmap or metafile use the following call LL L1DefineVariableExtHandle Picture BufferImage picture bitmap handle LL_DRAWING_HBITMAP or LL L1DefineVariableExtHandle Picture BufferImage picture metafile handle LL_DRAWING_HEMETA 4 4 2 Barcodes Barcodes are transferred by using the constant LL BARCODE One example in which an EAN13 type barcode variable is registered looks like this LL L1DefineVariableExt EAN13 123456789012 LL_BARCODE_EAN13 82 Language Selection 4 5 Language Selection The List amp Label Designer is available in numerous languages Thus the component provides full scale support in the implementation of multilingual desktop applications There are two ways for telling List amp Label which language to use 1 Assigning the Language property the appropriate language LL Language 1tEnglish 2 Set the language directly in the component Note You need the appropriate language kit in order to display the respective language For a list of the kits currently available please visit our online shop at www combit net en 4 6 Working With Events List amp Label offers a variety of callbacks which have been implemented as events in the List amp Label VCL component For a detailed description of the available events please refer the online help included with the VCL component 4 7 Displaying a Preview File A VCL preview control is provided for the VCL This provide
92. contexts cannot be used across different threads Make sure to open a job create a component instance in your application before starting the first print thread and do not close this job before all threads are terminated Typically this will be done in your application s start up and shutdown code Background the first job creates a couple of helper objects that need to be destroyed in the same job Also this can increase the performance remarkably as it avoids steady loading and unloading of DLLs Threads that open the designer need to use the Single Threaded Apartment STA concurrency model This means you cannot use NET worker threads from the thread pool for this task as they are initialized to use the Multi Threaded Apartment MTA concurrency model Background List amp Label needs to call Olelnitialize for drag amp drop support within the designer which requires the current apartment to be STA to succeed 9 Error Codes General Error Codes 9 1 General Error Codes The return codes are provided below They start with LL FAR_ for example BAD_JOBHANDLE means LL_ERR_BAD_JOBHANDLE The values in brackets are the decimal numbers that are written in the debug output In order to provide error handling within your application the L GetErrortext API returns a displayable localized error description for each error code Value BAD_JOBHANDLE 1 TASK_ACTIVE 2 BAD_OBJECTTYPE 3 PRINTING JOB 4 NO_BOX 5
93. created may be specified with L PreviewSetTempPath Printing to Export will create files in a directory that can be defined by the host application and or the user Please refer to the export module s documentation for further details A list of files created can be queried using LL_OPTIONSTR_EXPOATFILELIST after the print has been finished Whenever a project file is saved a backup file is created The name of the backup file s extension consists of a and the project s extension eg Ist for the default list project extension If the target does not support long file names the extension will be cut off after the third character e g ls 429 Redistribution Shipping the Application 11 5 Other Settings The following data are managed dependent on the main application i e the program name of the task e Language e Dialog design e Dialog positions e Designer configurations colors fonts This means that the configurations set by you or your program regarding language and dialog design or the dialog positions and the Designer configurations chosen by the user are only valid for your application In this way your application does not need to pay attention to whatever configurations are used in other applications These settings are stored in the registry at HKEY CURRENT USER Soft ware combit CMBTLL lt application name gt 430 Overview 12 Update Information for Version 21 Update hints for older ver
94. displayed automatically The program that displays the result will be determined by the registered file extension 372 Programming Reference Value Meaning 0 1 Result will not be displayed automatically Calls She Execute with Export File so that usually Microsoft PowerPoint should be executed Default 0 7 3 8 RTF Export Overview The RTF export module creates documents in Rich Text Format based on Microsoft specification 1 5 1 7 The exported files have mainly been optimized for Microsoft Word and Lotus Word Pro Please note that the rendering of the exported files can differ with different word processors Limitations Besides others the following hints and limitations should be considered Rows that are anchored to each other are not correctly exported The max color depth is 24 bit PNG 32bit Shadows of rectangle objects are not supported Tabs will be replaced by blanks Objects should not be placed too close to the page borders Some word processors create page breaks in such cases This means that all following objects will then automatically be placed on the next page The option Separators fixed in the table object is not supported Not all background patterns available in List amp Label can be transformed to RTF The number of patterns available in RTF is much smaller than that of the patterns available in List amp Label The chart and HTML object are exported as pictures and thus cannot a
95. features Designer preview Drilldown report container would have to be specially supported If in 39 Programming With NET doubt it makes more sense to write your own data provider See section Database Independent Contents All provided list samples for the NET Framework make use of the report container and therefore provide demonstration material for the different operation purposes A detailed description for using this element can be found in the Designer Manual under section Inserting Report Container 2 3 9 Object Model DOM Whereas the Designer is providing a very comfortable and powerful interface for editing project files it can often be desired to set object or report properties per code For example the application can display a dialog prior to the Designer with a data preselection and then start the Designer with a project already prepared with this selection An example for that can be found in the Simple DOM sample for C and VB NET Access to the object model is only available from the Professional Edition and higher The following table lists the most important classes and properties of the namespace combit ListLabel21 Dom Class Function ProjectList The actual project classes These represent the root ProjectLabel element of the project Key methods are Open Save and ProjectCard Close lt Project gt Objects A list of all objects within the project The objects are descendants of Object
96. font instance is being created The permitted values are referenced in the MSDN documentation Default OUT_STRING PRECIS Function Reference LL_OPTION_FORCE_DEFAULT_PRINTER_IN_PREVIEW TRUE printer name setting will not passed on to the preview so that the preview always uses the default printer in its print routines FALSE printer name setting will be passed on to the preview default LL_OPTION_FORCEFONTCHARSET Selects whether all fonts in the system are offered in font selection combo boxes or whether they must support the charset of the default LCID or the font set with LL OPTION_LCID See also LL_OPTION_SCALABLEFONTSONLY Default FALSE LL_OPTION_FORCEFIRSTGROUPHEADER Set to TRUE to force the first group header to be printed even if the evaluated result of the group by property is empty Default FALSE LL_OPTION_HELPAVAILABLE TRUE display help buttons default FALSE do not display help buttons LL_OPTION_IMMEDIATELASTPAGE FALSE the LastPage flag will not be set before all objects have been printed up to a table in case of a report project TRUE a non finished object will immediately force LastPage to be FALSE and will reset all its appended objects Default TRUE LL_OPTION_INCREMENTAL_PREVIEW TRUE The preview is displayed as soon as the first page has been created and further pages are added to the display incrementally If the user closes the preview window during printing you will receive
97. in several smaller print jobs see below with network spooler print LL_PRINT_ REMOVE _ Fields and variables not required by the UNUSED_VARS project are removed from the internal buffer after printing starts This can speed up following declarations considerably The recommended practice however is to query the required data using L GetUsedidentifiers which is the better alternative These options influence LL_ OPTIONSTR_EXPORTS_ALLOWED nBoxType Value Meaning LL_BOXTYPE_ Abort box with bar meter and text NORMALMETER LL_BOXTYPE_ Abort box with bridge meter and text BRIDGEMETER LL_BOXTYPE_EMPTYABORT Abort box with text LL_BOXTYPE_ Box with bar meter and text no abort NORMALWAIT button LL _BOXTYPE_BRIDGEWAI T Box with bridge meter and text no abort button LL _BOXTYPE_EMPTYWAIT Box with text no abort button LL_BOXTYPE_STDABORT Abort box with system bar meter LL_BOXTYPE_STDWAIT Box with bar meter no abort button LL_BOXTYPE_NONE No box Please note that starting with Windows Vista the Boxtype parameter is ignored and the standard Windows progress bar is used hWnd Window handle of the calling program used as parent of the dialog box IpszTitle Title of the abort dialog box also appears as text in the print manager Return Value Error code 239 API Reference Hints Please check the return value An application modal abort dialog box is shown as soon as the print starts Its title is defined by the p
98. information in this way In the preview file the parameters are saved with the prefix ProjectParameter before the actual name 8 4 3 Predefined Project Parameters List amp Label uses project parameters for sending emails and faxes The user may change and edit the values As List amp Label expects the contents to be a formula it will be necessary to mask them as a string value whenever fixed values are used Example L1PrintSetProjectParameter hJob LL FAX RecipNumber 497531906018 3 LL FAX Queue LOCAL PRIVATE LL FAX RecipNumber GLOBAL PUBLIC LL_OPTIONSTR_FAX_RECIPNUMBER LL FAX RecipName GLOBAL PUBLIC LL_OPTIONSTR_FAX_RECIPNAME LL FAX SenderName GLOBAL PRIVATE LL_OPTIONSTR_FAX_SENDERNAME LL FAX SenderCompany GLOBAL PRIVATE LL_OPTIONSTR_FAX_SENDERCOMPANY LL FAX SenderDepartment GLOBAL PRIVATE 416 Project Parameters LL_OPTIONSTR_FAX_SENDERDEPT LL FAX SenderBillingCode GLOBAL PRIVATE LL_OPTIONSTR_FAX_SENDERBILLINGCODE LOBAL FORMULA PUBLIC LOBAL VALUE PUBLIC LOBAL FORMULA PUBLIC LOBAL FORMULA PUBL LOBAL FORMULA PUBLIC LL MinPageCount LL ProjectDescription LL lssueCount O LL PageCondition LL PrintJobLCID oOo fA Of a Further information on the project parameters can be found in the Designer manual Analog to the LL FAX parameters LL MAIL parameters exists see chapter Setting ail Parameters by Code for fu
99. label2 11 c test label2 pdf PDF See also LIStgsysStorageOpen LIStgsysConvert LIStgsysStorageOpen Syntax Task HLLSTG LlStgsysStorageOpen LPCTSTR lpszFilename LPCTSTR pszTempPath BOOL bReadOnly BOOL bOneJobTranslation Opens a preview file Parameter IpszFilename The name of the project or preview List amp Label does not take account of the extension as it will always be set to LL pszTempPath A temporary path can be NULL or empty bReadOnly TRUE The file will be opened in read only mode FALSE The file can be written to bJobTranslation TRUE The Stgsys API takes account of multiple jobs and shows you all data as one job FALSE You can and must manage multiple jobs yourself Return value Hints Job handle for all other LIStgsys functions 0 means error If you use a path for temporary data this will be used as directory for the preview files otherwise the path of the project file name will be used This convention is compatible with the calls to L Print lt Project file gt and L PreviewSetlempPath lt Temporary Path gt 333 API Reference Note that the functions L StgsysAppend and L StgsysSetPageOptionString need the file to be opened with bReadOnly FALSE bJobTranslation TRUE is convenient if you don t want to take account of multiple jobs If you want to show your users whether the file contains multiple jobs you need to set this to FALSE and manage a l
100. maximum available percentage of a table INT nMaxPerc 100 L1PrintDbGetRootTableCount If you index the root tables from 0 L PrintDbGetRootlableCount 1 you can calculate the total percentage as INT nPercTotal nMaxPerc nIndexCurrentTable nPerc 100 nMaxPerc where nPerc is the percentage position in the current table To properly update the progress bar you can adapt the function Print ab e from the last section The current depth of the recursion can be determined with another input parameter if this parameter is 0 a root data record is printed and the progress bar can be updated function PrintTable DataTable data object depth of recursion depth lt repeat gt lt define fields of DataTable gt lt if depth 0 update progress bar gt 113 Programming Using the API L1PrintDbGetRootTableCount L1PrintSetBoxText lt print row gt L1PrintFields lt as long as warning repeat gt L1Print Ret L1PrintFields lt repeat until Ret lt gt LL_WRN_TABLECHANGE gt lt generate an appropriate DataTable child object gt lt Ret PrintTable child DataTable depth 1 gt Supplying Master Data as Variables In the case of an order with the relevant order details it could be desirable to offer the master data i e in this example the data of the table orders as variables So the addressee could e g be displayed in a text object and the order details in a table object Therefore at
101. next page gt allow user to abort L1PrintUpdateBox hJob L1PrintEnd hJob 0 else MessageBox NULL Error List amp Label MB OK LlJobClose hJob See also LIPrintEnd 219 API Reference LIPrintGetChartObjectCount Syntax INT L1lPrintGetChartObjectCount HLLJOB hJob UINT nType Task Returns the number of chart objects in the current project Parameter hJob List amp Label job handle nType Location of chart Return Value Error code or number of charts Hints nType must be one of the following LL_GETCHARTOBJECTCOUNT_CHARTOBJECTS Returns the number of chart objects excluding those placed in table columns LL_GETCHARTOBJECTCOUNT_CHARTOBJECTS BEFORE_TABLE Returns the number of chart objects before the table in the print order LL_GETCHARTOBJECTCOUNT_CHARTCOLUMNS Returns the number of chart columns This function can be used to optimize the printing loop More hints can be found in the chart chapter of this manual See also LIPrint LIPrintGetCurrentPage Syntax INT L1lPrintGetCurrentPage HLLJOB hJob Task Returns the page number of the page currently printing Parameter hJob List amp Label job handle Return Value lt 0 Error code gt 0 page number 220 Function Reference Hints This function can only be used if a print job is open i e after L Print WithBox Start It is the same page number that is returned by the Page function in t
102. objects should be exported Value Meaning 0 Ignore object 1 As RTF stream 2 As unformatted text uses the default font specified in the project file 3 Object as JPEG Default 1 Verbosity Table Contigures how table objects should be exported Value Meaning 0 Ignore object 1 As a table object Default 1 Verbosity Table Cell Configures how table cells should be exported Value Meaning 0 Ignore cell 401 The Export Modules 1 As a cell object using the verbosity settings of the object types specified in the cell 2 Cells as JPEG Default 1 Verbosity LLXObject Configures how LLX objects e g chart object should be exported Value Meaning 0 Ignore object 1 Complete object information and object as JPEG Default 1 XML Title Specifies the title of the generated XML document Default Title used with L PrintWithBoxStart Export Path Path where the exported files should be saved If this option is empty a file selection dialog will always be displayed Export File File name of the first XML page Default export xml You may also use printf format strings like d in the filename ex Export Page d xml In this case the files for the pages will be named by replacing the placeholder with the correctly formatted page number Otherwise you will get a simple page numbering for the result files Export AllinOneFile Configures the export result format Value Meaning 0 Every printed page will
103. or preview print 129 Programming Using the API When you use structure members e g like _nUserParam please ensure that the thread has evaluated or copied them before you pass control back to List amp Label as the structure will no longer be valid then this is true for all Callbacks 5 7 4 Supporting Expandable Regions in Preview If this feature is supported elements in the report container can be expanded and collapsed dynamically in the preview window For convenience this feature uses the same callback as drilldown printing so in most cases you can simply reuse your existing code and just make sure it works even if no drilldown filter is set in the passed structure i e all table IDs and key field values are empty Preparations To enable expandable regions in List amp Label set the option LL_OPTION_EXPANDABLE_REGIONS_REALDATAJOBPARAMETER to a value unequal to 0 Please note that this option has to be set for each LL job that should support expandable regions activate expandable regions for current LL Job L1SetOption hJob LL_OPTION_EXPANDABLE_REGIONS_REALDATAJOBPARAMETER LPARAM amp oMyExpandableRegions To deactivate expandable regions for this LL job set the option to NULL deactivate expandable regions for current LL Job L1SetOption hJob LL_OPTION_EXPANDABLE_REGIONS_REALDATAJOBPARAMETER NULL The parameter passed with this option can be used freely for example as a pointer to an inter
104. root level contains a variety of different cross table samples under Design gt Extended Samples 2 5 8 Database Independent Contents Data is not always available in a database or a DataSet It can be required to output urther data in addition to the data from the data source such as a user name within the application the project name or similar information In some cases no suitable data provider seems to be available at first These cases will be examined in the ollowing paragraphs Pass Additional Contents f only a few variables or fields are to be added to the data of the data source there are two possibilities e f the data is constant during the runtime of the report it can just be added prior to the design or print call by using LL Variables Add e f the data changes from page to page or even from line to line the information can be passed within the AutoDetineNewPage or AutoDefineNewLine events by using LL Fields Add or LL Variables Add The following example shows both approaches C ListLabel LL new ListLabel LL DataSource CreateDataSet Define additional data fields LL Variables Add AdditionalData UserName GetCurrentUserName LL Variables Add AdditionalData ProjectName GetCurrentProjectName 53 Programming With NET Add event handling for own fields LL AutoDefineNewLine new AutoDefineNewLineHandler LL_AutoDefineNewLine Call Designer LL Design Print
105. should be exported Value Meaning 0 Ignore object 1 Object as picture 2 Object as shape object Word 97 and later Default 2 Verbosity Line Configures how line objects should be exported Value Meaning 0 Ignore object 1 Object as picture 2 Object as shape object Word 97 and later Default 2 375 The Export Modules Verbosity Text Configures how text objects should be exported Value Meaning 0 Ignore object 1 Object as text object 2 Object as picture Default 1 Verbosity RTF Contigures how RTF objects should be exported Value Meaning 0 Ignore object 1 As formatted RTF text 2 Object as picture Default 1 Verbosity Table Configures how table objects should be exported Value Meaning 0 Ignore object 1 As a complete table object Default 1 Verbosity NestedTable Configures how nested table objects should be exported Value Meaning 0 Ignore object 1 As a complete table object 2 Object as picture Default 1 Verbosity LLXObject Configures how LLX objects e g chart object should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Export Path Path where the exported files should be saved Export File File name of the RTF document If this option is set to an empty string a file selection dialog will always be displayed 376 Programming Reference Export Quiet Use this option to configure the possibility of exporting without user interaction Value M
106. some options of the PreviewFile class C Open preview files first file coversheet with write access PreviewFile cover new PreviewFile lt Path gt frontpage 11 false PreviewFile report new PreviewFile lt Path gt report 11 true Append report to first file coversheet cover Append report Print complete report cover Print Convert report to PDF cover ConvertTo lt Path gt report pdf Release preview files report Dispose cover Dispose VB NET Open preview files first file coversheet with write access Dim cover As New PreviewFile lt Path gt frontpage 11 False Dim report As New PreviewFile lt Path gt report 11 True 59 Programming With NET Append report to first file coversheet cover Append report Print complete report cover Print Convert report to PDF cover ConvertTo lt Path gt report pdf Release preview files report Dispose cover Dispose 2 5 12 Sending E Mail Sending e Mail can also be controlled via the list of export options see section Export Without User Interaction if export and sending should be done in one step An example showing that is the Export sample for C and VB NET However e Mail by independent of the previous export it is also possible to send any files via using the MailJob class This is especially interesting when generating a PDF file from the preview file as a source see section
107. the actual call with all parameters In the following line the error code 99 is returned as well as an explanation for it in this case the user has aborted the file selection dialog with Cancel If the application is supposed to create debug logs without the help of Debwin3 this can be done in the configuration file of the application Logging can be forced as follows 42 Usage in Web Applications lt configuration gt lt appSettings gt lt add key ListLabel DebugLogFilePath value c users public debug log gt lt add key ListLabel EnableDebug value 1 gt lt appSettings gt lt configuration gt 2 4 Usage in Web Applications List amp Label can also be used within web applications albeit with a number of limitations For ASP NET based web applications List amp Label contains components for displaying reports in the web browser which also support complex features such as drill down as well as an independent version of the Designer with which reports can be designed on the server with the familiar List amp Label Designer Web Designer 2 4 1 Web Reporting Printing within a web application is basically the same as an export e g to PDF format where all dialogs are suppressed How this is done in general is described in section Export Without User Interaction After the report is generated that way the browser of the user can be directed to the created file by the usual mechanisms Alternatively t
108. the first HTML page Default index htm You may also use printf format strings like Yd in the file name ex Export Page d htm In this case the files for the pages will be named by replacing the placeholder with the correctly formatted page number Otherwise you will get a simple page numbering for the result files Export AllinOneFile Configures the export result format Value Meaning 0 Every printed page will be exported in a single HTML file 1 The result is a single HTML file Export File containing all printed pages Default 1 Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 0 Export with user interaction dialogs 1 No dialogs or message boxes will be displayed only if Export Path was specified Default 0 Export ShowResult Specifies whether the export result will be displayed automatically The program that displays the result will be determined by the registered file extension 398 Programming Reference Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with Export File Default 0 Export ShowResultAvailable Enables you to hide the respective checkbox in the dialog Value Meaning 0 Checkbox will be hidden 1 Checkbox will be available Default 1 Hyperlinks Hyperlinks can be embedded in text table and RTF objects directly in the Designer using the Hyperlink function Dynamic hyperlinks
109. the name of the preview file This can be a file name as well as a URL Default lt empty gt Pages out Long The total number of pages in the preview CurrentPage in out Long Sets or reads the current page index 1 pages Default 1 ToolbarEnabled in out BOOL Defines whether the toolbar should be displayed The toolbar is not necessary as all of its functions can be called by methods as an example see LLVIEW21 EXE and its menu items So there is no problem at all in defining your own toolbar Default TRUE 71 Programming With the OCX Component ToolbarButtons out LPDISPATCH Returns a ToolbarButtons object that can be used to get or set the status of each toolbar button The object has the following methods e GetButtonState in nButtonID LONG Returns the button state for the passed TLB constant Value Meaning Constant 1 Hidden TLBS_PRV_HIDE 0 Default TLBS_PRV_DEFAULT Enabled TLBS_PRV_ENABLED 2 Disabled TLBS_PRV_DISABLED Example Dim oTlb as ToolbarButtons Set oTlb L1ViewCtr11 ToolbarButtons MsgBox oTlb GetButtonState TLB_PRV_FILEEXIT e SetButtonState in nButton D in nButtonState Sets the button state for the passed TLB_ constant See above for valid state values Example Dim oTlb as ToolbarButtons Set oTlb L1ViewCtr11 ToolbarButtons oTlb SetButtonState TLB_PRV_FILEEXIT TLBS_PRV_HIDE The ID constants can also be found in the file MENUID TXT of your List amp Label installation S
110. the root level of the table object you need to have access to the sub tables of the master table In order to achieve this call L DbSetMasterTable The necessary calls are LIDbAddTable hjJob Orders LIDbAddTable hJob OrderDetails L1IDbAddTableRelation hJob OrderDetails Orders Orders20rderDetails NULL L1DbSetMasterTable hJob Orders The print loop is analogous to the description above but you have to make the appropriate child table available on the top level see Chapter Multiple Independent Tables on the Same Level lt repeat gt lt get current table name gt L1PrintDbGetCurrentTable lt get current sorting gt L1PrintDbGetCurrentTableSortOrder lt get current relation gt L1PrintDbGetCurrentTableRelation lt if relation empty gt lt generate an appropriate DataTable object gt lt else gt lt generate an appropriate child DataTable object gt lt Ret PrintTable DataTable gt 114 Printing Relational Data lt until Ret lt gt LL_WRN_TABLECHANGE gt lt close printing gt L1PrintEnd 5 5 4 Handling 1 1 Relations When reporting 1 1 relations the data is usually combined by a database query with a SQL JOIN so that the data is available in one table If this is not the case or if you don t want this you can display the 1 1 relations in the list of variables below the fields of the parent table To accomplish this you have to declare the fields in a special synt
111. the toolbar SendTo Starts Send SaveAs Starts Save As GetOptionString in BSTR sOption BSTR Returns mail settings See the chapter on project parameters for more information The available options are documented in chapter Send Export Results via E Mail SetOptionString in BSTR sOption in BSTR sValue BSTR Sets mail settings See the chapter on project parameters for more information The available options are documented in chapter Send Export Results via E Mail Additionally the control supports the following options Print NoProgressDlg Can be used to suppress the progress dialog during printing Value Meaning 0 The progress dialog is displayed during printing 1 The progress dialog is suppressed Default 0 3 9 5 Events BtnPress Syntax BtnPress short nID BOOL 73 Programming With the OCX Component Task Tells you that a toolbar button has been pressed Parameter nID See MENUID TXT for valid IDs Return value TRUE if the action should not be performed by the OCX PageChanged Syntax PageChanged Task Tells you that the current page has been changed Parameter Return value LoadFinished Syntax LoadFinished BOOL bSuccessful Task Notifies you that the file is on the local disk Important in case of asynchronous download This does not guarantee that the downloaded file is correct you should use the property pages to check a value of 0 indicates a failure Pa
112. this function refer to chapter API Reference 3 3 2 Barcodes Barcodes are transferred by using the constant LL BARCODE One example in which an EAN13 type barcode variable is registered looks like this LL LIDefineVariableExt EAN13 123456789012 LL_BARCODE_EAN13 3 4 Language Selection The List amp Label Designer is available in numerous languages Thus the component provides full scale support in the implementation of multilingual desktop applications There are two ways for telling List amp Label which language to use e Assigning the Language property the appropriate language LL Language CMBTLANG_ENGLISH e Set the language directly in the component Note You need the appropriate language kit in order to display the respective language For a list of the kits we currently offer and their prices please visit our online shop at www combit net en 3 5 Working With Events List amp Label offers a variety of callbacks which have been implemented as events in the List amp Label OCX component For a detailed description of the available events please refer to the online help included with the OCX component 66 Displaying a Preview File 3 6 Displaying a Preview File A separate component exists for displaying previews To use this component you must include the file cmll21v ocx in your IDE The component offers special ways to use the List amp Label preview format For example you can start
113. variables in the fax dialog Project gt Fax Variables Any changes made by the user in the Designer will override these values If the project is sent by fax these expressions will be evaluated and directly used as parameters for the MS Fax module 273 API Reference 274 As an alternative these expressions are also available as variables LL Fax xxxx so that they can be placed in the project in a special format to be used by other fax drivers For details please see the fax software manual If these options are not set and the user has not entered any expressions in the fax dialog the MS FAX export will not be available LL_OPTIONSTR_LABEL_PRJDESCR Use this parameter to set the description of the corresponding project type for the file dialogs LL_OPTIONSTR_LABEL_PRJEXT The file extension for a label project Default Ibl LL_OPTIONSTR_LABEL_PRVEXT The file extension for the bitmap of a label project that will be shown in the File Open dialog Default bv LL_OPTIONSTR_LABEL_PRNEXT The file extension for the printer definition file of a label project Default Ibp LL_OPTIONSTR_LICENSINGINFO This option defines the licensing You need to set your own personal license key here This option must be set before you distribute your project Further information is available in the files perslic txt and redist txt in the List amp Label installation directory For the List amp Label trial version yo
114. vary regarding features and licensing conditions You will find a verbose description and comparison of the different editions and licensing conditions at http Avww combit net en Licensing 1 2 After Installation 1 2 1 Start Menu After installing List amp Label you will find the program group combit gt combit List amp Label 21 in the Windows start menu This program group enables you to access all important information regarding integration documentation and examples as well as further useful tips and tricks This group will be the starting point for the following chapters 1 2 2 Designer Quick Start via Sample Application A quick way to become acquainted with the Designer and its possibilities is to use the List amp Label sample application This standalone sample application is just for Introduction demonstration purposes and shows the various possibilities which the Designer offers The data is taken from a fixed sample database You will find the application in the start menu group It enables you to start the List amp Label Designer immediately and gain an overview of its functionality and flexibility through the wide variety of layout examples provided The Designer is started by clicking Design from the menu and selecting an entry e g invoice Before the actual start you can select an existing project file in the file selection dialog or enter a new file name The full functionality of the List amp Label
115. you that you have to start a new page for the entry With the corresponding L Print on the next page the record pointer should not be moved to the next record If more tables are added via L DbAddTable the return value also can be LL_ WAN _ TABLECHANGE Please refer to chapter Printing Relational Data for further information The exact behavior is described in the programming part of this manual See also LIPrint LIPrintEnableObject 218 Function Reference LIPrintFieldsEnd Syntax INT L1lPrintFieldsEnd HLLJOB hJob Task Prints tries to print the footer on the last page and appended objects Parameter hJob List amp Label job handle Return Value Error code Hints Only needed in list projects Is necessary to make sure that the footer is printed even if no other normal field data is available If the return value is LL WRN_REPEAT DATA the footer could not be printed on the last page LIPrintFieldsEnd might have to be called multiple times to print the footer on another page If more tables are added via L DbAddTable the return value also can be LL_ WAN _ TABLECHANGE Please refer to chapter Printing Relational Data for further information Example HLLJOB hJob hJob LlJobOpen 0 if L1PrintStart hJob LL_PROJECT_LIST test LL_PRINT_ NORMAL 0 Sues E 232 lt data finished gt while L1PrintFieldsEnd hJob LL_WRN_REPEAT DATA lt define variables for
116. 0 aao CLE 24 gt L1PrintEnd hJob 0 else MessageBox NULL error List amp Label MB OK LlJobClose hJob See also LIPrintStart LIPrintWithBoxStart LIPrintFieldsEnd LIPrinterSetup Syntax INT LlPrinterSetup HLLJOB hJob HWND hWnd UINT nObjType LPCTSTR lpszObjName Task Opens a printer selection window and saves the user s selection in the printer definition file Parameter hJob List amp Label job handle hWnd Window handle of the calling program nObjType Value Meaning LL_ PROJECT LABEL for labels LL_ PROJECT_CARD for cards LL_ PROJECT LIST for lists IpszObjName Valid project file name including path 217 API Reference Return Value Error code Hints Must be called before L Print WithBox Start Allows printer selection without having to perform a printing process as you must do when using L PrintOptionsDialog We do not recommend this function L PrintOptionsDialog is much more flexible See also LIPrintStart LIPrintWithBoxStart LIPrintOptionsDialog LIPrintGetPrinter nfo LISetPrinterlnPrinterFile LIPrintFields Syntax INT L1lPrintFields HLLJOB hJob Task Output of a table line Parameter hJob List amp Label job handle Return Value Error code or command Hints L PrintFields prints a data line in all non hidden tables if the line matches the filter condition With the return value LL_ WAN_REPEAT DATA List amp Label informs
117. 1 RegQuery MaximumParameters 1 RegQuery ResultType LlParamType String RegQuery EvaluateFunction new EvaluateFunctionHandler RegQuery_EvaluateFunction Add function LL DesignerFunctions Add RegQuery LL Design LL Dispose void RegQuery_EvaluateFunction object sender EvaluateFunctionEventArgs e Get registry key RegistryKey key Registry CurrentUser OpenSubKey Software combit e ResultValue key GetValue e Parameter1 ToString ToString VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Initialize function Dim RegQuery As New DesignerFunction RegQuery FunctionName RegQuery RegQuery GroupName Registry RegQuery MinimalParameters 1 RegQuery MaximumParameters 1 RegQuery ResultType L1lParamType String 58 Examples Add function LL DesignerFunctions Add RegQuery LL Design LL Dispose Sub RegQuery_EvaluateFunction sender As Object e As EvaluateFunctionEventArgs Handles RegQuery EvaluateFunction Get registry key Dim key As RegistryKey RegistryKey Registry CurrentUser OpenSubKey Software combit e ResultValue key GetValue e Parameter1 ToString ToString End Sub 2 5 11 Join and Convert Preview Files The preview format can be used as the output format if for example multiple reports should be joined to one or if archiving the output in the form of a PDF is desired in addition to the direct output The following example shows
118. 1DomCreateSubobject hObjParagraphList _T Paragraph amp hObj Paragraph L1DomSetProperty hObjParagraph _T Contents _T DOM Save project L1ProjectSave hJob NULL L1ProjectClose hJob L1JobClose hJob Creating a Table This example shows the creation of a table object inside a report container and creates a new dataline and three columns inside it Please note that even if you do not use the APIs to control the report container you must create a report container with exactly one table HLLJOB hJob L1lJobOpen 1 Create new project L1ProjectOpen hJob LL_PROJECT_LIST c simple 1st LL_PRIOPEN_CD_CREATE_ALWAYS LL_PRJOPEN_AM_READWRITE HLLDOMOBJ hProj L1DomGetProject hJob amp hProj Get object list HLLDOMOBJ hObjList L1DomGetObject hProj Objects amp hObjList Create report container and set properties HLLDOMOBJ hObjReportContainer L1DomCreateSubobject hObjList _T ReportContainer amp hObjReportContainer L1DomSetProperty hObjReportContainer T Position Left _T 27000 L1DomSetProperty hObjReportContainer T Position Top _T 103500 138 Using the DOM API Professional Enterprise Edition Only L1DomSetProperty hObjReportContainer T Position Width _1T 1534 0 L1DomSetProperty hObjReportContainer T Position Height _T 159500 Get subobject list and create table inside it HLLDOMOBJ hObjSubItems L1DomGetObject
119. 21 ListLabel VB NET Dim LL As New combit ListLabel21 ListLabel First Steps Generally the namespaces combit ListLabel21 and combit ListLabel21 DataProviders are prereferenced for the whole file depending on the programming language by using C or Imports VB NET This saves a lot of typing later C using combit ListLabel21 using combit ListLabel21 DataProviders VB NET Imports combit ListLabel21 Imports combit ListLabel21 DataProviders When using dynamic creation the component should be released by the Dispose method after its use so that the unmanaged resources can be released as soon as possible C LL Dispose VB NET LL Dispose Due to performance reasons it is recommended that you always keep an instance of the ListLabel object in memory globally for the dynamic creation as well It can be created in the Load event of the application s main window and released again in the FormClosed event for example The essential advantage is that the List amp Label modules won t be loaded and released for every new instance which can lead to undesirable delays of frequent calls or e g multiple prints 2 2 2 License Component During the installation of the full version not the Trial version a file with the personal license and support information is created in the start menu To successfully use List amp Label on end user machines it is mandatory to pass the license key included in this
120. 76 3 10 6 Inserting the OCX Into Your Internet Page cceceeeeeeeeees 76 Programming With the VCL Component ccceseeeeeeeeeeeeeeeeeneeeeees 78 4 1 Integration of the COMpONeNt cccceceeeeeeeeeeeeeeeeeeeeeeeeetaaeeeeeeeeteeaae 78 4 2 Data BINGING eects eneen chy shen Buccal reena t eaa a o aa ai iaa ataa 78 4 2 1 Binding List amp Label to a Data SOuUrCe sssseiiiseeerseeireeerrrrrrr 78 4 2 2 Working With Master Detail Records 0 cccceesseeeeeeeeeetees 79 4 2 3 Additional Options for Data Binding ccccccceeeeetteeeeeeeetetees 80 4 3 Simple Print and Design Methods ceeeeeeeeeeeeeeeeeeeeeneeeeeeeeeeeeeeaae 81 4 3 1 Working Principle Mates sndiec lessons Mian shales date estes iiweedchdnesne diel selen 81 4 3 2 Using the UserData Parameter cccccecceeeeeeeecneeeeeeeeeeeeneees 81 4 4 Transferring Unbound Variables and Fields ccccesceeseeeeeeeeeeeeeeeeee 82 4 4 1 PICU POS Caeiie aena a ands Ae eesti ae gaotan aS 82 4 4 2 BarcOdes viiciG see a E a aS 82 4 5 Language Selection cccceccecceeeeeeeeeneeeeeeeeeeeeneeeeeeeeeeeeeeeeeeeeeeeeeeeeeaaa 83 4 6 Working With Events c cccccceeeeeeeeeeeeeeeeeeeeeeenneeeeeeeeeeeeeeaeeeeeeeeeeeeeaaa 83 4 7 Displaying a Preview File ccccccccccccccceccceeeeceeccecccceeeeeeeeeeeeeeeeeeeeeseseeess 83 4 8 Working With Preview Files 0 ccccseeeeeeeeeeeeeeenceeeeeeeeeeeeeseeeee
121. ATA L Print must be called again so objects that have caused a page break must be printed again on the next label page This function is described explicitly in the chapter Further Programming Basics See also LIPrintFields LIPrintEnableObject LIPrintAbort Syntax INT L1lPrintAbort HLLJOB hdJob Task Aborts the print an incomplete page will remain incomplete or may not be printed Parameter hJob List amp Label job handle Return Value Error code Hints Is necessary to abort the print by code if L PrintWithBoxStart is not used and print abortion is necessary The difference to the normal end i e no longer having to call L Print or LIPrintFields is that data which is still in the printer driver is discarded so that the print may be ended halfway through a page The L Print calls following this call will return LL USER ABOATED so your print loop will be ended automatically 209 API Reference Example HLLJOB hJob hJob LlJobOpen 0 if L1lPrintStart hJob LL_PROJECT_LABEL test LL_PRINT_NORMAL 0 for all data records Kene SUC a gt if bDataError L1PrintAbort hJob L1PrintEnd hJob else MessageBox NULL error List amp Label MB OK LlJobClose hJob See also LIPrintStart LIPrintWithBoxStart LIPrintEnd LIPrintCopyPrinterConfiguration Syntax INT L1PrintCopyPrinterConfiguration HLLJOB hJob LPCTSTR lpszFilen
122. Adobe Font Packages are provided on the system Under certain circumstances right to left charsets in RTF objects are not exported accurately Fonts other than Japanese or Chinese might not be embedded correctly Hint When embedding fonts through CID the PDF A standard is not fully supported e Rotated boldface italic true type fonts may have a slightly different width e Fonts with a font width lt gt 0 are not supported e Bitmap fonts cannot be used embedded e Line ends are displayed with round caps 365 The Export Modules e Not all EMF records can be displayed accurately if you are using complex EMFs you should pass them as bitmaps or choose export as picture in the designer Programming Interface You can find a description of all options used in the PDF export module in this chapter The options can be modified read using the methods L XSetParameter PDF and L IXGetParameter PDF PDF Title Specifies the title of the generated PDF document Default title passed to L PrintWithBoxStart PDF Subject Specifies the subject of the generated PDF document Default empty PDF Keywords Specifies the keywords of the generated PDF document Default empty PDF Encryption EncryptFile f this parameter is set the result file will be encrypted Other different options are then enabled which are described below Value Meaning 0 Do not encrypt file 1 Encrypt file Default 0 PDF Encrypt
123. BEL L PROJECT LIST LL_QUERY_ LL_QUERY_DESIG L_RTF L TEXT L WRN REPEAT _DATA 998 L WRN PRINTFINISHED 997 TABLECHANGE 105 AddCtlSupport AssociatePreviewControl CreateSketch LIDbAddTable LIDbAddTableEx DbAdadTableRelation DbAddTableRelationEx DbAddTableSortOrder DbAddTableSortOrderEx DbSetMasterTable DebugOutput ineChartFieldExt ineChartFieldStart ineField ineFieldExt ineFieldExtHandle ineFieldStart 157 178 180 ineLayout 99 117 158 ineSumVariable ineVariable ineVariableExt ineVariableExtHandle EXPR2HOSTEXPRESSION ERACTIONSTATE 107 107 107 8 79 55 227 264 62 Index 223 233 223 234 234 234 234 10 10 102 31 310 96 93 N A N N Oo NOO AONAN anna A N gt O 226 53 54 78 422 59 60 61 78 441 Index LIDefineVariableStart 163 178 180 181 LIDesignerAddAction 64 LIDesignerFileOpen 66 LIDesignerFileSave 67 LIDesignerGetOptionString 68 LIDesignerlnvokeAction 68 LIDesignerProhibitAction 99 169 LIDesignerProhibitEditingObject 70 LIDesignerProhibitFunction 71 LIDesignerRefreshWorkspace 71 LIDesignerSetOptionString 68 172 LIDIgEditLineEx 73 LIDomCreateSubobject 35 173 LIDomDeleteSubobject 35 174 LIDomGetObject 34 174 LIDomGetProject 175 LIDomGetProperty 36 175 LIDomGetSubobject 34 176 LIDomGetSubobjectCount 34 177 LIDomSetProperty 136 177 LilEnum GetEntr
124. BOXTYPE_xxx see L PrintWithBoxStart or 1 if no box had been used LLPrintStart LS OPTION_UNITS Returns the units chosen for the project see LL PRNOPT_UNIT LS_OPTION_PRINTERCOUNT Number of printers used See also LIStgsysSetJob LIStgsysGetLastError Syntax INT LlStgsysGetLastError HLLSTG hStg Task Returns the error code of the last call to a L Stgsys API function Parameter hStg The handle returned by L StgsysStorageOpen Return value lt 0 Error code 0 no error Hints Can be used for functions that return NULL as return value in case of an error i e L StgsysGetPageMetafile See also LIStgsysGetPageMetatile 322 Managing Preview Files LIStgsysGetPageCount Syntax INT L1lStgsysGetPageCount HLLSTG hStg Task Returns the number of pages in the current Job Parameter hStg The handle returned by L StgsysStorageOpen Return value gt 0 Number of pages lt 0 Error code Hints The page numbers the numbers that can be written on the paper can be queried by calling L StgsysGetPageOptionValue with the parameter LS_OPTION_PAGENUMBER Example See LIStgsysSetJob See also LIStgsysSetJob LIStgsysJobGetOptionValue LIStgsysGetPageMetafile Syntax HANDLE L1lStgsysGetPageMetafile HLLSTG hStg INT nPageIndex Task Returns an enhanced metafile handle that can be used to display or print page data Parameter hStg The handle returned by L StgsysSto
125. Base and each object contains its own properties and enumerations e g Text paragraphs lt Project gt Regions An enumeration of the layout regions of the project A page dependent printer control can be realized this way or example Further information can be found in section Regions ObjectText Represents a text object Key property is Paragraphs the actual content of the text ObjectReportContainer Represents a report container Key property is Subltems the actual content of the report container SubltemTable Represents a table within the report container It consists of different line regions Lines property which have different columns Columns property of a line 40 Other Important Concepts Within the single classes the properties can easily be browsed via Intellisense A complete reference of all classes can be found in the component help for NET 2 3 10 List amp Label in WPF Applications As List amp Label itself is a non visual component it can be used in WPF applications as well as in WinForms applications The Designer itself is no WPF window however this does not affect its functionality The WPF Viewer can be used for displaying preview files and is a replacement for the WinForms PreviewControl Please note that the WPF viewer relies on the existence of the XPS Document Writer printer driver on the target system If the driver is not available documents cannot be displayed 2 3 11 Error Hand
126. CEREPR CODE 265 Bs M CARD_PRJDESCR 27 PRINTERDCCACHE_TIMEOUT_SECONDS265 i CARD_PRJEXT 27 PRINTERDEVICEOPTIMIZATION 265 CARD_PRNEXT 27 PROHIBIT_USERINTERACTION 265 z is CARD_PRVEXT 27 PROJECTBACKUP 265 7 CURRENCY 27 PRVRECT_HEIGHT 266 ie DECIMAL 27 PRVRECT_LEFT 266 a DEFDEFFONT 259 27 PRVRECT_TOP 266 a EXPORTEDFILELIST 273 PRVRECT_WIDTH 266 i EXPORTS_ ALLOWED 272 440 EXPORTS ALLOWED_IN PREVIEW EXPORTS AVAILABLE FAX HELPFILENAME LABEL_PRJDESCR 271 LABEL_PRJEXT LABEL_PRNEXT LABEL_PRVEXT LICENSINGINFO LIST PRJDESCR 271 LIST PRJEXT LIST_PRNEXT LIST_PRVEXT LLFILEDESCR LLXPATHLIST 257 272 LTO LTO BCC LTO CC LTO_ SUBJECT ULLVALUE PREVIEWFILENAME PRINTERALIASLIST PROJECTPASSWORD SAVEAS PATH SHORTDATEFORMAT THOUSAND VARALIAS LL_PRINT FILE LL_PRINT NORMAL LL_PRINT PREVIEW LL_PRINT USERSELECT LL_PRNOPT COPIES COPIES SUPPORTED DEFPRINTERINSTALLED FIRSTPAGE JOBID JOBPAGES LASTPAGE OFFSET PAGE PRINTDLG_ONLYPRINTERCOPIES PRINTORDER A A A A 272 272 273 273 274 274 274 274 274 274 274 274 274 275 275 275 275 275 276 276 276 276 276 277 277 277 277 101 101 101 101 233 222 223 233 223 233 233 233 233 233 223 L De De De De De De De De De De De UNIT UNITS USE2PASS L_PRNOPTSTR_ EXPORT SSUERANGES PAGERANGES PRINTDST_FILENAME PRINTJOBNAME L_ PROJECT CARD L_PROJECT LA
127. CMND_MODIFYMENU callback Example HLLJOB hJob hJob LlJobOpen 0 L1DefineVariableStart hJob L1DefineVariable hJob Name Smith L1DefineVariable hJob Forename George L1DefineVariable hJob PIN 40 08150 77500 LL BARCODE _EAN13 NULL L1lDesignerProhibitAction hJob LL SYSCOMMAND_MAXIMIZE L1lDesignerProhibitAction hJob LL SYSCOMMAND_MINIMIZE L1DefineLayout hJob hWndMain Test LL _PROJECT_LABEL test LlJobClose hJob See also LIDefineLayout LIDesignerProhibitEditingObject LIDesignerProhibitFunction LIDesignerProhibitEditingObject Syntax INT L1lDesignerProhibitEditingObject HLLJOB Job LPCTSTR pszObject Task Prohibits the editing of the passed object Parameter hJob List amp Label job handle pszObject Object name Return Value Error code Hints With NULL or the list of prohibited objects will be deleted Example HLLJOB hJob hJob LlJobOpen 0 L1lDesignerProhibitEditingObject hJob MyText LlJobClose hJob 170 Function Reference See also LIDefineLayout LIDesignerProhibitAction LIDesignerProhibitFunction LIDesignerProhibitFunction Syntax INT LlDesignerProhibitFunction HLLJOB hJob LPCTSTR pszFunction Task Hides the given function in the formula wizard Must be called before any functions are evaluated Parameter hJob List amp Label job handle pszFunction Function name Return Value
128. DERCOLOR ff0000 gt is specific for Internet Explorer 3 or later Setting line color for horizontal table lines lt hr COLOR ff0000 gt is specific for Internet Explorer 3 or later If the HTML object is not exported as picture but as HTML text the part of the stream between the lt body gt and lt body gt tags will be embedded This by definition leads to the following limitations 352 Cascading Style Sheets are not completely supported Page formatting such as background color margins etc is lost HTML does not allow scaling The exported result may thus differ from the layout in the Designer especially when the HTML object contains the contents of a whole web site Programming Reference e Even if the HTML object wraps over several pages it will be exported in one stream i e no page wrap will occur e Embedded scripting functionalities may be lost e Issue print is not supported Programming Interface You can find a description of all options used in the HTML export module in this chapter These options can be modified read using the methods L iXSetParameter HTML and LiXGetParameter HTML Resolution Defines the resolution in dpi for the transformation of the coordinates and the generation of pictures Default 96 dp screen resolution Picture JPEGQuality Specifies the quality and the corresponding compression factor of the generated JPEG graphic The value lies between 0 700 with 700
129. Database Independent Contents The event is triggered for every new line If the application requires additional line specific data which is not part of the data source itself it can be added in this event by using LL Fields Add Examples can be found in section Database Independent Contents These events are each called once before and after printing the corresponding elements e g for each table cell DrawTableField The event arguments contain a Graphics object and the output rectangle so that the application can output custom information additionally That could be a special shading a Trial character or a complete specific output You can support your users by displaying help texts for each variable and field in the Designer 33 Programming With NET 2 3 4 Project Types Three different modes of the Designer are available as report type Which mode is used depends on the value of the property AutoProjectType Lists This is the default and matches the value LIProject List for the AutoProjectType property Typical fields of use are invoices address lists reports with charts and cross tables multi column lists briefly all types of reports where a tabular element is required The report container is only available in this mode see section 2 3 8 Report Container Labels This project type matches the value LIProject Label for the AutoProjectType property It is used for the output of labels As there ar
130. DownParameters gt _hAttachInfo LL_ASSOCIATEPREVIEWCONTROLFLAG_DELETE_ON_CLOSE LL_ASSOCIATEPREVIEWCONTROLFLAG_HANDLE_IS_ATTACHINFO 127 Programming Using the API 5 7 2 1 2 Finalize Event LL_DRILLDOWN_FINALIZE This event will be called for drilldown jobs that have been canceled so you can release internal data structures Additionally it is suggested that active print jobs should be aborted by calling L PrintAbort If the _n D member of the scL DriliDownJob structure that has been passed by List amp Label is 0 all active drilldown Jobs can be ended and released This happens if ending the preview 5 7 2 1 3 Preparing the Data Source To provide the correct data for the drilldown report minor changes to the printing loop are neccessary Relation s Drilldown can only be used when relations are declared For drilldown reports use the function LiIDbAddTableRelationEx This function has 2 additional parameters pszKeyField and pszParentKkeyFie d for the key field of the child table and the key field of the parent table so a unique assignment can be made Further information can be found in the description of the function LIDbAddTableRelationEx Please note that the key fields must contain the table name as a prefix for example Customers Customer D Example Declare the relation between Customers and Orders table for drilldown using the northwind sample add relation CString sParentField pMyDri
131. E PATCH OPTIONS modules IsapiModule scriptProcessor windir Microsoft NET Framework64 v4 0 30319 aspnet_isapi d1l1 preCondition classicMode runtimeVersionv4 bitness64 responseBufferLimit 0 gt lt add name ExtensionlessUrlHandler Integrated 4 0 path verb GET HEAD POST DEBUG PUT DELETE PATCH OPTIONS type System Web Handlers TransferRequestHandler preCondition integratedMode runtimeVersionv4 gt Additional Information By default the Web Designer communicates via URLs in the following format WebDesigner WebDesignerHandler If these routes are already being used by your own application you may use the optional parameter of the WebDesignerContig RegisterRoutes command to assign the Web Designer other routes 2 5 Examples The examples in this paragraph show how some typical tasks can be solved The code can serve as a template for your own implementations 48 Examples For the sake of clarity the usual error handling is omitted here All exceptions will be caught directly in the development environment For real applications we recommend exception handling as described in section Error Handling With Exceptions 2 5 1 Simple Label To print a label use the project type LIProject Label If a data source with multiple tables such as a DataSet is connected the desired data for the label can be selected by the DataMember property C ListLabel LL new ListLabel
132. ECTSTATE_FORCES_NEW_PRINTJOB TRUE A new print job is forced after PrintResetProjectState This option is especially of use if the same project is printed consecutively multiple times and when it is important that every one of the prints creates its own job in the spooler FALSE Multiple reports can be merged into one print job A new print job is only created if it is necessary due to duplex prints default LL_OPTION_RETREPRESENTATIONCODE Character code of the character that represents a new line in the Designer This value might have to be changed for code pages other than standard Western code page as the default might be used for a printable character LL_OPTION_RIBBON_DEFAULT_ENABLEDSTATE TRUE Starting with Windows Vista the Designer and the print preview use the Windows Ribbon framework The Ribbon may be switched off in the project s options dialog default FALSE Usage of the Ribbon has to be enabled explicitly in the project s options dialog Function Reference LL_OPTION_RTFHEIGHTSCALINGPERCENTAGE Percentage value to wrap RTF text a bit earlier so that MS Word does show RTF text completely default 100 LL_OPTION_SCALABLEFONTSONLY Here you can choose which fonts can be selected in font selection dialogs only scalable fonts TrueType and Vector fonts 7RUE or all FALSE Raster fonts have the disadvantage of not being scalable so the preview may not appear as expected Default 7RUE LL_
133. EVIEW CONTROLFLAG DELETE_ON_ CLOSE and LL_ASSOCIATEPREVIEW CONTROLFLAG HANDLE _IS_ATTACHINFO must be used Further infor mation can be found in chapter Printing Relational Data Hints This callback will always be called in the context of the preview thread regardless if initiated from designer or preview print Example See chapter Printing Relational Data LL_QUERY_DESIGNERACTIONSTATE Task Via this callback List amp Label checks the state of the user defined Actions see L DesignerAddAction You can then depending on requirements enable or disable the actions Activate Always active Parameter HIWORD Param the user defined ID for the action LOWORD Param Status setting as set by Designer Return value _IResult Value Meaning 7 Action is active 2 Action is not active Example case LL_QUERY_DESIGNERACTIONSTATE _lResult bEnabled 1 2 break 310 Callback Reference LL_QUERY_EXPR2HOSTEXPRESSION Task Via this callback List amp Label asks the host to translate a filter expression as configured in the Designer to data source native syntax The callback is triggered multiple times for each part of the filter expression as soon as the application calls to L PrintDbGetCurrentTableFilter This callback can be used e g to translate a List amp Label filter to an SOL query Activate Always active triggered by a call to L PrintDbGetCurrentlableFilter Parameter Param
134. EXPRESSION 23 CFGBADFILE 24 BADOBJNAME 25 UNKNOWNOBJECT 27 NO_TABLEOBJECT 28 NO_OBJECT 29 NO_TEXTOBJECT 30 UNKNOWN 37 BAD_MODE 32 CFGBADMODE 33 422 An error occurred during print e g no access rights to the destination path export file already existing and write protected This DLL version requires Visual Basic LIPrintOptionsDialogTitle No printer available Preview functions No preview mode is set L lPreviewDisplay No preview files found NULL pointer as a parameter is not allowed other parameter errors are also possible Please use the debug mode to determine the error New expression mode an expression in L Expr Evaluate could not be interpreted Unknown expression mode in L SetOption LIPrint WithBox Start Project file not found LIPrint WithBox Start LIDefineLayout One of the expressions used has an error When starting the Designer these errors will be displayed interactively When printing the errors are logged to Debwin When working with LIExprEval use L ExprError to find the error LIPrint WithBox Start Project file has the wrong format or is defective L PrintEnableObject The object name is not correct LIPrintEnableObject No object exists with this object name LIPrint WithBox Start No table available in the list mode LIPrint WithBox Start The project has no objects and empty pages can be printed another way L Pri
135. EXPRESSION 23 or LL_ERR_NOPRINTER 11 If a job has already been opened the output will occur in the language of the respective job otherwise the language of the first language kit found will be used See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value LIGetFieldContents Syntax INT L1GetFieldContents HLLJOB hJob LPCTSTR lpszName LPTSTR lpszBuffer UINT nBufSize Task Returns the contents of the corresponding chart field Parameter hJob List amp Label job handle IpszName Pointer to a string with the name of the field 189 API Reference pszBuffer Address of buffer for contents nBufSize Maximum number of characters to be copied Return Value Error code LL ERR_UNKNOWWN_FIELD or 0 Hints This function can be used in callback routines to ask for the contents of fields See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIDefineFieldStart LIDefineFieldExt LIDefineFieldExtHandle LIGetFieldType LIGetFieldType Syntax INT LlGetFieldType HLLJOB hJob LPCTSTR lpszName Task Returns the type of the corresponding field Parameter hJob List amp Label job handle IpszName Pointer to a string with the name of the field Return Value Field type positive or error code negative Hints This function can be used in callback routines to ask for the type of fields See also
136. E_YMD LL_DATE_YYYYMMDD With these the value of a date variable can be passed directly as a string to List amp Label there is no need for your program to convert it to the Julian date List amp Label performs this task for you The day month and year numbers must be separated by a dot slash or minus sign in the first three formats Constant Hint LL_ DATE LOCALIZED The date is interpreted as localized date e g 12 31 2013 The OLE API VarDateFromStr is used internally Boolean Constant LL_ BOOLEAN Content e g Hint T eHe J t y 1 all represent true all other values represent false 95 Programming Using the API RTF Formatted Text Constant LL_RIF Content e g rtf1 ansi Hello b World par Hint The variable content must start with rtf and contain RTF formatted text Important The rendering of RTF contents in variables and fields is optimized for contents created with Microsoft s RTF control These can be generated e g by using the Windows Wordpad application Contents generated by Microsoft Word may not conform to the Windows RTF control s RTF standard and should not be used HTML Formatted Text Constant LL_ HTML Content e g lt html gt lt body gt lt font size 7 gt Hello World lt font gt lt body gt lt html gt Hint List amp Label uses a custom component for HTML rendering This component s
137. Error code Hints If you pass NULL or an empty string the list of functions to be hidden will be reset Example HLLJOB hJob hJob LlJobOpen 0 L1lDesignerProhibitFunction hJob LlDesignerProhibitFunction hJob CStr LlJobClose hJob See also LIDefineLayout LIDesignerProhibitAction LIDesignerProhibitEditingObject LIDesignerRefreshWorkspace Syntax INT L1DesignerRefreshWorkspace HLLJOB hJob Task Activates an update of all tool windows menu items etc in the Designer Use this function to ensure that the Designer immediately shows all the changes made to the object model using DOM within the open Designer 171 API Reference Parameter hJob List amp Label Job Handle Return code Error code Hints This function can only be used within a designer event It is typically used in connection with L DesignerAddAction See also LIDefineLayout LIDesignerAddAction LIDesignerSetOptionString Syntax INT L1lDesignerSetOptionString HLLJOB hJob INT nMode LPCTSTR pszValue Task Defines various settings when the Designer is open Parameter hJob List amp Label Job Handle nMode The following values are possible as function index LL_DESIGNEROPTSTR_PROJECTFILENAME The name of the project currently opened If you have created a new file through an action it can be named in this way Otherwise corresponds to a Save as LL_DESIGNEROPTSTR_ WORKSPACETITLE As
138. Fits the print to the printable area of the printer LS_PRINTFLAG_ Print copies for each page not the job STACKEDCOPIES 111222333 instead of 123123123 LS_PRINTFLAG_ Try to make hardware copies if possible TRYPRINTERCOPIES LS PRINTFLAG_METER Show a meter dialog LS PRINTFLAG_ Show a meter dialog which has a ABORTABLEMETER Cancel button LS PRINTFLAG_SHOWDIALOG Shows a printer select dialog LS_PRINTFLAG_FAX Required for output on fax printer pszMessage Will be shown in the title of the optional meter dialog and is also used as document name for the print job If NULL the entry from the preview file parameter of L PrintWithBoxStart is used hWndParent Window handle to be used as parent for the meter dialog Return Value Error code Hints Use this API routine if you want an easy way to print a page range from the current storage job If a printer name is NULL List amp Label tries to get the printer and its settings from the values stored in the preview file i e the printer settings selected during creation If no printer with the specified device name is present the default printer is selected You need to set the job L StgsysSet ob before you call this function See Also LIStgsysPrint LIStgsysSetJob LIStgsysSetjob Syntax INT LlStgsysSetJob HLLSTG hStg INT nJob 329 API Reference Task Sets the job index for the following API calls Parameter hStg The handle returned by L StgsysStora
139. G LL COLORING PROGRAM In this way the control of the coloring in tables is left to your program the corresponding settings in the table characteristic dialog of the Designer won t appear or L1SetOption hJob LL_OPTION_TABLE COLORING LL_COLORING_DONTCARE 299 API Reference With this command List amp Label lets your program draw the background first of all then it draws the background again if allowed with the field pattern defined in the Designer This allows a kind of cooperation between the programmer and the user Parameters Param points to an scllTableField structure _nSize Size of structure sizeof scllTableField _nType Type of field lt D Value LL TABLE FIELD_HEADER LL TABLE FIELD BODY LL TABLE FIELD GROUP LL TABLE FIELD_GROUPFOOTER LL TABLE FIELD FILL a d is in the header line d is in the data line d is in group header line d is in group footer line TI oO a is the filling area when the table has a xed size and there is some free space ow the last data line eld is in the footer line moO 2 D LL TABLE FIELD FOOTER _hPaintDC Device Context for the print and in the following callback definitions _hRefDC Device Context for the references _rcPaint Rectangle in which the field is to be drawn The mapping mode is in the normal drawing units mm 10 inch 100 or inch 1000 _nLineDef Number of line definition to be drawn _nindex Field index 0 ba
140. GDI This can result in display errors in the XPS file when exporting charts and generally truncated clipped objects As a precaution we recommend that you carefully check the XPS output before delivery to your customers Programming Interface You can find a description of all options used in the XPS export module in this chapter The options can be modified using the methods L XSetParameter XPS and read by calling L XGetParameter XPS Export Path Path where the exported files should be saved Export File File name of the document If this option is empty a file selection dialog will always be displayed Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 403 The Export Modules 0 Export with user interaction dialogs 1 No dialogs or message boxes even a overwrite warning will be displayed only if Export Path was specified Default 0 Export ShowResult Specifies whether the export result will be displayed automatically The program that displays the result will be determined by the associated file type Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with Export File Default 0 Export ShowResultAvailable Enables you to hide the respective checkbox in the dialog Value Meaning 0 Checkbox will be hidden 1 Checkbox will be available Default 1 7 4 Digitally Sign Export Results By accessi
141. General Notes About the Return Value e Zero or with some functions a positive return value generally means that the function was successful though there are some exceptions to this rule e A negative return value apart from exceptional cases indicates an error which shows the reason with the corresponding error constants 5 2 Programming Basics This chapter should provide a quick and easy start into programming List amp Label Thus only the programming basics will be covered For a look at more advanced topics please read the corresponding chapters later on 5 2 1 Database Independent Concept List amp Label works database independently when being programmed via the API meaning List amp Label does not access the database itself and does not have its own database drivers This offers you an enormous number of advantages 91 Programming Using the API The advantages e No unnecessary overheads due to duplicate database drivers resulting in less memory consumption so that your application can run faster e Less risk of problems with additional database drivers e More flexible as this allows data control in one place only e Can be used without any database e Allows access to exotic databases e You can mix database data and virtual data created by your program e The data can be manipulated before printing The disadvantage e You really have to write some code List amp Label needs to be fed with data T
142. ICAL_X Returns the horizontal size of the paper of the original printer LS_OPTION_PRN_PIXELSPHYSICAL_Y Returns the vertical size of the paper of the original printer LS_OPTION_PRN_PIXELSPERINCH_X Returns the horizontal printer resolution DPI LS _OPTION_PRN_PIXELSPERINCH_Y Returns the vertical printer resolution DPI LS _OPTION_PRN_INDEX Returns the index of the printer used for the current page 0 means first page printer 1 for the printer for the other pages LS_OPTION_ISSUEINDEX Returns the issue index 1 of the page Return value gt 0 Value lt 0 Error code Hints Printer or original printer means the printer selected when the preview file was created These values are invaluable if you wish to create your own preview and print management especially if the destination printers are different from the original To get the correct value set the job with L StgsysSet ob before calling this API function See also LIStgsysGetPageOptionString LIStgsysGetPagePrinter Syntax INT LlStgsysGetPagePrinter HLLSTG hStg INT nPageIndex LPTSTR pszDeviceName UINT nDeviceNameSize PHGLOBAL phDevmode Task Returns the printer and the settings that would be used for this page 327 API Reference Parameter hStg The handle returned by L StgsysStorageOpen nPagelndex Page index 1 L StgsysGetPageCount pszDeviceName Pointer to a buffer for the device name nDeviceNameS
143. ID of the table relation It is returned by LIPrintDbGetCurrentlableRelation at print time pszRelationDisplayName Name of the table relation as displayed in the Designer and it is not saved to the project file If no name is given the display name and the unique name are identical Return Value Error code Hints See the hints in chapter Printing Relational Data Before using the call the parent and child table must be passed with L DbAddTable Example HLLJOBhJob hJob LlJobOpen 0 LIDbAddTable hJob Orders NULL LIDbAddTable hJob OrderDetails NULL L1DbAddTableRelation hJob OrderDetails Orders Orders20OrderDetails NULL Se WEES ANET LlJobClose hJob See also LIDbAddTable LIDbAddTableSortOrder LIPrintDbGetCurrentTable LIPrintDbGet CurrentTableSortOrder LIPrintDbGetCurrentTableRelation LIDbAddTableRelationEx Syntax INT L1DbAddTableRelationEx HLLJOB hJob LPCTSTR pszTablelID LPCTSTR pszParentTableID LPCTSTR pszRelationID LPCTSTR pszRelationDisplayName LPCTSTR pszKeyField LPCTSTR pszParentKeyField 147 API Reference Task This method can be used to define a relation between two tables added via LIDbAddTable especially for drilldown support List amp Label does not directly distinguish between different relation types You simply pass a relation and its ID and you can query the current relation later at print time using L PrintDbGetCurrentlableRelat
144. IP export 412 Zoom factor 266 447
145. IPrintDobGetCurrentTableSortOrder LIPrintDbGetCurrentTableSortOrder Syntax INT L1PrintDbGetCurrentTableSortOrder HLLJOB hJob LPTSTR pszSortOrderID UINT nSortOrderIDLength 213 API Reference Task This function returns the current table sort order to be printed If multiple stacked sortings are supported see L DbAdadTableEx a tab separated list is returned Parameter hJob List amp Label job handle pszSortOrder ID Buffer in which the string is to be stored nSortOrderIDLength Size of buffer Return Value Error code Hints See the hints in chapter Printing Relational Data See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIDbAddTable LIDbAddTableRelation LIDbAddTableSortOrder LIPrintDbGet CurrentTable LIPrintDoGetCurrentTableRelation LIPrintDeclareChartRow Syntax INT L1lPrintDeclareChartRow HLLJOB hJob UINT nFlags Task This function is used to inform the chart objects contained in the project that data is available Parameter hJob List amp Label job handle nFlags Specifies the chart type for which data is available Return Value Error code Hints The following flags may be used with this function 214 Function Reference LL DECLARECHARTROW_FOR_OBJECTS informs chart objects that data is ava
146. JPEGEncoding Specifies how to encode JPEG images Value Meaning 0 Save JPEGS as external files 1 Include pictures MIME encoded into the XML file 2 Ignore JPEG images Default 0 Picture BitsPerPixel Defines the color depth of the generated picture Please note that the picture files will quickly get very large with higher color depths Value Meaning 1 Black amp White 24 24bit True Color Default 24 Verbosity Rectangle Configures how rectangle objects should be exported Value Meaning 0 Ignore object 1 Complete object information 2 Object as JPEG Default 1 Verbosity Barcode Configures how barcode objects should be exported Value Meaning 0 Ignore object 1 Complete object information and object as JPEG Default 1 Verbosity Drawing Configures how picture objects should be exported Value Meaning 0 Ignore object 1 Complete object information and object as JPEG Default 1 Verbosity Ellipse Configures how ellipse objects should be exported 400 Programming Reference Value Meaning 0 Ignore object 1 Complete object information 2 Object as JPEG Default 1 Verbosity Line Configures how line objects should be exported Value Meaning 0 Ignore object 1 Complete object information 2 Object as JPEG Default 1 Verbosity Text Configures how text objects should be exported Value Meaning 0 Ignore object 1 Object as text object 2 Object as JPEG Default 1 Verbosity RTF Configures how RTF
147. Join and Convert Preview Files and the PDF file is supposed to be sent via e mail C Instantiate mail job MailjJob mailJob new MailJob Set options mailJob mailJob mailjob mailJob mailjob mailJob Send mailJob mailjob VB NET AttachmentList Add lt Path gt report pdf To info combit net Subject Here is the report Body Please note the attachment Provider XMAPI ShowDialog true e Mail Send Dispose Instantiate mail job Dim mailJob As New MailJob Set options mailJob 60 AttachmentList Add lt Path gt report pdf Examples mailjJob To info combit net mailjJob Subject Here is the report mailJob Body Please note the attachment mailJob Provider XMAPI mailJob ShowDialog True Send e Mail mailJob Send mailJob Dispose 2 5 13 Store Project Files in a Database Project files can also be stored in a database Besides the option to unpack these directly from the database and to store them in the local file system this job can be passed to List amp Label as well The Print and Design methods have both overloads that allow passing a stream directly When using these overloads a few important changes in how these methods work are to be obeyed The background for these changes is the missing local file context and therefore the missing possibility to create new files e It is not possible to c
148. L DefineLayout offers the structures read from the stream in the Designer Parameter hJob List amp Label job handle pStream Stream that was created by a preceeding call to LA obStateSave The stream format is proprietary and may change anytime without notice 202 Function Reference nFlags Combination of LL JOBSTATEFLAG values They determine which values are read from the stream variables fields chart fields database structure dictionaries other job settings To deserialize all available information use LL JOBSTATEFLAG ALL Return Value Error code See also LlJobStateSave LUobStateSave Syntax INT LlJobStateRestore HLLJOB hLlJob _PISTREAM pStream UINT nFlags bool bPacked Task This API is used e g by the NET DesignerControl to save the state of a job Depending on the flags passed the variables fields and database structure are serialized to the stream Parameter hJob List amp Label job handle pStream Serialization stream The stream format is proprietary and may change anytime without notice nFlags Combination of LL JOBSTATEFLAG values They determine which values are written to the stream variables fields chart fields database structure dictionaries other job settings To serialize all available information use LL JOBSTATEFLAG ALL bPacked Determines if the stream content should be packed Return Value Error code See also LlJobStateRestore LILocA
149. L o switch on normal debugging info LL DEBUG_CMBIDWG o switch on debugging info for graphic functions LL DEBUG CMBTILL switch off debugging info for NOCALLBACKS notifications callbacks LL DEBUG_CMBTLL_NOSTORAGE switch off debugging info for storage L StgSys functions LL DEBUG_CMBTLL_NOSYSINFO do not issue system information dump on L SetDebug LL DEBUG_CMBTLL_LOGTOFILE debug output will also be directed to a log file COMBIT LOG in your APPDATA directory Hints Use the program Debwin included in your package to show the debug output in a separate window If debug mode is switched on in List amp Label with L SetDebug LL_DEBUG_ CMBTLL the DLL prints every function call with the corresponding parameters and results An is added to the function names so that the function calls can be easily differentiated from other internal List amp Label debugging output The output is indented in case a DLL in debugging mode calls other functions of a DLL even itself which is also in debugging mode Further information can be found in chapter Debug Tool Debwin Example HLLJOB hJob int v LlSetDebug LL DEBUG _CMBTLL HEPES i hJob LlJobOpen 0 v LlGetVersion VERSION_MAJOR LlJobClose hJob prints approx the following in the debugging output 251 API Reference LlJobOpen 0 1 L1GetVersion 1 6 L1lJobClose 1 LISetDefaultProjectParameter Syntax INT L1SetDefaultProjectParameter
150. LIPrinterSetup LIPrintSetOption LIPrintGetOption LIPrintOptionsDialog LIPrintResetProjectState Syntax INT LlPrintResetProjectState HLLJOB hJob Task Resets the print state of the whole project so that printing starts as if L Print WithBox Start has just been called Parameter hJob List amp Label Job handle Return Value Error code Hints This API resets the print state of the whole project objects page numbers user and sum variables etc This function can be used for mail merge tasks Example lt start print job gt lt while letters have to be printed gt lt get record gt lt print one letter gt lt if no error gt L1PrintResetProjectState hJob lt get next record of the database gt lt advance to next record gt lt end print job gt 230 Function Reference LIPrintSelectOffsetEx Syntax INT LlPrintSelectOffsetEx HLLJOB hJob HWND hWnd Task Opens a dialog in which the user can choose the first label s position in the label array Parameter hJob List amp Label job handle hWnd Window handle of the calling application Return Value Error code Hints Not applicable for list projects Default values can be defined with L PrintSetOption This function must be called after L PrintStart L PrintWithBoxStart but before calling L Print for the first time The offset can be set and read via LL PRNOPT_OFFSET The dialog is the same as the one offered
151. LL Print LL Dispose void LL_AutoDefineNewLine object sender AutoDefineNewLineEventArgs e Switch to next record if necessary GetCurrentFieldValue is function of your application which returns the content of a data field LL Fields Add AdditionalData AdditionalField GetCurrentFieldValue VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Define additional data fields LL Variables Add AdditionalData UserName GetCurrentUserName LL Variables Add AdditionalData ProjectName GetCurrentProjectName Call Designer LL Design Print LL Print LL Dispose Sub LL_AutoDefineNewLine sender As Object e As AutoDefineNewLineEventArgs Handles LL AutoDefineNewLine Switch to next record if necessary GetCurrentFieldValue is function of your application which returns the content of a data field LL Fields Add AdditionalData AdditionalField GetCurrentFieldValue End Sub 54 Examples Suppress Data From a Data Source Particular fields or variables that are not needed e g ID fields which aren t required for printing can be suppressed by using the AutoDefineField and AutoDefineVariable events C ListLabel LL new ListLabel LL DataSource CreateDataSet Add event handling for suppressing fields LL AutoDefineField new AutoDefineElementHandler LL_AutoDefineField Call Designer LL Design Print LL Print LL Dispose
152. Label lets your program draw the background first of all then it draws the background with the field background defined in the Designer when required again This allows a kind of cooperation between the programmer and the user Make sure to set the LL_CB_TABLELINE flag via LL_OPTION_CALLBACKMASK in order to receive this notification Parameters Param points to an scLlTableLine structure _nSize Size of the structure sizeof scLlTableLine _nType Type of field Value Meaning LL TABLE LINE HEADER Header line LL TABLE LINE BODY Data line LL TABLE LINE_GROUP Group header LL TABLE Group footer LINE_GROUPFOOTER 301 API Reference LL TABLE LINE FILL Filling area when the table has a fixed size and there is some free space below the last data line LL TABLE LINE FOOTER Footer line _hPaintDC Device Context for the printout _hRefDC Device Context for references _rcPaint Rectangle in which the line is to be drawn The mapping mode is in the normal drawing units mm 10 inch 100 or inch 1000 _nPageLine Line index Marks the 0 based line number on this page _nLine Line index Marks the O based line number of the line in the whole print _nLineDef Number of line definition to be drawn _bZebra TRUE when the user chooses zebra mode in the Designer _tcSpacing Cell distances Return Value 0 Hints In this callback no List amp Label function may be called which will produce output L Print etc
153. OCALIZED Content e g 1 255 00 Hint The number is interpreted as a localized number i e as a number formatted according to the local format settings The OLE API VarR8FromSitr is used internally Constant LL_NUMERIC_INTEGER Content e g my Hint Provides an integer value The usage of integer values has a better performance in calculations They will be displayed and printed without decimals Date Constant LL DATE Content e g 2451158 5 equals 12 11 1998 noon or 5 1 2013 for LL DATE MDY format or 20130501 for LL DATE_YYYYMMDD format 94 Hint Programming Basics Date values are usually expected in the Julian format The Julian date specifies a certain date by giving the number of days that have passed since January 1 4713 The decimals represent the fraction of a day which may be used to calculate hours minutes and seconds Many programming languages also have a special data type for date values The representation is usually analogous to the Julian date however a different start day is often used This means that in this case an offset has to be added To avoid this at least for the languages Visual Basic Visual FoxPro and Delphi List amp Label knows the following special date variants LL DATE OLE LL DATE MS LL DATE DELPHI 1 LL DATE DELPHI LL DATE VFOXPRO To make passing dates easier there are some formats that do not require a Julian format LL_DATE_DMY LLDATE_MDY LL_DAT
154. OM functionality is available If you re using one of these components you may skip this chapter and turn to one of the DOM samples for a quick start In order to create project files dynamically for the runtime or to edit existing project files by code you can use the List amp Label DOM functions 5 8 1 Basic Principles Each object within a project file has its own handle DOM handle The functions of the DOM API use this handle to uniquely identify objects An object in this sense is any designer object but also other elements such as auxiliary lines project parameters etc The DOM viewer included in the scope of supply enables a quick overview of all objects their value and other properties In addition properties values can be changed with the viewer and saved in the project The clipboard function enables any object or property to be copied to the clipboard for further use The functions relevant for the DOM API are divided into 2 groups first of all project files can be loaded created and saved The functions L ProjectOpen L ProjectClose and L ProjectSave are available for this purpose The function 133 Programming Using the API L DomGetProject called immediately after L ProjectOpen returns the DOM handle for the project object This then provides the basis for using the other functions DOM Functions LIDomGetObject With this function important subobjects can be obtained from the project obj
155. ONTROLS LlAssociatePreviewControl Syntax INT LlAssociatePreviewControl HLLJOB hJob HWND hWndControl UINT nFlags 142 Function Reference Task Associates a LL job to a preview control Parameters hJob List amp Label job handle hWnd window handle nFlags Value Meaning LL ASSOCIATEPREVIEW Automatically delete preview file when preview is CONTROLFLAG DELETE closed ON_CLOSE LL_ASSOCIATEPREVIEW Informs the API that the passed window handle is CONTROLFLAG HANDLE a pointer to a structure containing drilldown IS_ATTACHINFO information LL_ASSOCIATEPREVIEW If LL_ASSOCIATEPREVIEWCONTROLFLAG CONTROLFLAG_PRV_ HANDLE_IS_ATTACHINFO is not set the current REPLACE preview will be replaced by this preview LL ASSOCIATEPREVIEW If LL_ASSOCIATEPREVIEWCONTROLFLAG CONTROLFLAG_PRV_ HANDLE_IS_ATTACHINFO is not set this preview ADD_TO_CONTROL_STACK is added to the current preview tab LL_ASSOCIATEPREVIEW If LL_ASSOCIATEPREVIEWCONTROLEFLAG CONTROLFLAG_PRV_ HANDLE_IS_ATTACHINFO is not set this preview ADD_TO_CONTROL_IN_ is added to the current preview window in a new TAB tab If necessary combined with or Return Value Error code Hints See chapter Direct Print and Export From the Designer Example See chapter Direct Print and Export From the Designer LiCreateSketch Syntax INT L1lCreateSketch HLLJOB hJob UINT nObjType LPCTSTR lpszObjName
156. OPTION_SETCREATIONINFO List amp Label can store some information about the user user and computer name date and time of creation as well as last modification in the project file and the preview file This can be important for tracing modifications TRUE Save info default FALSE Suppress info LL_OPTION_SHOWPREDEFVARS TRUE The internal variables of List amp Label will be listed in the variable selection dialog of the formula wizard default FALSE These will be suppressed LL_OPTION_SKETCH_COLORDEPTH This option sets the color depth of the sketch files for the file selection dialogs Default is 8 i e 256 colors 32 would be true color LL_OPTION_SKIPRETURNATENDOFRTF RTF texts may contain blank lines at the end TRUE These are removed FALSE The blank lines are printed default LL_OPTION_SORTVARIABLES TRUE The variables and fields in the selection dialog are sorted alphabetically FALSE The variables and fields in the selection dialog are not sorted default 267 API Reference 268 LL_OPTION_SPACEOPTIMIZATION TRUE List amp Label will default the space optimization feature for new paragraphs in text objects and new fields default FALSE The default state will be unchecked This does not apply to existing objects LL_OPTION_SUPERVISOR TRUE All menu options are allowed and even locked objects are not locked This mode enables sections that are not accessible to the user to be used wit
157. ORKSPACETITLE 172 L BARCODE _ 97 SSCC 97 LL_BOOLEAN 95 LL_CHAR_LOCK 93 L_CHAR_NEWLINE 93 L_CHAR_PHANTOMSPACE 93 L_CMND _ CHANGE _DCPROPERTIES CREATE 292 CHANGE_DCPROPERTIES_ DOC 293 CHANGE_DCPROPERTIES_ PAGE 293 DRAW_USEROBJ 283 EDIT _USEROBJ 284 ENABLEMENU 286 EVALUATE 286 GETVIEWERBUTTONSTATE 287 HELP 288 HOSTPRINTER 269 289 MODIFYMENU 170 294 OBJECT 294 PAGE 296 PROJECT 297 SAVEFILENAME 298 SELECTMENU 299 TABLEFIELD 299 TABLELINE 301 VARHELPTEXT 302 L DATE 94 95 L DATE_DELPHI 95 L DATE_DELPHI_1 95 L DATE_MS 95 L DATE_OLE 95 L_DATE_VFOXPRO 95 L DRAWING 96 L ERR L_DRAWING_HBITMAP L_DRAWING_HEMETA L_DRAWING_HICON L_DRAWING_HMETA L_DRAWING_USEROBJ L_DRAWING_USEROBJ_DLG ALREADY_PRINTING 6 BAD_DLLS 100 BAD_EXPRESSION 19 BAD_EXPR ODE 20 BAD_JOBHANDLE 1 BAD_MODE 32 BAD_OBJECTTYPE 3 BAD_PR BAD_WE BADCOD BADOBJ ouw Ww gt oT FGBAD FGBAD TER 15 BSERVER_LICENSE 50 EPAGE 45 AME 25 FFERTOOSMALL FFERTOOSMALL 44 CREATETEMPFILE 46 FILE 24 ODE 33 FGNOT CUR O T O OO _BOX O90 9 9 9 0 0 PR O OCHAR ODEST FOUND 22 RENT_PRINTJOBS 49 RAWINGNOTFOUND 53 EXCEPTION 104 EXPRESSION 23 LICENSEVIOLATION 105 EEDS_VB 14 5 _LANG_DLL 101 EMORY 102 OBJECT 29 PREVIEWFILES 17 PREVIEWMODE 16
158. PE_DOUBLE something is wrong must be numerical LIExprEvaluate hJob lpExpr lpszBuf sizeof lpszBuf 1DateOne atol lpszBuf DateOne now has the Julian date 29 2 1964 LlDefineVariable hJob Date 28 10 2013 LL_TEXT 185 API Reference LLExprEvaluate hJob lpExpr lpszBuf sizeof lpszBuf lDateTwo atol lpszBuf DateTwo now has the Julian date LIExprFree hJob lpExpr else Error LIExprError hJdob lpszErrortext sizeof lpszErrortext See also LIExprEvaluate LIExprType LIExprError LIExprFree LIExprType Syntax INT LlExprType HLLJOB hJOB HLLEXPR 1pExpr Task Evaluates the result type of the expression Parameter hJob List amp Label job handle IpExpr The pointer returned from the corresponding L ExprParse Return Value Type of result Value Meaning LL_EXPATYPE_STRING String LL_EXPRTYPE_ DOUBLE Numerical value LL_EXPRTYPE_DATE Date LL_EXPATYPE_BOOL Boolean value LL_EXPRTYPE_DRAWING Drawing LL_EXPATYPE_BARCODE Barcode Example See LIExprParse See also LIExprParse LIExprEvaluate LIExprError LIExprFree 186 Function Reference LIGetChartFieldContents Syntax INT L1GetChartFieldContents HLLJOB hJob LPCTSTR lpszName LPTSTR lpszBuffer UINT nBufSize Task Returns the contents of the corresponding chart field Parameter hJob List amp Label job handle IpszName Pointer to a string with the name of the chart f
159. PE_RELATION Relation name 204 Function Reference Value Meaning LL DICTIONARY _TYPE_SORTORDER Sortorder name Return Value Error code Use this function to use the same project definition file for various localizations After having added languages via L LocAddDictionaryEntry the Designer toolbar will offer a button for choosing the language LL_DICTIONARY_TYPE_STATIC allows the localization of static text by using the Translate Designer function including Intellisense support The static text may contain up to three placeholders which are marked as 0 1 and 2 At print time the used language will be automatically set according to the thread locale ID which is the system language by default If you want to set a specific language as the default use LL_OPTION LCID This default setting can be overruled by the end user via the Designer For clean up purposes set pszKey and pszValue to NULL and nType to 0 This will delete all dictionary entries from all dictionary types Example HLLJOBhJob hJob L1lJobOpen CMBTLANG DEFAULT Add languages LlLocAddDesignLCID hJob 9 LlLocAddDesignLCID hJob 7 English as base language German as translation language r 7 Add translations LlLocAddDictionaryEntry hJob 7 ArticleNumber Artikelnummer LL_DICTIONARY_TYPE_IDENTIFIER LlLocAddDictionaryEntry hJob 7 Price Preis LL_DICTIONARY_TYPE_IDENTIFIER LlLocAddDictionaryEntry hJob 7 Pa
160. PORTPARAMETER 259 PRVZOOM_TOP 265 DESIGNERPREVIEWPARAMETER 260 PRVZOOM_WIDTH 265 DESIGNERPRINT_SINGLETHREADED 260 REALTIME 266 ERR_ON_FILENOTFOUND 260 RESETPROJECTSTATE_FORCES NEW_DC ESC CLOSES PREVIEW 260 266 EXPRSEPREPRESENTATIONCODE 260 RESETPROJECTSTATE_FORCES NEW_PRINT J JOB 266 FONTPRECISIO 260 i RETREPRESENTATIONCODE 266 FONTQUALITY 260 i E RIBBON DEFAULT ENABLEDSTATE 266 FORCE_DEFAULT PRINTER_IN_PREVIEW261 eee aes RTFHEIGHTSCALINGPERCENTAGE 267 FORCEFIRSTGROUPHEADER 261 3 j 7 SCALABLEFONTSONLY 267 FORCEFONTCHARSET 261 SETCREATIONINFO 267 HELPAVAILABLE 192 261 SHOWPREDEFVARS 267 MMEDIATELASTPAGE 261 7 z SKETCH_COLORDEPTH 267 NCLUDEFONTDESCENT 262 SKIPRETURNATENDOFRTF 267 NCREMENTAL_ PREVIEW 261 SORTVARIABLES 267 NTERCHARSPACING 262 SPACEOPTIMIZATIO 268 LANGUAGE 192 SUPERVISOR 268 LCID 262 271 277 SUPPORT _HUGESTORAGEFS 268 LOCKNEXTCHARREPRESENTATIONCODE 262 z SUPPORTS_PRNOPTSTR_EXPORT 268 AXRTFVERSION 262 TABLE_COLORING 268 ETRIC 263 a 7 TABREPRESENTATIONCODE 268 OAUTOPROPERTYCORRECTION 263 TABSTOPS 269 OFAXVARS 263 i UISTYLE 269 OFILEVERSIONUPGRADEWARNING 263 UNITS 269 OMAILVARS 263 3 USE_JPEG_OPTIMIZATION 269 ONOTABLECHECK 263 SAE USEBARCODESIZES 269 OPARAMETERCHEC 90 264 Z USECHARTFIELDS 269 OPRINTERPATHCHECK 264 USEHOSTPRINTER 269 OPRINTJOBSUPERVISION 264 VARSCASESENSITIVE 270 OTIFICATIONMESSAGEHWND 264 XLATVARNAMES 270 ULL_IS_NONDESTRUCTIVE 264 7 re LL_OPTIONSTR_ PHANTOMSPA
161. PrinterDefaultsDir should be used here This setting is of particular importance if the available printers vary from workstation to workstation That s one of the reasons why you shouldn t redistribute printer settings files to your users ListLabel LL new ListLabel LL LL LL LL LL DataSource CreateDataSet Set local temporary path Core L1PreviewSetTempPath Path GetTempPath Printer settings should be created in user specific sub directory so changes will be stored permanently Core L1SetPrinterDefaultsDir lt Path gt Print Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Set local temporary path LL Core L1PreviewSetTempPath Path GetTempPath Printer settings should be created in user specific sub directory so changes will be stored permanently LL Core L1SetPrinterDefaultsDir lt Path gt LL Print 62 Examples LL Dispose Using the stream overloads of the Print and Design methods is an alternative here These for example automatically take care of storing the printer settings in the passed stream Hints as well as an example can be found in section Store Project Files in a Database 63 Programming With the OCX Component 3 Programming With the OCX Component Parallel with the VCL component and NET assembly List amp Label includes the OCX component s for integration into your IDE The following sect
162. R lpszName Task Returns the type of the corresponding variable Parameter hJob List amp Label job handle IpszName Pointer to a string with the name of the variable Return Value Variable type positive or error code negative Hints This function can be used in callback routines to ask for the type of variables See also LIDefineVariableStart LIDefineVariableExt LIDefineVariableExtHandle LIGetVariableContents LIGetVersion Syntax INT L1GetVersion INT nCmd Task Returns the version number of List amp Label Parameter Value Meaning LL_VERSION_MAJOR 1 Returns the main version number LL_VERSION_MINOR 2 Returns the minor version number for example 1 1 means 001 as the sub version has three digits Return Value See parameter 199 API Reference Example int v v LlGetVersion VERSION MAJOR LlUjobClose Syntax void LlJobClose HLLJOB hJob Task Releases the internal variables frees resources etc Parameter hJob List amp Label job handle Hints This function should be called at the end coupled with Li obOpen or LUobOpenLCID i e after using the List amp Label DLL or when ending your program Example HLLJOB hJob hJob LlJobOpen 1 LlDefineVariableStart hJob See CEG a ace L1lJobClose hJob See also LlJobOpen LlJobOpenLCID LIJobOpen Syntax HLLJOB LiJobOpen INT nLanguage Task Initializes internal variables and res
163. RAMETERFLAG_ LOCAL The parameter is not added to the print project parameter list and will not be saved to the preview file as it is only valid for the local user or machine If the parameters are passed using L SetDefau tProjectParameter they represent the default values that the user may change according to his needs if LL_ PARAMETERFLAG_PUBLIC is set 415 Miscellaneous Programming Topics If the project is loaded afterwards L DefineLayout L Print WithBox Start the passed parameters will be replaced by those saved to the project file i e they are overwritten Unchanged parameters are not saved to the project file and thus remain with their default values If required you may set the LL_PARAMETERFLAG_SAVEDEFAULT to override this behavior This is especially useful if the project parameter is queried before printing with L GetUserParameter to offer report parametrization to the user Note you may not pass multiple parameters with the same name but different types 8 4 2 Querying Parameter Values While Printing After starting the printout using L Print WithBox Start the values for the project parameters can be queried using L PrintGetProjectParameter You may also change these values using L PrintSetProjectParameter or even add further parameters As the parameters may be see above saved to the preview file and can be extracted from there using L StgsysGet obOptionStringEx you may consistently save your own
164. Releases the parsing tree created by L ExprParse Parameter hJob List amp Label job handle IpExpr The pointer returned from the corresponding L ExprParse Hints To avoid memory leaks the function must be called when a tree returned by LlExprParse is no longer required Example See LIExprParse See also LIExprParse LIExprEvaluate LIExprType LIExprError LIExprGetUsedVars Syntax INT L1LExprGetUsedVars HLLJOB hJob HLLEXPR lpExpr LPSTR pszBuffer UINT nBufSize Task Returns the variables and fields tab separated that were used in a formula with LIExprParse 183 API Reference Parameter hJob List amp Label job handle pExpr The pointer returned by the corresponding L ExprParse pszBuffer Buffer for the return value nBufSize Size of buffer Hints Corresponds to LIExprGetUsedVarsEx with parameter bOrgName TRUE See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIExprParse LIExprEvaluate LIExprType LIExprError LIExprGetUsedVarsEx Syntax INT L1LExprGetUsedVarsEx HLLJOB hLlJob HLLEXPR lpExpr LPSTR pszBuffer UINT nBufSize BOOL bOrgName Task Returns the variables and fields tab separated that were used in a formula with LIExprParse Parameter hJob List amp Label job handle pExpr The pointer returned by the corresponding L ExprParse pszBuffer Buffer for the return value nBufSize Siz
165. SetPrinterDefaultsDir LIPrintStart LIPrintWithBoxStart LIViewerProhibitAction Syntax INT LlViewerProhibitAction HLLJOB hJob INT nMenuID Task Removes buttons from the preview Parameter hJob List amp Label job handle nMenulD D of the button you wish to remove The IDs of the menu items in List amp Label can be found in the file MENUID TXT in your List amp Label installation Return value Error code Hints AO as menu ID clears the list of menu items to be suppressed See also LIPreviewDisplay LIPreviewDisplayEx LIXGetParameter Syntax INT L1XGetParameter HLLJOB hJob INT nExtensionType LPCTSTR pszExtensionName LPCTSTR pszKey LPTSTR pszBuffer UINT nBufSize Task Gets parameters from a specific extension module Parameter hJob List amp Label job handle nExtensionType Type of extension Value Meaning LL_LLX_EXTENSIONTYPE_EXPOAT Export module LL LLX_EXTENSIONTYPE_BARCODE 2D barcode module 281 API Reference pszExtensionName Name of the extension HTML RTF PDF417 pszKey Name of the parameter pszBuffer Pointer to a buffer nBufSize Size of the buffer Return value Error code Hints The keys known by the extension modules are specific to them Please refer to the documentation for the respective module See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIXSetParameter LIXSetParamete
166. String you will get a list of available extension modules for example CMLL21PW LLX CMLL21HT LLX If debug mode is switched on List amp Label will issue the rules and tell you why which module has been loaded or unloaded LL_OPTIONSTR_MAILTO Can be used to preset the address of the recipient when sending the preview file from the preview Multiple recipients can be separated by LL_OPTIONSTR_MAILTO_CC Can be used to preset the address of a CC recipient when sending the preview file from the preview Multiple recipients can be separated by LL_OPTIONSTR_MAILTO_BCC Can be used to preset the address of a BCC recipient when sending the preview file from the preview Multiple recipients can be separated by 275 API Reference 276 LL_OPTIONSTR_MAITO_SUBJECT Can be used to preset the subject when sending the preview file from the preview LL_OPTIONSTR_NULLVALUE Can be used to preset the representation of a NULL value at print time Default value empty LL_OPTIONSTR_PREVIEWFILENAME Can be used to preset the name of the preview file By default the files are created in the project file s directory or an alternative directory see LIPreviewSetTempPath The default file name is lt Project file name gt LL This option can be used to preset another name that replaces the lt Project file name gt part LL_OPTIONSTR_PRINTERALIASLIST Allows you to define printer alias tables i e tables that de
167. T ORIENTATION the paper orientation shall be set to the orientation given in _nOrientation The printer DC is stored in ADC No change of he return value LL_PRN_GET he current paper orientation should be ORIENTATION stored in _nOrientation as DMORIENT PORTRAIT or DMORIENT LANDSCAPE No change of the return value LL _PRN_EDIT reserved not yet used LL_PRN_GET copy the device name of the printer into DEVICENAME _pszBuffer optional No change of the return value LL_PRN_GET copy the driver name of the printer into DRIVERNAME _pszBuffer optional No change of the return value LL PRN_GET PORTNAME copy the port name of the printer into _pszBuffer optional No change of the return value 290 Callback Reference LL_PRN_RESET DC the printer DC shall be reset see API function ResetDC The new value usually the same in current Windows versions should be stored into ADC No change of the return value LL_PRN_COMPARE List amp Label needs this function to decide PRINTER whether the printer for the first page is the same as the one for the following pages You must compare the printers for example DEVMODE structure members with the IDs in nUniqueNumber and nUniqueNumberCompare Return 1 for equal O for different LL_PRN_GET shall return set paper format PAPERFORMAT _nPaperFormat xPaperSize and LL_PRN_SET _yPaperSize PAPERFORMAT Hints This callback is rarely used and can be ignored for
168. TER 11 PROJECT 10 O_TABLEOBJECT 28 O_TEXTOBJECT 30 O_WEBSERVER_LICENSE 51 T 48 NATION 47 97 97 97 97 97 97 LL_HTML LL_INFO_METER LL_INFO_PRINTJOBSUPERVISION LL pi LL LL LL LL_OPTION OPRINTERCFG 38 OT_YET_PRINTING 7 OTFINISHED 43 OVALIDPAGES 41 ONLY_ONE JOB 13 PARAMETER 18 PRINTING 12 PRINTING JOB 4 SAVEPRINTERCFG 39 TASK_ACTIVE 2 KNOWN 31 OWNFIELD 36 lt gt Ho ee K K K K USER_ABORTED 99 HT TEN oes DESIGNERPRINTJOB EXPRERROR FAILSFILTER VIEWERBTNCLICKED UMERIC UMERIC_INTEGER UMERIC_LOCALIZED ADDVARSTOFIELDS gt OTINHOSTPRINTERMODE 42 ONLYWITHONETABLE 34 OWNOBJECT 27 OWNSORTORDER 37 OWNVARIABLE 35 TFY_VIEWERDRILLDOWN 289 305 307 307 308 308 94 94 94 257 LLOW_COMBINED_COLLECTING OF_DATA _FOR_COLLECTIONCONTROLS ALLOW_LLX_EXPORTERS 257 257 CALC_SUMVARS_ON_PARTIAL_LINES258 CALCSUMVARSONINVISIBLELINES CALLBACKMASK CALLBACKPARAMETER CODEPAGE COMPRESSRTF COMPRESSSTORAGE CONVERTCRLF DEFAULTDECSFORSTR 258 258 258 258 259 259 259 259 439 Index DEFDEFFONT 259 271 PRVZOOM_HEIGHT 265 DEFPRINTERINSTALLED 192 PRVZOOM_LEFT 265 DELAYTABLEHEADER 259 PRVZOOM_PERC 266 DESIGNEREX
169. This is useful for printing labels for example as in this way you can paint additional information onto a page page number printout time demo text individual watermarks etc Activation L1SetOption hJob LL OPTION CALLBACKMASK lt other flags gt LL_CB_PAGE Parameters Param points to an scLlPage structure _nSize Size of structure sizeof scLIPage _bDesignerPreview TRUE if the call takes place from the Designer preview FALSE if the call takes place during the WYSIWYG preview or print 296 Callback Reference _bPreDraw TRUE for a call before List amp Label draws the page FALSE for a call after List amp Label has finished the page _bDesignerPreview TRUE if the call takes place from the Designer preview FALSE if the call takes place during the WYSIWYG preview or print _hPaintDC Device Context for the print _hRefDC Device Context for references Return Value 0 Hints In this callback no List amp Label function may be called which will produce output as a result L Print etc Functions like L PrintGetCurrentPage LIPrintGetOption or L PrintEnableObject are allowed See Hints on the use of GDl objects This function is called twice per page once with _bPreDraw TRUE then with bPreDraw FALSE The page size can be determined by the function GetWindowExt Don t forget use the hRefDC If you change the window origin of the hRefDC for bPreDraw TRUE with SetWindowOrg
170. WNPARAMETER LPARAM amp oMyDrillDownParameters To deactivate drilldown for this LL job set the option to NULL deactivate Drilldown for current LL Job L1SetOption hJob LL_OPTION_DRILLDOWNPARAMETER NULL The parameter passed with this option can be used freely for example as a pointer to an internal data structure or objecets This parameter will be passed unchanged in the callback for your use scL DrillDownJob _nUserParam Please make sure the parameter is not 0 or NULL unless you want to deactivate drilldown Via the callback LL N7FY_VIEWERDRILLDOWN for further description please see chapter Callbacks and Notifications List amp Label informs about the current task This callback will always be called in the context of the preview thread regardless if initiated from designer or preview print When you use structure members e g like _nUserParam please ensure that the thread has evaluated or copied them before you pass control back to List amp Label as the structure will no longer be valid then this is true for all Callbacks Tasks Now to the individual tasks that will be put to you via the callback being indicated by various values of scL DrillDownJob _nFunction 5 7 2 1 1 Start Event LL_DRILLDOWN_START If this event is fired you can create a thread and pass on the drilldown parameters If your development systems does not support threads you should use the main thread for the print job In this c
171. _ PAGE Task The host application can modify the printer DC Parameters Meaning of the parameter IParam Pointer to a structure of type scLIPrinter The following fields have meaningful values _nSize sizeof of the structure sizeof scLIPrinter _hDC printer DC Return Value ignored always 0 Hints This callback is rarely used and can be ignored for nearly all cases It is called when List amp Label has called StartPage 293 API Reference LL_CMND_MODIFYMENU Task Allows the application to modify List amp Labels menu This callback is supported for reasons of compatability to extend the Designer the use of L DesignerAddAction is recommended Activation Always activated Parameters Meaning of the parameter Param Param menu handle Return Value Ignored always 0 Hints This function is called when List amp Label created its menu The application can add or delete menu items The IDs of the menu items in List amp Label can be found in the file MENUID TXT of your List amp Label installation User defined menus should use IDs above 0100 This callback is only included for compatibility reasons to expand the Designer preferably use L DesignerAddAction Example case LL _CMND_ MODIFYMENU DeleteMenu _hMenu IDM _HELP_CONTENTS MF_BYCOMMAND DeleteMenu _hMenu IDM _HELP_INDEX MF_BYCOMMAND DeleteMenu _hMenu IDM _HELP_HELPONHELP MF _BYCOMMAND break LL_CMND_OBJECT
172. _T John Q Public Mail parameter L1DomSetProperty hProj _T ProjectParameters LL MAIL Subject Contents _T Your request L1DomSetProperty hProj _T ProjectParameters LL MAIL From Contents 140 Using the DOM API Professional Enterprise Edition Only _T info combit net L1DomSetProperty hProj _T ProjectParameters LL MAIL To Contents _T info sunshine agency net Save project L1ProjectSave hJob NULL L1ProjectClose hJob L1JobClose hJob 141 API Reference 6 API Reference 6 1 Function Reference LIAddCtlSupport Syntax INT L1lAddCtlSupport HWND hWnd UINT nFlags LPCTSTR lpszInifile Task Allows you to use combit dialog styles in your own application Parameter hWnd Window handle of the program nFlags Multiple flags can be used by adding these constants Value Meaning LL_CTL_ADDTOSYSMENU Extends the system menu of the program with a choice of a dialog style LL_CTL_ALSOCHILDREN Ensures that the child windows automatically use the same dialog styles as their parent LL CTL _ Ensures that correct drawing is possible CONVERTCONTROLS even with VB Thunder Controls Ipszinifile Name of a valid registry key Suggestion leave empty to use the default Return Value Error code Hints Enables e g your application to be provided with other combit dialog styles Example L1AddCt1lSupport hWndMain LL_CTL_ALSOCHILDREN LL_CTL_CONVERTC
173. a for a detailed explanation However for label and card projects it might be interesting to access these objects separately 131 Programming Using the API In the following chapter whenever chart is mentioned crosstab also applies Besides working with the report container there are two different modes when handling chart objects Choose the one you require via the option LL_OPTION_USECHAATFIELDS n principle printing charts is similar to printing tables i e you first declare a data record you wish to pass to the chart object and pass this record afterwards Standard Mode Default This mode can only be used with list projects and does not require any changes to existing projects The chart objects are fed with the same data as the table objects an L PrintFields sends data to both chart objects and table objects However the charts only accumulate the data and are not printed right away This mode is included for compatibility reasons and can be used to easily fill charts that are linked to table objects Enhanced Mode This mode is activated by setting the option LL_ OPTION_USECHAATFIELDS to TRUE In this case besides variables and fields you have special chart fields available These can be declared similarly to normal fields via API calls This mode offers more flexibility than the standard mode your users may e use chart objects wherever they like no printing order has to be obeyed e use chart objects in label
174. a label is to be processed It is important that the buffer receiving the filename is pre initialized either to an empty string or to a file name suggestion which also sets the path 98 Invoking the Designer TCHAR aczProjectFile _MAX_PATH _tcscpy aczProjectFile c mylabel 1b1 L1SelectFileDlgTitle hJob hWindow Choose label LL_PROJECT_LABEL aczProjectFile _MAX_PATH NULL Of course this can also be done with an individual dialog box or a file name can be passed to the Designer directly if the user should not be given the option of choosing List amp Label must be informed of the possible variables in order to make them available to the user during design time or print time Otherwise the user could only use fixed text in the object definitions First of all the variable buffer is cleared in case variables have been previously defined The call is also recommended to make sure that the variable buffer is empty and no variables remain from the previous print job that might be meaningless in this next task L1DefineVariableStart hJob Now the variables can be declared in various ways If the Designer knows sample data for a variable then these are used instead of the variable name in the preview window in order to guarantee a more realistic preview display L1DefineVariable hJob forename George L1DefineVariable hJob lastname Smith And so the expression forename is tra
175. a multi page print pnState State value used by the next L A7FDisplay call 244 Function Reference Return Value Error code Example Create Printer DC HDC hDC CreateDC NULL prnsrv default NULL NULL RECT re 0 0 1000 1000 BOOL bFinished FALSE INT nPage 0 Init document StartDoc hDC NULL while bFinished nPagett UINT nState 0 Init page StartPage hDC Prepare DC set coordinate system SetMapMode hDC MM_ ISOTROPIC SetWindowOrgEx hDC rc left rc top NULL SetWindowExtEx hDC rc right re left rc bottom re top NULL SetViewportOrgEx hDC 0 0 NULL SetViewportExtEx hDC GetDeviceCaps hDC HORZRES GetDeviceCaps hDC VERTRES NULL print RTF Text BOOL bFinished LIRTFDisplay hJob hRTF hDC amp rc nPage 1 amp nState LL_WRN_PRINTFINISHED done page EndPage hDC EndDoc hDC See also LIRTFCreateObject LIRTFEditObject Syntax INT LIRTFEditObject HLLJOB hJob HLLRTFOBJ hRTF HWND hWnd HDC hPrnDC INT nProjectType BOOL bModal Task Displays the RTF editor to the user All variables and in case of LL_ PROJECT LIST all fields are available for use in expressions 245 API Reference Parameter hJob List amp Label job handle ARTF RTF object handle hWnd Handle of parent window or host control hPrnDC Reference DC of the destination usually a printer DC Important for the
176. abel 92 Programming Basics Please note the hints regarding NULL values in section Passing NULL Values HLLJOB hJob L1JobOpen CMBTLANG ENGLISH L1DefineVariable hJob Firstname George L1DefineVariable hJob Lastname Smith L1DefineVariableExt hJob ISBN 40 15589 97531 LL_BARCODE_EAN13 NULL L1DefineVariableExt hJob Photo c dwg test bmp LL_DRAWING NULL Text Constant LL TEXT Content e g abcdefg Hints The text can contain special characters to handle word wraps These characters are Value Meaning LL_CHAR_NEWLINE OxOd Text object Becomes a blank if word Ox0a wrapping is not activated in the Designer Table field Wrap is forced This will chr LL_ CHAR NEWLINE be wrapped LL_CHAR The character is ignored if no wrapping is PHANTOMSPACE chosen in the Designer In this way other characters can be assigned to a wrap This is a word chr LL_CHAR_PHANTOMSPACE wrap is wrapped when needed LL_CHAR_LOCK Is put in front of tabs or blanks and means that no wrapping may occur Not chr LL_ CHAR _LOCK here please The codes of these characters can be changed with LL OPTION_xxx REPRESENTATIONCODE 93 Programming Using the API Numeric Constant LL_ NUMERIC Content e g 3 1415 2 5e3 Hint Exponential syntax is allowed 2 5e3 equals 2 5 10 A thousands separator as in 1 420 000 00 is not allowed Constant LL_NUMERIC_L
177. abel search path Further information can be found in chapter Redistribution Shipping the Application 1 4 8 Integration With Other Programming Languages For various programming languages the installation of List amp Label contains declaration files as well as examples You will find these files in the corresponding sub directories of your List amp Label installation Follow the documentation of your programming language to include DLL s via API or OCX ActiveX components f your programming language is not included you can create a declaration file on your own by following the appropriate steps for your programming language Your programming language just needs to support invoking an API via calling DLL unctions n case of doubt please contact our support 1 4 9 Hints on Variable and Field Names n variable names the only characters that should be used are A through Z a through z and umlaut characters They must not start with numbers Invalid characters will be replaced by _ A dot is the separator for hierarchies This way you can use e g person address street and person address city as variables or fields In the Designer you get a hierarchical structure i e below person you will find a folder address with the fields city and street The names of variables fields must not be ambiguous 1 4 10 Debugging Support A significant part of the development process of an application is the detectio
178. ace Optimization Speed Optimization SqlConnection SqlConnectionDataProvider SQLite START Event Sub reports SubltemTable Sum variable Suppress data SVG export System requirements T Text CSV export Text Layout export Text blocks Text Variables Thousands separator Threading Translate Translation TTY U Unbound data Update Changes User Drawn Object User information User variable 446 159 195 258 259 262 243 373 60 430 408 268 106 29 29 56 126 52 40 414 55 377 427 382 384 30 93 277 420 205 277 387 53 432 432 97 267 197 V V V V V V V Vi V V V Vi V V Vi V ariableHelpText ariables CL CL component Data binding Data transfer Designer objects Events Preview control Preview files Relational links DF iewer Application iewer OCX AsyncDownload iewer OCX Control isual Basic isual C isual DataFlex isual dBase isual FoxPro isual Studio LC component Integration Ww Web Reporting Word export x lt x x xX KK KK XK base HTML export LS export API L export m DataProvider P Look amp Feel Language selection Print and design methods 7 7 43 44 33 13 24 30 34 156 14 78 82 86 83 83 83 83 81 79 15 427 5 76 0 75 14 14 15 15 15 16 78 419 389 15 393 345 408 30 399 30 269 Index XPS export 403 Z Z
179. aeeeaaeaees 100 5 4 1 S pplying Datas tanin lta ean itches pare eniet etree hse ate 00 5 4 2 Real Data Preview or Print ccccccccceeseececceeeeeetseeeeetseeeenseeeees 01 5 4 3 Basi ProCO Gur iesnsesztscdins de ankagitndet ina a ana te patie 01 54A Annotations isis ira Naan Oahu UA Alea eed aced 04 5 5 Printing Relational Data ccc cccceeceeseeeeeeeeeeeeeneeeeeeeeeeeeteaeeeeeeeees 107 5 5 1 API Functions N ded ccceceeceeeeeeeeeeeeeeeeeeeeeeeteteeseeeeeeeeeeeea 07 5 52 Calling the DESIGNED iennet eR een ee ek 07 5 5 3 Controlling the Print ENJIN Greenie adenine 09 5 5 4 Handling 1 1 Relations aea e a e a e L 15 5 6 Callbacks and Notifications cccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 116 5 6 1 OVEMVIGW elann pa ientadentesanete aa Aa EAN S M phe A AEE AEA 16 5 6 2 User ObDJ6CtS Innie aa A a E 17 5 6 3 Definition of a Callback Routine 00 0 eee ceceeeeeeeneeeeeeeeeetenees 18 5 6 4 Passing Data to the Callback Routine sssssiissssesseiinreeereerrrree 19 5 6 5 Passing Data by Messages ccccecceeeceeeeeeeeeeentteeeeeeeeenenaes 19 5 6 6 R rther HIMES eaea a 2 Glades ian oenncatean E ben weamlens 21 5 7 Advanced Programming ccccceeeeseeeeeeeeeeeeeeeeeeneeeeeeeeeeeenneeeeeeeeeess 121 5 7 1 Direct Print and Export From the Designer ssssssisseeerserrneeee 21 5 7 2 Drilldown Reports in Previ Wass musragsnom iiipin naa 25 5 7 3 Supporting the Report Parame
180. al applications can use the DLL routines without requiring multiple copies to be installed on the system Of course procedures of one DLL can also call procedures of other DLLs as is regularly done by Windows List amp Label uses different DLLs for specific jobs Usage of a DLL Because of this method of linking Windows has to be able to find and load the DLL file To be accessible the DLL has to be placed either in the path where the calling application is the directory of Windows or its system path or in any path contained in the system search path The same is valid for the DLLs List amp Label uses These DLLs must be copied into a path in which your program is installed or which complies with the requirements stated above The List amp Label DLL and its dependent DLLs can be installed for Side By Side use in your application s directory For compatibility reasons concerning Windows 7 and Windows 8 no files should be placed in the Windows directory 89 Programming Using the API See chapter Redistribution Shipping the Application for further information Linking With Import Libraries To use the API functions your source code must include a declaration file for cmll21 dll C cmbtll21 h which needs to be done after the include lt windows h gt statement resp the precompiled header file as Windows data types are used in the declarations Additionally you need to link the corresponding LIB file C
181. aller DemoApplication exe the called function including all parameters and in the following line the return value of the call A full debug log which is also often requested by our support team contains many such output lines If you don t get the output normally m you haven t activated the debug mode with L SetDebug or m you haven t activated logging in Debwin We do not offer support for this additional tool It is purely a debugging tool 426 System Requirements 11 Redistribution Shipping the Application For further information please refer to the file REDIST TXT that can be found in your List amp Label installation menu under Documentation gt Other gt Redistribution Info 11 1 System Requirements Please refer to System Requirements as the redistribution modules of List amp Label have the same requirements 11 2 64 Bit Modules For Information on the 64 bit modules please refer to the file REDIST TXT in your List amp Label installation directory The following restrictions current as of 10 2015 should be considered when using the 64 bit modules m no project wizard available m no direct digital signature support available restriction from OpenLimit secrypt 11 3 The Standalone Viewer Application 11 3 1 Overview LLVIEW21 EXE is a standalone application for viewing and printing the List amp Label preview files Once the viewer is registered the file extension ll is link
182. alls 97 Programming Using the API lt open Job gt L1JobOpen L1lJobOpenLCID lt define List amp Label settings gt L1SetOption L1SetOptionString L1SetDebug L1SetFileExtensions L1SetNotificationMessage L1SetNotificationCallback lt which file gt L1SelectFileDlgTitleEx lt define variables gt L1DefineVariableStart L1DefineVariable L1DefineVariableExt L1DefineVariableExtHandle lt define fields gt only LL_PROJECT_LIST L1DefineFieldStart L1DefineField L1DefineFieldExt L1DefineFieldExtHandle lt disable functions gt L1DesignerProhibitAction L1DesignerProhibitFunction lt call designer gt L1DefineLayout lt close Job gt L1JobClose It is sufficient for job management to get the job at the beginning of the program and to release it at the end this job is then used both for Designer calls and printing Normally a job handle can be retained for the whole lifetime of the application so that it only has to be released at the end We recommend making global settings valid for all List amp Label calls after LlJobOpen LIJobOpenLCID and making local settings such as disabling menu items directly before calling the Designer or printing 5 3 2 Annotations If setting of certain options is required then this must of course be done before calling the Designer Normally the user is asked by a file selection dialog which file he would like to process Let s assume in our example that
183. ame INT nFunction Task Allows saving and restoration of the printer configuration file Parameter hJob List amp Label job handle IpszFilename File name of the printer configuration file nFunction Action Action Meaning LL_PRINTERCONFIG_SAVE Saves the printer configuration file of the currently opened project in a file with the name lpszFilename LL_PRINTERCONFIG_ Copies the previously saved configuration RESTORE file created with LL_PRINTERCONFIG_SAVE back to the current project Return Value Error code always 0 Hints It is important that LL_ PRINTERCONFIG_RESTORE is called before L Print 210 Function Reference Example The following principle should be used for hand made copies on a temporary printer that is a user can choose to temporarily change the printer using the printer dialog box and choose multiple copies Usually the second and following passes would print to the default printer which is not intended for each copy L1PrintWithBoxStart if first copy L1PrintOptionsDialog 7 L1PrintCopyPrinterConfiguration curcfg LL_PRINTERCONFIG SAVE else LlPrintCopyPrinterConfiguration curcfg LL_PRINTERCONFIG RESTORE LlPrint LlPrintFields See also LIPrintStart LIPrintWithBoxStart LlSetPrintertoDefault LIPrintStart LIPrint WithBoxStart LlSetPrinterlnPrinterFile LlGetPrinterFromPrinterFile LISet PrinterDefaultsDir LIPr
184. and Export From the Designer 259 API Reference 260 LL_OPTION_ DESIGNERPREVIEWPARAMETER see chapter Direct Print and Export From the Designer LL_OPTION_ DESIGNERPRINT_SINGLETHREADED see chapter Direct Print and Export From the Designer LL_OPTION_ERR_ON_FILENOTFOUND TRUE if a graphic file is not found during print time LL_ERR_DRAWINGNOTFOUND will be returned FALSE the error will be ignored without any feedback Default LL_OPTION_ESC_CLOSES_PREVIEW This option defines whether the Escape key closes the preview window Default FALSE LL_OPTION_EXPRSEPREPRESENTATIONCODE Character code of the character that is used to divide an expression into multiple lines in the expression wizard This value might have to be changed for code pages other than standard Western code page as the default might be used for a printable character LL_OPTION_FONTQUALITY See also LL_ OPTION FONTPRECISION below Can be used to influence the Windows font mapper for example to use a device font The value set by this option will be used for the LOGFONT IfQuality field when a font instance Is being created The permitted values are referenced in the MSDN documentation Default DEFAULT QUALITY LL_OPTION_FONTPRECISION See also LL_OPTION FONTQUALITY above Can be used to influence the font mapper of Windows for example to use a device font The value set by this option will be used for the LOGFONT IfOutPrecision field when a
185. arameter SVG and L IXGetParameter SVG Resolution Defines the resolution in dpi for the transformation of the coordinates and the generation of pictures Default 96 dp screen resolution Picture JPEGQuality Specifies the quality and the corresponding compression factor of the generated JPEG graphic The value lies between 0 700 with 700 representing the highest quality least compression Takes effect only when the source graphic is not the JPEG format as encoding of JPEG to JPEG would result in a quality loss Default 75 Picture BitsPerPixel Defines the color depth of the generated picture Please note that the picture files will quickly get very large with higher color depths Value Meaning 378 Programming Reference 1 Black amp White 24 24bit True Color Default 24 Verbosity Rectangle Configures how rectangle objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG and also as a complete rectangle for objects with colored background Default 1 Verbosity Barcode Configures how barcode objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Verbosity Drawing Configures how picture objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Verbosity Ellipse Configures how ellipse objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Verbosity Line Configures ho
186. ase your program will not be usable for this period The return value of the callback resp the _ Rep y member of the scL Callback structure should be set to a unique number so you can assign the drilldown reports to the corresponding thread Example LRESULT 1Result case LL_DRILLDOWN_START 126 Advanced Programming scL1DrillDownJob pDDJob scL1DrillDownJob 1Param StartSubreport pDDJob generate new Drilldown JobID 1Result m_nUniqueDrillDownJobID case LL_DRILLDOWN_FINALIZE scL1DrillDownJob pDDJob scL1DrillDownJob 1Param if pDDJob gt _nID clean up else clean up the corresponding job return lResult After copying the parameters this thread creates a new List amp Label job that uses the regular print loop The following differences have to be made before calling L PrintStart e set the option LL OPTIONSTR_PREVIEWFILENAME to the path that has been passed in the structure with _pszPreviewFileName Example set preview filename L1SetOptionString pMyDrillDownParameters gt m_hL1lJob LL_OPTIONSTR_PREVIEWFILENAME pMyDrillDownParameters gt m_sPreviewFileName e Pass on the AAttachinfo to List amp Label that has been passed with the callback structure so the print job is informed whrere the data should be displayed Example attach viewer LlAssociatePreviewControl pMyDrillDownParameters gt m_hL1Job HWND pMyDrill
187. assed parameter In the dialog box there is a percentage meter control and a two line static text both of which can be set using L PrintSetBoxText to show the user the print progress and also an abort button if required see below Example HLLJOB hJob hJob LlJobOpen 0 if L1PrintWithBoxStart hJob LL PROJECT LABEL test LL_PRINT_NORMAL LL_BOXTYPE_NORMALMETER hWnd print 0 L1iPrintSetBoxText hJob There we go 0 Li SOL ie L1lPrintEnd hJob 0 else MessageBox NULL error List amp Label MB OK LlJobClose hJob See also LIPrintStart LIPrintEnd LIProjectClose Syntax HLLDOMOBJ L1ProjectClose HLLJOB hJob Task This function is only available starting with the Professional Edition Closes an open project and releases the relevant project file again The file is not saved Detailed application examples can be found in chapter DOM Functions Parameter hJob List amp Label job handle Return value Error code Example See chapter DOM Functions See also 240 LIProjectSave LIProjectOpen Function Reference LIProjectOpen Syntax INT L1lProjectOpen HLLJOB hJob UINT nObjType LPCTSTR pszObjName UINT nOpenMode Task This function is only available starting with the Professional Edition Opens the specified project file Call LIDomGetProject to retrieve the DOM handle for the project object afterwards This object is the basis for all further DOM fun
188. ast to using the callback LL CWND_MODIFYMENU a command button with a selectable icon can be added to the toolbar here This command must be called before L DefineLayout Parameter hJob List amp Label Job Handle nID Menu D for the new action to be added This ID is passed by the callback LL_CMND_SELECTMENU when the user selects the corresponding menu item or toolbar button User defined IDs should be in the range between 10100 and 10999 164 Function Reference nFlags Combination ORed of the following flags Value Meaning LLDESADDACTIONFLAG_ADD_TO Add a command button to the toolbar in _TOOLBAR addition to the menu item LLDESADDACTION_MENUITEM_A_ The menu item is added behind the entry in PPEND pszMenuHierarchy LLDESADDACTION_MENUITEM_ The menu item is added in front of the NSERT entry pszMenuHierarchy As well as an optional Keycode as a Shortcut and a combination of the following flags as modifiers Value Meaning LLDESADDACTION_ACCEL_CONT Keyboard shortcut is CTRL Keycode ROL LLDESADDACTION_ACCEL_SH IFT Keyboard shortcut is SHIFT Keycode LLDESADDACTION_ACCEL_ALT Keyboard shortcut is ALT Keycode LLDESADDACTION_ACCEL_VIRTK Should always be set EY pszMenuText Menu text without a keyboard shortcut this will be added automatically You can however use the amp symbol to allocate the shortcuts for menu navigation Use as a hierarchy separator to create submenu items For example in o
189. ataProvider can be used If only a small amount of additional information is to be passed it is possible to do it directly A sample is shown in paragraph Database Independent Contents Once List amp Label is bound to a DataProvider it supports the following features automatically if applicable to the data source e real data preview in the Designer e report container and relational data structure e sortings e drilldown The following overview lists the most important classes and their supported data sources AdoDataProvider Offers access to data of the following ADO NET elements e DataView e DataTable e DataViewManager e DataSet The provider can be assigned implicitly by setting the DataSource property to an instance of any of the supported classes Of course the provider can also be explicitly assigned This data provider automatically supports a single level sorting by any field ascending or descending Example C ListLabel LL new ListLabel AdoDataProvider provider new AdoDataProvider CreateDataSet LL DataSource provider LL Print LL Dispose VB NET Dim LL As New ListLabel 25 Programming With NET Dim provider As New AdoDataProvider CreateDataSet LL DataSource provider LL Print LL Dispose DataProviderCollection This data provider can be used to combine multiple other data providers into one data source Use it if you have e g multiple DataSet classes fro
190. automatically analyze and transfer relationships existing between multiple tables The type of data transfer is defined using the AutoMasterMode property The underlying enumeration provides for the following values e None No master detail relations are analyzed e AsFields Master and detail data are registered in parallel as fields This makes it possible to realize groups statistics and overviews e AsVariables The master data is registered in the form of variables and the detail data in the form of fields respectively After each master data set the project is reset internally with L PrintResetProjectState This makes it possible to use a single print job for printing in a row several identical reports containing different data for example multiple invoices Please also note the examples included for data binding 79 Programming With the VCL Component 4 2 3 Additional Options for Data Binding There are four different events you can use for influencing the process for data binding of the component The table provides an overview Event Description AutoDefineNewPage The event is invoked for each new page and allows additional variables to be registered for this page The property IsDesignMode of the event arguments indicates whether design mode is being used AutoDefineNewLine This event is invoked for each new line before the data bound fields are registered automatically In the same was as you do with AutoDefineNe
191. ax 1 1 Relations Without a Key Field Definition If the key fields for the relation are not relevant if for example you are dealing with a trivial single 1 1 relation between the two connected tables you can declare the fields as follows lt parent table gt lt linked table gt lt field name gt e g OrderDetails Orders OrderDate This adds a folder with the field OrderDate to the list of variables below the OrderDetails hierarchy s Order_Details s i Orders Ki Customers mi Employees Mi Shippers A CustomerID EmployeelD Freight E OrderDate Of course you must make sure that when printing the OrderDetails table you fill this field with the corresponding value for each record 1 1 Relation With Key Field Definition In case of multiple 1 1 connections it might be important for the user to see which of the key fields are linking the tables together In this case you can declare the fields as follows 115 Programming Using the API lt parent table gt lt key field parent table gt lt linked table gt lt key field linked table gt lt field name gt e g OrderDetails OrderlD Orders OrderlD OrderDate SQL equivalent SELECT OrderDate FROM Orders WHERE OrderDetails OrderlD Orders Order D Now the key field declaration is displayed in the tool window list of variables next to the table name s Order_Details 4 4 Orders Order_Details OrderlID Orders OrderlD Custo
192. ayout We suggest splitting your print loop into different subroutines The first part declares the data and the structure starts the print job and initializes he first page so that printing of a table can be started For ease of reading the optional part of the print loop is not shown here as it has already been shown in the ast chapter lt define data structure gt L1DbAddTable L1DbAddTableRelation L1IDbAddTableSortOrder lt define all possible variables gt L1DefineVariableStart L1DefineVariable L1DefineVariableExt L1DefineVariableExtHandle lt define all possible fields gt L1DefineFieldStart L1DefineField L1DefineFieldExt L1DefineFieldExtHandle L1SetPrinterDefaultsDir lt begin print gt L1PrintStart L1PrintWithBoxStart lt define options gt L1PrintSetOption L1PrintSetOptionString L1PreviewSetTempPath lt define fixed variables gt L1DefineVariable L1DefineVariableExt L1DefineVariableExtHandle lt print variables gt print all objects L1Print lt as long as warning repeat gt L1Print The second part of the print loop needs an auxiliary function This function prints the data of a single database table function PrintTable DataTable Dataobject DataTable is an adequate object for data access e g a 110 Printing Relational Data table of a database a class array or similar lt repeat gt lt define fields of DataTable gt L1DefineField L1DefineFieldExt
193. be exported in a single XML file 1 The result is a single XML file Export File containing all printed pages Default 1 Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 0 Export with user interaction dialogs 1 No dialogs or message boxes including overwrite warnings will be displayed only if Export Path was specified Default 0 Export ShowResult Specifies whether the export result will be displayed automatically The program that displays the result will be determined by the registered file extension 402 Programming Reference Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with Export File Default 0 Export ShowResultAvailable Enables you to hide the respective checkbox in the dialog Value Meaning 0 Checkbox will be hidden 1 Checkbox will be available Default 1 Export OnlyTableData Only data from table lines will be exported Value Meaning 0 All objects are exported 1 Only table cells and their data are exported Default 0 7 3 17 XPS Export Overview The XPS export format is available as soon as NET Framework 3 0 is installed on the computer The export module uses the installed Microsoft XPS printer driver for the output Some limitations must be taken into account here too for example the driver does not currently current as of 10 2015 support all clipping options of the Windows
194. bel job handle ARTF RTF object handle nFlags One option from each of the two groups mentioned below combined using a bitwise or or by addition Value Description Options for the format of the text to be retrieved LL_RIFIEXTMODE_RIF RTF formatted text incl RTF control words etc LL_RIFIEXTMODE_PLAIN Text in plain text format Options for the evaluation state LL_RIFIEXTMODE_RAW Text in plain format with unevaluated 248 Function Reference formulas if applicable LL_RIFTEXTMODE_EVALUATE Text in evaluated format all formulas D replaced by their computed results Return Value Length of the buffer negative in case of an error See also LIRTFCreateObject LIRTFGetText LIRTFSetText Syntax INT LIRTFSetText HLLJOB hJob HLLRTFOBJ HRTF LPCTSTR lpszText Task Sets the text in the RTF control The format of the text plain or RTF is auto detected Parameter hJob List amp Label job handle ARTF RTF object handle IpszText New contents Return Value Error code See also LIRTFCreateObject LISelectFileDIgTitleEx Syntax INT L1lSelectFileDlgTitleEx HLLJUOB hJob HWND hWnd LPCTSTR pszTitle UINT nObjType LPTSTR pszBuffer UINT nBufLen LPVOID pReserved Task Opens a file selection dialog with an optionally integrated preview window Parameter hJob List amp Label job handle hWnd Window handle of the calling program pszTitle Title for the dialog 249 API Re
195. by the L PrintOptionsDialog Title The return value is in the range of 0 to MAX X MAX _Y 1 See also LIPrintOptionsDialog LIPrintSetBoxText Syntax INT L1lPrintSetBoxText HLLJOB hJob LPCTSTR lpszText INT nPercentage Task Sets text and meter percentage value in the abort dialog box Parameter hJob List amp Label job handle IpszText Text which should appear in the box nPercentage Progress percentage 231 API Reference Return Value Error code Hints To make the text multi line line feeds x0a can be inserted Unchanged texts or NULL pointers are not re drawn to avoid flickering unchanged percentage values or 1 are also ignored Example HLLJOB hJob hJob LlJobOpen 0 if L1PrintWithBoxStart hJob LL_PROJECT_LABEL test LL PRINT NORMAL LL_BOXTYPE NORMALMETER hWnd print 0 L1PrintSetBoxText hJob starting 0 evens LG 55 gt L1PrintEnd hJob L1PrintSetBoxText hJob done 100 else MessageBox NULL error List amp Label MB OK LlJobClose hJob See also LIPrintWithBoxStart LIPrintUpdateBox LIPrint LIPrintSetOption Syntax INT L1lPrintSetOption HLLJOB hJob INT nIndex INT nValue Task Sets various print options for the print job or the print options dialog for example to preset the number of copies required Parameter hJob List amp Label job handle nindex See below nValue Sets the option correspondin
196. ch LL job that should support interactive sortings activate interactive sortings for current LL Job L1lSetOption hJob LL_OPTION_INTERACTIVESORTING_REALDATAJOBPARAMETER LPARAM amp oMyInteractiveSortings To deactivate interactive sortings for this LL job set the option to NULL deactivate interactive sortings for current LL Job L1SetOption hJob LL_OPTION_INTERACTIVESORTING_REALDATAJOBPARAMETER NULL The parameter passed with this option can be used freely for example as a pointer to an internal data structure or objecets This parameter will be passed unchanged in the callback for your use scL DrillDownJob _nUserParam Please make sure the parameter is not 0 or NULL unless you want to deactivate expandable regions Via the callback LL N7FY_VIEWERDRILLDOWN for further description please see chapter Drilldown Reports in Preview List amp Label informs about the current task This callback will always be called in the context of the preview thread regardless if initiated from designer or preview print When you use structure members e g like _nUserParam please ensure that the thread has evaluated or copied them before you pass control back to List amp Label as the structure will no longer be valid then this is true for all Callbacks 5 7 6 Handling Chart and Crosstab Objects The easiest way to work with charts and crosstabs is to insert them into the report container See chapter Printing Relational Dat
197. choice of available fonts Can be NULL in which case the default printer is used nProjectType Project type LL_PROJECT LABEL LL_PROJECT_CARD or LL_ PROJECT LIST bModal if TRUE the dialog will be displayed modally If FALSE the control passed as hWnd will be replaced by the RTF control Please note that the window created by Visual C MFC is not suitable for the non modal mode We suggest using the RTF OCX control cmll21r ocx instead Return Value Error code See also LIRTFCreateObject LIRTFEditorInvokeAction Syntax INT LIRTFEditorInvokeAction HLLJOB hJob HLLRTFOBJ HRTF INT nControlID Task Allows activation of an action in the RTF control by code This is important for in place RTF controls see L RTFEditObject if the hosting application provides a separate menu Parameter hJob List amp Label job handle ARTF RTF object handle nControliD Control ID of the button to be activated The IDs of the items in List amp Label can be found in the file MENUID TXT of your List amp Label installation Return Value Error code 246 Function Reference See also LIRTFCreateObject LIRTFEditorProhibitAction LIRTFEditObject LIRTFEditorProhibitAction Syntax INT LIRTFEditorProhibitAction HLLJOB hJob HLLRTFOBJ hRTF INT nControlID Task Disables buttons in the RTF control Parameter hJob List amp Label job handle ARTF RTF object handle nControliD Control ID of the button t
198. ck amp White 24 24bit True Color Default 24 Verbosity Rectangle Configures how rectangle objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG and also as a complete rectangle for objects with colored background Default 1 Verbosity Barcode Configures how barcode objects should be exported Value Meaning 0 Ignore object 394 Programming Reference 1 Object as JPEG Default 1 Verbosity Drawing Configures how picture objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Verbosity Ellipse Configures how ellipse objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Verbosity Line Configures how line objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Verbosity Text Configures how text objects should be exported Value Meaning 0 Ignore object 1 Object as text object 2 Object as JPEG Default 1 Verbosity Text Frames Configures how text object frames should be exported Value Meaning 0 Single frames for top bottom left right uses CSS 1 Complete frame as box Default 0 Verbosity RTF Configures how RTF objects should be exported Value Meaning 395 The Export Modules 0 Ignore object 1 As formatted RTF text parsed and converted to HTML 2 As unformatted text uses the default font specified in the project file 3 Object as JPEG Default 1 Verbos
199. correctly by Word e When exporting large images at large resolutions these images are sometimes not displayed by Word although they are referenced correctly in the RTF Programming Interface You can find a description of all options used in the RTF export module in this chapter The options can be modified read using the methods L XSetPara meter RTF and LIXGetParameter RTF Resolution Defines the resolution in dpi for the transformation of the coordinates and the generation of pictures Default 96 dp screen resolution Picture BitsPerPixel Defines the color depth of the generated picture Please note that the picture files will quickly get very large with higher color depths Value Meaning 1 Black amp White 4 16 Colors 8 256 Colors 24 24bit True Color Default 24 UsePosFrame Switches the text positioning method 374 Programming Reference Value Meaning 0 Text boxes used for positioning 1 Position frames used for positioning Default 0 Verbosity Rectangle Configures how rectangle objects should be exported Value Meaning 0 Ignore object 1 Object as frame Default 1 Verbosity Barcode Configures how barcode objects should be exported Value Meaning 0 Ignore object 1 Object as picture Default 1 Verbosity Drawing Configures how picture objects should be exported Value Meaning 0 Ignore object 1 Object as picture Default 1 Verbosity Ellipse Configures how ellipse objects
200. ctions Detailed application examples can be found in chapter DOM Functions Parameter hJob List amp Label job handle nObjType Value Meaning LL_ PROJECT LABEL for labels LL_ PROJECT_CARD for index cards LL_ PROJECT LIST for lists pszObjName Project file name with path specification nOpenMade Combination ORing of a flag from each of the following three groups Value Meaning LL_PRJOPEN_CD_OPEN_EXISTIN File must already exist otherwise error G code will be returned LL PRJOPEN_CD_CREATE_ALWA File is always newly created If it already YS exists the content is deleted LL_PRJOPEN_CD_CREATE_NEW File is newly created if it does not exist If ile already exists error code is returned LL_ PRJOPEN_CD_OPEN ALWAYS f file exists the content is used otherwise ile is newly created Value Meaning LL_ PRJOPEN_AM_READWAITE File is opened for read write access LL_ PRIOPEN_AM_READONLY File is only opened for read access 241 API Reference Value Meaning LL_ PRJOPEN_EM_IGNORE_ Syntax errors are ignored See notes FORMULAERRORS Return value Error code Hints If the flag LL_ PRJOPEN_EM_IGNORE_FORMULAERRORS is used syntax errors in the project are ignored This has the advantage that projects can be successfully opened and edited even if the data structure is unknown or undefined As the formulas in the project are then treated as placeholders the section with the used variables see L GetUsed dentifiers
201. ctly after LUobOpen LU obOpenLC D If an option needs to be set at a different time this will be stated in that option s description LL_OPTIONSTR_CARD_PRJDESCR Use this parameter to set the description of the corresponding project type for the file dialogs LL_OPTIONSTR_CARD_PRJEXT The file extension for a file card project Default crd LL_OPTIONSTR_CARD_PRVEXT The file extension for the bitmap of a file card project that will be shown in the File Open dialog Default crv LL_OPTIONSTR_CARD_PRNEXT The file extension for the printer definition file of a file card project Default crp LL_OPTIONSTR_CURRENCY This represents the string that is used as currency symbol in the fstr function The default is the value of the user settings in the system but will be set to the respective locale value on LL_OPTION_LCID LL_OPTIONSTR_DECIMAL This represents the string that is used as decimal char in the fstr function The default is the value of the user settings in the system but will be set to the respective locale value on LL_ OPTION_LCID LL_OPTIONSTR_DEFDEFFONT Sets the font to be used as default for the project font The parameter must have the following format R G B H L R Red intensity G Green intensity B Blue intensity H Height in points L Commaz separated fields of the LOGFONT structure See SDK This DEFDEFFONT can be set using LL_ OPTION_DEFDEFFONT as handle 271
202. czVarName L1DomSetProperty hObjHeaderField T Filling Style _T 1 139 Programming Using the API L1DomSetProperty hObjHeaderField T Filling Color _T RGB 204 204 255 L1DomSetProperty hObjHeaderField T Font Bold _T True L1DomSetProperty hObjHeaderField T Width _T 50000 sprintf aczVarName Var d i Create new field in data line and set properties HLLDOMOBJ hObjDataField L1DomCreateSubobject hObjTableDataFields _T Text amp hObjDataField L1DomSetProperty hObjDataField T Contents aczVarName L1DomSetProperty hObjDataField T Width _T 50000 Save project L1ProjectSave hJob NULL L1ProjectClose hJob L1JobClose hJob Setting the Project Parameters The following code sets project parameters in an existing List amp Label project for fax and mail dispatch HLLIOB hJob LlJobOpen 1 L1ProjectOpen hJob LL_PROJECT_LIST c simple 1st LL_PRIOPEN_CD_OPEN_EXISTING LL_PRJOPEN_AM_READWRITE HLLDOMOBJ hProj L1DomGetProject hJob amp hProj Fax parameter L1DomSetProperty hProj _T ProjectParameters LL FAX RecipName Contents _T sunshine agency L1DomSetProperty hProj _T ProjectParameters LL FAX RecipNumber Contents _T 555 555 555 L1DomSetProperty hProj T ProjectParameters LL FAX SenderCompany Contents _T combit L1DomSetProperty hProj _T ProjectParameters LL FAX SenderName Contents
203. ddDesignLCID Syntax INT LlLocAddDesignLCID HLLJOB hJob LCID nLCID 203 API Reference Task Adds a localization language to the project For all added languages translations can be provided via L LocAddDictionaryEntry Parameter hJob List amp Label job handle nLCID Windows locale ID The locale ID passed with the first call will be considered as the base language All translations that will be provided via LiLocAddDictionaryEntry need to use this language for the dictionary keys If nLCID is O all languages will be removed from the list of localization locale IDs Return Value Error code See also LlLocAddDictionaryEntry LlLocAddDictionaryEntry Syntax INT LlLocAddDictionaryEntry HLLJOB hJob LCID nLCID LPCTSTR pszKey LPCTSTR pszValue UINT nType Task Adds a translation pair to one of the dictionaries The dictionaries allow the localisation of project resp Designer items Parameter hJob List amp Label job handle nLCID Windows locale ID specifing the dictionary to which the translation shall be added This dictionary must already have been declared via LiLocAddDesignLCID pszKey Key for the dictionary original text in the base language pszValue Translated text for the dictionary nType Dictionary type Value Meaning LL_DICTIONARY_TYPE_STATIC Static fixed text LL _DICTIONARY_TYPE_IDENTIFIER Name of field or variable LL _DICTIONARY_TYPE_TABLE Table name LL_DICTIONARY_TY
204. dedicated printer does not have to be in the system physically the simple driver installation is sufficient Also it has to be ensured that the used user account can load the List amp Label DLLs meaning that the rights for the DLL path were assigned The actual web application carries out a silent export without user interaction see chapter Export Without User Interaction and directs the client to the export file e g by a redirect The following image visualizes the principle Server Ber Application User can view result in browser Please note the licensing requirements for using List amp Label on a web server 419 Miscellaneous Programming Topics 8 6 Hints for Usage in Multiple Threads Multithreading List amp Label can be used from multiple threads This enables the distribution of large print jobs on multiple different processors cores Internally this is used for the designer preview or drill down reporting If you plan to use List amp Label in a multithreaded environment keep the following issues in mind 420 Make sure that each List amp Label Job resp a component instance is only used within a single thread i e the creation usage and destruction of the job component needs to be done from the same thread If you want to use multiple printing threads each of these threads needs to open and close it s own job Background Windows GDI resources like window handles or printer device
205. doesn t already contain such a page itself Of course the current storage format may not be opened with bReadOnly TRUE 314 Managing Preview Files Example HLLSTGhStgOrg HLLSTGhStgAppend hStgOrg LlStgsysStorageOpen c test labell 11 FALSE FALSE hStgAppend LlStgsysStorageOpen c test label2 11 FALSE TRUE L1lStgsysAppend hStgOrg hStgAppend L1StgsysClose hStgsysOrg L1StgsysClose hStgsysAppend LIStgsysConvert Syntax INT L1StgsysConvert HLLSTG hStg LPCTSTR pszDstFilename LPCTSTR pszFormat Task Converts a preview file to another format Parameter hStg The handle returned by L StgsysStorageOpen pszDstFilename Name of the target file It is also possible to use the place marker d e g page d This is important e g for converting JPEGs because without the place marker only one page will result pszFormat Target format Valid values are TIFF also PICTURE_MULTITIFF JPEG also PICTURE_JPEG PNG also PICTURE_PNG EME THY PDF PRN XPS TXT This parameter allows you to declare a semicolon separated list with further export options You will find the accepted values in the chapter The Export Modules Please note that not all options can be supported with this API An example is the parameters PDF PDF EncryptionFile 1 Additional to the mentioned parameters above the following parameters can be used Value Meaning Pagelnd
206. ds in the List amp Label Designer or in the Objects tool window You are not restricted to real databases it is also possible to display a class array or dynamically created data in a table or all member variables of a class In the List amp Label Designer you will work with just one report container object This object can contain multiple tables crosstabs and charts Once you have added single tables with L DbAdadTab e your users can edit the structure in the Objects tool window You will find further information on how to design the report container object in the corresponding chapter of the Designer manual This chapter focuses on how to control such designs Examples of how to use multiple tables for the most common programming languages are included in the installation 5 5 1 API Functions Needed The name of the API functions needed to control this functionality begin with L Db or L PrintDb You can add tables L DbAddTab e define sortings for the tables LIDbAddTableSortOrder and define relations between tables L DbAddTable Relation At print time you can query the currently active table L PrintDbGetCurrentlable as well as the currently active relation and sort order L PrintDbGetCurrentlableSort Order L PrintDbGetCurrentlableRelation You will find detailed descriptions later in this chapter 5 5 2 Calling the Designer First all tables have to be declared to List amp Label so that
207. e 414 Project Parameters e Avoid using RTF and HTML text where possible and use the normal text object instead 8 4 Project Parameters List amp Label enables you to set project specific parameters The user may set these and the application may query the values at print time For example List amp Label uses these parameters itself for the fax and email settings However your own application may also save information to the project file in the same way too 8 4 1 Parameter Types There are different types of parameters that are distinguished by the nFlags parameter passed to L SetDefaultProjectParameter One of each of the three flag alternatives FORMULA VALUE PUBLIC PRIVATE and GLOBAL LOCAL needs to be used LL_PARAMETERFLAG_ FORMULA default The parameter is a formula that is evaluated at print time The evaluated value is returned with L PrintGetProjectParameter LL_PARAMETERFLAG_ VALUE The parameter is a fixed value This value is returned with L PrintGetProjectParameter LL_PARAMETERFLAG_ PUBLIC default The parameter can be changed within the Designer in the Project gt Settings dialog where the user can enter a formula or value LL_PARAMETERFLAG_ PRIVATE The parameter cannot be changed in the Designer LL_PARAMETERFLAG_ GLOBAL default The parameter is added to the print project parameter list and will be saved to the preview file if applicable see L StgsysGet obOptionStringEx LL_PA
208. e lt get current relation gt L1PrintDbGetCurrentTableRelation lt get current sorting gt L1PrintDbGetCurrentTableSortOrder lt generate an appropriate DataTable child object gt lt Ret PrintTable child DataTable gt lt next record in DataTable gt 112 Printing Relational Data lt until last record in DataTable is reached gt lt print footer line gt Ret L1lPrintFieldsEnd lt as long as warning page full repeat gt Ret L1lPrintFieldsEnd lt result Ret gt Any sequence of tables and sub tables can be printed with this code The recursion ensures that it works properly with any depth i e this code can control arbitrary multilevel relations The Recursive Print Loop For a complete print loop which is supporting sequence tables und sub tables there is nothing more to do The code from the last two sections makes sure that the complete tree of the table structure is printed So only the finishing touches have to be added e g to display a progress bar The structure of a layout can be quite complex Thus it is not possible to just take the current position inside the data source as percentage This approach does not work as soon as the user puts two tables in series Therefore List amp Label allows you to get the count of tables at the root level L PrintDbGetRootlableCount Whenever you display a data record from the root level you can update the progress bar The following holds for the
209. e embedding mode Value Meaning 0 No embedding The TrueType fonts on the target machine will be used if available or the font mapper will choose substitutes 1 All TrueType fonts are embedded 2 Only symbol fonts are embedded No embedding All fonts will be replaced by PostScript standard fonts 4 Subset embedding Only the characters from the selected code page are embedded Subset embedding Only the used characters are embedded CID fonts will be used Suggested for unicode text Draw fonts as curves o nN oO A Embed fonts as Type 3 367 The Export Modules Value Meaning Default 5 PDF ExcludedFonts Allows you to pass a semicolon separated list of fonts that will never be embedded regardless of the PDF font mode setting Default Arial PDF CompressStreamMethod Sets the compression method for the PDF stream Value Meaning 0 No compression 1 Flate compression 2 Run Length compression 3 FastFlate compression Default 1 Picture JPEGQuality Specifies the quality and the corresponding compression factor of the generated JPEG graphic The value lies between 0 700 with 700 representing the highest quality least compression Takes effect only when the source graphic is not the JPEG format as encoding of JPEG to JPEG would result in a quality loss Default 75 PDF DontStackWorldModifications nfluences the way that coordinate transforming records are handled and may help to avoid rounding differences o
210. e export module collects all List amp Label objects for the page currently being printed and orders them according to their height width and position The position of an object results from two values left and top They specify the distance from the upper left page border All objects are positioned absolutely on a page which leads to a more accurate export result Limitations There are limitations set by the target format The most important are listed now e Rows that are anchored to each other are not correctly exported e Decimal tabs will be transformed to right aligned tabs e Any other tabs will be transformed to a blank e The option Line break in text objects and table columns is always active in the export result e The option Separators fixed in table objects is not supported e The chart object is exported as a picture and thus cannot appear transparently e The transformation of RTF text to HTML code is carried out by an RIF parser This parser interprets the basic RTF formatting Extended RTF functionality such as embedded objects will be ignored e Diagonal lines are exported as images e Gradient fills with more than 3 colors are not supported e Objects to be exported as picture should not overlap the object frame Therefore e g barcode objects with fixed bar width must fit in the object rectangle e Custom drawings in callbacks must be exported as picture 393 The Export Modules e Table frames of
211. e fixed text combit the parameter combit must be used This also applies for fixed font names for example once again Verdana must be transferred for example not Verdana Example code LIDomSetProperty hObj _T Contents _T sProjectTitle TT In order to set the values of nested properties such as the color of a filling the property name lt Parent property gt lt Child property gt can be used so for example INT nRet L1DomSetProperty hObj _T Filling Color _T LL Color Black LIDomGetProperty Reads out the value of a property It is advisable to determine the necessary buffer length first of all by transferring a NULL buffer as usual and then to allocate an adequately large buffer INT nBufSize L1DomGetProperty hObj _T AllowPageWrap NULL 9 TCHAR pszBuffer new TCHAR nBufSize INT nRet L1DomGetProperty hObj _T AllowPageWrap pszBuffer nBufSize delete pszBuffer For simplification objects but not lists can also be tunneled through using the full stop as hierarchy separator as for example US Get the page coordinates for the first page 136 Using the DOM API Professional Enterprise Edition Only L1DomGetProperty hRegion _T Paper Extent Horizontal pszContainerPositionWidth nBufSize Units Many properties contain information on sizes widths etc These are if transferred as fixed numbers interpreted and returned as SCM units 1 1000 mm a
212. e no tabular areas and also no report container only variables and no fields are available see section Variables Fields and Data If the used data source contains multiple tables e g products customers etc the source table for printing labels can be selected by the DataMember property of the component C ListLabel LL new ListLabel LL DataSource CreateDataSet Products as data source LL DataMember Products Select label as project type LL AutoProjectType L1lProject Label LL Design LL Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Products as data source LL DataMember Products Select label as project type LL AutoProjectType L1lProject Label LL Design 34 Other Important Concepts LL Dispose Cards This project type matches the value LIProject Card of the AutoProjectType property Card projects are a special case of label projects with exactly one page tilling label Typical fields of use are printing file cards e g all customer information at a glance or mail merges Activation is the same as Labels the same hints and restrictions apply therefore 2 3 5 Varying Printers and Printing Copies List amp Label offers a comfortable support of splitting a report to different printers or the output of copies with a Copy watermark The best is that these are all pure Designer features that are automatically supported by List amp
213. e of buffer bOrgName TRUE global field names FALSE localized field names Hints See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIExprParse LIExprEvaluate LIExprType LIExprError 184 Function Reference LIExprParse Syntax LPVOID LIExprParse HLLJOB hJob LPCTSTR lpExprText BOOL bTableFields Task Tests the expression for correctness and constructs a function tree for this expression Parameter hJob List amp Label job handle IpExprText Expression bTableFields TRUE reference to fields and variables FALSE reference to variables Return Value Pointer to an internal structure parsing tree Hints If an error is signaled Address NULL then you can query the error text with L ExprError The variables defined with L DefineVariable can be integrated into the expression if bTableFields is FALSE otherwise the fields defined with L DefineFie d are included in the expression If the expression is used for calculation several times it is recommended that you translate it once with L ExprParse and then carry out the calculations releasing the tree at the end Example LPVOID lpExpr char lpszErrortext 128 char lpszBuf 20 Long 1DateOne Long 1DateTwo L1DefineVariable hJob Date 29 2 1964 LL TEXT lpExpr L1ExprParse hJob DateToJulian DATE Date FALSE if lpExpr if L1ExprType hJob lpExpr LL_EXPRTY
214. e or field You should call this function before print start and later only pass the fields or variables from your data source which will actually be used c Global Dummy job Some of the system libraries e g riched20 dll used by List amp Label seem to cause resource losses under certain circumstances These are very small but incur with every load and unload of the DLL These DLLs are loaded or unloaded by List amp Label with every open or close of the first job Therefore you should avoid a frequent LWiobOpen LU obClose in your application or to start a dummy job at start and keep it open until the end The permanent loading and unloading of the DLLs is avoided and besides the achieved speed optimization also the resource losses won t occur anymore 106 Printing Relational Data 5 5 Printing Relational Data List amp Label offers a convenient way of designing projects with multiple relationally linked database tables hierarchical reports The report container is also the easiest way for the user to work with multiple tables charts crosstabs or charts in table columns The rest of this chapter handles working with LL PROJECT LIST type projects LL PROJECT LABEL or LL_PROJECT_CARD type projects support exactly one table and an arbitrary number of sort orders for this table that can be set and retrieved just as for LL PROJECT LIST projects In the following we use table as a synonym for a group of matching fiel
215. e the HTML content should be downloaded e With Formula contents already passed as an HTML stream can be displayed see section Data Types Also see the hint for HTML Formatted Text in section Variables Fields and Data Types 2 3 8 Report Container The report container is the central element of list projects It allows displaying tabular data also multi columnar or nested statistics and charts as well as cross tables Data can also be output in different form e g at first for a graphical analysis of the sales by years and then in a detailed tabular list The contents of the container are visible underneath the Report Container object in the Objects tool window Using this window new content can be added or existing content can be edited The window is a sort of screenplay for the report since the exact order of the single report elements is shown in it Objects x 4 Project qy Background A Header Header 2 Report Container a E Table Customers CustomerID a E Table Orders 4 E Table Order Details A Print info un gt Objects Layers Preview The Objects tool window in the Designer To make the report container available a data provider see section Data Providers has to be used as data source Generally it is also possible to perform the complete printing on your own by using the low level API functions of the LICore object however this is not the recommended practice since many
216. e to view could not be loaded completely An action could not be compled because the attempt to load the file failed Write or access error when saving a file Unexpected error Further information will be displayed Write or access error when Saving a file Unexpected error Further information will be displayed LiStgsysPrint and LiStgsysStoragePrint only while printing to MS FAX some pages did not include a phone number and could not be faxed 425 Debug Tool Debwin 10 Debug Tool Debwin Debwin is a tool for manifold debug functions If the debug mode is switched on with L SetDebug List amp Label outputs status information in the Debwin window Alternatively by Logging gt Force Debug Mode from Debwin s main menu the logging can be forced To get all available information we suggest to start Debwin before starting the application As soon as your application is started it will start sending debug messages to Debwin Besides the error codes see chapter Error Codes you often get additional information that helps to trace the reasons for unexpected program behavior A typical debug output looks like this CMLL21 09 05 01 266 00000ee4 DemoApplication exe L1lSelectFileDlgTitleEx 1 0x00010a3a NULL 0x00008001 0x0012F86C 129 0x00000000 CMLL21 09 05 19 726 00000ee4 gt c templates article 1lb1 0 You can see the called module CMLL21 timing information the current thread ID the c
217. eaning 0 With user interaction dialogs 1 No dialogs or message boxes even overwrite warnings will be displayed only if Export File was specified Default 0 Export ShowResult Specifies whether the export result will be displayed automatically The program that displays the result will be determined by the registered file extension Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with Export File Default 0 Export ShowResultAvailable Enables you to hide the respective checkbox in the dialog Value Meaning 0 Checkbox will be hidden 1 Checkbox will be available Default 1 7 3 9 SVG Export The SVG export module creates SVG code according to the Scalable Vector Graphics SVG 1 1 Second Edition specification Overview The export module collects all List amp Label objects for the page currently being printed and orders them according to their height width and position The position of an object results from two values left and top They specify the distance from the upper left page border All objects are positioned absolutely on a page which leads to a more accurate export result Limitations There are limitations set by the target format The most important are listed now e Rows that are anchored to each other are not correctly exported e Decimal tabs will be transformed to right aligned tabs e Any other tabs will be transformed to a blank 377 The Export Modul
218. ebDesigner Under ASP NET WebForms DesignerControl1 DataSourceIDs new System Collections Generic List lt string gt DesignerControl1 DataSourceIDs Add My Dataprovider DesignerControl1 ParentComponent LL Under ASP NET MVC Htm1 ListLabelMvcWebDesigner 46 Usage in Web Applications new WebDesignerOptions DataSource Model DataSource DataSourceIDs Model DataSourcelIDs oak In the OnRequestDataProvider event this ID in this case My Dataprovider is once again available public static void WebDesignerConfig OnRequestDataProvider object sender RequestDataProviderEventArgs e if e DataSourceID My Dataprovider e DataProvider DataAccess CreateProviderCollection else throw new Exception Unknown datasource was requested Step 3 Expand the Application Configuration The new Web Designer always uses ASP NET MVC for the internal processing of HTTP requests Hence the necessary routes will need to be registered in the Application_Start function of your application G obal asax file even if your application is not based on ASP NET MVC Add the following lines WebDesignerConfig RegisterRoutes RouteTable Routes WebDesignerConfig WebDesignerSetupFile Server MapPath Webdesigner LL21WebDesignerSetup exe Important If you are also using MVC Web API the WebDesignerContig RegisterRoutes function must be registered before your own routes The second i
219. ecks whether the help file is present TRUE usable FALSE not usable not present LL_OPTION_DEFPRINTERINSTALLED Returns whether the operating system has a default printer Example HLLJOB hJob UINT nLanguage L1SetDebug TRUE hJdob LlJobOpen 0 eee L1GetOption hJob LL_OPTION_LANGUAGE N nie See also LISetOption LIGetOptionString Syntax INT L1GetOptionString HLLJOB hJob INT nMode LPTSTR pszBuffer UINT nBufSize Task Requests various string settings see below from List amp Label Parameter hJob List amp Label job handle nMode Option index see L SetOptionString pszBuffer Pointer to a buffer where the requested value will be stored nBufSize Size of the buffer Return Value The value of the corresponding option Hints The option indices are listed in the description of L SetOptionString 192 Function Reference See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value Example HLLJOB hJob TCHAR szExt 128 L1SetDebug TRUE hJob LlJobOpen 0 aa L1GetOptionString hJob LL _OPTIONSTR_PRJEXT szExt sizeof SzExt eo rece E LlJobClose hJob See also LISetOptionString LIGetPrinterFromPrinterFile Syntax INT L1GetPrinterFromPrinterFile HLLJOB hJob UINT nObjType LPCTSTR pszObjName INT nPrinter LPTSTR pszPrinter LLPUINT pnSizePrn _PDEVMODE pDM LLPUINT pnSizeDm Task Querie
220. ect In order to obtain the object list for example L1ProjectOpen hJob LL_PROJECT_LIST c filename 1st LL_PRJOPEN_AM_ READONLY HLLDOMOBJ hProj L1DomGetProject hJob amp hProj HLLDOMOBJ hObjList INT nRet L1DomGetObject hProj Objects amp hObjList can be used The other available objects correspond to the entries in the tree structure in the DOM viewer Layout ProjectParameters Settings SumVars and UserVars A description of the individual objects with most properties can be found in the reference chapter the emphasis here is on the principle of working with the DOM functions LIDomGetSubobjectCount Serves to query the number of subobjects in the specified list To query the number of objects in the project for instance use INT nObjCount INT nRet L1DomGetSubobjectCount hObjList amp nObjCount LIDomGetSubobject Returns the DOM handle of the specified subobject In addition to the DOM handle for the list parameters are the index O0 based and a pointer for return of the handle The code for a DOM handle to the first object in the projectfile is HLLDOMOBJ hObj INT nRet L1DomGetSubobject hObjList amp hObj 134 Using the DOM API Professional Enterprise Edition Only LIDomCreateSubobject Creates a new subobject in the specified list Parameters are the list handle the insertion position the desired type and a handle pointer for the new object In order to insert a ne
221. ect To query the used fields even before starting a print job the usage of L GetUsed dentifiers is preferable Parameter hJob List amp Label job handle IpszFieldName Field name Return Value Value Meaning 1 Field is used 0 Field is not used LL_ ERR UNKNOWN Field is not defined Hints This function can only be called after L PrintStart or L PrintWithBoxStart This function needs LL OPTION _NEWEXPRESSIONS to be set to true default As calling L DefineFie dStart clears the used flags this function will return LL ERR_UNKNOWN or 0 afterwards regardless of whether the field is actually used or not Therefore do not use L DefineFieldStart after L Print WithBox Start Instead of using a specific field name wildcards can be used This is especially useful if you pass your fields ordered hierarchically e g all fields from the Article table use Article as prefix Simply do a search for Article to find out whether the table has been used at all by the user Example if L1PrintIsFieldUsed hJob Name 1 L1lDefineFieldExt hJob Name lt gt See also LIPrintStart LIPrintWithBoxStart LIPrintlsVariableUsed 227 API Reference LIPrintlsVariableUsed Syntax INT L1lPrintIsVariableUsed HLLJOB hJob LPCTSTR lpszFieldName Task Specifies whether the given variable is used in one of the expressions or conditions of the project Note the hints for L Print sFieldUsed Parameter
222. ect ZUGFeRD generation enhanced PNG rendering and support for combo form controls 431 Update Information for Version 21 e Support for nested tables NET only e Native aggregate functions NET only selected data providers e New data providers Cassandra SharePoint Oracle via new managed Oracle provider NET only e Enhanced data provider ObjectDataProvider in NET 4 0 build now uses LINO to support sorting filtering and native aggregates NET only e Enhanced data provider ODataDataProvider offers support for OData V4 NET only e Enhanced data provider DoCommandSetDataProvider in NET 4 0 build has a new query builder analyzer that can cope with much more complex queries NET only 12 2 Updating to List amp Label 21 12 2 1 General Please make sure to update your personal license key since the key is version and user specific As with any software update we highly recommend that you check all project and template files after updating Improvements can sometimes mean that things are done slightly differently which might have an unexpected impact on your projects 12 2 2 Updating NET Projects Generally the only thing to do is to replace the reference to the combit ListLabel20 dll with a reference to the combit ListLabel21 dll and to update the namespace references Additionally the older components should be removed from the toolbox and be replaced with the new components Changes Compared to the Previo
223. ection Variables and Fields in List amp Label This function can be mixed with the other L DefineVariab e functions 161 API Reference The variables predefined by List amp Label are listed within the description of L DetineVariable Example hJob LlJobOpen 0 L1DefineVariableStart hJob L1lDefineVariableExt hJob City Washington LL TEXT NULL L1DefineVariableExt hJob ZIP Code 90206 LL_BARCODE_30F9 NULL L1DefineVariableExt hJob Photo i bmp LL DRAWING NULL L1lJobClose hJob See also LIDefineVariableStart LIDefineVariable LIDefineVariableExtHandle LIGet VariableContents LIGetVariableType LIDefineVariableExtHandle Syntax INT L1lDefineVariableExtHandle HLLJOB hJob LPCTSTR lpszName HANDLE hContents INT 1Para LPVOID lpPara Task Defines a variable and its contents Parameter hJob List amp Label job handle IpszName Pointer to a string with the name of the variable hContents Handle to an object of type HMETAFILE HENHMETAFILE HICON or HBITMAP IPara LL DRAWING_HMETA LL DRAWING_HEMETA LL_ DRAWING_HICON or LL DRAWING_HBITMAP pPara For future extensions must be NULL Return Value Error code Hints Please note the general hints in the section Variables and Fields in List amp Label This function can be mixed with the other DefineVariab e functions The handle must be valid as long as it is needed that is duri
224. ed After use the handle can or should be deleted with the normal API function Example 156 HLLJOB hJob HMETAFILE hMeta HDC hMetaDC INT SER hMetaDC CreateMetaFile NULL Fieberkurve selectObject hMetaDC GetStockObject NULL_PEN Rectangle hMetaDC 0 0 LL META MAXX LL _METY MAXY for fk O07 1 lt lt LOF 41 MoveTo hMetaDC 0 MulDiv i LL META MAXY 10 LineTo hMetaDC MulDiv i LL META MAXX 100 MulDiv i LL_META MAXY 10 MoveTo hMetaDC 0 MulDiv 100 i amp 251 100 LL_META MAXyY 100 for i 0 i lt 10 i LineTo hMetaDC MulDiv i LL META MAXX 10 MulDiv 100 i amp 251 100 LL_META MAXyY 100 hMeta CloseMetaFile hMetaDC hJob LlJobOpen 0 L1lDefineFieldStart hJob L1lDefineField hJob Name Normalverbraucher Function Reference L1lDefineField hJob Vorname Otto L1DefineFieldExt hJob Ort Konstanz LL_ TEXT NULL L1DefineFieldExtHandle hJob Erfolgs Chart hMeta LL_DRAWING_HMETA NULL Corr GEG miar LlJobClose hJob DeleteObject hMeta See also LIDefineFieldStart LIDefineField LIDefineFieldExt LIDefineFieldStart Syntax INT LlDefineFieldStart HLLJOB hJob Task Empties List amp Label s internal field buffer in order to delete old field definitions Parameter hJob List amp Label job handle Return Value Error code Hints The hints for L DefineVariableStart also
225. ed to this viewer so whenever a user double clicks on files with this extension the viewer is started 11 3 2 Command Line Parameters LLVIEW21 lt file name gt Loads the file No URL can be given here LLVIEW21 p lt file name gt Prints the file with a printer dialog LLVIEW21 pt lt file name gt lt printer name gt Prints the file using the given printer If the printer name contains spaces enclose it in quotation marks 427 Redistribution Shipping the Application 11 3 3 Registration Your setup program should call the viewer once with the regserver option in order to register it with the file extension LL Unregister using unregserver 11 3 4 Necessary Files LLVIEW21 EXE needs CMLL21 DLL CMDW21 DLL CMCT21 DLL CMBR21 DLL CMLS21 DLL and CMUT21 DLL It also requires at least one language resource file e g CMLL2101 LNG Depending on the direct export functionality required you also need e CMLL21XL DLL if direct PDF export functionality should be supported 11 4 List amp Label Files List amp Label saves the project definitions in single files In addition to the basic definition some special settings such as target printer printer configuration etc which can be made in the Designer are saved in a special so called P File A small sketch of the form which is displayed in the file open dialog is saved to another extra file the so called V File File extension Form Printer Sk
226. ed using L IPrintDbGetCurrentlableSortOrder at print time Parameter hJob List amp Label job handle pszTableID Table ID to which this sort order applies Must be identical to the ID passed in L DbAddTable pszSortOrderID Unique ID of the table sort order It is returned by LIPrintDbGetCurrentlableSortOrder at print time pszSortOrderDisplayName Name of the table sort order as displayed in the Designer If no name is given the display name and the unique name are identical Return Value Error code Hints See the hints in chapter Printing Relational Data Before using the call the table must be passed with L DbAdaTable Example HLLJOBhJob hJob LlJobOpen 0 L1DbAddTable hJob Orders NULL LIDbAddTableSortOrder hJob Orders Name ASC Name eee CLC eo LlJobClose hJob See also LIDbAddTable LIDbAddTableRelation LIPrintDbGetCurrentTable LIPrint DbGetCurrentTableSortOrder LIPrintDbGetCurrentTableRelation LIDbAddTableSortOrderEx Syntax INT L1DbAddTableSortOrderEx HLLJOB hJob LPCTSTR pszTableID LPCTSTR pszSortOrderID LPCTSTR pszSortOrderDisplayName LPCTSTR pszField 149 API Reference Task Defines available sort orders for the tables added via L IDbAddTable Each sorting has its unique ID that can be queried using L PrintDbGetCurrentlableSortOrder at print time Additionally the fields that are relevant for the sorting can be passed separated b
227. eeeceeeeeeeeeeeeeeeeseeeeseeeeeeeeeeeeeegs 421 9 2 Additional Error Codes of the Storage API eeeeeesseeeeeeeeeeeeeesnaeeees 424 10 Debug TOOlDEDWIN vicsstesessectecceevetuvestenteeeteaedereteeetiesteerderetyeetasedesetestys 426 Contents 11 12 13 14 Redistribution Shipping the Application ssssssssssssssssstseeeeseeeees 427 11 1 System Requirements 11 2164 Bit Modules ve c t e505 tee seel ele eh des eels oie Merlot hades ek Sess 11 3 The Standalone Viewer Application sssseeeeeeeeeeeeeeeeeeeeeeeeees 427 ASEM COVEIVIGW Ade rete det acai aean iA ENEE a E Eea caantesi aden 427 11 3 2 Command Line Paramete rs 00ccccccceeeeeeeeeeeeeeeteeeteeeeeeeeeenees 427 TLS Registration sien raires teeus eenia e RE A ENa 428 11 94 Necessary Files ietahdinaine nuibolinelinceu heen allan 428 11 4 biste Label Files rreri renr eea E Geeariesd E RE 428 11 5 Other Settings 5 i Sis aa a elena ea nel ee ea 430 Update Information for Version 21 ccsccsssssssssssssssssssssssseseseseeeeeeees 431 V21 OVES W saoo terrera kaapit e a ea E AEEA NENE een NEEE 431 TZT Genera APl arrien nn e dew eho a a a 431 12 12 NOW TEAtUreS cach Aha i a a a a i 431 12 2 Updating to List amp Label 21 eee ceeeeeeeeeeeeeeeeeaeeeeeeeeeeeseneeeeeeees 432 T2271 GONG ral h el BAe tio weet adele EE 432 12 2 2 Updating NET ProjeCts tisvaiscsttastesnerkosterhsauscnideaseststnanaenlen de stiad 432
228. eeeeeeeaaa 83 4 8 1 Opening a Preview Files sei armine pes ds aiae a bev Od En anaes evaded 83 4 8 2 Merging Multiple Preview FileS ceceeeeeeeeeeeeeeeeeeeeeeeteneeees 84 4 8 3 DEBUGGING sesser nsn a aaa aa 84 4 9 Extending the Designer cccceeeeeeeeeeeeeeeeeeeeeeeneeeeeeeeeeeeeaaeeeeeeeeseeaas 84 4 9 1 Using the Formula Wizard to Add Your Own Functions 85 4 9 2 Adding Your Own Objects to the Designer cece 86 Programming Using the API scssssssssssssssssssssssssssssesssssssessseeeeeees 89 5 1 Programming Interface ccseccccceceeseesnneeeeeeeeeseeenaeeeeeeeeesessneeeeeeeeeess 89 5 1 1 Dynamic hnk HibrarneS sea ieman a aaa ia 89 5 1 2 General Notes About the Return Value sssssssiissessrsrrrrrsserrennna 91 5 2 Programming BaSiCS ccecceeeseeeeeeeeeeeeeneeeeeeeeeeeeenaeeeeeeeeeeeeeeseeeseeenss 91 5 2 1 Database Independent Concept cee ceeeceeceeeeeeeeeeeeeeeeeenteees 91 5 22 Ther List amp Label JOD cignan ms eankeotaabaleds 92 Contents 5 2 3 Variables Fields and Data Types cc ccccccceceeeeeeeeeeeeeetteeeeees 92 5 3 Invoking the Designer ccceeeeesseeeeeeeeeeeeeeneeeeeeeeeeeessaaeeeeeeeeeteneaas 97 5 3 1 EERTE AEL AE AA E E A A EA E TT 97 5 3 2 ANMOtatONS e isziite elas s edie teehee peek te ek heat ed al 98 5 4 The Print Process cccccccccccccccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaaeaea
229. efaultProjectParameter LIPrintGetProjectParameter LIPrintlsChartFieldUsed Syntax INT L1lPrintIsChartFieldUsed HLLJOB hJob LPCTSTR lpszFieldName Task Specifies whether the given chart field is used in one of the expressions or conditions of the project Parameter hJob List amp Label job handle IpszFieldName Chart field name Return Value Value Meaning 1 Chart field is used 0 Chart field is not used LL ERR_UNKNOWN Chart field is not defined Hints This function can only be called after L PrintStart or L PrintWithBoxStart This function needs LL OPTION_NEWEXPRESSIONS to be set to true default As calling L DefineChartFieldStart clears the used flags this function will return LL ERR_UNKNOWN or 0 afterwards regardless of whether the field is actually used or not Therefore do not use L DefineChartFieldStart after LIPrint WithBox Start Instead of using a specific field name wildcards can be used For further information see L PrintlsFieldUsed Example if L1PrintIsChartFieldUsed hJob Month 1 L1lDefineChartFieldExt hJob Month lt gt See also LIPrintStart LIPrintWithBoxStart LIPrintlsVariableUsed LIPrintlsFieldUsed 226 Function Reference LIPrintlsFieldUsed Syntax INT L1lPrintIsFieldUsed HLLJOB hJob LPCTSTR lpszFieldName Task Specifies whether the given field from the loaded project is used in one of the expressions or conditions of the proj
230. elation contains different key fields the result is tab delimited Please note the description of the function LIDbAddTableRelationEx _pszSubreportKeyField Points to a string containing the name of the key field of the child table If the relation contains different key fields the result is tab delimited Please note the description of the function LIDbAddTableRelationEx _pszKeyValue Points to a string containing the contents of the key field of the parent table If the relation contains different key fields the result is tab delimited Please note the description of the function LIDbAddTableRelationEx _pszProjectFileName Name of the project file to be processed _pszPreviewFileName Name of the preview file that has to be created _pszTooltipText Points to a string containing the tool tip text when hovering over a table entry that can trigger a drilldown report _pszTabText Points to a string containing the tab text if the user wants a drilldown report shown in a separate tab _hWnd Window handle to show own dialogs window handle of the preview control 309 API Reference _nID Unique drilldown job ID should not be mistaken with the List amp Label print job To make a unique assignement in the FINALIZE task this ID contains the value that has been assigned in the S7AAT task _hAttachinfo This parameter is needed for L AssociatePreviewControl to attach the viewer Additionally the flags LL_ASSOCIATEPR
231. en FALSE always 0 Hints In this callback no List amp Label function may be called which will produce output L Print etc Functions like L PrintGetCurrentPage or L PrintGetOption are allowed See Hints on the use of GDI objects 295 API Reference This function is called twice per object once with _bPreDraw TRUE then with bPreDraw FALSE _rcPaint may vary between these calls if the object size becomes smaller text table object or the appearance condition does not match _bPreDraw TRUE Use you can draw an individual background or hide the object If you change _rcPaint these modifications will have consequences for the size of the object as the object is drawn by List amp Label in the given rectangle _bPreDraw FALSE Use you can draw an individual background and or shade as only then is the true size of the object known The rectangle _rcPaint is the correct object rectangle If you change _rcPaint then this affects the linked objects as the data from _rcPaint is used as object rectangle which might influence the coordinates of spatially linked objects Example case LL_CMND_OBJECT pSCO PSCLLOBJECT pSC gt _1Param if pSCO gt _nType LL_OBJ_RECT amp amp pSCO gt _bPreDraw FALSE FillRect pSCO gt _hPaintDC pSCF gt _rcPaint GetStockObject LTGRAY_BRUSH break LL_CMND_PAGE Task Allows the programmer to place additional output on the page
232. end end 4 3 2 Using the UserData Parameter The Print and Design methods allow a UserData parameter of the type integer to be passed This parameter makes it possible to prepare various data in the event for List amp Label For example using the parameter it would be possible to provide data for invoice printing as well as for a list of customers 81 Programming With the VCL Component 4 4 Transferring Unbound Variables and Fields Transferring variables and fields follows the regular List amp Label principle Three API variations can be used for the registration API Description L DefineVariable Defines a variable of the type LL_TEXT and its content L DefineVariableExt As described above additionally can be transferred along with the List amp Label data type L DefineVariableExtHandle As described above except that the content must now be a handle One example in which a text type variable is registered looks like this LL L1DefineVariableExt MyVariable Content LL_TEXT You can find the constants for the List amp Label data types in the cmbtll21 pas unit located in your List amp Label installation directory 4 4 1 Pictures To transfer pictures files saved on your system use LL L1DefineVariableExt Picture lt data path gt LL_DRAWING Graphics in the memory only for BMP EMF are transferred with the API L DefineVariableExtHandle For example to display the graphic as a
233. ers In this case only the ID of the relation was passed and will be displayed in the Designer Finally you can pass sort orders for the tables Again you define a unique ID for every sort order that can then be queried at print time L1IDbAddTableSortOrder hJob Orders OrderDate ASC Order Date L1IDbAddTableSortOrder hJob Orders OrderDate DESC Order Date This allows the user to choose one of these sort orders as well as the default unsorted in the Designer If you use L DbAddTableEx to define the tables you can also support multiple stacked sortings The remaining action when calling the Designer is analogous to the normal call i e the complete scheme for calling the Designer with multiple tables looks like this lt open job gt L1JobOpen L1lJobOpenLCID lt define List amp Label settings gt L1SetOption L1SetOptionString L1SetDebug L1SetFileExtensions L1SetNotificationMessage L1SetNotificationCallback 108 Printing Relational Data lt which file gt L1SelectFileDlgTitleEx lt define data structure gt L1DbAddTable L1IDbAddTableRelation L1DbAddTableSortOrder lt define variables gt L1DefineVariableStart L1DefineVariable L1DefineVariableExt L1DefineVariableExtHandle lt define fields gt L1DefineFieldStart L1DefineField L1DefineFieldExt L1DefineFieldExtHandle lt disable funtions gt L1DesignerProhibitAction L1DesignerProhibitFunction lt ca
234. es Value Meaning 0 No non standard CSS formatting styles are used 1 Non standard CSS formatting styles may be used e g to create a gradient fill Default 0 XHTML ToolbarType Specifies if an additional toolbar will be created Value Meaning 0 No toolbar will be created 1 A toolbar with color scheme Skyblue will be created 2 A toolbar with color scheme Blue will be created 3 A toolbar with color scheme Black will be created 4 A toolbar with color scheme Web will be created Default 1 XHTML UseSeparateCSS Specifies if a separate CSS file will be created Value Meaning 0 CSS will be added to the HEAD area of the XHTML file 1 CSS will be created in a separate file Default 0 Layouter Percentaged This option configures whether the layout should be defined in absolute values or with values expressed as percentage 397 The Export Modules Value Meaning 0 Layout of the X coordinates in absolute values pixel 1 Layout of the X coordinates with values expressed as percentage Default 0 Layouter FixedPageHeight Configures whether all pages should be forced to have the same page height Value Meaning 0 Layout can shrink on the last page e g if no objects have been placed in the page footer 1 The page height is set as configured Default 1 Export Path Path where the exported files should be saved If this option is empty a file selection dialog will always be displayed Export File File name of
235. es e The option Line break in text objects and table columns is always active in the export result e The option Separators fixed in table objects is not supported e The list object option fixed size is not supported e The chart object is exported as a picture and thus cannot appear transparently e RTF text will be exported as pictures e Spacing before table lines is not supported e Diagonal lines are exported as images e Rotated text RTF and plain is not supported e Custom drawings in callbacks are not supported e Objects to be exported as picture should not overlap the object frame e Table frames of neighboring cells are not drawn so that they overlap each other but discretely This can double the frame width and needs to be taken into account during the design e TotalPages may not be used in rotated text objects e Even if the HTML object wraps over several pages it will be exported in one stream i e no page wrap will occur e Embedded scripting functionalities may be lost e Shadow Pages are not supported e lt A mix of different page formats is not supported To achieve an export of e g portrait and landscape format all pages of the same format can be each exported to a separate document e Issue print is not supported Programming Interface You can find a description of all options used in the SVG export module in this chapter These options can be modified read using the methods LIXSetP
236. es except for TTY MS fax export 7 5 2 Setting Mail Parameters by Code Like the other export options some of the parameters for email dispatch can be set by code The user can also predefine some settings in the Designer Project gt Settings These are then used automatically See the chapter on project parameters or further details A couple of other options can be set or read using LlXSetParameter lt exporter name gt LIXGetParameter lt exporter name gt Note that the exporter name may be left empty to address all export modules Export SendAsMail Activates sending of export files via email This option corresponds to the checkbox Send exported files by email for the end user Value Meaning 0 No mail will be send 1 The exported files are sent via the specified provider see below Default O 407 The Export Modules Export SendAsMailAvailable Enables you to hide the respective checkbox in the dialog Value Meaning O Checkbox will be hidden 1 Checkbox will be available Default 1 Export Mail Provider This option can be used to switch the mail provider All options apart from Simple MAPI need the CMMX21 DLL Value Meaning SMAPI Simple MAPI XMAPI Extended MAPI SMTP SMTP MSMAPI Simple MAPI using the default MAPI client Default The default value depends on the system s or application s settings see below If the DLL cannot be found the mail will be sent using system Simple
237. escending Example 29 Programming With NET C SqlConnection conn new SqlConnection Properties Settings Default ConnectionString SqlConnectionDataProvider provider new SqlConnectionDataProvider conn ListLabel LL new ListLabel LL DataSource provider LL Design LL Dispose VB NET Dim conn As New SqlConnection Properties Settings Default ConnectionString Dim provider As New SqlConnectionDataProvider conn Dim LL As New ListLabel LL DataSource provider LL Design LL Dispose XmI DataProvider Allows accessing XML data files easily No schema information in XML XSD files will be used and no constraints will be handled The main purpose of this class is to provide a fast and easy access to nested XML data This data provider does not support any sorting Example C Xml1DataProvider provider new Xm1lDataProvider c users public data xml1 ListLabel LL new ListLabel LL DataSource provider LL Design LL Dispose VB NET Dim provider As New XmlDataProvider c users public data xml Dim LL As New ListLabel LL DataSource provider LL Design LL Dispose 2 3 2 Variables Fields and Data Types Variables and fields are the dynamic text blocks for reports and contain the dynamic part of the data Variables usually change once per page or report an example is the 30 Other Important Concepts header data of an invoice with invoice numbe
238. esponding modules are installed Value Meaning PRN Printing to printer PRV Printing to Preview file FILE Printing to printer file DOCX Microsoft Word Format HTML TML Format JQM TML jQuery Mobile Format Function Reference MHTML Multi Mime HTML Format PDF Adobe PDF Format PICTURE_BMP Bitmap Picture PICTURE_EMF Metafile Picture EMF PICTURE_JPEG JPEG Picture PICTURE_MULTITIFF Multi TIFF Picture PICTURE_PNG PNG Picture PICTURE_TIFF TIFF Picture RTF Rich Text Format RTF TTY Pinwriter TTY TXT Text CSV Format TXT_LAYOUT Text Layout Format XHTML XHTML CSS Format XLS Microsoft Excel Format XML XML Forma XPS Microsoft XPS Format LL_OPTIONSTR_EXPORTFILELIST This is a read only property After L PrintEnd you can use this function to get a list of files that have been created by the export process The return value is a semicolon separated list of the path names of the files This list can be very large so please allocate sufficient buffer and check the return value of L SetOption on the error value LL_ERR_BUFFERTOOSMALL LL_OPTIONSTR_HELPFILENAME You can use this function to force the help file name e g if you want to display your own help file LL_OPTIONSTR_FAX_RECIPNAME LL_OPTIONSTR_FAX_RECIPNUMBER LL_OPTIONSTR_FAX_SENDERNAME LL_OPTIONSTR_FAX_SEN DERCOMPANY LL_OPTIONSTR_FAX_SENDERDEPT LL_OPTION STR_FAX_SENDERBILLINGCODE These options set a default value for the
239. esults in another column or row in the layout grid you should pay attention to the design of your layout Objects should generally be aligned with the same edges This results in a less complex layout grid which can be loaded more quickly by the browser The HTML 4 01 standard does not support overlapping objects When you have objects which overlap in the original layout only the object with the lowest order the object printed first will be exported The other overlapping objects will be ignored Exception colored rectangle objects in the background This effect is achieved by filling the cell in the layout grid of the next object over the rectangle Limitations There are also other limitations set by the target format The most important are listed now e Rows that are anchored to each other are not correctly exported e Overlapping objects except rectangles are not supported e Rectangles cannot have any frames Transparent rectangles will be ignored e Decimal tabs will be transformed to right aligned tabs e Any other tabs will be transformed to a blank e Paragraph spacing and Line distance in text objects are not supported e The option Line break in text objects and table columns is always active in the export result e The option Separators fixed in table objects is not supported e The left offset in the first column of a table line will be ignored 351 The Export Modules The list object optio
240. etDebug TRUE hJob LlJobOpen 0 L1SetNotificationCallback hJob MyCallback L1JobClose hJob See also 254 LIGetNotificationMessage LISetNotificationMessage Function Reference LISetNotificationCallbackExt Syntax FARPROC L1lSetNotificationCallbackExt HLLJOB hJob INT nEvent FARPROC lpfnNotify Task Definition of a procedure which will be called for notifications of the given event Parameter hJob List amp Label job handle nEvent Event ID LL_CMND_xxx or LL_NTFY_xxxx IpfnNotify The address of a function see below Return Value Address of the procedure if successful NULL otherwise Hints The specialized callback function has a higher priority than the general callback function or a message List amp Label first of all searches for a specialized callback function for the event to be raised If one is defined it will be called If not List amp Label checks whether a general callback handler has been installed with L SetNotificationCallback If so it will be called If not List amp Label checks whether a message for the current event has been defined using LiSetNotificationMessage f so the message will be sent This function may not be used with the NET component as this component already uses the API for its own functionality The callback function has the following definition LPARAM STDCALL MyCallback UINT nFunction LPARAM lParam and must be an exported func
241. etc pReserved NULL Return value Error code Hints If hDC is NULL it will be set to hPrnDC after the reference DC has been created See Also LIStgsysPrint LIStgsysStoragePrint LIStgsysGetAPIVersion Syntax int L1iStgsysGetAPIVersion HLLSTG hStg Task Returns the version of the Stgsys API Parameter hStg The handle returned by L StgsysStorageOpen Return value The version number of the Stgsys API in List amp Label C LL21 DLL and C LS21 DLL Hints The current version is 21 as of 10 2015 This function should be used to test the API version Newer APIs might have a larger set of functions available older ones less 318 Managing Preview Files See also LIStgsysGetFileVersion LIStgsysGetFilename Syntax int LlStgsysGetFilename HLLSTG hStg INT nJob INT nFile LPTSTR pszBuffer UINT nBufSize Task Can be used to get the real name s of the preview file s If a path has been provided to L StgsysStorageOpen this path will also be included Parameter hStg The handle returned by L StgsysStorageOpen nJob Job Index 1 first Job 1 L StgsysGet obCount nFile Page number Value Meaning 1 Management file 0 Printer configuration file gt 0 Page Metafile for this page 1 L StgsysGet PageCount IpszBuffer initialized buffer for the file name nBufSize Size of the buffer Return value Error code Hints The nFile Parameter distinguishes the type of
242. etch for dialog Definition Label project Ibl lbp lov File card project crd crp Crv List project Ast Isp Isv These file extensions are only default values and can be changed using LiSetFileExtensions or LiSetOptionString The crucial file is the form definition file The V File can be created at any time using L CreateSketch In the printer configuration file P File are all export specific settings stored as well as the printer specific settings Usually this file is created by the end user you should not redistribute it with your application as the user typically will not have your printer available If the P File cannot be found List amp Label automatically chooses the Windows default printer and if the Designer is used generates a P tile for it The path where the P File is searched for or generated can be specified with L SetPrinterDefaultsDir which may be relevant for network applications The logical sequence of choosing the printer is shown in the following graph 428 List amp Label Files Yos P File available Printer from P File available No y Choose printer from Choose windows P File default printer When printing to preview List amp Label generates a file which contains all printed pages as graphics This file has the fixed extension LL and may be viewed at any time with the stand alone application LLVIEW The path where the LL file is
243. etup lt define constant variables gt L1DefineVariable L1DefineVariableExt L1DefineVariableExtHandle lt get printer info for progress box gt L1PrintGetOption L1PrintGetOptionString L1PrintGetPrinterInfo lt skip unwanted labels gt lt print while data left and no error or user abort gt lt give progress status gt L1PrintSetBoxText L1PrintGetCurrentPage L1PrintGetOption lt define variables gt L1DefineVariable L1DefineVariableExt L1DefineVariableExtHandle lt print objects gt L1Print lt no warning no user abort next data record gt lt end print gt L1PrintEnd Printing Lists And for printing a report LL_ PROJECT LIST 102 lt define all possible variables gt L1DefineVariableStart L1DefineVariable L1DefineVariableExt L1DefineVariableExtHandle lt define all possible fields gt L1DefineFieldStart L1DefineField L1DefineFieldExt L1DefineFieldExtHandle lt define options gt L1SetPrinterDefaultsDir lt start print gt L1PrintStart L1PrintWithBoxStart lt define options gt L1PrintSetOption L1PrintSetOptionString L1SetPrinterDefaultsDir L1PreviewSetTempPath lt let user change options gt L1PrintOptionsDialog L1PrintOptionsDialogTitle L1PrintSelectOffsetEx L1PrinterSetup lt define constant variables gt L1DefineVariable L1DefineVariableExt L1DefineVariableExtHandle lt print variables gt print all objects L1Print lt whi
244. eturns project parameter values Parameter hStg The handle returned by L StgsysStorageOpen pszKey Option name pszBuffer Address of buffer for the value nBufSize Size of buffer incl string termination Return value lt 0 Error code 0 okay Hints The available option names depend on the parameters which the creating application has made available via L PrintSetProjectParameter or LiSetDefaultProjectParameter as PUBLIC Note that you need to prefix these parameters with ProjectParameter in order to query the values See also the Project Parameters chapter See also LIStgsysSetJobOptionStringEx LIStgsysGetJobOptionValue Syntax INT LlStgsysGetJobOptionValue HLLSTG hStg INT nOption Task Returns certain numerical parameters for the current job Parameter hStg The handle returned by L StgsysStorageOpen nOption Chooses the meaning of the return value Return value gt 0 Value lt 0 Error code 321 API Reference Hints These values are invaluable if you wish to create your own preview and print management especially if the destination printers are different from the original To get the correct value set the job with L StgsysSet ob before calling this API function nOption can have the following values LS_OPTION_BOXTYPE Returns the style of the meter box used at the time of the preview print and which should also be used during printing This is one of the constants LL_
245. exRange Analog to the print options dialog range for pages can be set 315 API Reference Value Meaning JobIndexRange Analog to the print options dialog a range for the job can be set IssuelndexRange Analog to the print options dialog a range for the issues can be set An example of this is the use of PDF Export PagelndexRange 2 3 With this only pages 2 and 3 are converted to PDF The export to PRN creates a file that is specially prepared for the given printer parameter PRN Device This file can be output on the printer by copying it directly Therefore the printer name device name must be explicitly defined Return value lt 0 Errorcode 0 okay Hints Example HLLSTGhStgOrg hStgOrg LlStgsysStorageOpen c test label1l 11 FALSE TRUE L1lStgsysStorageConvert hStgOrg c test label2 pdf PDF L1StgsysStorageClose hStgOrg See also LIStgsysStorageOpen LIStgsysStorageConvert LIStgsysDeleteFiles Syntax void LlStgsysDeleteFiles HLLSTG hStg Task Erases the preview file s Parameter hStg The handle returned by L StgsysStorageOpen Return value lt 0 Error code 0 okay 316 Managing Preview Files Hints This function erases the preview file s The only call that makes sense after this call is L StgsysStorageClose See also LIStgsysStorageOpen LIStgsysStorageClose LIStgsysDestroyMetafile Syntax INT L1lStgsysDestroyMetafile HANDLE
246. example if you wish to present data on the Internet for download or preview using our OCX The file has the extension LL We do not provide any information about its inner structure and we recommend that you do no rely on any details you may find out This is intentional as we have our own API to access the data contained in it so that there is no advantage for you in seeing inside the file We wish to be free to change the format whenever necessary without having conflicts with existing software 6 3 2 The Preview API You do not need to worry about the details of the preview files the API functions LiStgsysxxx do that for you All of these functions are exported by the C LS21 DLL This DLL which you will usually distribute with external viewers is as small as possible If you wish to use this DLL via an import library you need to link to the C LS21 LIB file In some programming languages it is sufficient to include the respective declaration file LIStgsysAppend Syntax INT LlStgsysAppend HLLSTG hStg HLLSTG hStgToAppend Task Append another preview job to the current storage file Parameter hStg The handle returned by L StgsysStorageOpen hStgToAppend Handle of the preview file to append Return value lt 0 Error code 0 okay Hints This function needs both preview files to be in the LL STG STORAGE format If the file to append contains a backside page it will only be used if the original file
247. external picture files Programming Interface All options of the XHTML exporter are supported pass MHTML as module name The option Export AlllnOneFile will be ignored as this format always results in one file only 7 3 5 Picture Export Overview This module creates a graphics file JPEG BMP EMF TIFF Multi TIFF PNG for every printed page The file names of the created graphics will be enumerated If the file name contains the format identifier d this identifier will be replaced by the page number Limitations e Issue print is not supported Programming Interface You can find a description of all options used in the picture export module in this chapter The options can be modified read using the methods L xXSetPara meter lt Exportername gt and L XGetParameter lt Exportername gt lt Exportername gt can be PICTURE JPEG PICTURE BMP PICTURE EMF PICTURE_TIFF PICTURE_MULTITIFF or PICTURE_PNG depending on the graphic format Resolution Defines the resolution in dpi for the transformation of the coordinates and the generation of pictures Default 96 dp screen resolution Picture JPEGQuality Specifies the quality and the corresponding compression factor of the generated JPEG graphic The value lies between 0 700 with 700 representing the highest quality worst compression Takes effect only when the source graphic is not the JPEG format as encoding of JPEG to JPEG would resul
248. ference nObjType Value Meaning LL_ PROJECT LABEL for labels LL_ PROJECT CARD for cards LL PROJECT LIST for lists Combined with LL FILE ALSONEW if a file name for a new not yet existing project can be entered pszBuffer nBufSize Buffer for the file name Must be initialized with a file name or an empty string pReserved Reserved set to NULL or empty Return Value Hints Error code Important for Visual Basic and some other languages as well if the OCX control is not used the buffer must be allocated and initialized by an 0 terminated string Advantages compared to a normal CommonDialog display of the project description a preview sketch the language consistency within List amp Label and the adaptation of the dialog design See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value Example char szFilename 260 1 INT nRet nRet LlSelectFileDlgTitleEx hJob hWnd Report LL PROJECT _LIST szFilename sizeof szFilename if nRet OK lt then do what you have to do gt See also LL _OPTION_OFNDIALOG_NOPLACESBAR LL_OPTIONSTR_ PRJDESCR LISetDebug Syntax 250 void LlSetDebug INT nOnOff Function Reference Task Switches the debug mode on or off Parameter nOnOff 0 if debug mode is to be switched off otherwise the following values can be additionally passed Value Meaning LL DEBUG_CMBITL
249. file for which the name is to be returned In the case of LL_S7TG_STORAGE its name is returned regardless of the nFile parameter as this is the one and only file that contains all information Example CString sFilename sOutput L1StgsysGetFilename hStg 1 1 sFilename GetBuffer _MAX PATH _MAX_PATH sFilename ReleaseBuffer sOutput CString _T View of file sFilename See also LIStgsysGetJobCount 319 API Reference LIStgsysGetFileVersion Syntax int LlStgsysGetFileVersion HLLSTG hStg Task Returns the version of the preview file Parameter hStg The handle returned by L StgsysStorageOpen Return value The version number of the preview file and the type Value Meaning Bits 0 7 Version number currently 21 current as of 10 2015 Hints This call is also very important for finding out about properties of the storage file and for dealing with possible differences See also LIStgsysGetAPIVersion LIStgsysGetJobCount Syntax INT L1lStgsysGetJobCount HLLSTG hStg Task Returns the number of jobs stored in the preview Parameter hStg The handle returned by L StgsysStorageOpen Return value gt 0 Number of jobs lt 0 Error code Example see LIStgsysSetJob See also LIStgsysStorageOpen 320 Managing Preview Files LIStgsysGetlobOptionStringEx Syntax INT L1lStgsysGetJobOptionStringEx HLLSTG hStg LPCTSTR pszKey LPTSTR pszBuffer UINT nBufSize Task R
250. file to all instances of the ListLabel object The object provides the property LicensingInfo for that A sample call could be as following C LL LicensingInfo A83jHd 19 Programming With NET VB NET LL LicensingInfo A83jHd where the part in quotes must be replaced by the license code in the text file Please note for the trial version an empty string should be used as license code 2 2 3 Binding to a Data Source For design and print List amp Label has to have knowledge of a data source An overview about the available data sources can be found in the section 2 3 1 Data Providers Of course additional unbound custom data can be passed too An example for that can be found in 2 5 8 Database Independent Contents To bind List amp Label to the data source the component provides the property DataSource The binding can be done either interactively in the development environment by using the property windows or the SmartTags of the component or alternatively on code level C LL DataSource CreateDataSet VB NET LL DataSource CreateDataSet The CreateDataSet routine in this sample is a placeholder for a method of your application which prepares the DataSet required for the report 2 2 4 Design The Designer is called by the Design method and will be displayed as a modal pop up window that overlaps your application window A data source always has to be assigned beforehand This is
251. fine which printers are to be used If any one of the default project printers is not available To delete the table pass NULL or an empty string to this option For each printer you can provide a translation table with the old printer and one or more replacement printers You can do this by calling this function more than once or by issuing multiple definitions for the individual printers separated by a line break n A table is defined by the line format old printer new printer 1 new printer 2 so for example server eti server eti1 server_eti2 server a4fast server standard This list will cause List amp Label to try the alias list server eti1 server_eti2 in that order if the printer server eti is not available until a printer is available or the list is finished The original paper format will be used for the replacement printers The parameters are not case sensitive LL_OPTIONSTR_PROJECTPASSWORD Encrypts the project files to protect them against unauthorized use The password given here is used for the encryption The password itself is not stored in the project so do not forget it Function Reference You can store encrypted projects in unencrypted format in the Designer by pressing a shift key when you save it A password dialog will pop up and allow you to enter the original password This is useful for debugging or support cases The maximum password length i
252. fineField hJob Name Smith L1lDefineField hJob Forename George L1lDefineFieldExt hJob Residence Cambridge LL TEXT NULL L1DefineFieldExt job Number of entries per page 1 LL TABLE FOOTERFIELD Or LL_TEXT NULL L1DefineFieldExt hJob Postal code CB5 9NB LL BARCODE 30F9 LlDefineFieldExt hJob Photo c photos norm bmp LL DRAWING Swe CLG p LlJobClose hJob See also LIDefineFieldStart LIDefineField LIDefineFieldExtHandle LIDefineFieldExtHandle Syntax INT L1DefineFieldExtHandle HLLJOB hJob LPCTSTR lpszName HANDLE hContents INT 1Para LPVOID lpPara 155 API Reference Task Defines a list field and its handle contents Parameter hJob List amp Label job handle IpszName Pointer to a string with the name of the field hContents Handle to an object of type HMETAFILE HENHMETAFILE HICON or HBITMAP IPara LL DRAWING_HMETA LL DRAWING_HEMETA LL DRAWING_HICON or LL DRAWING_HBITMAP pPara For further extensions must be NULL Return Value Hints Error code Please note the general hints in the section Variables and Fields This function defines a text field and can be mixed with the other L DefineField functions List amp Label predefines the fields listed in L DefineFie d The metafile handle must be valid as long as it is needed that is during the entire layout definition or until after L PrintFields or L Print has finish
253. g one of these components you may skip this chapter Direct Print and Export From the Designer for further information Checking for error codes is generally recommended 5 4 The Print Process 5 4 1 Supplying Data List amp Label also works database independently in this mode This means that the application is i e you as a programmer are responsible for supplying the data You tell List amp Label by calling a function which data fields are available in your application e g A Field called lt Name gt a field called lt Lastname gt etc and which content this field should have Where you get the data from at print time is totally irrelevant for List amp Label In most cases you probably perform a read access to a record field in a database To integrate the Designer into your application you need to tell List amp Label about the available data fields by calling a function for each of your data fields that may be placed in the form With this call you may also optionally declare the field type e g text numeric boolean date etc to List amp Label which is e g relevant for the correct treatment of your fields and variables in formulas within the Designer You may pass a sample content for each field which is used during the design in the layout preview If you want to support the real data preview in the Designer please follow the instructions in chapter This chapter is only required if you re not working with
254. g to the nlndex Return Value Error code Hints Values for nlndex 232 Function Reference LL_PRNOPT_COPIES is the number of copies to be preset in the print dialog box A value of LL_COPIES_HIDE will hide the copies option The task of supporting copies is described in the programming hints section Default 1 LL_PRNOPT_PAGE is the page number of the first page printed by List amp Label If this should not be selectable LL PAGE _HIDE is the value to be passed Default 1 LL_PRNOPT_OFFSET is the position of the first label in the label array The position the number refers to is defined by the print order Default O LL_PRNOPT_FIRSTPAGE is the first page of the page range that shall be printed If All has been chosen this is identical to LL PRNOPT_PAGE LL_PRNOPT_LASTPAGE is the page number of the last page to be printed Default MAX_INT LL_PRNOPT_JOBPAGES is the number of pages a print job should contain if you choose LL_PRINT_ MULTIJOB in LiPrint WithBox Start Default 16 LL_PRNOPT_PRINTDLG_ONLYPRINTERCOPIES The print options dialog will only allow a copies value to be entered if the printer supports copies Caution the printer copies may not be useful for labels as these may need programmer s copies support instead of the printer s See chapter Copies Default FALSE LL_PRNOPT_UNITS Returns the same value as L GetOption LL_OPTION_UNITS 233 API Reference See also
255. gTableMode Enables if tables will be linked For a larger amount of pages with tables this option should be set to 0 because Microsoft Office Word can only link up to 86 depending on the Word version tables Value Meaning 0 Table won t be linked 1 Tables will be linked Default 1 DOCX lgnoreCellPadding Defines wether the Border Spacing will be ignored Value Meaning 0 Border Spacing will not be ignored 1 Border Spacing will be ignored Default 0 Export File Defines the file name of the generated Word document If empty the file selection dialog will be displayed Export Path Defines the path of the generated Word document Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 0 Export with user interaction dialogs 1 No dialogs or message boxes will be displayed only if Export File was specified Default 0 392 Programming Reference Export ShowResult Specifies whether the export result will be displayed automatically The program that displays the result will be determined by the registered file extension Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with Export File so that usually Microsoft Word should be executed Default 0 7 3 15 XHTML CSS Export The XHTML export module creates XHTML code according to the XHTML 1 0 specification and CSS code according to the CSS 2 1 specification Overview Th
256. ge 0 of 1 Seite 0 von 1 LL_DICTIONARY_TYPE_STATIC L1DefineVariableStart hJob L1DefineVariable hJob ArticleNumber 12345 L1DefineVariable hJob Price 123 Invoke Designer etc L1JobClose hdob See also LlLocAddDesignLCID LL_OPTION_LCID 205 API Reference LIPreviewDeleteFiles Syntax INT LlPreviewDeleteFiles HLLJOB hJob LPCTSTR lpszObjName LPCTSTR lpszPath Task Deletes the temporary file s which have been created by the preview print Parameter hJob List amp Label job handle IpszObjName Valid file name without pat IpszPath Valid path of the preview files ending with a backslash Return Value Error code Hints Should always be called after L PreviewDisplay as the preview files are generally only valid momentarily Of course if you want to archive send or print them at a later time this should NOT be called See also LIPrintStart LIPrintWithBoxStart LIPreviewDisplay LIPrintEnd LlPreviewSet TempPath LIPreviewDisplay Syntax INT LlPreviewDisplay HLLJOB hJob LPCTSTR lpszObjName LPCTSTR lpszPath HWND hWnd Task Starts the preview window Parameter hJob List amp Label job handle IpszObjName Valid file name without path name IpszPath Valid path of the preview files ending with a backslash hWnd Window handle of the calling program Return Value Error code 206 Function Reference Hints
257. geOpen nJob Job index 1 L StgsysGet obCount Return value Error code Hints The following API calls that return job dependent data will use this job index to return the corresponding values Example calculates the total amount of pages int nPages 0 INT nJob for nJob 1 nJob lt LlStgsysGetJobCount hStg nJob L1StgsysSetJob hStg nJob nPages LlStgsysGetPageCount hStg See also LIStgsysGetJobCount LIStgsysSetJobOptionStringEx Syntax INT L1lStgsysSetJobOptionStringEx HLLSTG hStg LPCTSTR pszKey LPCTSTR pszValue Task Sets project parameter values Parameter hStg The handle returned by L StgsysStorageOpen pszKey Option name pszValue Value Return value lt 0 Error code 0 okay 330 Managing Preview Files Hints Can be used to write values into the preview file unless it was opened as READ ONLY Do not use reserved option names starting with LL See also LIStgsysGetJobOptionStringEx LIStgsysSetPageOptionString Syntax INT L1lStgsysSetPageOptionString HLLSTG hStg INT nPageIndex INT nOption LPCTSTR pszBuffer Task Set string values Parameter hStg The handle returned by L StgsysStorageOpen nPagelndex Page index 1 L StgsysGetPageCount nOption Chooses the meaning of the contents value Value Meaning LS_OPTION_JOBNAME New job name LS_OPTION_USER A user specific value The user can insert a user specific s
258. gs Number of arguments This member is important for functions with optional arguments _pvName Name of function to translate This member can also be set to handle query parameters see above _pv7 Depending on _nType see above the first argument of a function or the left hand side of an operator _pv2 Depending on _nType see above the second argument of a function or the right hand side of an operator _pv3 The third argument of a function _pv4 The fourth argument of a function Return value Value Meaning 0 Translation was not handled or cannot be handled The whole or in case of an AND operator the current branch of the expression is not translated Translation was handled exactly Translation was handled inexactly the result will contain more records than appropriate In this case List amp Label will run its own filtering in addition in order to filter the exceeding records 6 3 Managing Preview Files 6 3 1 Overview The preview print contained in List amp Label writes the preview data into a Tile This file can be archived for later use sent to another user who can look at it or print it without any loss of quality All data is stored in one file Using the optional compression that you can switch on using L1SetOption hJob LL_OPTION_COMPRESSSTORAGE 1 313 API Reference the file size can be reduced by up to 2 3 Compression slows down the print process but is convenient for
259. h is set to a Chinese font the property Charset would be automatically switched accordingly If this is not desired use this option to switch the behavior LL_OPTION_NOFAXVARS FALSE The variables for fax are visible in the Designer default TRUE The variables for fax are not visible in the Designer LL_OPTION_NOFILEVERSIONUPGRADEWARNING This option defines the behavior of the Designer when opening a project file from an older version of List amp Label TRUE Conversion takes place without user interaction FALSE A warning box is displayed to the user indicating that the project file will not be editable by an older version of List amp Label once it has been saved with the current version default LL_OPTION_NOMAILVARS FALSE The variables for email are visible in the Designer default TRUE The variables for email are not visible in the Designer LL_OPTION_NONOTABLECHECK TRUE For a list project List amp Label does not check whether at least one table object is present default FALSE List amp Label performs the check and returns LL_ ERR_NO_TABLEOBJECT if the project contains no table 263 API Reference 264 LL_OPTION_NOPARAMETERCHECK TRUE List amp Label does not check the parameters passed to its DLL functions which results in a higher processing speed FALSE The parameters will be checked default LL_OPTION_NOPRINTERPATHCHECK TRUE List amp Label does not check if the printers that a
260. hMF Task Releases the metafile handle Parameter AMF enhanced metafile handle Return value lt 0 Error code 0 okay Example See LIStgsysGetPageMetafile See also LIStgsysGetPageMetafile LIStgsysDrawPage Syntax void LlStgsysDrawPage HLLSTG hStg HDC hDC HDC hPrnDC BOOL bAskPrinter _PCRECT pRC INT nPageIndex BOOL bFit LPVOID pReserved Task Paints a preview page to a screen or printer device Parameter hStg The handle returned by L StgsysStorageOpen ADC DC for printing usually a printer or screen device Can be NULL see below hPrnDC Reference DC which can be used to get the unprintable area etc For a screen DC this is the default printer DC for a printer DC it is the same as hDC above Can be NULL See below 317 API Reference bAskPrinter f hPrnDC is NULL this flag defines whether the user is asked about the printer for the reference DC If it is TRUE he will be asked if it is FALSE the default printer will be used PRC Points to a RECT structure containing the device coordinates for printing If this is NULL the printer s values will be used Must not be NULL when printing to a non printer DC nPagelndex Page index 1 L StgsysGetPageCount bFit Defines whether the print should fit into the area TRUE or whether the original size should be kept FALSE although the latter might result in clipped output due to differences in paper size unprintable area
261. hObjReportContainer _T SubItems amp hObjSubItems HLLDOMOBJ hObjTable L1DomCreateSubobject hObjSubItems _T Table amp hObjTable Get line list HLLDOMOBJ hObjTableLines L1DomGetObject hObjTable _T Lines amp hObjTableLines Get data line list HLLDOMOBJ hObjTableData L1DomGetObject hObjTableLines _T Data amp hObjTableData Create new line definition HLLDOMOBJ hObjTableLine L1DomCreateSubobject hObjTableData _T Line amp hObjTableLine L1DomSetProperty hObjTableLine T Name _T My new table line Get header list HLLDOMOBJ hObjTableHeader L1DomGetObject hObjTableLines _T Header amp hObjTableHeader Create new line definition HLLDOMOBJ hObjTableHeaderLine L1DomCreateSubobject hObjTableHeader _T Line amp hObjTableHeaderLine Get field list for headers HLLDOMOBJ hObjTableHeaderFields L1DomGetObject hObjTableHeaderLine _T Fields amp hObjTableHeaderFields Get field list for data lines HLLDOMOBJ hObjTableDataFields L1DomGetObject hObjTableLine _T Fields amp hObjTableDataFields TCHAR aczVarName 1024 int nItemCount 3 for int i i lt nItemCount i sprintf aczVarName Var d i Create new field in header and set properties HLLDOMOBJ hObjHeaderField L1DomCreateSubobject hObjTableHeaderFields _T Text amp hObjHeaderField L1DomSetProperty hObjHeaderField _T Contents a
262. hanges e g change the mapping mode you should reverse the changes before ending the routine Tip the Windows API functions SaveDC RestoreDC can help considerably for complex changes 5 7 Advanced Programming This chapter is only required if you re not working with one of the components NET VCL OCX If you re using one of these components you may skip this chapter 5 7 1 Direct Print and Export From the Designer Introduction It is possible to provide the Designer with data for preview so that the user sees the report as it will be when printed Furthermore there is the possibility of printing or exporting directly from the Designer For C there is already a fully functional sample source code available You ll find it in the Samples program group for Visual C its title is Designer Preview and Drilldown Your development environment must comply with the following conditions so that this feature can be supported e t can respond to callbacks refer to Chapter Callbacks and Notifications e t can start a thread with a print procedure and supports synchronization elements such as Mutex Critical Section or similar The work to be undertaken by your code includes execution of your usual real data print export routine however at least for the preview in a separate thread For this purpose information about the pending task start abort end and query status is supplied via a callback A pointer to
263. he Designer or by L PrintGetOption hJob LL_PRNOPT_PAGE See also LIPrint LIPrintGetFilterExpression Syntax INT L1lPrintGetFilterExpression HLLJOB hJob LPTSTR lpszBuffer INT nBufSize Task Gets the chosen filter condition if the project has assigned one Parameter hJob List amp Label job handle IpszBuffer Buffer in which the string is to be stored nBufSize Size of the buffer Return Value Error code Hints This function can only be used if a print job is open i e after L Print WithBox Start See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIPrintWillMatchFilter LIPrintDidMatchFilter LIPrintGetitemsPerPage Syntax INT L1lPrintGetItemsPerPage HLLJOB hJob Task Returns the number of labels on a page no of columns no of lines 221 API Reference Parameter hJob List amp Label job handle Return Value lt 0 error code gt 0 number of labels Hints 1 is always returned for LL PROJECT LIST Can be used to calculate the total number of output pages See hints in the programming part of this manual See also LIPrintGetltemsPerTable LIPrintGetOption Syntax INT L1lPrintGetOption HLLJOB hJob INT nIndex Task Returns the various print options which are set by the user in the L Print OptionsDialog Parameter hJob List amp Label job handle nIndex One of the values listed below
264. he Function Parameters of DLLs concerning the buffer return value See also LIGetUsedldentiefersEx LIGetUsedidentifiersEx Syntax INT L1GetUsedIidentifiersEx HLLJOB hJob LPCTSTR lpszProjectName UINT nIdentifierTypes LPTSTR lpszBuffer UINT nBufSize Task Returns a list of variables fields and chart fields that are actually used within the given project file in order to increase performance as only these values need to be provided 196 Function Reference Parameter hJob List amp Label Job Handle IpszProjectName Pointer to a string with the project name nidentifierTypes dentifier types that shall be considered The values can be combined with OR Value Meaning LL_USEDIDENTIFIERSFLAG Variables _VARIABLES LL_USEDIDENTIFIERSFLAG Fields _FIELDS LL_USEDIDENTIFIERSFLAG Chart fields _CHAATFIELDS LL_USEDIDENTIFIERSFLAG Tables see LIDbAddTable _TABLES LL_USEDIDENTIFIERSFLAG Relations see LIDbAddTableRelation _RELATIONS IpszBuffer Address of buffer for contents nBufSize Maximum number of characters to be copied Return Value Error code Hints See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIGetUsedldentiefers LIGetUserVariableContents Syntax INT L1GetUserVariableContents HLLJOB hJob LPCTSTR lpszName LPTSTR lpszBuffer UINT nBufSize Task Returns the contents of the corresponding user variable Parameter
265. he data printed by the preview print process If lpszPath is empty the path of the project file is used See also LIPrintStart LIPrintWithBoxStart LIPreviewDeleteFiles LIPreviewSetTempPath LIPreviewDisplay LIPreviewSetTempPath Syntax INT LlPreviewSetTempPath HLLJOB hJob LPCTSTR lpszPath Task Sets a temporary path for the print preview file s Especially useful for applications running in a network environment Parameter hJob List amp Label job handle IpszPath Valid path with a concluding backslash Return Value Error code Hints The preview file s will be stored in this path The file name is the project s name the file extension is LL The preview file can be archived sent or viewed whenever needed If the path is NULL or the path in which the project file is stored is taken This command must be called before the first call to L Print in the print loop See also LIPrintStart LIPrintWithBoxStart LIPrint Syntax INT LlPrint HLLJOB hdob Task Output of all objects on the printer 208 Function Reference Parameter hJob List amp Label job handle Return Value Error code Hints Normal objects and the header of a table object see option LL OPTION _ DELAYTABLEHEADER are printed A table object has to be filled with calls of L PrintFields afterwards LIPrint is responsible for a page break Label card projects As long as L Print returns LL_WARN_REPEAT D
266. he dialog If this is to be inhibited set the option Export Quiet to 1 Export SaveAsZ PAvailable Here you can hide the ZIP archive filter within the file select dialog Value Meaning 0 Filter hidden 1 User selection possible Default 1 Export Z IPFile Default Name of the ZIP file to be created e g export zip For the file names in the ZIP archive the following rules apply 412 Export Files as ZIP Compressed Archive m if Export File is not assigned the name of the ZIP archive is used with a corresponding file extension e g export htm m if Export File is assigned this will then be used If an export format generates one file per page the placeholder d can be used for the page number e g Invoice Page d bmp for the bitmap exporter Export Z lPPath Path of the created ZIP files 413 Miscellaneous Programming Topics 8 Miscellaneous Programming Topics 8 1 Passing NULL Values You can use NULL values in List amp Label by passing a special string to the APIs This means that this field has no current value e g a delivery date for a shipment that has not yet occurred Most database drivers may return a field content of NULL which you need to pass on to List amp Label as NULL although that string can be altered if needed Basically the List amp Label components handle database NULL values automatically List amp Label handles NULL values according to the SOL 92 specification where pos
267. he file can be sent directly to the user via e mail if the creation is to be scheduled see section Sending E Mail Generally the project files are created within a client application and then published together with the web application For the design in the browser Designer controls are available for all common browsers The provided web reporting sample for C and VB NET shows how to do this The following image visualizes the principle 43 Programming With NET Server Bar Application User can view result in browser A printer driver has to be installed on the server as well so the print can be successfully executed List amp Label works closely together with the Windows GDI and therefore requires a printer device context for all operations The Microsoft XPS printer driver automatically installed on all systems from NET Framework 3 5 and higher is also suitable as a reference printer 2 4 2 Web Designer The Web Designer is a special version of the Designer which can be used to design reports on a web server This replaces the web browser plugin based designer control Internet Explorer or the browser extensions Mozilla Firefox and Google Chrome which were offered for this purpose up until List amp Label 21 Updating the Browser Plugin Based DesignerControl The web browsers Mozilla Firefox Google Chrome and Microsoft Edge successor of Internet Explorer for Windows 10 and above no longer support browser
268. he project file When this option is set to TRUE the text will be compressed Set this option to FALSE if you want to see the text in the project file for example for debugging Default TRUE LL_OPTION_COMPRESSSTORAGE TRUE the preview data will be compressed This is a bit slower but saves a lot of disk space FALSE no compression default LL_OPTION_CONVERTCRLF TRUE List amp Label translates CR LF combinations in variable and field contents to LF and prevents duplicate line breaks default FALSE contents remain unchanged LL_OPTION_DEFAULTDECSFORSTR This option sets the number of decimal places that the Designer function Str uses if the number is not defined by the user in the Designer Default 5 LL_OPTION_DEFDEFFONT Allows you to set the handle of the font used as default for the project s default font The handle need not be valid after the API call an own copy of the font will be used This font can be set by LL_ OPTIONSTR_DEFDEFFONT Default GetStockObject ANS _VAR_FONT LL_OPTION_DELAYTABLEHEADER This option defines whether List amp Label prints the table header when calling L Print or when first printing a table line L PrintFields TRUE at L PrintFields thus triggered by the first table line Default FALSE at L Print Of course if fields are used in the header line they must be defined at the L Print call LL_OPTION_ DESIGNEREXPORTPARAMETER see chapter Direct Print
269. his is very simple and needs little coding in standard cases 5 2 2 The List amp Label Job To enable List amp Label to distinguish between the different applications that are printing with it a so called job management is necessary each application using a functionality of List amp Label print design etc has to open a job first LUobOpen Li obOpenLCID and pass the returned job handle as parameter to nearly all following calls of List amp Label functions If you develop using one of the enclosed components the job management is handled automatically by the control For this reason the job handle parameter must be omitted in calls of functions of these components HLLJOB hJob L1JobOpen CMBTLANG_ENGLISH L1DefineVariable hJob Firstname George L1DefineVariable hJob Lastname Smith 5 2 3 Variables Fields and Data Types The delivery and definition of variables and their contents is performed with the List amp Label function L DefineVariable Ext the delivery and definition of fields and their contents is performed with the List amp Label function L DefineFie d Ext Regarding the names of fields and variables please refer to the section Hints on Variable and Field Names List amp Label allows the specification of the following variable and field types As the APIs expect string parameters to be passed you may need to convert the actual values to strings before passing them to List amp L
270. hout much additional programming FALSE Limitations are valid default LL_OPTION_SUPPORT_HUGESTORAGEFS TRUE The preview file size is not restricted Preview files can only be read starting with Windows 2000 FALSE The preview file size is restricted to 2 GB Preview files can be read on any of the supported operating systems default LL_OPTION_SUPPORTS_PRNOPTSTR_EXPORT TRUE The user can choose a default exporter for the project which will be preset in the print options dialog FALSE Usually means that the application sets the default exporter The default print medium is stored in the Project file Default FALSE LL_OPTION_TABLE_COLORING LL_COLORING_DESIGNER the coloring of list objects may only be carried out by List amp Label default LL_COLORING_PROGRAM the coloring of list objects is only carried out by notifications or callback see chapter Notifications and Callbacks color setting in the Designer is not possible LL_COLORING_DONTCARE the coloring is first of all carried out by the program by notification or callback and then additionally by List amp Label LL_OPTION_TABREPRESENTATIONCODE Character code of the character that represents a tab in the Designer This value might have to be changed for code pages other than standard Western code page as the default might be used for a printable character Function Reference LL_OPTION_TABSTOPS TRUE List amp Label replaces tabs code 0x09 in a tex
271. howThumbnails in out BOOL Defines whether the thumbnail bar is visible in the preview control Default TRUE SaveAsFilePath in out BSTR Defines the default path for the Save as dialog When using the SaveAs method the user defined file name will be returned CanClosefout BOOL Must be used to query the state of the control before closing the hosting form page If the result is FALSE the control must not be destroyed Version out LONG Returns the version number of the OCX control MAKELONG lo hi 3 9 4 Methods GotoFirst Shows the first page GotoPrev Shows the previous page if possible 72 The Viewer OCX Control GotoNext Shows the next page if possible GotoLast Shows the last page ZoomTimes2 Zooms in with a factor of 2 ZoomRevert Resets to the previous zoom state the zoom states are on a stack where ZoomRevert pops the last one off before resizing to that zoom state ZoomReset Resets the zoom state to fit to client window SetZoom in long nPercentage Sets the zoom to the passed factor 1 30 PrintPage in Long nPage in Long hDC Prints the page nPage 1 page If hDC is NULL a printer dialog will be shown PrintCurrentPage in Long hDC Prints the current page If hDC is NULL a printer dialog will be shown PrintAllPages in BOOL bShowPrintOptions Prints all pages of the project If bShowPrintOptions is TRUE a printer dialog will be shown RefreshToolbar Refreshes
272. id in the same or similar way for Picture Barcode etc columns in table elements Text A text objects consists of multiple paragraphs Each of these paragraphs does have specific content This can be either a variable or a formula which combines multiple data contents To display single variables usually no special conversion is required If multiple variables of a different type see section Data Types are to be combined within a formula the single parts have to be converted to the same data types e g string An example for the combination of numbers and strings would be Total Str Sum Article Price 2 37 Programming With NET The following table lists some of the conversion functions which are frequently needed in this context From To Date Number Picture Barcode Text Date DateToJulian Date FStr Number JulianToDate 7 s Barcode Str Str Picture Drawing Barcode Val Barcode Barcode Text Date Val Drawing Barcode Picture The content of a picture object is set via the property window The property Data Source offers three values File Name Formula and Variable e The setting File Name is used for a fixed file such as a company logo If the file is not supposed to be redistributed it can be embedded in the report itself The file selection dialog offers the appropriate option e With Formula the content can be set by a string containing a path The requ
273. ield IpszBuffer Address of buffer for contents nBufSize Maximum number of characters to be copied Return Value Error code LL_ ERR_UNKNOWN_FIELD or 0 Hints This function can be used in callback routines to ask for the contents of chart fields See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIDefineChartFieldStart LIDefineChartFieldExt LIGetFieldType LIGetDefaultPrinter Syntax INT L1GetDefaultPrinter LPTSTR pszPrinter LLPUINT pnBufferSize _PDEVMODE pDevMode LLPUINT pnDevModeBufSize UINT nOptions Task Returns the name of the default printer and a DEVMODE struct corresponding to the default settings Parameter pszPrinter Address of buffer for the printer name May be NULL see hints pnBufferSize Size of the buffer in TCHARs pDevMode Address of buffer for the DEVMODE struct May be NULL see hints pnDevModeBufSize Size of the buffer in bytes 187 API Reference nOptions Reserved must be 0 Return Value Error code Hints If pszPrinter and pDevMode is NULL the required buffer sizes are stored in pnPrinterBufferSize and pnDevModeBufferSize See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LISetPrinterloDefault LISetPrinterlnPrinterFile LIGetDefaultProjectParameter Syntax INT L1GetDefaultProjectParameter HLLJOB hLlJob LPCTSTR pszParameter
274. ignatureProvider Option 4 Sign using secrypt digiSeal server 2 405 The Export Modules Value Meaning Default 0 Export SignatureProvider Option Additional options for the signature provider selected by Export SignatureProvider Options for the esiCAPI provider Allows to select the used connector to use Information on the diverse selectors is available from e siqia Value Meaning 0 Default i e the first available connector is used 1 Sign using SignLive CC 4 1 2 2 Sign using SecSigner 3 5 X Default 0 Options for the signature provider digiSeal server 2 This option has only one value and contains the connection data for digiSeal server 2 The single values are separated with a pipe character each The following structure applies lt ServerHost gt lt ServerPort gt lt File path to the software certificate for identification and authentication gt lt Password for the software certificate gt Example localhost 2001 secrypt_Testcertificate_D TRUST_test pfx test NET component LL ExportOptions Add L1ExportOption ExportSignatureProvider 4 LL ExportOptions Add L1ExportOption ExportSignatureProviderOption localhost 2001 secrypt_Testcertificate_D TRUST_test pfx test C L1XSetParameter hJob LL_LLX_EXTENSIONTYPE_EXPORT _T PDF _T Export SignaturProvider _T 4 L1XSetParameter hJob LL_LLX_EXTENSIONTYPE_EXPORT _T PDF _T Export SignaturProvider Option _T loca
275. igner In the case of a list project LL_ PROJECT LIST the corresponding fields must also be defined in order to avoid an error Once you have called L1PrintWithBoxStart hJob LL_PROJECT_LABEL aczProjectFile LL_PRINT_NORMAL LL_BOXTYPE_BRIDGEMETER hWindow my test and no error is returned from this function List amp Label has read the definition of the project and is ready to print The printer is however not initialized yet this is done with the first function call which starts the printing job If you want to allow the user to change the print parameters the corresponding dialog is called using 104 The Print Process L1PrintOptionsDialog hJob hWindow Print Parameter With L SetOption and L SetOptionString standard values for that particular printout can be given for example L1PrintSetOption hJob LL_OPTION COPIES LL_COPIES HIDE suppresses the copies query in the print options dialog If Save options permanently has been checked in the dialog then the chosen printer setting is saved in a so called printer definition file Initially the printer and layout is determined in the Designer menu Project gt Page Layout If this file is not found then the Windows standard printer is used Further information on this can be found in chapter List amp Label Files List Projects Important Things to Note Variables in the case of list projects are values which remain constant for one
276. ilable LL DECLARECHARTROW_FOR_TABLECOLUMNS informs chart objects contained in table columns that data is available Please note the hints in the chart chapter of this manual This call does not actually print the objects but only tells them to store the current data Only a call to L Print chart objects or L PrintFields charts in table columns actually prints the charts Example while data to put into chart object LlDefineChartFieldExt L1PrintDeclareChartRow hJob LL DECLARECHARTROW_FOR_ OBJECTS now print chart object ret L1lPrint See also LIDefineChartFieldExt LIDefineChartFieldStart LIPrintDidMatchFilter Syntax INT L1lPrintDidMatchFilter HLLJOB hJob Task Specifies whether the last data record printed matched the filter provided by the user i e if it was really printed Parameter hJob List amp Label job handle Return Value lt 0 Error code 0 not printed 1 printed Hints This function can only be called after L Print L PrintFields Example ret L1Print if ret 0 amp amp L1PrintDidMatchFilter hJob nCountOfPrintedRecords See also LIPrintGetFilterExpression LIPrintWillMatchFilter LL NTFY_FAILS_FILTER Callback 215 API Reference LIPrintEnableObject XE LIPrintEnableObject Syntax INT L1PrintEnableObject HLLJOB hJob LPCTSTR lpszObject BOOL bEnable Task Enables the object to be printed or disables it in
277. ilable Default 1 Export OnlyTableData Only data from table lines will be exported Value Meaning 0 All objects are exported 1 Only table cells and their data are exported The font properties Bold Italic and the horizontal alignment of the text is used in the result file Other format options are ignored to ensure best reusability of the result in Excel Default 0 350 Programming Reference 7 3 2 HTML Export The HTML export module creates HTML 4 01 code with some limitations Overview The export module collects all List amp Label objects for the page currently being printed and places them in a large HTML table the layout grid corresponding to their physical position on the page The sizes of the columns and rows in this table are a result of the X and Y coordinates of all objects The end user can choose an option from the HTML export settings to determine whether the column widths of the layout grid should be values expressed as percentage based on the current window size of the browser or absolute values in pixels The advantage of absolute positions is that the result of the export is a more precise representation of the original layout in the Designer Representation with percentage positions has the advantage that it is normally more easily printable than the other representations This is due to the fact that the browsers can resize this kind of representation Because each different X and Y coordinate r
278. ills are not supported e Rotated text 180 is not supported e Custom drawings in callbacks are not supported e Paragraph spacing is not supported e Negative values for spacing are not supported e The maximum number of Excel columns is limited to 256 e Issue print is not supported e Shadow Pages are not supported e The wrapping option Minimum Size in the crosstab object is not supported Programming Interface You can find a description of all options used in the XLS export module in this chapter The options can be modified using the methods L xXSetParameter XLS and read by calling L XGetParameter XLS Resolution Defines the resolution in dpi for the generation of pictures Default 300 dpi Picture BitsPerPixel Defines the color depth of the generated picture Please note that the picture files will quickly get very large with higher color depths Value Meaning 1 Black amp White 24 24bit True Color Default 24 Verbosity Rectangle Configures how rectangle objects should be exported Value Meaning 0 Ignore object 1 Object as rectangle 2 Object as picture Default 1 346 Programming Reference Verbosity Barcode Configures how barcode objects should be exported Value Meaning 0 Ignore object 1 Object as picture Default 1 Verbosity Drawing Configures how picture objects should be exported Value Meaning 0 Ignore object 1 Object as picture Default 1 Verbosity Elli
279. in order to pass a variable FirstName that should be displayed as Vorname in the Designer To delete all passed alias names just use L1SetOptionString hJob LL_OPTIONSTR_VARALIAS 277 API Reference The NET OCX and VCL components offer a custom dictionary API that makes using this option even easier See the components help file for more information Example HLLJOB hJob L1SetDebug TRUE hJob LlJobOpen 0 all label projects will be called lt somewhat gt label v L1lSetOptionString hJob LL _OPTIONSTR_LABEL PRJEXT label ER ea LlJobClose hJob See also LIGetOption LIGetOptionString LISetOptionString LISetPrinterDefaultsDir Syntax INT LlSetPrinterDefaultsDir HLLJOB hJob LPCTSTR pszDir Task Sets the path of the printer definition file e g to use user specific printer settings in a network environment Parameter hJob List amp Label job handle pszDir Path name of the directory Return Value Error code Example 278 HLLJOB hJob hJob LlJobOpen 0 L1SetPrinterDefaultsDir hJob c temp user if LlPrintStart hJob LL PROJECT LIST c test lst LL_PRINT_NORMAL 0 p Cry ELE ee LlPrintEnd hJob else MessageBox NULL Error List amp Label MB OK LlJobClose hJob Function Reference See also LISetPrinterToDefault LIPrintStart LIPrintWithBoxStart LIPrintCopyPrinter Configuration LIPrintSetPrinterlnPr
280. inal printer for example HP LaserJet 4L See also LIStgsysGetPageOptionValue LIStgsysSetPageOptionString 325 API Reference LIStgsysGetPageOptionValue Syntax INT Task Ret L1lStgsysGetPageOptionValue HLLSTG hStg INT nPageIndex INT nOption urns page dependent information Parameter hStg The handle returned by L StgsysStorageOpen nPagelndex Page index 1 L StgsysGetPageCount nOption Chooses the meaning of the return value LS_OPTION_PAGENUMBER Ret LS_ Ret LS_ Ret urns the page number of the selected page OPTION_COPIES urns the number of copies that the page should be printed with OPTION_PRN_ORIENTATION urns the page orientation DMORIENT_PORTRAIT or DMORIENT_LANDSCAPE LS_OPTION_PHYSPAGE Ret urns whether the project should be printed using the physical paper size 1 or only the printable area 0 LS_OPTION_PRN_PIXELSOFFSET_X Ret of LS Ret of LS Ret LS_ urns the horizontal offset of the printable area in relation to the paper edge he original printer OPTION_PRN_PIXELSOFFSET_Y urns the vertical offset of the printable area in relation to the paper edge he original printer OPTION_PRN_PIXELS_X urns the horizontal size of the printable area of the original printer OPTION_PRN_PIXELS_Y Ret 326 urns the vertical size of the printable area of the original printer Managing Preview Files LS_OPTION_PRN_PIXELSPHYS
281. ing the objects LL_METERJOB _ internal consistency check CONSISTENCYCHECK 303 API Reference Hints By using this callback the host application can implement a wait dialog box We suggest using this callback if the object count exceeds 200 objects to reduce unnecessary screen flickering To get a percentage value use MulbDiv 100 _nCurrent _nTotal Example functions used here for a meter dialog must be replaced by own functions case LL_INFO_METER scLiMeterInfo pMI scLliMeterInfo 1Param static HLLJOB hMeterJob 0 is actual version if pMI gt _nSize sizeof scLlMeterInfo do I have to do something if pMI gt _nTotal gt 0 get parent window handle for Dialog HWND hWndParent pMI gt _hWnd pMI gt _hWnd hwndMyFrame start if pMI gt _nCurrent 0 open meter bar with 0 hMeterJob WaitDlgStart hWndParent wait a moment 0 else end if pMI gt _nCurrent pMI gt _nTotal end meter bar WaitDlgEnd hMeterJob else somewhere in between 0 and 100 set meter value to MulDiv 100 _nCurrent _nTotal WaitDlgSetText hMeterJob still working MulDiv 100 pMI gt _nCurrent pMI gt _nTotal break LL_INFO_PRINTJOBSUPERVISION Task Can be used to monitor a print job after it is passed to the spooler 304 Callback Reference Parameter Hints Param contains an address of a struct of type scL Print obinfo
282. ing to the data type will become 0 an empty string or an invalid date The better alternative is however to work with NULLSafe Designer functions where the replacement value can be defined exactly in case of NULL Function Reference TRUE NULL values will be displayed by replacement values FALSE NULL values as operators or parameter result in NULL as function value default LL_OPTION_PHANTOMSPACEREPRESENTATIONCODE Character code of the character that represents a phantom space in the Designer This value might have to be changed for code pages other than standard Western code page as the default might be used for a printable character LL_OPTION_PRINTERDCCACHE_TIMEOUT_SECONDS Determines how long in seconds printer device contexts are cached Please note that some printers do not start a print job before the corresponding device context is closed For these you might want to change this setting to 0 The default value is 60 LL_OPTION_ PRINTERDEVICEOPTIMIZATION TRUE Printers that are effectively equal concerning their DEVMODE structs are optimized away default This also means that print jobs may be collated even if there are pages with different printer settings in between To prevent this from happening you may switch this option to FALSE FALSE All printers are shown print jobs are not collated LL_OPTION_PROHIBIT_USERINTERACTION TRUE No message boxes and dialogs will be displayed Message boxes wi
283. intDbGetRootTableCount Syntax INT L1PrintDbGetRootTableCount HLLJOB hJob Task Returns the number of tables at the root level Necessary to correctly display a progress bar Parameter hJob List amp Label job handle Return Value Number of tables Hints See the hints in chapter Printing Relational Data See also LIDbAddTable LIDbAddTableRelation LIDbAddTableSortOrder LIPrintDbGet CurrentTable LIPrintDoGetCurrentTableSortOrder LIPrintDbGetCurrentTable Relation 211 API Reference LIPrintDbGetCurrentTable Syntax INT L1PrintDbGetCurrentTable HLLJOB hJob LPTSTR pszTableID UINT nTableIDLength BOOL bCompletePath Task This function returns the table that is currently printed filled Parameter hJob List amp Label job handle pszTablelD Buffer in which the string is to be stored nTablelDLength Size of buffer bCompletePath f true the complete table hierarchy will be returned e g Orders gt OrderDetails If false only the table name e g OrderDetails is returned Return Value Error code Hints See the hints in chapter Printing Relational Data See also LIDbAddTable LIDbAddTableRelation LIDpbAddTableSortOrder LIPrintDbGet CurrentTableSortOrder LIPrintDbGetCurrentTableRelation LIPrintDbGetCurrentTableFilter Syntax INT L1lPrintDbGetCurrentTableFilter HLLJOB hJob PVARIANT pvFilter PVARIANT pvParams Task This function returns the current table filte
284. interFile LISetPrinterInPrinterFile Syntax INT LlSetPrinterInPrinterFile HLLJOB hJob UINT nObjType LPCTSTR pszObjName INT nPrinter LPCTSTR pszPrinter _PCDEVMODE pDM Task Replaces a printer in a printer configuration file by a new one or allows you to set special printer parameters Parameter hJob List amp Label job handle nObjType LL PROJECT LABEL LL_PROJECT_CARD or LL_PROJECT LIST pszObjName Project name nPrinter Printer index 0 range with Page 1 will be created automatically if necessary 1 default range 1 creates only the default range and deletes other ranges that may exist If the project contains multiple layout regions you can use indices starting from 99 where 99 will set the printer for all regions 100 for the first 101 for the second and so on pszPrinter Printer name pDM Address of new DEVMODE structure If NULL the default settings of the printer will be used Return Value Error value Hints This function allows you to define the printer that will be used for printing If the printer configuration file does not exist it will be created By oring the project type with LL_PRJTYPE_OPTION_ FORCEDEFAULTSETTINGS you can force the printer s default settings for the print job As the printer configuration file will be used by L Print WithBox Start the function must be called before this function The DEVMODE structure is defined in the Windows API help file
285. ints See also LIPrinterSetup LIPrintSetOption LIPrintGetOption LIPrintOptionsDialogTitle LIPrintOptionsDialogTitle Syntax INT L1PrintOptionsDialogTitle HLLJOB hJob HWND hWnd LPCTSTR lpszTitle LPCTSTR lpszText Task Calls a print option selection window and enables the user to select print specific settings Parameter hJob List amp Label job handle hWnd Window handle of the calling program IpszTitle Dialog title IpszText Text to be passed in the dialog e g Only 55 labels will be printed Return Value Error code Hints The following settings can be made Printer or reference printer for export Export destination Page number of the first page if not hidden Number of copies required if this has not been removed by L PrintSetOption Starting position with LL PROJECT LABEL LL_PROJECT_CARD if more than one label file card per page exists Print destination 229 API Reference Page range print from to Default values can be defined with L PrintSetOption This function must be called after L PrintStart LiPrintWithBoxStart but before calling L Print for the first time The number of copies might have to be evaluated by the programmer as some printer drivers do not have the relevant function implemented See programmer s hints in this manual The function L PrinterSetup allows you to call a print selection dialog without further settings See also
286. ion Parameter hJob List amp Label job handle pszTablelD D of the child table Must be identical to the ID passed in LIDbAddTable pszParentTablelD D of the parent table Must be identical to the ID passed in LIDbAdaTable pszRelationID D of the table relation It is returned by LIPrintDbGetCurrentlableRelation at print time pszRelationDisplayName Name of the table relation as displayed in the Designer and it is not saved to the project file If no name is given the display name and the unique name are identical pszKeyField Key field of the child table multiple key fields can be added as tab separated list pszParentKeyField Key field of the parent table multiple key fields can be added as tab separated list Return Value Hints Error code See the hints in chapter Printing Relational Data Before using the call the parent and child table must be passed with L DbAdaTable Example See chapter Direct Print and Export From the Designer See also LIDbAddTable LIDbAddTableSortOrder LIPrintDbGetCurrentTable DbGetCurrentTableSortOrder LIPrintDbGetCurrentTableRelation LIDbAddTableSortOrder Syntax INT L1DbAddTableSortOrder HLLJOB hJob LPCTSTR pszTablelID LPCTSTR pszSortOrderID LPCTSTR pszSortOrderDisplayName 148 LIPrint Function Reference Task Defines available sort orders for the tables added via L DbAddTable Each sorting has its unique ID that can be queri
287. ion LL_ NONAMEINTITLE No file name of the current project in List amp Label s main window title IpszObjName File name of the desired object Return Value Hints 158 Error code The window handle is used to deactivate the calling program If this is not desired or possible NULL can also be passed In this case the calling program is responsible for closing the layout editor should the user abort the main program This is not recommended Function Reference When the List amp Label layout Designer is minimized the calling program is also automatically minimized when the Designer is subsequently restored List amp Label is also restored Example LLJOBhJob hJob LlJobOpen 0 m 1DefineVariableStart hJob 1DefineVariable hJob Name Smith 1DefineVariable hJob forename George L1DefineVariable hJob PIN 40 08150 77500 LL_BARCODE_EAN13 NULL L1lDefineLayout hJob hWndMain Test LL PROJECT LABEL test LlJobClose hJob E E E See also LIDesignerProhibitAction LISetOption LISetFileExtensions LIDefineSumVariable Syntax INT L1DefineSumVariable HLLJOB hJob LPCTSTR lpszName LPCTSTR lpszCont Task Defines a sum variable s contents Parameter hJob List amp Label job handle IpszName Pointer to a string with the name of the variable IpszCont Pointer to a string with the contents of the variable Return Value Error code Hints
288. ion Minimum Size in the crosstab object is not supported Programming Interface You can find a description of all options used in the PowerPoint export module in this chapter These options can be modified read by the application using the methods L xXSetParameter PPTX and LIXGetParameter PPTX Resolution Defines the resolution in dpi for the generation of pictures Default 96dp screen resolution Picture BitsPerPixel Defines the color depth of the generated pictures Value Meaning 1 Black amp White 24 24bit True Color Default 24 Verbosity Rectangle Configures how rectangle objects should be exported Value Meaning 0 Ignore object 1 Object as rectangle 2 Object as picture Default 1 Verbosity Barcode Configures how barcode objects should be exported Value Meaning 0 Ignore object 1 Object as picture Default 1 Verbosity Drawing Configures how picture objects should be exported 370 Programming Reference Value Meaning 0 Ignore object 1 Object as picture Default 1 Verbosity Ellipse Configures how ellipse objects should be exported Value Meaning 0 Ignore object 1 Object as ellipse 2 Object as picture Default 1 Verbosity Line Configures how line objects should be exported Value Meaning 0 Ignore object 1 Object as line 2 Object as picture Default 1 Verbosity Text Configures how text objects should be exported Value Meaning 0 Ignore object 1 Objec
289. ion EnablePrinting f this parameter is set the file can be printed even if it is encrypted Only effective if PDF Encryption EncryptFile is set to 1 Value Meaning 0 Printing is not enabled 1 Printing is enabled Default 0 PDF Encryption EnableChanging f this parameter is set the file can be changed even if it is encrypted Only effective if PDF Encryption EncryptFile is set to 1 Value Meaning 0 Changing is not enabled 1 Changing is enabled Default 0 366 Programming Reference PDF Encryption EnableCopying f this parameter is set the file can be copied to the clipboard even if it is encrypted Only effective if PDF Encryption EncryptFile is set to 1 Value Meaning 0 Copying is not enabled 1 Copying is enabled Default 0 PDF Encryption Level Sets the encryption strength Only effective if PDF Encryption EncryptFile is set to 1 Value Meaning 0 40 bit encryption 1 128 bit encryption needs Acrobat Reader version 5 and higher Default 0 PDF OwnerPassword The owner password for the encrypted file This password is needed to edit the file If no password is given a random password will be assigned We recommend that you always explicitly choose a suitable password PDF UserPassword The user password for the encrypted file This password is needed to access the encrypted file If no password is given access is possible without a password but may be limited see above PDF FontMode Sets the TrueTyp
290. ion dialog is displayed at first followed by a print options dialog The section Important Properties of the Component describes how these can be avoided or be prefilled if desired 2 2 6 Export Export means the output to one of the supported output formats like PDF HTML RTF XLS etc The code for starting an export is identical with a print in the print options dialog the user can choose any export format besides the normal output formats Printer File and Preview If a format is to be preselected by default the print start could be as follows C ListLabel LL new ListLabel LL DataSource CreateDataSet LL ExportOptions Add LlExportOption ExportTarget PDF LL Print LL Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet 22 First Steps LL ExportOptions Add L1ExportOption ExportTarget PDF LL Print LL Dispose The available export targets are listed in the following table Export target Printer Preview Adobe PDF Format XHTML CSS Format ulti Mime HTML Format icrosoft Excel Format icrosoft Word Format icrosoft XPS Format Rich Text Format RTF ulti TIFF Picture TIFF Picture PNG Picture JPEG Picture Bitmap Picture etafile Picture EMF File TML Format TML JQuery Mobile Format Pinwriter TTY icrosoft PowerPoint Format Text CSV Format Text Layout Format XML Format Value for ExportTarget PRN PRV PDF XHTML MHTML XLS DOCX
291. ion exclusively discusses working with this component If you do not work with the OCX component you can skip this section 3 1 Integration of the Component The component is integrated by using the cmll210 0cx file containing the control This file is located in the Redistributable Files directory For more information on how to install the OCX in your IDE refer to the online help documentation for your development environment After integrating the control an icon should appear automatically in the component area of the toolbar or toolbox of your IDE Now you can begin customizing List amp Label to suit your needs by configuring the available properties and implementing the required programming logic There are two different ways to do this e The simple print and design methods e A separate iterative print loop The first option is described below The iterative approach is for the most part the same as the direct use of the DLL and is thus covered by the general description of the List amp Label API 3 2 Simple Print and Design Methods 3 2 1 Working Principle The print and design methods of the OCX Control implement a standardized print loop which can be used directly with most of the simple applications applications working with only one table To print multiple tables a separate print loop is used see chapter Printing Relational Data In the case of this method the data is passed within the events CmndDefineVariab
292. ired function is Drawing e With Variable contents already passed as a picture can be displayed see section Data Types Barcode The content of a barcode object is set in a dialog This dialog offers the three options Text Formula and Variable for the data source e The setting Text is used for fixed text content in the barcode In addition to the content the type e g with 2D Barcodes and other properties for error correction or encoding can be set e With Formula the content can be set by a string which contains the barcode content The required function is Barcode e With Variable contents already passed as a barcode can be displayed see section Data Types RTF Text The content of a RTF Text object is set in a dialog This dialog offers the options Free Text or a selection of possible passed RTF variables see below under Source e The setting Free Text is used for fixed text content in the RTF object Within the object data content can be used at any position e g for personalized multiple letters by clicking the formula icon in the toolbar 38 Other Important Concepts e By selecting a variable contents already passed as RTF can be displayed see section Data Types HTML The content of an HTML object is set in a dialog This dialog offers the three options File URL and Formula as a data source e The setting File is used for a fixed HTML file e With URL a URL can be passed from wher
293. is List amp Label extension interface is designed to allow multiple output formats in a single extension file The standard output formats provided with List amp Label are DOCX HTML MHTML JQM PDF PICTURE BMP PICTURE EMF PICTURE_JPEG PICTURE _PNG PICTURE _MULTITIFF PICTURE _ TIFF PPTX PRES RTF SVG TTY TXT TXT_LAYOUT XLS XHTML XML and XPS The export output formats DOCX HTML MHTML JOM PDF PICTURE BMP PICTURE_EMF PICTURE JPEG PICTURE_PNG PICTURE _MULTITIFF PICTURE_TIFF PPTX PRES RTF SVG TTY TXT TXT LAYOUT XLS XHTML XML XPS can be used in addition to the standard output formats media printer PRN preview PRV and file FILE The actual export to one of the new formats can be performed analogously to normal printing The output formats which are shown to the end user or which are directly used can be specified by your program 7 2 Programming Interface 7 2 1 Global De activation of the Export Modules List amp Label tries to load the export extension module cmll21ex Ilx from the main DLLs path by default All export formats are thus automatically available when passing LL_PRINT_EXPORT as target to L Print WithBox Start f you want to deactivate the export modules use LL_OPTIONSTR_LLXPATHLIST and pass the file name preceded by a i e cmll21ex llx The same option may be used to load the module from a different path WA f you wan
294. ist of jobs with their properties See also LIStgsysClose LIStgsysStoragePrint Syntax INT L1lStgsysStoragePrint LPCTSTR lpszFilename LPCTSTR pszTempPath LPCTSTR pszPrinterNamel LPCTSTR pszPrinterName2 INT nStartPageIndex INT nEndPageIndex INT nCopies UINT nFlags LPCTSTR pszMessage HWND hWndParent Task Prints pages from an open preview file job Parameter IpszFilename The name of the project or preview List amp Label does not take account of the extension as it will always be set to LL pszTempPath A temporary path can be NULL or empty pszPrinterName1 Name of the printer to be used for the first page can be NULL see below pszPrinterName2 Name of the printer to be used for the following pages can be NULL see below nStartPagelndex Index of the first page to be printed nEndPagelndex Index of the last page to be printed nCopies Number of copies nFlags A combination of the following flags Flag Meaning LS PRINTFLAG_FIT Fits the print to the printable area of the printer LS_PRINTFLAG_ Prints copies for each page not the job STACKEDCOPIES 111222333 instead of 123123123 LS_PRINTFLAG_ Tries to make copies by printer feature TRYPRINTERCOPIES if possible 334 Managing Preview Files LS PRINTFLAG_METER Shows a meter dialog LS_PRINTFLAG_ Shows a meter dialog which has a ABORTABLEMETER Cancel button LS_PRINTFLAG_SHOWDIALOG Shows a printer select dialog LS_PRINTFLAG_FAX Req
295. itrary sequence of multiple tables in series In the following chapter we will expand it to print sub tables as well Simple 1 n Relations The typical example for this case is the previously discussed 1 n relation order order details After each record with order data the order details for that data shall be printed The printing of a data line is triggered by L PrintFie ds Analogously to the behavior of L PrintFieldsEnd in the last section the function returns LL WAN_TABLECHANGE if the user has placed a sub table and you then have to respond You can ask for the table relation with L PrintDbGetCurrentRelation and for the name of the child table with L PrintDbGetCurrentlableName With this information you can invoke the auxiliary function PrintTable from the last section again This call must be placed directly after L PrintFie ds thus from the function PrintTable itself The function must be changed in order to call itself recursively function PrintTable DataTable data object DataTable is an adequate object for data access e g a table of a database a class array or similar lt repeat gt lt define fields of DataTable gt L1DefineField L1DefineFieldExt L1DefineFieldExtHandle lt print row gt L1PrintFields lt as long as warning repeat gt L1Print Ret L1PrintFields lt as long as Ret LL_WRN_TABLECHANGE repeat gt lt get current table name gt L1PrintDbGetCurrentTabl
296. ity RTF Frames Configures how RTF object frames should be exported Value Meaning 0 Single frames for top bottom left right uses CSS 1 Complete frame as box Default 0 Verbosity Table Configures how table objects should be exported Value Meaning 0 Ignore object 1 As a table object Default 1 Verbosity Table Cell Configures how table cells should be exported Value Meaning 0 Ignore cell 1 As a cell object using the verbosity settings of the object types specified in the cell 2 Cells as JPEG Default 1 Verbosity Table Frames Configures how table frames should be exported Value Meaning 0 Ignore table frame 1 Only horizontal lines of table frames 2 The whole table line including all frames 3 Cell specific frames uses CSS Default 3 Verbosity LLXObject Configures how LLX objects e g chart object should be exported Value Meaning 396 Programming Reference 0 Ignore object 1 Object as JPEG Default 1 Verbosity LLXObject HTMLObj Configures how the HTML object should be exported Value Meaning 0 Ignore object 1 Object as JPEG 2 Object as embedded HTML Only the HTML text between the lt BODY gt and lt BODY gt tags will be exported Please note the hint on exporting limitations Default 2 XHTML Title Specifies the title of the generated XHTML document Default Title used with L PrintWithBoxStart XHTML UseAdvancedCSS Allows the usage of non standard CSS formatting styl
297. ize Size of the buffer phDevmode Pointer to a global handle where the DEVMODE structure will be stored If NULL the DEVMODE structure is not queried If a pointer to a handle is passed it must be a valid global handle or NULL Return value Error code LL_ERR_BUFFERTOOSMALL if the device name s buffer is too small See also LIGetPrinterFromPrinterFile LISetPrinterlnPrinterFile Example HGLOBAL dev NULL TCHAR pszPrinter new TCHAR 1024 int iRet LlStgsysGetPagePrinter m_hStgOrg 1 pszPrinter 1096 amp dev LPVOID pDevmode GlobalLock dev DEVMODE aDEVMODE DEVMODE pDevmode tidy up GlobalUnlock dev GlobalFree dev LIStgsysPrint Syntax HLLSTG LiStgsysStoragePrint HLLSTG hStg LPCTSTR pszPrinterNamel LPCTSTR pszPrinterName2 INT nStartPageIndex INT nEndPageIndex INT nCopies UINT nFlags LPCTSTR pszMessage HWND hWndParent Task Prints pages from an open preview file job Parameter hStg The handle returned by L StgsysStorageOpen pszPrinterName1 Name of the printer to be used for the first page can be NULL see below pszPrinterName2 Name of the printer to be used for the following pages can be NULL see below 328 Managing Preview Files nStartPagelndex Index of the first page to be printed nEndPagelndex Index of the last page to be printed nCopies Number of copies nFlags A combination of the following flags Flag Meaning LS_PRINTFLAG_FIT
298. ize Event PREVIEW_FINALIZE EXPORT_FINALIZE Will always be called so that you can release internal data structures Status Query Event PREVIEW_QUEST JOBSTATE EXPORT_ QUEST _JOBSTATE Is used to keep List amp Label toolbar icons and menu options up to date Return LL_DESIGNERPRINTTHREAD_STATE_ RUNNING when your thread is running otherwise return LL_DES GNERPRINTTHREAD_STATE_STOPPED Activity Of course you can support multiple start events Before each start List amp Label checks if a print thread is running and stops it if necessary with an abort event 123 Programming Using the API Designer Thread Print Thread Start Event Copies the start parameter of the callback Starts the print thread and waits on signal that it is ready Event starts e sets process status internally to RUNNING e indicates change of state per SetEvent hEvent to List amp Label e indicate readiness returns to List amp Label From now on both the designer and preview export run in parallel Normal designer execution e create new job Abort e starts print loop with changes e calls L PrintAbort for the print job already mentioned above and returns When printing is complete Status Query e set internal process state to e returns the value of the process STOPPED status e indicate state change per Completion SetEvent hEvent to List amp Label e calls L PrintAbort if necessary and e endjob waits for thread
299. k Components e Click button Browse e Select combit ListLabel21 dll Now the List amp Label components can be dragged onto a form via Drag amp Drop as usual In the properties window the specific properties can be edited and event handlers can be added If the components are not available in Visual Studio from version 2010 the cause can be that the Client Profile is selected as the target platform Further information can be found in section Integrate List amp Label To integrate the List amp Label NET Help into the Visual Studio 2010 Help Viewer please follow these steps e Open Visual Studio 2010 e Select Help gt Manage Help Settings to start the Help Library Manager e You might have to select a location for the local content at first Confirm this dialog with OK e Select the item Install content from disk Introduction e Click Browse and navigate to the Documentation Files subdirectory of your List amp Label installation e Then select helpcontentsetup msha and click Open e Back in the Help Library Manager click Next e In the following dialog you will see the available help files including combit List amp Label 21 NET Help select Add here e Now click Update to integrate the help into the Help Viewer e Click Yes in the Security Alert dialog to confirm the digitally signed help file e After updating the local library click Finish to complete the integration of the help N
300. l possible objects be they spline objects statistic graphs or drawings with an unknown format a function has been built into List amp Label to offer the programmer so called user objects as even metafile variables cannot cover all areas If you have defined a variable in your program with L1DefineVariableExt hJob lt Name gt lt Content gt LL_DRAWING_USEROBJ NULL the user can define an object in the Designer which is connected to this variable This takes place analogously to normal LL DRAWING variables When List amp Label needs to print this object it calls your program using the callback LL_ CMND_DRAW_USEROBJ to pass this task on to your program as List amp Label has no idea what kind of visual action needs to be taken 117 Programming Using the API The same can be done for table fields so that the user has the capability of including an user object in a table L1DefineFieldExt hJob lt Name gt lt Content gt LL_DRAWING_USEROBJ NULL For variables but not for fields it is also possible to define user objects whose parameters can be changed by the user in the Designer just like the object properties of List amp Labels own objects These objects are defined with the LL DRAWING_USEROBJ_DLG type L1DefineVariableExt hJob lt Name gt lt Content gt LL_DRAWING_USEROBJ_DLG NULL This means that editable user objects cannot be inserted in tables Only non editable user objects can be used as tab
301. layed in the wizard MinimumParameters The minimum number of parameters Permissible values between 0 and 4 MaximumParameters The maximum number of parameters Here too permissible values between 0 and 4 The value must be equal to or greater than the minimum number Increasing the number results in optional parameters 68 Extending the Designer Resultlype The data type of the return value Using the properties you can customize the configuration of the new Designer function The parameters for the design functions are defined in the source code This may look as follows Visual Basic Private Sub InitializeDesFunction Dim param1 As DesignerFunctionsParameter Dim param2 As DesignerFunctionsParameter Set param1 DesFunc_Add Parameter1 param1 Description First Value param1 Type L1lParamType ParamType_Double Set param2 DesFunc_Add Parameter2 param2 Description Second Value param2 Type L1lParamType ParamType Double DesFunc_Add ParentComponent ListLabel1 End Sub In order to bring the function to life you have to handle the event DesFunc_Add_ EvaluateFunction Using the event arguments you gain access to the parameters entered by the user For example to return the sum of the two parameters use the following lines Visual Basic Private Sub DesFunc_Add_EvaluateFunction ResultValue As Variant ResultType As CMLL21FXLibCt1 L1ParamType DecimalPositions As Long ByVal Parameters As Long ByVal
302. ld is identical to LIDefineFieldExt LL 7EX7 NULL List amp Label predefines the following fields Field Meaning LL CountDataThisPage Numerical footer field defined data records per page LL CountData Numerical footer field defined data records total LL CountPrintedDataThisPage Numerical footer field printed data records per page LL CountPrintedData Numerical footer field printed data records total LL FCountDataThisPage Numerical footer field defined data records per page 153 API Reference LL FCountData Numerical footer field defined data records total LL FCountPrintedDataThisPage Numerical footer field printed data records per page LL FCountPrintedData Numerical footer field printed data records total The difference between defined and printed data records is that the user can apply a record filter to the table so that the defined numbers increase with every data record sent from the program but not necessarily the printed ones Example HLLJOB hJob hJob LlJobOpen 0 L1DefineFieldStart hJob L1lDefineField hJob Name Smith L1lDefineField hJob Forename George L1DefineFieldExt hJob Residence Cambridge LL TEXT NULL L1DefineFieldExt hJob Postal Code CB5 9NB LL BARCODE _30F9 eee TES ig tes LlJobClose hJob See also LIDefineFieldStart LIDefineFieldExt LIDefineFieldExtHandle LIDefineFieldExt
303. ldown printing so in most cases you can simply reuse your existing code and just make sure it works even if no drilldown filter is set in the passed structure i e all table IDs and key field values are empty Preparations To enable report parameter printing in List amp Label set the option LL_OPTION_REPORT_PARAMETERS_REALDATAJOBPARAMETER to a value unequal to 0 Please note that this option has to be set for each LL job that should support report parameter printing activate report parameter pane for current LL Job L1SetOption hJob LL_OPTION_REPORT_PARAMETERS_REALDATAJOBPARAMETER LPARAM amp oMyReportParameters To deactivate report parameter printing for this LL job set the option to NULL deactivate report parameter pane for current LL Job L1SetOption hJob LL_OPTION_REPORT_PARAMETERS_REALDATAJOBPARAMETER NULL The parameter passed with this option can be used freely for example as a pointer to an internal data structure or objects This parameter will be passed unchanged in the callback for your use scL DrillDownJob _nUserParam Please make sure the parameter is not 0 or NULL unless you want to deactivate report parameter printing Via the callback LL N7FY_VIEWERDRILLDOWN for further description please see chapter Drilldown Reports in Preview List amp Label informs about the current task This callback will always be called in the context of the preview thread regardless if initiated from designer
304. le page full warning LL_WRN_REPEAT_DATA do gt L1Print lt repeat gt lt define fields gt LlDefineField LlDefineFieldExt LlDefineFieldExtHandle lt print row gt LlPrintFields lt while page full warning LL_WRN_REPEAT_DATA do gt lt define page specific variables gt LlDefineVariable L1DefineVariableExt L1DefineVariableExtHandle lt re print gt L1Print The Print Process 103 Programming Using the API L1PrintFields lt goto next data record gt lt give progress report gt L1PrintSetBoxText L1PrintGetCurrentPage L1PrintGetOption lt until error or no data records left or user abort gt lt Print final footer and all linked objects gt LlPrintFieldsEnd lt while page full warning LL_WRN_REPEAT_DATA do gt LlPrintFieldsEnd lt end print gt LlPrintEnd 5 4 4 Annotations Starting Print Reading the Project File Before the print can be started it is important to know which project is to be loaded and which variables are to be made available After the optional dialog where the user can choose the project file LISelectFileDigTitleEx all variables which are to be included in this project must be defined If List amp Label evaluates an expression in which there is an unknown variable then it ends the loading process and passes back the corresponding error code The definition of variables is programmed in the same way as the definitions before calling the Des
305. le field If the user selects the image in the Designer and clicks on the Variable s Properties sub item in the property window the callback LL ED T_ USEROBJ is invoked to request a dialog in which the parameters belonging to the object can be changed These parameters are automatically stored in the project definition file with the other object information and passed with the callback LL DRAW _USEROBJ for evaluation so that your program does not have to take care of further storage of the parameters Please note the references of article 99109 http support microsoft com kb 99109 in the Microsoft Knowledge Base when you want to print DDBs device dependent bitmaps in callback objects transform the DDB first of all to a DIB device independent bitmap if it is not compatible with the printer DC otherwise irregular behavior of the printer driver is pre programmed 5 6 3 Definition of a Callback Routine A callback routine is defined like a normal Windows callback For special features such as compiler switches please refer to your compiler manual The general form of a callback is in C LRESULT CALLBACK _extern LLCallback INT nMsg LPARAM 1Param UINT_PTR 1UserParam You can pass the routine pointer immediately L1SetNotificationCallback hJob LLCallback From now on your routine will be called by List amp Label if necessary At the end of the program it is important that the callback is set to NULL otherwise your syste
306. lection dialog lt Reportname gt Isp File with user specific printer and export settings This file should not be redistributed if the design computer is not identical with the print computer as the printer stored in the file usually does not exist lt Reportname gt lst Is created as soon as the project is saved for the second time within the Designer and contains a backup of the project file The most important file is of course the project file The other files will automatically be created by List amp Label at application runtime At print time the actual report is created by the combination of project file and data source In practice it is often also desired to keep the project files in a central database How this is done is described in section Store Project Files in a Database 21 Programming With NET 2 2 5 Print The print is called by the method Print A project file for the data structure of the selected data source must first be created in the Designer It is easiest to bind the component to the same data source at print and design time So the preview in the Designer displays the correct data and the user can easily visualize the result at runtime A full call of the print would be C ListLabel LL new ListLabel LL DataSource CreateDataSet LL Print LL Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet LL Print LL Dispose By default a file select
307. led individually for each thread 122 Advanced Programming e Delete the remaining project data after printing Additionally the following points have to be considered Preview e Pass the window handle you ve received in the callback structure via LlAssociatePreviewControl hJob hWnd 1 to List amp Label before calling LIPrint WithBox Start so that the print job is informed where the data should be presented e After completing printing that is after LIPrintEnd call LlAssociatePreviewControl hjob NULL 1 so that preview control regains control of the preview data If a print error occurs the last parameter has to be 0 so that the preview control is empty and not showing the last project Export e Use _L PrintWithBoxStart so that a status box can be displayed For the parent window handle use additionally the window handle passed by the callback structure e f the user selects a direct export from the Ribbon s menu Windows Vista and later the _pszExportFormat member of the struct is set In this case call LiPrintSetOptionString hJob LL_PRNOPTSTR_EXPORT _pszExportFormat to preset the required export format and do not show the print options dialog L PrintOptionsDialog if bWithoutDialog is TRUE Abort Event PREVIEW_ABORT EXPORT_ABORT If you receive this event simply call L PrintAbort to abort the print job for the preview export thread The print loop of the thread ensures correct handling Final
308. les and CmndDefineFie ds to List amp Label This allows any data source to be connected individually The event arguments allow access to useful information such as user data that has been copied the Design mode etc The property pbLastRecord is used to notify the print loop that the last data record has been reached As long as this is not the case each event is invoked repeatedly in order to retrieve the data The Design method shows the Designer in a modal pop up window on top of your application window You can specify additional options in the CmndSetPrintOptions event Internally this event is triggered after invoking L PrintWithBoxStart but before the actual printing 64 Transferring Unbound Variables and Fields One very simple implementation of the print method looks like this Private Sub ListLabel1_CmndDefineVariables ByVal nUserData As Long ByVal bDummy As Long pnProgressInPerc As Long pbLastRecord As Long Dim i As Integer For i To Recordset Fields Count 1 Select Recordset Fields i Type Case 3 4 6 7 para LL_NUMERIC content Recordset Fields i Case 8 para LL_DATE_MS a CDate Recordset Fields i content al Case 1 para LL_BOOLEAN content Recordset Fields i Case Else para LL_TEXT content Recordset Fields i End Select nRet LL L1DefineVariableExt Recordset Fields i Name content para Next i If bDummy Then pnProgressInPerc Form1 Datal Recordset PercentPo
309. lhost 2001 secrypt_Testcertificate_D TRUST_test pfx test 406 Send Export Results via E Mail Export SignatureFormat Can be used to choose the signature format The available values depend on the file type and signature software Value eaning pk7 Signature in pk7 format container format that contains the signed file and signature Available for Multi TIFF TXT and PDF the latter only for SignCubes The resulting file has the extension pk7 p7s Signature in p7s format An additional file p7s is created during the export process Available for Multi TIFF TXT and PDF the latter only for SignCubes If the export result is sent via email both files are attached p7m Signature in p7m format container format that contains the signed file and signature Available for Multi TIFF TXT and PDF the latter only for SignCubes The resulting file has the extension p7m PDF PDF signature Available for PDF and Multi TIFF only for digiSeal office and BMW Tiffs A Multi TIFF is converted to a PDF and signed with a special Barcode that allows verifying the signed document even after printing the PDF Default p7s for TXT and Multi TIFF PDF for PDF 7 5 Send Export Results via E Mail 7 5 1 Overview The files generated by the export modules can be sent via email automatically List amp Label supports MAPI capable email clients as well as direct SMTP mailing This unctionality is supported by all export modul
310. lines are ignored Default 1 XLS lgnoreHeaderFooterLines Allows header and footer lines to be ignored in the resulting Excel file Only effective if Export Onlylabledata has been set see below Value Meaning 0 Header and footer lines are exported 1 Header and footer lines are ignored 2 Header and footer lines are exported once on the first page To export the footer lines only on the last page set the appearance condition to LastPage Default 1 348 Programming Reference XLS gnoreLinewrapForDataOnlyExport Allows line wraps to be ignored Only effective if Export OnlyTabledata has been set see below Value Meaning 0 Line wraps are exported to Excel 1 Line wraps are ignored Default 1 XLS ConvertNumeric Allows switching of the automatic conversion of numeric values in the created Excel sheet Value eaning 0 No automatic conversion 1 Numeric values are formatted according to the setting in the Designer Project gt Options 2 Only columns which actually contain a numeric value e g a price will be converted If a numeric column is explicitly formatted in List amp Label e g Str price 0 0 then it will not be converted 3 List amp Label tries to transform the output formatting configured in the Designer to Excel as exact as possible If the Format property in the designer is not used the content will be passed as Text to Excel Default 3 XLS AllPagesOneSheet Enables the creation of a sepa
311. lines to be ignored in the resulting text file Value Meaning 0 Header and footer lines are exported 1 Header and footer lines are ignored 2 Header and footer lines are exported once on the first page To export the footer lines only on the last page set the appearance condition to LastPage Default 1 TXT Charset Specifies the character set of the result file The target code page needs to be passed in addition eg 932 for Japanese using LL_OPTION_CODEPAGE Value Meaning ANSI Ansi character set ASCII Ascii character set UNICODE Unicode character set Default UNICODE 7 3 11 Text Layout Export Overview The Layout Export can alternatively create a text file that resembles as far as the format allows the layout of the project Please make sure that you choose a font size that is large enough in the Designer If the lines of text in your project cannot be assigned to different lines in the text file lines may be overwritten resulting in a loss of data in the result file A font size with a minimum of 12 pt is suggested 384 Programming Reference Limitations e Issue print is not supported e Shadow Pages are not supported e Nested tables are not supported Programming Interface You can find a description of all options used in the Text export module in this chapter The options can be modified using the methods LixSetParameter TXT_LAYOUT and read by calling LIXGet Parameter TXT_LAYOUT
312. ling With Exceptions List amp Label defines a number of internal exceptions which are all derived from the common base class ListLabelException and therefore can be caught at a central location If the application is supposed to carry out its own Exception handling calls to List amp Label can be enclosed by an Exception handler C ListLabel LL new ListLabel LL DataSource CreateDataSet try LL Design catch ListLabelException ex MessageBox Show ex Message LL Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Try LL Design Catch ex As ListLabelException MessageBox Show ex Message End Try LL Dispose 41 Programming With NET The Message property of the Exception class contains an error text which if a corresponding language kit is present is also generally localized and can be displayed directly to the user A complete reference of all Exception classes can be found in the component help for NET 2 3 12 Debugging Problems occurring on the developer PC can be easily found in most cases The usual features of the development environment can be used to spot a problem relatively quickly The first step is to catch any occurring exceptions and to find their cause see section Error Handling With Exceptions As a development component List amp Label is naturally run under a variety of different constellations on the end user side To find
313. ll automatically return the default value This option is usually set automatically in webserver environments If the webserver detection should fail for some reason you can manually force the non Ul mode via this option FALSE Message boxes and dialogs are displayed default LL_OPTION_PROJECTBACKUP TRUE A backup file is generated during editing in the Designer default FALSE No backup file is generated LL_OPTION_PRVZOOM_LEFT LL_OPTION_PRVZOOM_TOP LL_OPTION_PRVZOOM_WIDTH LL_OPTION_PRVZOOM_HEIGHT Preview the rectangle coordinates of the preview window in percentage of the screen If this is not set set to 1 the positions of the window when it was last closed will be used 265 API Reference 266 LL_OPTION_PRVRECT_LEFT LL_OPTION_PRVRECT_TOP LL_OPTION_PRVRECT_WIDTH LL_OPTION_PRVRECT_HEIGHT The same in screen pixels LL_OPTION_PRVZOOM_PERC Preview initial zoom factor in percentage default 100 To zoom to page width set the value to 100 LL_OPTION_REALTIME TRUE Time and Now will always use the current time FALSE The time will be fixed once when the project is loaded default LL_OPTION_RESETPROJECTSTATE_FORCES_NEW_DC TRUE The output device context will be created new after L PrintResetProjectState default FALSE The device context is preserved after L PrintResetProjectState s not supported by all printers but results in increased performance with merge print LL_OPTION_RESETPROJ
314. ll designer gt L1DefineLayout lt close job gt L1JobClose Make sure that you pass all field names in the form of lt tableid gt lt fieldname gt in order to enable List amp Label can connect these to their corresponding table e g Orders OrderlD If you want to add fields of a 1 1 relation please refer to chapter Handling 1 1 Relation 5 5 3 Controlling the Print Engine The control of hierarchical reports with List amp Label occurs more or less analogously to the print flow in the last chapter With the function L PrintDbGetCurrentlable you can query which table s values are to be passed as usual with L DefineFie d Ext and L PrintFields Depending on the layout there are two specific cases e Tables can be consecutive multiple tables following each other at the same level e The user could have added a sub table to the current table We will deal with these cases in the next two sections Multiple Independent Tables on the Same Level An example for this would be a list of customers followed by a chart of employees Both tables can be independent The print loop for this looks very similar to the print 109 Programming Using the API oop in the last chapter with one difference Usually you tell List amp Label that a table is finished no more data by calling L PrintFieldsEnd Now you may get the return value LL_ WAN_TABLECHANGE meaning that there is another table to print in the
315. llDownParameters gt _pszSubreportTableID _T pMyDrillDownParameters gt _pszKeyField Orders CustomerID CString sChildField pMyDrillDownParameters gt _pszTableID _T pMyDrillDownParameters gt _pszSubreportKeyField Customers OrderID L1DbAddTableRelationEx hJob pMyDrillDownParameters gt _pszSubreportTableID Orders pMyDrillDownParameters gt _pszTableID Customers pMyDrillDownParameters gt _pszRelationID _T sParentField sChildField Datasource For each drilldown report the datasource should be filtered differently because only the data related to the parent record that has been clicked is needed 128 Advanced Programming For example you want to create a drilldown structure from Customers to Orders In this case the parent table should show all customers A click on one customer should show only the corresponding orders related to this special customer Therefor the datasource must only contain the orders from this customer All necessary information for filtering the child table can be found in the structure scL IDrillDownJob 5 7 3 Supporting the Report Parameter Pane in Preview Out of the box report parameter printing is already supported automatically However if you want to support a re rendering from the preview window you need to signal your support to List amp Label by setting some additional options For convenience this feature uses the same callback as dril
316. lue Meaning 0 Ignore object 1 Object as line 390 Programming Reference 2 Object as picture Default 1 Verbosity Text Configures how text objects should be exported Value Meaning 0 Ignore object 1 Object as text object 2 Object as picture Default 1 Verbosity RTF Configures how RTF objects should be exported Value Meaning 0 Ignore object 1 As formatted text 2 As unformatted text 3 Object as picture Default 1 Verbosity Table Contigures how table objects should be exported Value Meaning 0 Ignore object 1 As a complete table object Default 1 Verbosity NestedTable Configures how nested table objects should be exported Value Meaning 0 Ignore object 1 Object as picture Default 1 Verbosity LLXObject Configures how LLX objects OLE HTML chart should be exported Value Meaning 0 Ignore object 1 Object as picture Default 1 DOCX FontScalingPercentage Scaling factor to correct font sizes Default 100 100 font size 391 The Export Modules DOCX CellScalingPercentageHeight Scaling factor to correct the cell heights Default 100 100 cell height DOCX CellScalingPercentageWidth Scaling factor to correct the cell widths Default 100 100 cell width DOCX AllPagesOneFile Enables creation of a separate Word document for each page Value Meaning 0 A separate Word document is create per page 1 All pages are created in the same Word document Default 1 DOCX Floatin
317. m where to pull data or if you would like to have a mix of XML and custom object data Example This provider supports the same sortings that the providers in the collection do support C DataSet ds1 CreateDataSet DataSet ds2 CreateOtherDataSet combine the data from ds1 and ds2 into one datasource DataProviderCollection providerCollection new DataProviderCollection providerCollection Add new AdoDataProvider ds1 providerCollection Add new AdoDataProvider ds2 ListLabel LL new ListLabel LL DataSource providerCollection LL Design LL Dispose VB NET Dim ds1 As DataSet CreateDataSet Dim ds2 As DataSet CreateOtherDataSet combine the data from ds1 and ds2 into one datasource Dim providerCollection As New DataProviderCollection providerCollection Add New AdoDataProvider ds1 providerCollection Add New AdoDataProvider ds2 Dim LL As New ListLabel LL DataSource providerCollection LL Design LL Dispose DataSource This data provider is in an exceptional position because it can be inserted as a component directly from the toolbox The component provides a few properties which are also available through the SmartTags The most important property is ConnectionProperties By using the corresponding property editor a connection 26 Other Important Concepts string can be directly created in the development environment that provides access to following data sources
318. m will raise an unhandled exception 118 Callbacks and Notifications L1SetNotificationCallback hJob NULL 5 6 4 Passing Data to the Callback Routine The value of the nMsg parameter determines the different functions The values are the constants which begin with LL CMND_xxxx e g LL_CMND_TABLEFIELD LL_NTFY_xxxx or LL_INFO Depending on the task your program has to perform the parameter IParam has different meanings The individual meanings are described later on They are mostly structures records which IParam points to so the value must therefore be cast by a type conversion to a structure pointer LRESULT CALLBACK _extern LLCallback INT wParam LPARAM lParam UINT_PTR 1UserParam PSCLLTABLEFIELD pSCF switch wParam case LL_CMND_TABLEFIELD pSCF PSCLLTABLEFIELD 1Param do something using pSCF break return The function must always return a defined value Unless stated otherwise this value should be zero UserParam is the value passed by L1SetOption hJob LL_OPTION_CALLBACKPARAMETER lt Value gt This can be used to store an object pointer this self in object oriented languages 5 6 5 Passing Data by Messages Every message has three parameters nMsg wParam and Param in the following definition of your message callback this is called a window procedure but is nothing but a callback LRESULT WINAPI MyWndProc HWND hWnd UINT nMsg WPARAM wParam LPARAM 1Param 119 Prog
319. mail settings in List amp Label 338 Managing Preview Files Parameter hJob List amp Label email API job handle pszKey The following values are possible Value Meaning Export Mail To Recipient address Multiple recipients can be separated by semicolons Export Mail CC This address will receive a carbon copy Multiple recipients can be separated by semicolons Export Mail BCC This address will receive a blind carbon copy Multiple recipients can be separated by semicolons Export Mail Subject Email subject Export Mail Body Mail body text Export Mail Body text html Mail body text HTML Export Mail AttachmentList Tabulator separated attachment list pszValue new value Return value Error code Example HLSMAILJOB hMailJob hMailJob LsMailJobOpen 0 LsMailSetOptionString hMailJob Export Mail To test domainname com SMa lJobClose hMailJdob See also LsMailGetOptionString LsSetDebug Syntax void LsSetDebug BOOL bOn Task Switches the LS API debug mode Parameter bOn f TRUE the debug mode will be switched on 339 API Reference Return value See also 340 Overview 7 The Export Modules 7 1 Overview In addition to the output to preview file List amp Label offers some other output formats These output formats can be created by certain special export modules used by List amp Label with the file extension LLX List amp Label extension Th
320. matic use TLS when server supports it 0 Turn TLS off even when it is supported by the server 1 Force SSL Cancellation when server does not support SSL 2 Force TLS Cancellation when server does not support TLS Default 1 Export Mail POP3 SenderDomain Login domain default computer name Export Mail POP3 ServerPort default 110 Export Mail POP3 ServerAddress URL IP address of POP3 server default localhost Export Mail POP3 ServerUser user for authentication Export Mail POP3 ServerPassword password for authentication Export Mail POP3 ProxyAddress proxy server address Export Mail POP3 ProxyPort proxy server port default 1080 Export Mail POP3 ProxyUser proxy server user name Export Mail POP3 ProxyPassword proxy server password Export Mail XMAPI ServerUser profile name for authentication Export Mail XMAPI ServerPassword password for authentication Export Mail_XMAPI SuppressLogonFailure O 1 show no dialog for login error Export Mail XMAPI DeleteAfterSend 0 1 delete mail after sending Example L1XSetParameter hJob LL_LLX_EXTENSIONTYPE_EXPORT Export SendAsMail m4 This automatically sends the export result as email to the recipient selected via Project gt Settings The globally selected mail settings will be used If you want to offer a default to your user this can be done quite simply L1SetDefaultProjectParameter hJob LL Mail To EMAIL 0 411 The Export Modules Thi
321. me printer for first and other pages sc lReply 1 We would need a vector of printers using _nUniqueNumber for different printers break break chk_strncpy is a corrected strncpy function which makes sure that the destination is always 0 terminated UtilDebug is an example function for Debugging Output LL_CMND_CHANGE_DCPROPERTIES_CREATE Task The host application can modify the printer DC Parameters Param pointer to a structure of type scLIPrinter The following fields have meaningful values _nSize sizeof of the structure sizeof scLIPrinter _hDC printer DC Return Value ignored always 0 Hints This callback is rarely used and can be ignored for nearly all cases It is called when List amp Label has created a printer DC after CreateDC 292 Callback Reference LL_CMND_CHANGE_DCPROPERTIES_DOC Task The host application can modify the printer DC Parameters Meaning of the parameter IParam Pointer to a structure of type scLIPrinter The following fields have meaningful values _nSize sizeof of the structure sizeof scLIPrinter _hDC printer DC Return Value ignored always 0 Hints This callback is rarely used and can be ignored for nearly all cases It is called when List amp Label has called StartDoc _nPaperFormat is the Job ID you can use to obtain information about the spooler progress LL_CMND_CHANGE_DCPROPERTIES
322. med with the DataSource property You can either program in the assignment of these or use the Properties window in your IDE If you have already created a DataSource in your form you can select it from the Properties window The necessary link is created automatically You can now implement the program code for starting the design and print To do this you can for example include the Print or Design method call in the Click event 78 Data Binding of a new button without any additional parameters The data from the assigned source can be made available automatically Show Designer DBL21_1 AutoDesign Invoice Execute print DBL21_1 AutoPrint Invoice If you want to modify the standard flow of data bound printing there are several properties you can use These begin with Auto and are found in the data section of the Properties window Property Description AutoProjectFile File name of the print project being used AutoDestination Print format for example printer preview PDF HTML etc AutoProjectType Type of print project list index cards label AutoFileAlsoNew Creating a new project when opening Designer enabled AutoShowPrintOptions Show print options when starting print AutoShowSelectFile Show the file selection dialog for printing and Designer AutoBoxType Type of progress box 4 2 2 Working With Master Detail Records In conjunction with data binding and list projects List amp Label can
323. mers Orders CustomerlD Customers Customer D Hi Employees Orders EmployeelD Employees EmployeelD a Shippers Orders ShipVia Shippers ShipperlD A CustomerID EmployeelD Freight OrderDate E ee fe amp Again remember to update the field contents when the parent table is printed Performance Hints When using 1 1 relations it is very important to check whether the user has actually placed a field of the linked table You can do this by using the wildcard option with LIPrintlsFieldUsed If you want to check whether a field of the 1 1 linked table Orders inside the table OrderDetails is being used you can call L1PrintIsFieldUsed hJob OrderDetails OrderID Orders OrderID If the result is 0 no field of the table orders is being used and it is not necessary to update the values 5 6 Callbacks and Notifications This chapter is only required if you re not working with one of the components NET VCL OCX If you re using one of these components you may skip this chapter 5 6 1 Overview The following principle is to be understood by the expressions callbacks and notifications when List amp Label needs information then it just asks your program 116 Callbacks and Notifications You don t have to pre program all answers just those for which you explicitly wish a modified behavior For example there are objects which are program definable user objects see next chapter which are handled b
324. mming environment The dependent modules have to be registered before the registration Often your setup program will make the registration For developing with the NET framework for ASP NET a separate control DesignerControl in the combit ListLabel21 Web namespace is available 3 10 3 Properties DataStructureUrl in out BSTR This property defines the URL of a file that contains the information about the declared variables fields This file is created with the function LV obStateSave This property must be declared Default lt empty gt ProjectFileUrl in out BSTR This property defines the URL of the project file This value must be declared Default lt empty gt ProjectType in out LONG This property defines the project type 75 Programming With the OCX Component Value Meaning 1 LL PROJECT LABEL 2 LL PROJECT LIST 3 LL _ PROJECT _ CARD Default 2 UploadProjectFileUr in out BSTR This property defines the URL that is used for uploading the project file If this property is not set the upload of the project file will be done by ProjectFileUrl Default lt empty gt UploadOnSave in out BOOL This property defines if an upload should be made right after saving in the Designer Default TRUE UploadType in out LONG This property defines which upload method should be used A HTML page in Up oadProjectFileUrl is expected when using HTTP POST that can receive the upload Value Meaning 1 HTTP POST
325. mple case LL _NTFY_FAILSFILTER bFails TRUE break LL_NTFY_VIEWERBTNCLICKED Task Notification that a button has been pressed in the preview window Activation Always activated Parameters Param Tool button ID Return Value _IResult _ Result Meaning 1 ignore button action usually done by host application 0 execute default button function Hints For the IDs please refer to the callback LLCMND_GETVIEWERBUTTONSTATE Example case LL_NTFY_VIEWERBTNCLICKED switch lParam case 112 beep on one page print and don t execute it MessageBeep 1 return 1 break LL_NTFY_VIEWERDRILLDOWN Task Notification that a drilldown action should be processed Activation L1SetOption hJob LL_OPTION DRILLDOWNPARAMETER LPARAM amp 0MyDrillDownParameters 308 Callback Reference Parameters Param points to a structure scL Drili DownJob _nSize Size of the structure _nFunction Sets the task Task Meaning LL_DRILLDOWN_START Start LL_DRILLDOWN_FINALIZE Finalize _nUserParameter Value passed with LL_ OPTION_DRILLDOWNPARAMETER _pszTablelD Points to a string containing the name of the child table _pszRelationID Points to a string containing the name of the relation between child and parent table _pszSubreportTablelD Points to a string containing the name of the child table _pszKeyField Points to a string containing the name of the key field of the parent table If the r
326. n fixed size is not supported The chart object is exported as a picture and thus cannot appear transparently The transformation of RTF text to HTML code is carried out by an RTF parser This parser interprets the basic RTF formatting Extended RTF functionality such as embedded objects will be ignored Rotated RTF text is not supported Spacing before table lines is not supported Horizontal and vertical lines are exported as images all other lines are ignored Gradient fills are not supported Rotated text RTF and plain is not supported Custom drawings in callbacks are not supported Objects to be exported as picture should not overlap the object frame Table frames of neighboring cells are not drawn so that they overlap each other but discretely This can double the frame width and needs to be taken into account during the design Offset of table lines is not supported TotalPages may not be used in rotated text objects Shadow Pages are not supported The wrapping option Minimum Size in the crosstab object is not supported The following tags or attributes superseding HTML 4 01 standard will be used Ending the page frame for HTML pages will use browser specific tags to achive best results for Netscape and Internet Explorer lt body TOPMARGIN 0 LEFTMARGIN 0 for Internet Explorer 2 or later and lt body MARGINHEIGHT 0 MARGINWIDTH 0 for Netscape 3 or later Setting line color for the table grid lt table BOR
327. n WINTFOGUCTION creeeren aaa A 9 1 1 Before Installation piekenier taea a a aadar 1 1 System Requirements sists E i EE ETTE Aled FICENSINGs viasdeishstie mat ren eg vidd ok a beac tig ead peered arene 1 2 After Installation cecccccceceeeeeeeeseeeeeeeeeeeeeseeeeeeeeeeseeeeeeaaeeeeeessseesaaees 2 1 Start Men seteeks Masranetne th easathenae destiawetaaiaaniebae th on aeeabead uae ecbieeeaaen 2 2 Designer Quick Start via Sample Application c cee 2 3 Programming Samples cccccceecceeeeeeeeeeeeeeeeeeeeeeeteneeeeeeeeseenes 2 4 DOCUMENTATION 06 ccuscnccidiuesieeeveed cadadscehecnedayerdheereoseua cauniehdeneneavaces 13 important CONCEPTS oiie epetan ee eee Nee Ee 3 1 Basi Prnelplesys sicce ee Wada E A ea E 3 2 Project TYP EGS aein teeses bags aneia eE OAE AA AE 3 3 Variables and Fields ccccccccccccceceeeeceeeeeeeneeeeeeeeeteteneeeeseseneees 3 4 Available User Interface Languages eeeeeeeeeeeeeeeteneteeeeteeeeee 1 4 Getting Started With Prograrmming cccccccccccccccccececeeceeeeeeeeeeeeeeeeeeeeess 4 1 OVENVICW ole ok ices a teks di pda ce a a a a ates A 2 ntegration With NET c cece eecceeeeeeeeeeteeeeeeeeeeeeeteneeeeeeeeeeeee 4 3 ntegration With Visual BasiG eih a 4 4 ntegration With Delphine a a 4 5 ntegration With C Builder ipei tarena aaa tias 4 6 ntegration With O O i A E AA AAEE A AAA 4 7 ntegratio With JaV essnee ngina 4 8 ntegrati
328. n and removal of bugs List amp Label offers the possibility of logging all function calls in order to facilitate the removal of faults in your programs All function calls including their parameters and the return value are shown on the debugging output These can be displayed with the combit Debwin Tool which is included in the package See chapter Debug Tool Debwin for further details 15 Programming With NET 2 Programming With NET 2 1 Introduction For using List amp Label with NET several components are available making the creation of reports on the NET platform as easy as it can be This tutorial shows the most important steps to work fast and productively with List amp Label The complete programming interface is documented in the component help for NET in detail You will find it in the Documentation folder of your installation combit ListLabel21 chm 2 1 1 Integration in Visual Studio The List amp Label NET component is automatically integrated in Microsoft Visual Studio For other programming environments or in case of a fresh installation of the development environment this can also be done manually The components in form of an assembly are located in the directories Programming Samples and Declarations Microsoft NET as well as Redistributable Files of the List amp Label installation The integration is done as follows e Menu bar Tools gt Choose Toolbox Items e Select tab NET Framewor
329. n some cases be necessary to remove the O termination Parameters are passed with ByVal It is recommended that you initialize buffer strings with Dim lpszBuffer As String 255 to a specific size here 255 bytes This is also possible using lpszBuffer space 255 but requires more time and memory It is important to reserve the memory so that the DLL does not write in unused areas an unhandled exception would be the result otherwise In addition it must be noted that some functions cannot be supported with Visual Basic these are however not normally required You can find out which functions these are in the corresponding chapters If a parameter value is NULL C or nil 90 Programming Basics Pascal you should use empty string or O as value in Visual Basic depending on the data type of the parameter The OCX control does not need ANSIZ buffers as it supports the native String data types Please note with C or C the C convention in source texts of having to enter for example the in path entries twice c temp lbl instead of c temp lbl Example INT nSize 16000 LPWSTR pszBuffer new TCHAR nSize INT nResult lt API gt hJob pszBuffer nSize if nResult LL_ERR_BUFFERTOOSMALL nSize lt API gt hJob NULL ASSERT nSize gt delete pszBuffer pszBuffer new TCHAR nSize nResult lt API gt hJob pszBuffer nSize delete pszBuffer 5 1 2
330. n the server you will only need to set a few parameters and add and assign the List amp Label data provider as usual The Web Designer will internally ensure that the data from the data source on the web server is forwarded to the Designer on the client for the real time data preview Integration To integrate the Web Designer into your application proceed as follows For more details please refer to the application examples provided for ASP NET Step 1 Add Web Designer to Application Copy the setup file of the Web Designer LL21WebDesignerSetup exe to any one of the web application s folders so that clients are able to download it from there The setup file is located in the List amp Label installation folder under Redistributable files When switching to a new List amp Label version also for service packs the setup file for the Web Designer on the server will need to be updated The clients will then automatically prompt the user to perform an update the next time the application is launched Finally add a reference to the assembly combit ListLabel21 Web dll How the Web Designer call is inserted differs according to the web framework used You will find the necessary code in the programming examples in the List amp Label installation folder under Programmable examples and declarations Microsoft NET ASP NET Under ASP NET WebForms C WebDesigner and AjaxViewer Designer aspx 45 Programming With NET
331. nal data structure or objecets This parameter will be passed unchanged in the callback for your use scL DrillDownJob _nUserParam Please make sure the parameter is not 0 or NULL unless you want to deactivate expandable regions Via the callback LL N7FY_VIEWERDRILLDOWN for further description please see chapter Drilldown Reports in Preview List amp Label informs about the current task This callback will always be called in the context of the preview thread regardless if initiated from designer or preview print When you use structure members e g like _nUserParam please ensure that the thread has evaluated or copied them before you pass control back to List amp Label as the structure will no longer be valid then this is true for all Callbacks 130 Advanced Programming 5 7 5 Supporting Interactive Sorting in Preview If this feature is supported report container table header fields can be used to toggle between different sortings in the preview window For convenience this feature uses the same callback as drilldown printing so in most cases you can simply reuse your existing code and just make sure it works even if no drilldown filter is set in the passed structure i e all table IDs and key field values are empty Preparations To enable interactive sortings in List amp Label set the option LL_OPTION_INTERACTIVESORTING_REALDATAJOBPARAMETER to a value unequal to 0 Please note that this option has to be set for ea
332. nd Support You will find many tips and tricks in our online Knowledge Base at http Wwww combit net en support The Knowledge Base is regularly updated and complemented by new articles Information about our support concept can be found in the information material that came with your product or at http www combit net en support Requirements Please make sure you have checked the following points or you have the required information before contacting us m Read the latest information available in the file readme_rel pdf in the Service Pack download area under http support combit net m Also read the file Self_help pdf in the List amp Label Documentation directory or in the respective Knowledge Base article Create and Analyze a Log File m Use the online support submit form 435 Index 14 Index NET 1 1 1 relations 1 n relations A Abort box Access AdoDataProvider Alias API Reference DefineField DefineNewLine DefineNewPage DefineVariable FileAlsoNew asterMode ProjectFile o o o o AutoDestination o o o o ProjectType AutoShowPrintOptions AutoShowSelectFile Barcode Barcode size Barcode Variables Boolean Variables C C C C Builder Callback Callbacks 436 14 115 112 231 239 29 25 277 142 33 33 53 33 53 33 24 24 24 3 24 24 34 24 24 33 269 97 95 14 14 117 100 116 121 133 Cards Charts Handling Pr
333. nd are therefore independent of the selected unit system In order to place an object in a fixed position 5 mm from the left margin you would use INT nRet L1DomSetProperty hObj _T Position Left _T 5000 If the property is to contain a formula rather than a fixed value the function UnitFromSCM must be used in order to be independent of the units An inside margin with an indent of 10 mm on odd and 5 mm on even pages would be produced with INT nRet L1DomSetProperty hObj _T Position Left T Cond Odd Page UnitFromSCM 10 0 UnitFromSCM 5 5 8 2 Examples Creating a Text Object The following code creates a new project inserts a text object inside which is a new paragraph with the content DOM and saves the project HLLJOB hJob LlJobOpen 1 Create new project L1ProjectOpen hJob LL_PROJECT_LIST c simple 1st LL_PRIOPEN_CD_CREATE_ALWAYS LL_PRJOPEN_AM_READWRITE HLLDOMOBJ hProj L1DomGetProject hJob amp hProj Get object list HLLDOMOBJ hObjList L1DomGetObject hProj Objects amp hObjList Create text object 137 Programming Using the API HLLDOMOBJ hObj L1DomCreateSubobject hObjList _T Text amp hObj L1DomSetProperty hObj _T Name _T My new Textobject Get paragraph list HLLDOMOBJ hObjParagraphList L1DomGetObject hObj _T Paragraphs amp hObjParagraphList Create new paragraph and create contents HLLDOMOBJ hObjParagraph L
334. nearly all cases Example case LL CMND_ HOSTPRINTER scL1Printer pPrn scLlPrinter sc _1Param if pPrn gt _nSize sizeof scLlPrinter switch pPrn gt _nCmd case LL_PRN_CREATE_DC UtilDebug LL_PRN_CREATE_DC d n pPrn gt _bFirst pPrn gt _hDC CreateDC PSCRIPT DRV x ps srv pr NULL break case LL _PRN_DELETE DC UtilDebug LL_PRN_DELETE_DC d n pPrn gt _bFirst DeleteDC pPrn gt _hDC break case LL PRN_SET ORIENTATION UtilDebug LL_ PRN SET _ORIENTATION d d n pPrn gt _bFirst pPrn gt _nOrientation not in this trivial example break case LL PRN_GET ORIENTATION UtilDebug LL_PRN_GET_ORIENTATION d n pPrn gt _bFirst not in this trivial example break case LL PRN_GET_DEVICENAME UtilDebug LL_PRN_GET_DEVICENAME d n pPrn gt _bFirst chk_strncpy pPrn gt _pszBuffer TestDevice 291 API Reference pPrn gt _nBufSize break case LL _PRN_GET_DRIVERNAME UtilDebug LL PRN_GET_DRIVERNAME d n pPrn gt _bFirst chk_strncpy pPrn gt _pszBuffer TestDriver pPrn gt _nBufSize break case LL_PRN_GET_PORTNAME UtilDebug LL_PRN_GET_PORTNAME d n pPrn gt _bFirst chk_strncpy pPrn gt _pszBuffer TestPort pPrn gt _nBufSize break case LL_PRN_RESET_DC UtilDebug LL_PRN_RESET_DC d n pPrn gt _bFirst not in this trivial example break case LL PRN COMPARE PRINTER the sa
335. neighboring cells are not drawn so that they overlap each other but discretely This can double the frame width and needs to be taken into account during the design e Even if the HTML object wraps over several pages it will be exported in one stream i e no page wrap will occur e Embedded scripting functionalities may be lost e Issue print is not supported e Rotated descriptions in the crosstab object are not supported e Shadow Pages are not supported e The wrapping option Minimum Size in the crosstab object is not supported Programming Interface You can find a description of all options used in the XHTML export module in this chapter These options can be modified read using the methods L XSetParameter XHTML and LIXGetParameter XHTML Resolution Defines the resolution in dpi for the transformation of the coordinates and the generation of pictures Default 96 dp screen resolution Picture JPEGQuality Specifies the quality and the corresponding compression factor of the generated JPEG graphic The value lies between 0 700 with 700 representing the highest quality least compression Takes effect only when the source graphic is not the JPEG format as encoding of JPEG to JPEG would result in a quality loss Default 75 Picture BitsPerPixel Defines the color depth of the generated picture Please note that the picture files will quickly get very large with higher color depths Value Meaning 1 Bla
336. ng the entire layout definition or until after L PrintFie ds or LiPrint return After use the handle can or should be deleted with the normal API function 162 Function Reference Example HLLJOB hJob HMETAFILE hMeta HDC hMetaDC INT aie hMetaDC CreateMetaFile NULL curve SelectObject hMetaDC GetStockObject NULL_PEN Rectangle hMetaDC 0 0 LL_META MAXX LL META MAXY for i 0 i lt 10 i MoveTo hMetaDC 0 MulDiv i LL META MAXY 10 LineTo hMetaDC MulDiv i LL META MAXX 100 MulDiv LL META _MAXY 10 MoveTo hMetaDC 0 MulDiv 100 i amp 251 100 LL META MAXY 100 for i 0 i lt 10 i LineTo hMetaDC MulDiv i LL META MAXX 10 MulDiv 100 i amp 251 100 LL META MAXY 100 hMeta CloseMetaFile hMetaDC hJob LlJobOpen 0 L1DefineVariableStart hJob L1DefineVariable hJob Name Smith L1DefineVariable hJob Forename George L1DefineVariableExtHandle hJob Chart hMeta LL_DRAWING META NULL L1DefineVariableExt hJob Postal code CB5 4RB LL_BARCODE_30F9 NULL Serna SCE gt L1lJobClose hJob DeleteObject hMeta See also LIDefineVariableStart LIDefineVariable LIDefineVariableExt LIGetVariableContents LIGetVariableType LIDefineVariableStart Syntax INT L1DefineVariableStart Task HLLJOB hJob Empties List amp Label s internal variable buffer in order to delete old definitions Paramete
337. ng the products digiSeal office and digiSeal server from secrypt GmbH OpenLimit CC Sign from OpenLimit SignCubes or esiCAPI from e siqia technologies GmbH you can digitally sign PDF TXT if the option Export AllinOneFile is set and Multi TIFF files generated with List amp Label Besides the software you need a card reader and a signature card with a certificate stored on it Details of hard and software requirements can be found in the signature provider s documentation digiSeal office requires the digiSealAPI dll or the dsServerAPI dll in digiSeal server which is provided by secrypt Windows NT or higher is mandatory for this package The DLL s corresponding signature file signatur may also be required Please note that you also will need a software certificate pfx file when using digiSeal server Detailed information can be obtained directly from secrypt GmbH OpenLimit CC Sign requires an interface DLL that is provided by OpenLimit SignCubes For esiCAPI from e sigia technologies GmbH the files esicAPI dll and esicConfig xml being shipped with the product have to be redistributed with your application The DLL for the respective connector will be provided directly from e siqia technologies GmbH 404 Digitally Sign Export Results 7 4 1 Start Signature Check the Digitally sign created files checkbox in the export target dialog Please note that this checkbox will only be available if one of the
338. ngle HTML file 1 The result is a single HTML file Export File containing all printed pages Default 1 356 Programming Reference Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 0 Export with user interaction dialogs 1 No dialogs or message boxes will be displayed only if Export Path was specified Default 0 Export ShowResult Specifies whether the export result will be displayed automatically The program that displays the result will be determined by the registered file extension Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with Export File Default 0 Export ShowResultAvailable Enables you to hide the respective checkbox in the dialog Value Meaning 0 Checkbox will be hidden 1 Checkbox will be available Default 1 HTML Form Header Defines a certain HTML form tag such as lt form method POST action If this option has been specified all object names are analyzed with regard to special tags used for the form extension see chapter HTML form creation Default Empty no form creation HTML Form Footer This option defines a certain HTML form tag indicating the end of the form Default lt form gt Hyperlinks Hyperlinks can be embedded in text table and RTF objects directly in the Designer using the Hyperlink function Dynamic hyperlinks and formulas can be realized in this way
339. ngth of the required buffer in TCHARS so BYTEs for SBCS MBCS and WCHARs for UNICODE including the string termination See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also Chapter DOM Functions LIDomGetSubobject Syntax INT L1lDomGetSubobject HLLDOMOBJ hDOMObj INT nPosition PHLLDOMOBJ phDOMSub0b j Task Returns the specified subelement of the DOM list Detailed application examples can be found in chapter DOM Functions Parameter hDomObBj DOM handle for the list to be queried nPosition ndex 0 based of the desired element phDOMSubObj Pointer to DOM handle for return Return value Error code 176 Function Reference See also Chapter DOM Functions LIDomGetSubobjectCount Syntax INT L1DomGetSubobjectCount HLLDOMOBJ hDOMObj _LPINT pnCount Task Returns the number of elements in the specified DOM list The number of objects in the object list can be determined for example Detailed application examples can be found in chapter DOM Functions Parameter hDomObj DOM handle for the list to be queried pnCount Pointer for return Return value Error code See also Chapter DOM Functions LIDomSetProperty Syntax INT Ll1DomSetProperty HLLDOMOBJ hDOMObj LPCTSTR pszName LPCTSTR pszValue Task Sets the specified property to the passed value Detailed application examples can be found in chapter DOM Functions
340. now all variables and fields you are making available to your end users For this reason you must define all variables and fields using the L DefineVariable and L DefineFie d functions before calling L PrintWithBoxStart As only the names and types are important at this point not the contents you may call the same routine you use to define all variables and fields for the Designer e g with a sample content or the content of the first record A print usually proceeds as follows functions with are optional calls which are not necessarily required lt open Job gt L1JobOpen L1lJobOpenLCID lt define List amp Label settings gt L1SetOption L1SetOptionString L1SetFileExtensions L1iSetNotificationMessage L1SetNotificationCallback lt print gt see below lt close Job gt L1JobClose Printing Labels and File Cards For a label or file card print LL PROJECT LABEL LL_PROJECT_CARD the lt print gt part looks as follows 101 Programming Using the API lt define all possible variables gt L1DefineVariableStart L1DefineVariable L1DefineVariableExt L1DefineVariableExtHandle lt define options gt L1SetPrinterDefaultsDir lt start print gt L1PrintStart L1PrintWithBoxStart lt define print options gt L1PrintSetOption L1PrintSetOptionString L1PreviewSetTempPath lt let user change options gt L1PrintOptionsDialog L1PrintOptionsDialogTitle L1PrintSelectOffsetEx L1PrinterS
341. nsformed to George Smith lastname If list objects are also required in a report or list project LL_ PROJECT LIST then the programmer must also make the necessary fields available This is done analogously to the above barcode fields and drawings are also possible table columns except that the function names contain Field instead of Variable L1DefineFieldStart hJob L1DefineField hJob book L1DefineField hJob ISBN L1DefineFieldExt hJob ISBN 40 15589 97531 LL_BARCODE_EAN13 NULL L1DefineFieldExt hJob photo c dwg test bmp LL_DRAWING NULL Before calling L DefineLayout menu items can be deleted by LIDesignerProhibitAction or blocked so that the Designer cannot be minimized The latter can be done by calling 99 Programming Using the API L1DesignerProhibitAction hJob LL_SYSCOMMAND_MINIMIZE Now everything has been defined sufficiently for the user to edit his project and the Designer can be started L1DefineLayout hJob hWindow test title LL_PROJECT_LABEL test For a list change the constant to LL PROJECT LIST or for a file card project to LL PROJECT_CARD Please note that in the Designer you will generally see the data of only one record multiple times in the Designer It is possible to provide a real data preview in the designer See chapter This chapter is only required if you re not working with one of the components NET VCL OCX If you re usin
342. nstruction specifies the local data path of the Web Designer setup which is downloaded if the client has not yet installed it Distribute the Web Designer setup together with your web application and modify this link accordingly Furthermore ensure that the web config file contains the right version of the handler DesignerContro FileHandler 47 Programming With NET lt system webServer gt lt handlers gt lt add name DesignerControlFileHandler verb path 11 type combit ListLabel21 Web DesignerControlFileHandler gt lt handlers gt lt system webServer gt The Web Designer has now been completely set up Troubleshooting Older versions of IIS may not work properly with the MVC framework If this happens try adding the following entries to the web config file under lt system webServer gt lt handlers gt lt remove name ExtensionlessUrlHandler ISAPI 4 0 32bit gt lt remove name ExtensionlessUrlHandler ISAPI 4 0 64bit gt lt remove name ExtensionlessUrlHandler Integrated 4 0 gt lt add name ExtensionlessUrlHandler ISAPI 4 0 32bit path verb GET HEAD POST DEBUG PUT DELETE PATCH OPTIONS modules IsapiModule scriptProcessor windir Microsoft NET Framework v4 30319 aspnet_isapi d 11 preCondition classicMode runtimeVersionv4 bitness32 responseBufferLimit 0 gt lt add name ExtensionlessUrlHandler ISAPI 4 0 64bit path verb GET HEAD POST DEBUG PUT DELET
343. ntGetTextCharsPrinted No text object in this project L Printls Variable Used L PrintlsFieldUsed The given variable does not exist L GetUsedidentifiers The project contains no information about variables and fields used because it has not yet been saved with List amp Label 11 or newer Field functions were used although the project is not a list project LIPrint WithBox Start LIDefineLayout The expression mode of the project file is the new mode but the old mode is set see LiSetOption ONLYWITHONETABLE 34 UNKNOWNVARIABLE 35 UNKNOWAFIELD 36 UNKNOWNSORTORCER 37 NOPRINTERCFG 38 SAVEPRINTERCFG 39 RESERVED 40 NOVALIDPAGES 41 NOTINHOSTPRINTERMODE 42 NOTFINISHED 43 BUFFERTOOSMALL 44 BADCODEPAGE 45 CANNOTCREATETEMPFILE 46 NODESTINATION 47 NOCHART 48 TOO MANY CONCURRENT PRINTJOBS 49 BAD_WEBSERVER_LICENSE 50 NO_WEBSERVER_LICENSE 51 ERR_INVALIDDATE 52 DRAWINGNOTFOUND 53 General Error Codes This error code can only be returned if in the list mode the OneTable mode LL_OPTION_ ONLYONETABLE is chosen but more than one table is present when loading the project with LIPrint WithBox Start See L SetOption The variable given with L GetVariablelype or L GetVariableContents has not been defined The field given with L GetFieldType or L GetFieldContents has not been defined The sorting order given by the ID for
344. nto the rectangle _hWnd Window handle of the dialog This should be taken as parent handle of your dialogs _IlpszParameters Pointer to a buffer with the maximum size _nParaBufSize _nParaBufSize Size of the buffer allocated by List amp Label Return Value Hints 0 This callback is sent if objects that are set to a variable of type LL DRAWING_USEROBJ_DLG need to be edited In this callback no List amp Label function may be called which produces output L Print etc Functions like L PrintGetCurrentPage LiPrintGetOption or LIPrintEnableObject are allowed See Hints on the use of GDl objects The editing of the _b sotropic flag is optional as this can be set by the user in the calling dialog If you change this flag the change will be adopted by List amp Label _IpszParameter points to string in which the values entered in the last dialog call are stored You can copy your parameter string into the buffer when it is smaller or the same size as the buffer Otherwise you can change the pointer value to a pointer that points to your data The problem of a longer parameter string is that it cannot be released by List amp Label if it is an allocated storage area Basic principle you can pass up to 1024 characters The string cannot be extended superfluous characters are cut off The characters permitted in the parameter string are all printable characters i e characters with codes gt 32 285
345. nu in Designer It should be a 16x16 pixel 16 color icon The component has three types of events First the DesObj Picture_CreateDesignerObject event is triggered when the user creates a new object If desired you can have an initial dialog appear on the user s screen For example this can be a wizard that helps the user to more easily configure the new object If it is not necessary to use this in a particular case simply skip handling the event The DesObj Picture _EditDesignerObject event is triggered when the user double clicks the newly inserted object or selects Properties from the context menu After you are finished editing the object you are prompted by List amp Label to show the object The DesObj Picture DrawDesignerObject event is triggered for this purpose Using the usual methods you can now draw in the workspace Here of course it is also possible or useful to access the stored object properties 3 9 The Viewer OCX Control 3 9 1 Overview The CMLL21V OCX control can be used to view export or print List amp Label preview files in your own environment It can for example be inserted into your own application or into an Internet page When printing the projects will be fitted into the page automatically taking account of the physical page flag and the page orientation to create the best possible printout result 70 The Viewer OCX Control If a URL is given instead of a file name the control will
346. o be disabled The IDs of the items in List amp Label can be found in the file MENUID TXT of your List amp Label installation Return Value Error code See also LIRTFCreateObject LIRTFEditorlInvokeAction LIRTFEditObject LIRTFGetText Syntax INT LIRTFGetText HLLJOB hJob HLLRTFOBJ hRTF INT nFlags LPTSTR lpszBuffer UINT nBufferSize Task Returns the text of an RTF object Parameter hJob List amp Label job handle ARTF RTF object handle nFlags Options see L R7FGetTextLength IpszBuffer Address of buffer for the text nBufferSize Maximum number of characters to be copied 247 API Reference Return Value Error code Hints See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value Example HLLRTFOBJ ARTF LIRTFCreateObject hJob if LLRTFEditObject hJob hRTF NULL NULL LL _PROJECT_LABEL gt 0 INT nFlags LL_RTFTEXTMODE_RTF LL_RTFTEXTMODE EVALUATED INT nLen LIRTFGetTextLength hJob hRTF nFlags TCHAR pszText new TCHAR nLen 1 LIRTFGetText hJob ARTF nFlags pszText nLentl printf Ss n n pszText delete pszText See also LIRTFCreateObject LIRTFGetTextLength LIRTFGetTextLength Syntax INT LIRTFGetTextLength HLLJOB hJob HLLRTFOBJ hRTF INT nFlags Task Returns the size of the text contained in the object Necessary to determine the required buffer size for the text Parameter hJob List amp La
347. ob handle nMode Mode index see below nValue New value Return Value Error code Hints Please call this function before L DefineLayout and before the functions L Print Start preferably directly after LWlobOpen LUobOpenLC D LL_OPTION_ADDVARSTOFIELDS TRUE in list projects the formula wizard offers variables in addition to fields in a table column formula FALSE in table objects only fields will be offered default This option only affects list projects LL_OPTION_ALLOW_COMBINED_COLLECTING_OF_DATA_FOR_ COLLECTIONCONTROLS TRUE f multiple report container elements use the same data source ex multiple charts or crosstabs etc the data is passed only once to the report and is re used by all these elements Depending on the project this might yield a noticeable performance boost The main drawback is a larger memory footprint Additionally it is no longer possible to change the value of variables that influence the properties or contents of the elements during printing default FALSE Each element gets its own data LL_OPTION_ALLOW_LLX_EXPORTERS TRUE List amp Label will accept export modules that are loaded during LL_OPTIONSTR_LLXPATHLIST FALSE List amp Label will not use export module functionality 257 API Reference This option must be set before the LLXPATHLIST call Default TRUE LL_OPTION_CALCSUMVARSONINVISIBLELINES This sets the default value for the Designer option specifying whe
348. oduce output L Print etc Functions like LIPrintGetCurrentPage LIPrintGetOption or L PrintEnableObject are allowed See Hints on the use of GDl objects This function is called twice per page once with bPreDraw TRUE then with bPreDraw FALSE Example case LL_CMND_ PROJECT pSCP PSCLLPROJECT pSC gt lParam if pSCP gt _bPreDraw FillRect pSCL gt _hPaintDC pSCL gt _rcPaint GetStockObject LTGRAY_BRUSBH break LL_CMND_SAVEFILENAME Task Notification that the user has saved the project in the Designer The file name is passed Parameters Param points to the zero terminated file name 298 Callback Reference Return Value _IResult 0 Example case LL _ CMND_SAVEFILENAME pszLastFilename LPCTSTR lParam LL_CMND_SELECTMENU Task Notification that a menu has been selected Activation Always activated Parameters Param Menu ID of the menu item negative ID if called from a toolbar button Return Value _IResult TRUE if List amp Label shall not try to execute the command associated with the menu ID usually if the menu item has been inserted by the application FALSE otherwise Example case LL CMND_SELECTMENU if lParam IDM _MYMENU execute custom code return TRUE break LL_CMND_TABLEFIELD Task Enables the programmer to modify the coloring of individual table fields Activation L1SetOption hJob LL_OPTION TABLE COLORIN
349. offer the suitable sub tables in the table structure window If you set the master table name using this method all tables related to this table can be inserted at the root level of the report container object Parameter hJob List amp Label job handle pszTable lD ID of the table which is used as the master table Must be identical to the ID passed in L DbAddTable Return Value Error code Hints See the hints in chapter Printing Relational Data Before using the call the table must be passed with L DbAdaTable Example HLLJOBhJob hJob LlJobOpen 0 L1DbAddTable hJob Orders NULL L1DbSetMasterTable hJob Orders ee PROS kea LlJobClose hJob See also LIDbAddTable LIDbAddTableRelation LIPrintDbGetCurrentTable LIPrint DbGetCurrentTableSortOrder LIPrintDbGetCurrentTableRelation LIDebugOutput Syntax void LlDebugOutput INT nIndent LPCTSTR pszText Task Prints the text in the debug window of the Debwin Tool or depending on the parameter passed to L SetDebug to the log file Parameter nindent Indentation of the following line s pszText Text to be printed 151 API Reference Hints The indentation is very handy for tracing calls to sub procedures but you need to make sure that every call with an indentation of 1 is matched by a call with the indentation of 1 Example HLLJOB hJob L1SetDebug LL_DEBUG_CMBTLL L1DebugOutput 1 Get version number
350. ogramming Code page Component Properties Components Concepts Copies Create log file Create new project Cross tables Crosstabs CSS Currency symbol Data provider Data Source Data transfer Data type Barcode Date Drawing HTML Logic umeric RTF Text Data types DataBinding DataMember DataSource DataTable DataView DataViewManager Date Variables Database independent DataProviderCollection 35 53 131 107 258 21 22 24 17 24 35 105 222 229 233 42 24 53 107 393 262 271 24 20 20 33 32 32 33 32 32 32 32 30 53 20 31 26 25 25 25 94 DateTime 32 DB2 56 DbCommandSetDataProvider 27 Debug mode 25 Debugging 15 42 151 25 Debwin 15 426 Debwin3 42 Decimal char 27 Declaration files 15 Default export format 24 Default printer 192 Default project file 24 Delphi 14 Design 20 Designer 1 Direct printing 12 Edit 36 Extend 36 58 DesignerFunction 58 Dialog styles 43 Digital Signature 404 DOC export 389 DOM 40 Examples 37 Functions 34 Units 37 Drawing Variables 96 DrawObject 33 DrawPage 33 DrawTableField 33 DrawTableLine 33 Drilldown reports 125 E E mail export 407 Entity Framework 27 EntityCollection 27 Error Codes 421 Events 33 Examples 48 Excel export 345 Expandable Regions 130 Export 14 22 56 341 418 Exc Fax H Formats HTML JOM PDF Picture Digital Signature el TML PowerPoint Restrict formats
351. oman numeral use the following lines Delphi procedure TDesExtForm RomanNumberEvaluateFunction Sender TObject var ResultType TL121XFunctionParameterType var ResultValue OleVariant var DecimalPositions Integer const ParameterCount Integer const Parameter1 Parameter2 Parameter3 Parameter4 OleVariant begin ResultValue ToRoman Parameter1 end Two additional events also give you the option to further modify the function OnCheckFunctionSyntax lets you perform a syntax check Here you can check the data types of the parameters and for example make sure the parameters fall within a certain range Using OnParameterAutoComplete you can define several suggested values for the AutoComplete feature of the formula wizard 4 9 2 Adding Your Own Objects to the Designer Similar to the way you add functions to Designer you can also define your own object types and register them in List amp Label The user can access the new objects in the usual way on the left toolbar and menu 86 Extending the Designer Here there is also a special component for adding objects Object Inspector GradientFillObject Properties Events Action Hint Help and Hints Hint Linkage ParentComponent PopupMenu Localizable Hint Icon Miscellaneous Description Name ObjectName SupportsMultipage Tag Visual Icon All shown LL PopupMenul TIcon GradientFill GradientFillObject GradientFill false 0
352. on With Other Programming Languages 4 9 Hints on Variable and Field Names ccceeeeeeeeeeeeteeeeeeeeeeeeeees A410 Debugging SUPPOMt eect ata raea a Ertan ASERNE FATHA 2 Programming With NET cccsssssseeeeececceesseeeeeececeeeeeeseeeeeeeesesaeaeess 251 CUMRPODUCTION souenon poepie naura ieena ina aeeie A aa Seeansteaessatess3sanle d3 2 1 1 tegration IN Visual StudiO reisge raran oea e Barents 2 1 2 COMPONENTS oiiire a i e nae inn 2 2 First Steps dirne ar R a a A e e e a ei 2 2 1 ntegrate List amp LabelaeroreaToiaeon t e T e aani 2 2 2 LICENSES Componian e ana e anea 2 2 3 Binding 10 4 Data SOuree eeo e E a tut al eet d 2 2 4 POS Mier eee erated SA see Se vtec tecltie x cadena ont E AON Tate 2 2 5 PPI bess sector ctadacvatcht thas ceases aie PA ousetttet sen E 2 2 6 EXPONlateslntt eet dan eh ln With eee a naga eee 2 2 7 mportant Properties of the Component cceeeeeeeeeeeeeee 2 3 Other Important Concepts ssssssssssssssessesesessssssssseeseeeeeeeeeees 2 3 1 Data Providers aaaea ceed etant gehen Wa cent EA E E EAR 2 3 2 Variables Fields and Data Types ccccccceecseeeeeeeeesentteeeeeees 2 3 3 EVENS isnvetihedl a cadence tate esata e 2 3 4 Project TYPES felines esiet or a EEEE ea A Ea A REA Contents 2 3 5 Varying Printers and Printing Copies cccceeeteeeeeeeeteeeeeeees 35 2 3 6 Edit and Extend the DeSignel
353. one of the components NET MVCL OCX If you re using one of these components you may skip this chapter Direct Print and Export From the Designer 100 The Print Process During printing the passing of data works analogously apart from the fact that you have to supply the real data content instead of the sample content This has to be done for all fields used while you are iterating all records you want to print out 5 4 2 Real Data Preview or Print In principle the printing loop always looks the same whether you print to preview LL_PRINT_ PREVIEW printer LL_PRINT_ NORMAL or file LL_PA INT_FILE The only difference is a parameter setting at the beginning of the print see L Print WithBox Start You may however leave the target choice to the end user LL_PRINT_EXPORT by giving him the option to choose the print target within the print dialog called by L PrintOptionsDialog 5 4 3 Basic Procedure First of all a List amp Label job is opened Li obOpen or LU obOpenLC D and if necessary global List amp Label options are set L SetOption Now List amp Label has to be informed that printing should start L PrintWithBoxStart With this call the project file to be used for printing is passed to List amp Label At this point the project is opened and parsed by List amp Label During this process a syntax check is performed on all variables fields and formulas used This requires List amp Label to k
354. onnectionDataProvider P Page break Page number 282 422 Pass additional data PDF export P file Picture Picture export Placeholders Portrait PostgreSQL PowerPoint Export PPTX export Preview Preview API Preview files Convert 73 73 73 72 72 72 71 72 70 75 29 56 29 29 105 209 233 Parameter90 168 173 176 178 181 183 184 187 188 189 190 193 194 195 196 197 198 213 214 221 224 225 226 248 250 33 365 21 32 363 51 35 56 369 369 12 59 206 313 314 313 59 Join PreviewFile Prin etwork Print Engine Print files Print options Print options dialog Printer configuration Printer device Printer driver Printer selection window Printer settings Printers Printing Job Proceeding Progress ProhibitedActions ProhibitedFunctions Project files In database Project includes Project parameters Project type Project types Cards Labels Lists ProjectCard ProjectLabel ProjectList Property Pages R ReadOnlyObjects Real data preview Regions Report Container Report Parameter Return Value Rounding RTF Index 59 59 22 62 12 313 230 232 24 210 428 236 44 217 21 35 91 92 101 15 36 36 415 24 35 34 34 40 40 40 74 36 206 35 40 39 107 129 91 414 96 445 Index RTF control RTF Editor calling RTF export S Sending e Mail Settings SMTP Sp
355. op up window overlapping you application window You can pass on this designing capability to your end users so that they can define individual templates or adapt the templates offered by you to personal requirements 11 Introduction u Designer C Program Files x86 combit Sample Application Different chartssrt w ig g Jam OA 6 General Settings w 4a Preview 452 11888 Select nothing seiected ws Print or Export Generating Reports To generate reports that have been designed by you or your end users and send them to the printer or display them in the print preview all data records to be processed is being passed on to List amp Label Depending on the programming language this will either happen under the surface automatically when List amp Label directly accesses your application s data by using specific data providers or it is being done explicitly by your source code e g if your data is not stored in a database at all A mixture between database data and application specific data is possible too Besides sending the report to the printer or preview List amp Label offers various other output formats such as PDF HTML XHTML CSS JOM XML RTF XLS DOCX TIFF JPEG PNG plain text bitmap and others This is achieved by special export modules From the developer s point of view there is no difference between printing and exporting the report Displaying Reports The print preview can be used to dis
356. or code Hints Examples for printer names are HP DeskJet 500 or NEC P6 for printer port LPT2 or server printer1 In case of an export the printer contains the description of the exporter and the port is empty See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIPrintStart LIPrintWithBoxStart LIPrintGetProjectParameter Syntax INT L1lPrintGetProjectParameter HLLJOB hLlJob LPCTSTR pszParameter BOOL bEvaluated LPTSTR pszBuffer INT nBufSize _LPUINT pnFlags Task Returns the value of a project parameter Parameter hJob List amp Label job handle pszParameter Parameter name May be NULL see hints pszBuffer Address of buffer for contents May be NULL see hints bEvaluated f the parameter is of the type LL PARAMETERFLAG_ FORMULA this flag decides whether the parameter should be evaluated first nBufSize Size of the buffer in TCHARs Return Value Error code or required buffer size Hints This function cannot be called before L Print WithBox Start If pszParameter is NULL a semicolon separated list of all USER parameters is returned If pszBuffer is NULL the return value equals the size of the required buffer in TCHARS including the termination 225 API Reference See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LISetDefaultProjectParameter LIGetD
357. orce TLS Cancellation when server does not support TLS Default 1 Export Mail SMTP ServerAddress SMTP server IP address or URL Export Mail SMTP ServerPort SMTP server port default 25 Export Mail SMTP ServerUser SMTP server user name if necessary Export Mail SMTP ServerPassword SMTP server password if necessary Export Mail SMTP ProxyType Proxy type O none 1 Socks4 2 Socks5 Export Mail SMTP ProxyAddress Proxy IP address or URL Export Mail SMTP ProxyPort Proxy port default 1080 Export Mail SMTP ProxyUser Proxy user name only Socks5 Export Mail SMTP ProxyPassword Proxy password only Socks5 Export Mail SMTP POPBeforeSMTP Some SMTP server need a login via POP before SMTP connection OQ no POP connection will be established 1 POP connection will be established Export Mail SMTP SenderAddress Mail sender s address ex xyz abc def is also used for the SMTP protocol Export Mail SMTP SenderName Real sender s name Export Mail SMTP ReplyTo Reply to address optional Export Mail SMTP From Substitutes the sender s address combination of Export Mail SMTP SenderName and Export Mail SMTP SenderAddress in the mail However Export Mail SMTP SenderAddress will still be used for the SMTP protocol Export Mail POP3 SocketTimeout Timeout for socket connection in ms default 10000 Export Mail POP3 SecureConnection Connection security 410 Send Export Results via E Mail Value Meaning 1 Auto
358. order to tell List amp Label to ignore it Parameter hJob List amp Label job handle IpszObject Object name see below bEnable TRUE Object can be printed FALSE Object should be ignored Return Value Error code important Hints The object name can be empty to address all objects otherwise it must be the object name entered by the user with the prefix If the user is able to change objects and object names in the Designer it is important to ask for the return value to test whether the object exists at all This function is particularly important for filling several independent tables Before calling L Print all table objects must be enabled Example L1lPrintEnableObject hJob TRUE L1lPrintEnableObject hJob AuthorList FALSE See also LIPrint LIPrintFields LIPrintEnd Syntax INT L1lPrintEnd HLLJOB hJob INT nPages Task Ends the print job Parameter hJob List amp Label job handle nPages Number of empty pages desired after the print 216 Function Reference Return Value Error code Hints The behavior is described in the programming part of this manual Please always use L PrintEnd if you have used L PrintStart or L PrintWithBoxStart even if these commands were aborted with an error otherwise resource and memory losses may result Example HLLJOB hJob hJob LlJobOpen 0 if L1PrintStart hJob LL PROJECT LABEL test LL PRINT NORMAL
359. ort Results To find out which files have been created as an export result you can use the option LL_OPTIONSTR_EXPORTFILELIST f you query this option using L GetOptionString after L PrintEnd the result will be a semicolon separated list of all files including path generated by List amp Label In the case of an HTML export the result would be a list of all HTML and JPEG files and in the case of a print to preview the result would be a single LL preview file 344 Programming Reference The files created by the export will not be deleted automatically and should be deleted by your application 7 3 Programming Reference 7 3 1 Excel Export Overview The Excel export module creates Microsoft Excel documents The creation is independent of any installed version of this product i e the export is native Depending on your needs the full layout can be conserved during export or only the data from table objects is exported unformatted Limitations The following limitations should be considered Excel renders texts with an increased height compared to the standard output Thus all fonts are scaled down by an optional factor You may set this factor using the XLS FontScalingPercentage option Excel does not accept any objects on the non printable area of your printer This results in a wider printout compared to List amp Label This effect can be minimized by setting a zoom for the printout see XLS PrintingZoom option
360. orted e Shadow Pages are not supported e Nested tables will be exported as image Programming Interface You can find a description of all options used in the JOM export module in this chapter These options can be modified read using the methods LIXSetParameter JQM and LiXGetParameter JQM Resolution Defines the resolution in dpi for the transformation of the coordinates and the generation of pictures Default 96 dp screen resolution Picture JPEGQuality Specifies the quality and the corresponding compression factor of the generated JPEG graphic The value lies between 0 700 with 700 representing the highest quality least compression Takes effect only when the source graphic is not the JPEG format as encoding of JPEG to JPEG would result in a quality loss Default 75 Picture BitsPerPixel Defines the color depth of the generated pictures Value Meaning 1 Black amp White 24 24bit True Color Default 32 Picture Format Defines the format of the generated pictures Value Meaning JPG JPEG picture PNG PNG picture Default PNG Export Path Defines the target path for the export with closing backslash If this option is empty a file selection dialog will always be displayed Export File File name of the first HTML page to be generated Default index htm Export Quiet Defines if the export should be executed with user interaction Value Meaning 0 Interaction dialogs allowed 360
361. ose hMailJob See also LsMailJobOpen LsMailJobOpen Syntax INT LsMailJobOpen INT nLanguage Task Opens a mail job Parameter nLanguage language for user interaction Value Meaning CMBTLANG_DEFAULT System default language CMBTLANG_GERMAN German CMBTLANG_ENGLISH English Further constants in the declaration files Return value A handle which is necessary for most functions A valid value is greater than 0 337 API Reference Example HLSMAILJOB hMailJdob hMailJob LsMailJobOpen 0 See also LsMailJobClose LsMailSendFile Syntax INT LsMailSendFile HLSMAILJOB hJob HWND hWndParent Task Sends an email with the current settings Parameter hJob List amp Label email API job handle hWndParent Parent window handle for the email dialog If the window handle is 0 no dialog will be shown and the email will be sent without any user activities Return value Error code Example HLSMAILJOB hMailJob hMailJob LsMailJobOpen 0 LsMailSetOptionString hMailJob Export Mail To test domainname de LsMailSetOptionString hMailJob Export Mail Subject Test LsMailSetOptionString hMailJob Export Mail AttachmentList Mer NESS tE LsMailSendFile hMailJob 0 LsMailJobClose hMailJob See also LsMailSetOptionString LsMailSetOptionString Syntax INT LsMailSetOptionString HLSMAILJOB hJob LPCTSTR pszKey LPCTSTR pszValue Task Sets various
362. ould be saved Export File File name of the document If this option is empty a file selection dialog will always be displayed default export txt Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 0 Export with user interaction dialogs 1 No dialogs or message boxes will be displayed only if Export Path was specified Default 0 Export ShowResult Specifies whether the export result will be displayed automatically The program that displays the result will be determined by the associated file type Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with Export File Default 0 Export ShowResultAvailable Enables you to hide the respective checkbox in the dialog Value Meaning 0 Checkbox will be hidden 1 Checkbox will be available Default 1 TXT FrameChar Specifies the framing character for the columns Value Meaning NONE No framing g as framing character as framing character TXT SeparatorChar Specifies the separator character 383 The Export Modules Value Meaning NONE No separator TAB Tab as separator BLANK Blank as separator aS separator as separator TXT lgnoreGroupLines Allows group header and footer lines to be ignored in the resulting text file Value Meaning 0 Group lines are exported 1 Group lines are ignored Default 1 TXT lgnoreHeaderFooterLines Allows header and footer
363. ources of the DLL for a calling program Almost all DLL commands require the return value of this function as the first parameter Parameter nLanguage Chosen language for user interactions dialogs Value Meaning CMBTLANG_DEFAULT Default language use settings in Windows For other languages see header file declarations 200 Function Reference CMBTLANG_GERMAN German CMBTLANG_ENGLISH English Further constants can be found in your declaration file If this parameter is or ed with the constant LL JOBOPENFLAG_NOLLXPRE LOAD no List amp Label extensions will be preloaded Return Value A handle which is required as a parameter for most functions in order to have access to application specific data A value less than 0 shows an error Hints For ease of maintenance we suggest putting global settings in one place immediately after the LV obOpen call dialog design callback modes expression mode The C LL21 DLL requires the language dependent components which are stored in a separate DLL e g C LL2100 LNG or C LL2101 LNG They are loaded depending on the language setting See also chapter 1 List amp Label is no longer required then the job should be released with the unction LU obC ose to give the DLL a chance to release the internal variables or this job any additional language kits are available Ask our sales department for urther information or have a look at our web site at www combit net The
364. output L Print etc Functions like LIPrintGetCurrentPage L PrintGetOption or LiPrintEnableObject are allowed See Hints for the use of GDl objects Example case LL_CMND_DRAW_USEROBJ pSCD PSCLLUSEROBJ pSC gt lParam FillRect pSCD gt _hPaintDC pSCD gt _rcPaint GetStockObject atoi lpszContents break LL_CMND_EDIT_USEROBJ Task Requests the program to start an object specific dialog through which the user can enter and change the corresponding presentation parameters Activation L1DefineVariableExt hJob lt Name gt lt Contents gt LL DRAWING USEROBJ DLG lt Parameter gt Parameters Meaning of the parameter IParam Pointer to an scL EditUserObj structure _nSize Size of the structure sizeof scL EditUserOb 284 Callback Reference _lpszName Name of the variable which is assigned to the object _IPara Para of the variable assigned to the object LL DRAWING_USEROBJ or LL DRAWING_USEROBJ_DLG Is identical to the 4 parameter of the call L DefineVariableExt _IpPtr IpPtr of the variable assigned to the object This refers to the 5 parameter of the call L DefineVariableExt _hPara Handle contents of the variable assigned to the object This value is only valid if the variable has been defined by L DefineVariableExtHandle otherwise the value _ pszContents is valid _blsotropic TRUE the object should be drawn undistorted FALSE the drawing should be fitted optimally i
365. ow with network spooler print nReserved for future extensions Return Value Error code Hints Please check the return value nPrintOptions for LL PRINT NORMAL can be combined with or using LL PRINT MULTIPLE JOBS so that the print job can be split into several smaller individual jobs The number of the page after which the job should split can be set with L PrintSetOption No abort dialog box is displayed see L PrintWithBoxStart Example HLLJOB hJob hJob LlJobOpen 0 if L1PrintStart hJob LL PROJECT _LABEL test LL_PRINT_ NORMAL 0 236 Function Reference EATR E Ay cox eile L1PrintEnd hJob else MessageBox NULL Error List amp Label MB OK LlJobClose hJob See also LIPrintWithBoxStart LIPrintEnd LIPrintSetOption LIPrintUpdateBox Syntax INT L1PrintUpdateBox HLLJOB hJdob Task Allows redrawing of the abort box used if you print with L PrintWithBoxStart Parameter hJob List amp Label job handle Return Value Error code Hints This is basically a message loop This function should be called if you run lengthy operations to get your data as it allows the dialog box to react to any necessary window repaint or an abort button press List amp Label implicitly calls this function on L Print LiPrintFields or L PrintSetBoxText calls so it is only needed if your own processing lasts some time See also LIPrintWithBoxStart LIPrintSetBoxTe
366. ow you can use the List amp Label NET help by pressing F1 in Visual Studio at any time To remove the List amp Label NET Help from Visual Studio 2010 Help Viewer please follow the above steps and select Remove content instead 2 1 2 Components In the tab combit LL21 in the toolbox the following components can be found after the installation Components Description ListLabel The most important component All essential functions such as print design and export are combined in it DataSource A component that can be directly bound to a ListLabel instance as a data source A description can be found in section Data Provider DesignerControl A component for displaying the Designer in custom forms ListLabelRTFControl A RIF editor component for use in custom forms ListLabelPreviewControl A preview control that can also be used in custom forms and supports the direct export to PDF for example To perform a print into such a preview control set th property AutoDestination to LIPrintWode PreviewControl in the e e 0 ListLabel component and select th desired preview control for th PreviewControl property ListLabelDocument A descendant of PrintDocument The Programming With NET Components Description built in NET preview classes can be used for displaying List amp Label preview files with it ListLabelWebViewer An ASP NET control for displaying preview files in Internet Explo
367. page and fields are the record dependent data These are printed using L PrintFields When calling L Print the objects that are not lists are printed as well as the list headers if the option LL OPTION_DELAYTABLEHEADERLINE is not set otherwise the table header will be delayed until the first data line is to be printed List amp Label then expects the records to be defined With every L PrintFields it is tested whether the data record to be printed fits onto the current page If this is not the case LL WAN_REPEAT DATA is returned which indicates that a new page should be started In this case don t increment the record pointer When the table is full the variables for the next page must be defined before calling LIPrint as with this L Print any linked objects are printed the new page is started and see above the objects on the new page including list headers printed A forced page break is possible by calling L Print at any time which ends the present page if this has already been partially filled Copies Copies can mean two different kinds of copies a Copies of labels usually do not mean that multiple pages should be printed but the copies should be located on labels next to each other To support this get the number of copies before the first L Print call so that you know how many copies should be printed of each label and set the copies for List amp Label to 1 so that List amp Label does not use p
368. planations on the methods and components used can be found in the List amp Label Start Center which is started directly after installation or is available in the start menu group 1 2 4 Documentation You will find all available documentation under the Documentation start menu group This includes the Programmers Manual and the Designer Manual as PDF documents You will also find various online help systems here e g for the Designer or the List amp Label components NET VCL OCX as well as further information on redistribution web reporting debug etc 1 3 Important Concepts 1 3 1 Basic Principles List amp Label is not a standalone application but a development component that is integrated into your application With just a few lines of code you can enhance your application with reporting and printing capabilities of various kinds Reports subreports lists crosstabs charts diagrams gauges forms labels printing print preview export and web reporting Creating Report Templates in the Designer The Designer functionality for interactive visual creation of reports print templates etc is an integrated part of the List amp Label component and therefore will become part of your application The Designer is not a standalone application but it will be programmatically launched from your application This is typically implemented within an event handler triggered by a menu item The Designer will show up as a modal p
369. play List amp Label outputs automatically save them to file convert them to other formats send them as email and more Additionally it can be embedded via a separate component into your own dialogs resp forms or HTML internet intranet pages 1 3 2 Project Types List amp Label can handle different project types label and file card projects on the one hand and list projects on the other 12 Getting Started With Programming Labels and File Cards These projects consist of an arrangement of objects which are printed once file cards or multiple times in columns or rows labels per page Lists Lists on the other hand consist of objects which are printed once per page and one or more objects which are filled repeatedly with varying contents depending on the data records The table crosstab and the report container objects are responsible for these repetitive areas and therefore are only available in this mode 1 3 3 Variables and Fields List amp Label distinguishes between two kinds of data fields on the one hand there are data fields that are filled with content once per printed page once per label or file card these are called variables in the List amp Label terminology On the other hand in a report there are data fields that are filled repeatedly with different contents for a page e g the data fields of an item list of an invoice These data fields are called fields in the List amp Label terminolog
370. plugins or will stop doing so in the near future Because List amp Label s Web Designer had also been provided in the form of a browser plugin starting with version 21 List amp Label uses a browser independent Web Designer which is installed as a regular Windows program on the client In this way the Web Designer no longer appears as a part of the website but instead as an independent desktop program which is launched from your website If the outdated browser plugin based Web Designer is to be used the property PluginCompatibility of the DesignerContro object will need to be set to 44 Usage in Web Applications True We recommend that you switch to Web Designer instead to do so only steps 2 and 3 below are required Basic Concepts e The List amp Label Web Designer needs to be distributed together with your own application To do so you will have to store the setup file at a location of your own choosing on the web server The users of the Designer will then download it and install it on their local computer The Designer launches as an independent program outside the web browser e As was the case for the versions leading up to List amp Label 21 you will need to place DesignerContro on a website under ASP NET WebForms or call the command Htm ListLabelMvcWebDesigner under ASP NET MVC from a view This ensures that the web browser performing the call launches the Web Designer or prompts the user to install it e O
371. points to a structure scLLEXPR2HOSTEXPR For readability the prefix p means that it s a pointer to the argument but in the description we call it the argument _nSize Size of the structure _pszTablelD Table this expression belongs to _nType Type of element that needs to be translated For most operations simply set _pvRes to the resulting statement for the operation If for example _nType is LLEXPR2HOSTEXPR_ARG_ BINARY _OPERATOR_ADD the typical return value would be _pvRes _pv1 _T _pv2 Value Meaning LLEXPR2HOSTEXPR_ARG BOOLEA a boolean value N LLEXPR2HOSTEXPR_ARG_TEXT a text value If you need to parametrize your query to avoid SOL injection attacks set the _pvName member to a parameter name on entry _pvName contains a unique consecutive integer index that you can use for the name if needed and set _pvRes to the resulting text The parameter values will be returned in the corresponding variant passed to L PrintDbGetCurrentTableFilter LLEXPR2HOSTEXPR_ARG_NUMBE a numeric value _pvArg1 gt vt is R either VT_l4 for an integer oder VT_R8 for a floating point value LLEXPR2HOSTEXPR_ARG_ DATE a date value 311 API Reference 312 _OPERATOR _OR _OPERATOR_AND LLEXPR2HOSTEXPR_ARG_UNARY_ OPERATOR_SIGN LLEXPR2ZHOSTEXPR_ARG_UNARY_ OPERATOR_NEGATION LLEXPR2HOSTEXPR_ARG_BINARY_ OPERATOR_ADD LLEXPR2HOSTEXPR_ARG_BINARY_ OPERATOR_SUBTRACT LLEXPR2HOSTEXPR_ARG_BINARY_ OPERATOR_MULTIPLY
372. ported e Shadow Pages are not supported e The option Separators fixed in the table object is not supported e The option Fixed size in the table object is not supported e The wrapping option Minimum Size in the crosstab object is not supported Programming Interface You can find a description of all options used in the DOCX export module in this chapter These options can be modified read by the application using the methods LIXSetParameter DOCX and LIXGetParameter DOCX 389 The Export Modules Resolution Defines the resolution in dpi for the generation of pictures Default 96dp screen resolution Picture BitsPerPixel Defines the color depth of the generated pictures Value Meaning 1 Black amp White 24 24bit True Color Default 24 Verbosity Rectangle Configures how rectangle objects should be exported Value Meaning 0 Ignore object 1 Object as rectangle 2 Object as picture Default 1 Verbosity Barcode Configures how barcode objects should be exported Value Meaning 0 Ignore object 1 Object as picture Default 1 Verbosity Drawing Configures how picture objects should be exported Value Meaning 0 Ignore object 1 Object as picture Default 1 Verbosity Ellipse Configures how ellipse objects should be exported Value Meaning 0 Ignore object 1 Object as ellipse 2 Object as picture Default 1 Verbosity Line Contigures how line objects should be exported Va
373. ppear transparently Rotated RTF texts and pictures are not supported Distances within table cells are not supported Paragraph spacing is not supported Frames narrower than pt about 0 4 mm in List amp Label will not be displayed correctly Frames of the same size in X and Y direction will not be displayed as squares Object frames are not supported Gradient fills are not supported Rotated text is not supported Custom drawings in callbacks are not supported 373 The Export Modules e TotalPages may not be used in rotated text objects e Paragraph distances are not supported e Issue print is not supported e Shadow Pages are not supported e Nested tables are only supported one level i e no subtable support if they are not exported as picture see Verbosity NestedTable below e The wrapping option Minimum Size in the crosstab object is not supported Known other issues e Frames smaller than V2 pt will not be displayed correctly e Positon frames in Word are handled unusual because length properties are interpreted incorrect by Word e Small line objects may be not displayed because the corresponding bitmap gets an offset causing the line object to be out of the frame e Word 2000 and later will not display table frames correctly e Word 2000 will not display the index correctly e Distances between cells are not supported e Not all colors that can be used in List amp Label are interpreted
374. prEvaluate HLLJOB hJOB HLLEXPR lpExpr LPTSTR lpBuffer UINT nBufferSize Task Evaluates an expression Parameter hJob List amp Label job handle pExpr The pointer returned by the corresponding L ExprParse pBuffer Address of buffer for calculated value nBufferSize Maximum number of characters to be copied Return Value Error code Hints The buffer is always filled with a zero terminated string Depending on the type of result the buffer contents are to be interpreted as follows Type Meaning LL_EXPRTYPE_STRING The buffer contents are the result string LL_EXPRTYPE_DOUBLE The buffer contents are the corresponding representation of the value for pi e g 3 141592 The value is always specified with 6 decimal places LL _EXPATYPE_DATE The buffer contains the corresponding representation of the Julian value for example 21548263 LL_EXPRTYPE_BOOL The buffer contains either the string TRUE or FALSE LL_EXPRTYPE_DRAWING The buffer contains the name of the drawing variable drawing field not the contents 182 Function Reference LL_EXPRTYPE_BARCODE The buffer contains the value which would be interpreted as the barcode See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value Example See LIExprParse See also LIExprParse LIExprType LIExprError LIExprFree LIExprFree Syntax void LIExprFree HLLJOB hJob HLLEXPR 1pExpr Task
375. problems there as easily as possible a dedicated debug tool is available which provides a logging function for problems occurring rarely or only on certain systems so problems can also be examined under systems without a debugger Of course the logging function can also be used on the developer PC and provides the possibility to check all calls and return values at a glance as well Create Log File If a problem only occurs on a customer system the first thing to do is to create a log file The tool Debwin3 can be used for this purpose It can be found in the Tools directory of the List amp Label installation Debwin3 has to be started before the application By Logging gt Force Debug Mode the logging is forced If the application is started afterwards all calls of the component with their return values as well as additional information about module versions operation system etc will be logged Every exception thrown under NET represents a negative value of a function in the log There is usually more helpful information in the log a typical output could look as follows CMLL21 12 30 02 082 0000 df 2 3 L1SelectFileDlgTitleEx 2 0X00131 BE NULL x 0008002 0X0344F7C8 260 00000000 CMLL21 12 30 03 672 0000 df 2 4 99 The user aborted the print gt EDT First to be seen is the DLL which causes the output a timestamp for the output the thread ID of the output thread a consecutive number as well as
376. program that displays the result will be determined by the registered file extension Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with the first generated graphic file Default 0 Export ShowResultAvailable Enables you to hide the respective checkbox in the dialog 364 Programming Reference Value Meaning 0 Checkbox will be hidden 1 Checkbox will be available Default 1 TIFF CompressionType Specifies the compression type for the TIFF export Please note that not all viewers support compression For CCITTRLE CCITT3 and CCITT4 Picture BitsPerPixel must be set to 1 or to 24 for JPEG Value Meaning None No compression CCITTRLE CCITT Modified Huffmann RLE CCITT3 CCITT Group 3 Fax encoding CCITT4 CCITT Group 4 Fax encoding JPEG JPEG DCT compression ZIP ZIP compression LZW LZW compression Default None TIFF CompressionQuality Specifies the compression quality for the TIFF export Default 75 7 3 6 PDF Export Overview The PDF export module creates documents in the Portable Document Format This format can be viewed platform independently with the free Adobe Acrobat Reader software Limitations Besides others the following hints and limitations should be considered e Unicode Multibyte characters will be embedded through CID character identifier Please make sure to set this mode in the print out dialog Japanese and Chinese characters require that the corresponding
377. pse Configures how ellipse objects should be exported Value Meaning 0 Ignore object 1 Object as picture Default 1 Verbosity Line Configures how line objects should be exported Value Meaning 0 Ignore object 1 Object as line 2 Object as picture Default 1 Verbosity Text Configures how text objects should be exported Value Meaning 0 Ignore object 1 Object as text object 2 Object as picture Default 1 Verbosity RTF Configures how RTF objects should be exported Value Meaning 0 Ignore object 1 As unformatted text 347 The Export Modules 2 Object as picture Default 1 Verbosity Table Configures how table objects should be exported Value Meaning 0 Ignore object 1 As a complete table object Default 1 Verbosity LLXObject Configures how LLX objects e g chart object should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 XLS FontScalingPercentage Scaling factor for the font sizes Necessary in order to compensate for the increased text height in Excel Default 89 XLS PrintingZoom Scaling factor for the printout of the project Necessary in order to compensate for the inability to place any objects in the non printable area Default 88 88 zoom XLS lgnoreGroupLines Allows group header and footer lines to be ignored in the resulting Excel file Only effective if Export OnlyTabledata has been set see below Value Meaning 0 Group lines are exported 1 Group
378. pty _bError TRUE error occurred FALSE no error occurred Default FALSE _szError Array where a possible error definition can be stored which can be requested later with L ExprError This text is also displayed to the user in the Designer during the automatic syntax check in case of an error Return Value _IResult 0 always Hints If for example the expression in a formula is Name External Name forename then the parameter is the evaluated result of the formula Name forename in this case for example Smith George Important the return fields must be zero terminated and may not exceed the maximum length 16385 characters incl termination for the return value 128 characters incl zero termination for the error string LL_CMND_GETVIEWERBUTTONSTATE Task Using this callback List amp Label asks the application about button states of the preview s toolbar buttons Activation Always activated Parameters HIWORD IParam Tool button ID LOWORD IParam State defined by List amp Label 287 API Reference Return Value _IResult New State Meaning 0 no change 7 enabled 2 disabled 1 hidden Hints This function will be called by the preview by List amp Label The IDs of the menu items in List amp Label can be found in the file MENUID TXT of your List amp Label installation Example case LL _ CMND_GETVIEWERBUTTONSTATE switch HIWORD 1Param
379. r hJob List amp Label job handle Return Value Error code 163 API Reference Hints Does not necessarily have to be called However as with every L DeftineVariable the internal variable list is checked for a variable which is already available with the same name and type this can be somewhat accelerated with this function Otherwise you only need to redefine the variables whose contents change as the old contents of the variable are over written the contents of the remaining variables remain the same If you use L PrintlsVariableUsed LiDefineVariableStart may not be called after the invocation of L Print WithBox Start otherwise L Printls Variable Used will always return FALSE Important This function must not be called within the print loop Example HLLJOB hJob hJob LlJobOpen 0 L1DefineVariableStart hJob L1lDefineVariable hJob Name Smith L1lDefineVariable hJob Forename George 6 BEC a o gt LlDefineVariable hJob Forename James GE EGS FGA LlJobClose hJob See also LIDefineVariable LIDefineVariableExt LIDefineVariableExtHandle LIGetVariableContents LIGetVariableType LIDesignerAddAction Syntax INT L1lDesignerAddAction HLLJOB hJob UINT nID UINT nFlags LPCTSTR pszMenuText LPCTSTR pszMenuHierarchy LPCTSTR pszTooltipText UINT nIcon LPVOID pvReserved Task Extends the Designer s menu and optionally the toolbar of the Designer In contr
380. r Syntax INT L1XSetParameter HLLJOB hJob INT nExtensionType LPCTSTR pszExtensionName LPCTSTR pszKey LPCTSTR pszValue Task Sets parameters in a specific extension module Parameter hJob List amp Label job handle nExtensionType Type of extension Value Meaning LL_LLX_EXTENSIONTYPE_EXPOAT Export module LL LLX_EXTENSIONTYPE_BARCODE 2D barcode module pszExtensionName Name of the extension HTML RTF PDF417 pszKey Name of the parameter pszValue Value of the parameter Return value Error code 282 Hints Callback Reference The keys known by the extension modules are specific to them Please refer to the documentation for the respective module Using this function you can preset certain options of a module for example the path of the output file See also LIXGetParameter 6 2 Callback Reference LL_CMND_DRAW_USEROBJ Task Tells the program to draw the object defined by the user Activation L1DefineVariableExt hJob lt Name gt lt Content gt LL DRAWING _USEROBJ lt Parameter gt L1DefineFieldExt hJob lt Name gt lt Content gt LL DRAWING _USEROBJ lt Parameter gt or L1DefineVariableExt hJob lt Name gt lt Content gt LL DRAWING USEROBJ DLG lt Parameter gt Parameters Pointer to an scL DrawUserOby structure _nSize Size of the structure s zeof scL DrawUserObj _IpszName Name of the variable assigned to the object _IlpszConten
381. r objects getting lost when dealing with very complex custom EMF records Set to 1 to enable default 0 Export Path Path where the exported files should be saved If this option is empty a file selection dialog will always be displayed Export File File name of the document Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 0 Export with user interaction dialogs 1 No dialogs or message boxes even overwrite warnings will be displayed only if Export Path was specified Default 0 Export ShowResult Specifies whether the export result will be displayed automatically The program that displays the result will be determined by the registered file extension 368 Programming Reference Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with Export File Default 0 Export ShowResultAvailable Enables you to hide the respective checkbox in the dialog Value Meaning 0 Checkbox will be hidden 1 Checkbox will be available Default 1 PDF PDFAMcade Use to create a PDF of type PDF A Value Meaning 0 no PDF A is created 1 create a PDF A 1a Default 0 PDF Author Set the Author tag of the PDF file Default empty PDF ZUGFeRDXmIPath Defines the path to a ZUGFeRD compliant XML file which should be embedded in the final PDF The XML file must be created before by the application itself 7 3 7 PowerPoint Expo
382. r and addressee Fields on the other hand usually change for every record a typical example would be the item data of an invoice Within the Designer variables are always offered outside of the report container the table area fields only inside of it and can only be used there The separation serves mainly to help the end user If he were to place a field in the outside area the result would depending on the print order either be the content of the first or the last record Both identifier types fields and variables can be ordered hierarchically and are displayed in a folder structure in the Designer The database table names are automatically added by the databinding so that all data from the OrderData table are displayed in a folder OrderData Custom data can also be ordered hierarchically by using a dot as a hierarchy separator e g AdditionalData UserName How to add custom data can be found in the section Database Independent Contents Variables and Fields With Databinding Consider the case of a 1 n linked data structure such as InvoiceHeader or Invoiceltems The header data should usually be declared as variables whereas the actual invoice items should be declared as fields The properties DataWMember and AutoMasterMode can be used to achieve this C ListLabel LL new ListLabel LL DataSource CreateDataSet Order data as variables LL DataMember InvoiceHeader LL AutoMa
383. r in data source native syntax The translation has to be performed in the LL QUERY EXPR2HOSTEXPRESSION callback This callback is triggered for each part of the filter expression that is used in the Designer Parameter hJob List amp Label job handle pvFilter This parameter receives the translated filter expression As usual for VARIANTs it must be initialized before Variantlnit and freed after use VariantClear 212 Function Reference pvParams f the filter expression uses parameters see callback documentation this argument receives a VARIANTARRAY with the parameter values As usual for VARIANTs it must be initialized before VariantInit and and freed after use VariantClear Return Value Error code See also LIDbAddTable LL QUERY _EXPR2HOSTEXPRESSION LIPrintDbGetCurrentTableRelation Syntax INT L1PrintDbGetCurrentTableRelation HLLJOB hJob LPTSTR pszRelationID UINT nRelationIDLength Task This function returns the current table relation to be printed Parameter hJob List amp Label job handle pszRelation D Buffer in which the string is to be stored nRelationIDLength Size of buffer Return Value Error code Hints See the hints in chapter Printing Relational Data See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIDbAddTable LIDpbAddTableRelation LIDbAddTableSortOrder LIPrintDbGet CurrentTable L
384. r top bottom left right uses CSS 1 Complete frame as box Default 0 Verbosity RTF Contigures how RTF objects should be exported Value Meaning 0 Ignore object 1 As formatted RTF text parsed and converted to HTML 2 As unformatted text uses the default font specified in the project file 3 Object as JPEG Default 1 354 Programming Reference Verbosity RTF Frames Configures how RTF object frames should be exported Value Meaning 0 Single frames for top bottom left right uses CSS 1 Complete frame as box Default 0 Verbosity Table Contigures how table objects should be exported Value Meaning 0 Ignore object 1 As a table object Default 1 Verbosity Table Cell Configures how table cells should be exported Value Meaning 0 Ignore cell 1 As a cell object using the verbosity settings of the object types specified in the cell 2 Cells as JPEG Default 1 Verbosity Table Frames Configures how table frames should be exported Value Meaning 0 Ignore table frame 1 Only horizontal lines of table frames 2 The whole table line including all frames 3 Cell specific frames uses CSS Default 3 Verbosity LLXObject Configures how LLX objects e g chart object should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Verbosity LLXObject HTMLObj Configures how the HTML object should be exported 355 The Export Modules Value Meaning 0 Ignore object 1 Object a
385. raction at least 1 TO recipient must be set If no recipient is set the dialog will be shown Ae The standard Send mail dialog is displayed The values passed are preset there Default O Export Mail Format Set the default for the file format selection dialog in the preview Valid values are TIFF MULTITIFF LL XML XFDEF XPS PDF JPEG PNG TTY lt emulation gt EMF Export Mail SendResultAs Allows the result of an HTML export to be sent directly as HTML mail text Value Meaning text html If SMTP is chosen as mail provider the export result is used as HTML content of the mail All other mail providers will ignore this option empty The HTML result is sent as attachment Default Empty Export Mail SignResult Value Meaning 0 Email will not be signed 1 Email will be signed Default 0 The SMTP provider offers a set of additional options These generally do not need to be set explicitly but should be set in the LsMai ConfigurationDialog Export Mail SMTP SocketTimeout Socket timeout in milliseconds default 1000 409 The Export Modules Export Mail SMTP LogonName Login name for the server default computer name usually unimportant Export Mail SMTP SecureConnection Connection security Value Meaning 1 Automatic use TLS when server supports it 0 Turn TLS off even when it is supported by the server 1 Force SSL Cancellation when server does not support SSL 2 F
386. rageOpen nPagelndex Page index 1 L StgsysGetPageCount Return value NULL error else handle of enhanced metafile Hints The handle needs to be released using L StgsysDestroyMetafile 323 API Reference Example Excerpt from the code of L StgsysDrawPage HANDLE hMF BOOL bl bit hMF LlStgsysGetPageMetafile hStg nPageIndex if hMF NULL hMF L1lStgsysGetPageMetafilel6 hStg nPageIndex if hMF NULL ret LL_ERR_STG_CANNOTGETMETAFILE else POINT ptPixels POINT ptPixelsOffset POINT ptPixelsPhysical POINT ptPixelsPeriInch ptPixels x L1lStgsysGetPageOptionValue hStg nPageIndex LS OPTION PRN PIXELS X ptPixels y L1lStgsysGetPageOptionValue hStg nPageIndex LS OPTION PRN PIXELS Y ptPixelsOffset x L1StgsysGetPageOptionValue hStg nPageIndex LS OPTION _PRN_PIXELSOFFSET_ X ptPixelsOffset y L1lStgsysGetPageOptionValue hStg nPageIndex LS OPTION _PRN_PIXELSOFFSET_ Y ptPixelsPhysical x LlStgsysGetPageOptionValue hStg nPageIndex LS_OPTION_PRN_PIXELSPHYSICAL X ptPixelsPhysical y LlStgsysGetPageOptionValue hStg nPageIndex LS_OPTION_PRN_PIXELSPHYSICAL_Y ptPixelsPerInch x L1StgsysGetPageOptionValue hStg nPageIndex LS_OPTION_PRN_PIXELSPERINCH_ X ptPixelsPerInch y L1lStgsysGetPageOptionValue hStg nPageIndex LS OPTION _PRN_PIXELSPERINCH_Y lt Paint Metafile gt L1StgsysDestroyMetafile hMF
387. rameter bSuccess TRUE if the file has been transferred FALSE if the download failed Return value 3 9 6 Visual C Hint Visual C at least V 5 0 notifies you with an Assertion Failed message in occcont cpp that something is incorrect This assertion is only in the debug build and results from the ATL library we used for this control 74 The Designer OCX Control 3 9 7 CAB Files Packaging A CAB file is supplied with List amp Label 3 9 8 Inserting the OCX Into Your Internet Page As stated above the control can be inserted into an Internet page Properties can be set via lt PARAM gt tag or scripts Take a look at 21vdemo htm 3 10 The Designer OCX Control 3 10 1 Overview With the control cmll21id ocx the Designer is available as an OCX control Please note that you can t use any Designer extensions e g custom functions with this Designer control Due to its implementation currently only single file projects are supported Also to save bandwidth only one record per table is transferred Amongst others e g no ribbon support the following restrictions apply for the DesignerControl e no support for templates e no support for drilldown e drawings PDF documents etc need to be embedded into the project file forced automatically by the Ul e no real data preview in the Designer 3 10 2 Registration The control can be registered in the usual way with the command REGSVR32 CMLL21ID OCX or by the progra
388. rameters 1 MinimumParameters 1 Name RomanNumber Parameter 1 TLI13XFunctionParameter Parameter2 TLI13XFunctionParameter Parameter3 TLI13XFunctionParameter Parameter TLI13XFunctionParameter ResultType ptall Tag 0 Visual Visible All shown HHAB Y Property Description Name The unique name of the designer function Description An additional description of the function for the formula wizard GroupName The group in which the function is displayed in the formula wizard Visible Indicates whether or not the function will be displayed in the wizard MinimumParameters The minimum number of parameters Permissible values between 0 and 4 MaximumParameters The maximum number of parameters Here too permissible values between 0 and 4 The value must be equal to or greater than the minimum number Increasing the number results in optional parameters Parameter 4 The configuration for each of the four parameters can be 85 Programming With the VCL Component customized Type The data type of the parameter Description A description of the parameter for the tooltip help in Designer ResultType The data type of the return value Using the properties you can customize the configuration of the new Designer function In order to bring the function to life you have to handle the event OnEvaluateFunction Using the event arguments you gain access to the parameters entered by the user For example to return the R
389. ramming Using the API The message value which List amp Label uses can be queried by L GetNotitficationMessage If the default setting is not suitable for your purposes by definition a unique value another can be chosen with L SetNotificationMessage wParam is once again our function index and Param points to an intermediate structure of the type scLICallback struct scL1Callback int _nSize LPARAM _1Param LRESULT _1Result UINT_PTR _1UserParameter The necessary _ Param as parameter value and _ Result as return value are stored in this structure nLLMessage L1lGetNotificationMessage hJob Hoon in the window procedure if wMsg nLLMessage PSCCALLBACK psc PSCLLTABLEFIELD pSCF pSC PSCCALLBACK 1Param switch wParam case LL_CMND_TABLEFIELD pSCF PSCLLTABLEFIELD pSC gt _1Param do something pSC _1Result break _ UserParam is the value passed by L1SetOption hJob LL_OPTION_CALLBACKPARAMETER lt value gt This can be used to store an object pointer this self in object oriented languages When no special return value is needed the AResult field doesn t need to be changed as it is set to 0 by default 120 Advanced Programming 5 6 6 Further Hints Some callback structures for drawing operations contain two device contexts Both are identical and kept only for backward compatibility reasons If you select a GDI object in this DC or make other c
390. rate XLS worksheet for each page Value Meaning 0 Create separate worksheet for each page 1 All pages are added to the same worksheet Default 1 XLS WorksheetName Configures the name of the worksheet s You can use the format identifier Yd in the name It will be replaced by the page number at runtime ex Report page d XLS FileFormat Configures the file format Value Meaning 0 Format is recognized automatically by the file extension 1 Office XML XLSX format will be used 349 The Export Modules Value Meaning 2 Excel XLS format will be used Default 0 Export Path Path where the exported files should be saved If this option is empty a file selection dialog will always be displayed Export File File name of the document Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 0 Export with user interaction dialogs 1 No dialogs or message boxes will be displayed only if Export Path was specified Default 0 Export ShowResult Specifies whether the export result will be displayed automatically The program that displays the result will be determined by the registered file extension Value Meaning 0 Result will not be displayed automatically 1 Calls She Execute with Export File Default 0 Export ShowResultAvailable Enables to hide the respective checkbox in the dialog Value Meaning 0 Checkbox will be hidden 1 Checkbox will be ava
391. rder to create a Menu Draft with a sub point Invoices use Draft Invoices as a menu text pszMenuHierarchy Menu hierarchy of the new menu item The description is given in the form of lt Level gt lt Level gt whereby Level is always the 0 based index of the menu entry For example to insert a new entry in the first place in the Edit menu use 1 0 and LLDESADDACTION_MENUITEM_INSERT pszTooltipText Text for the tooltip on the toolbar command button Will only be evaluated if the flag LLDESADDACTIONFLAG_ADD_TO_TOOLBAR is set May be NULL nicon con ID for the command button Will only be evaluated if the flag LLDESADDACTIONFLAG_ADD_TO_TOOLBAR is set Use the program IconSelector exe in the Tools directory to see the list of available icons with their IDs pvReserved For future extensions must be NULL 165 API Reference Return Value Error code Hints To execute the actual action the LL_ CMND_SELECTMENU Callback has to be processed See also LIDefineLayout LIDesignerFileOpen Syntax INT L1lDesignerFileOpen HLLJOB hJob LPCTSTR pszFileName UINT nFlags Task Opens the specified project file when the Designer is open Parameter hJob List amp Label Job Handle pszFileName Project file name including path nFlags Combination ORed of a flag from the following two groups at any one time Value Meaning LL_DESFILEOPEN_OPEN_EXISTIN File must already exist otherwise an Error
392. re relevant for the project exists If for example network printers are used in the project that are currently not available waiting time will occur FALSE List amp Label checks if the printers that are relavant for the project exist default LL_OPTION_NOPRINTJOBSUPERVISION With this option monitoring of the print jobs can be switched on see LL_INFO_PRINTJOBSUPERVISION Default TRUE LL_OPTION_NOTIFICATIONMESSAGEHWND Sets the window that is to receive notification messages callbacks when no callback procedure is explicitly set Usually events are sent to the first non child window starting with the window handle given in L DefineLayout or LiPrintWithBoxStart You can modify the destination with this call Default NULL default behavior LL_OPTION_NULL_IS_NONDESTRUCTIVE List amp Label handles NULL values according to the SQL 92 specification where possible An important effect of that is that functions and operators which get NULL values as parameter or operator generally also return NULL as the result An example is the following Designer formula Title Firstname Lastname If Title is filled with NULL the result of the formula is also NULL according to the standard As it often can be desired to get Firstname Lastname instead the option LL OPTION NULL IS NONDESTRUCTIVE defines that NULL values do not result in the complete expression to become NULL against the specification but accord
393. reate a new project in the Designer e The menu items File gt Save as and File gt Open are not available e Project includes are deactivated e Drilldown is not available e The Designer function ProjectPath is not available In the case of designing it can happen of course that the passed stream is being modified In this case you have to write the updated stream into the database after designing C ListLabel LL new ListLabel LL DataSource CreateDataSet byte report GetReportFromDatabase MemoryStream memStream new MemoryStream report LL Print LlProject List memStream LL Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Dim report As Byte GetReportFromDatabase Dim memStream As New MemoryStream report 61 Programming With NET LL Print LlProject List memStream LL Dispose 2 5 14 Network Printing When printing in the network keep the following two points in mind C e Preview files are usually created in the same directory as the project file by the name of the project file and the extension LL If two users want to print the same file to preview the second user receives an error message This can be avoided by setting L PreviewSet empFPath see example below e The same applies for printer settings files These also will with the currently selected extension be searched for or created in the directory of the project file L Set
394. rer and Firefox 2 2 First Steps This paragraph guides you through the first steps that are required to integrate List amp Label in your existing application 2 2 1 Integrate List amp Label First a reference to the List amp Label assembly has to be added to the project It is located in the directory Programming Samples and Declarations Microsoft NET of the installation Via Project gt Reference the assembly can be added to the project The assembly combit ListLabel21 dll supports the full NET Framework If the NET Client Profile is desired as a target platform instead the assembly combit ListLabel21 ClientProfile dll has to be referenced The NET Client Profile is a subset of the NET Framework From Visual Studio 2010 on it is the standard target platform for Winforms applications We recommend that you select the full Framework in the properties of the application project as a target at first and reference the combit ListLabel21 dll assembly to have SmartTags support and property editors at design time After the design stage the target platform can be edited if necessary and the ClientProfile assembly can be referenced In the second step an instance of the component can be created This can be done either by the development environment directly by dragging the ListLabel component onto a form Alternatively the component can also be created dynamically C combit ListLabel21 ListLabel LL new combit ListLabel
395. rinter copies too 105 Programming Using the API user can change the number of copies L1PrintOptionsDialog hJob hWnd Printing nCopies L1PrintGetOption hJob LL_PRNOPT_COPIES L1PrintSetOption hJob LL_PRNOPT_COPIES 1 Then print the requested number of labels for nCopy 1 nCopy lt nCopies amp amp nError 0 nCopy nError L1Print hJob support AUTOMULTIPAGE usually memos in file cards while nError LL_WRN_REPEAT_DATA nError L1Print hJob b True copies of the sheets that is identical pages This kind of copies is directly handled by List amp Label so no special handling from the developer is necessary Speed Optimization a Application optimization At first variable definitions which are to be constant during printing can be pulled out of the print loop If you want to always print your company name in the letter head with lists it s best to define it outside the loop before L PrintWithBoxStart b Is the variable field used You can also query which variables or fields are used in the expressions If the number of potential variables or fields is much bigger than the actually used number or getting the data values is complex sub queries calculations etc using these functions is worth it Calling L GetUsed dentifiers returns all variables and fields used in the project L GetUsed dentifiersEx furthermore allows to differentiate between the type variabl
396. rogramming Interface cee ceeeeceeceeceeeeeeeeeeeeeeeeneeeeeeeeeeeteeees 405 7 5 Send Export Results via E Mail cccccccccceeeeeeeeeeeceeeeeeeeeeeeeeeeeeeeeeeeess 407 7 5 OVETVICW ina e e A ie a Na a E 407 7 5 2 Setting Mail Parameters by Code sssa sssssssriiiiessrerrrrrsssrerrrrrnn 407 7 5 3 Sending Mail via 64 Bit Application cece ee teeeeteeeeees 412 7 6 Export Files as ZIP Compressed Archive cccccccceececeeeeeeeeeeeeeeeeeeeeeeess 412 8 Miscellaneous Programming Topics ccccceeeeeeeeeeeeeeeeeeeeeeeeeeeeees 414 8 1 Passing NULL Values aei tettek aaea ai ea aeea a detent cesdbeeeevedveagees tees 414 8 2 ROUNGING MEA A AE EE EE EEEE EE O EE AAT 414 8 3 Optimizing Speed cccecceeeeeeeeeeceeeeeeeeeeeceeeeeeeeeeeeeeeseeeeeeeseeseeeeeereeenegs 414 8 4 Project Parameters cccccecccesssssceeeeeeeeeseseeeeeeeeesseesaaeeeeeeeessesesaaees 415 8 4 1 Parameter TY DOS turnip ien i a e e iaaa 415 8 4 2 Querying Parameter Values While Printing 0 ceeeees 416 8 4 3 Predefined Project Parameters ccccceececeeeceeeeeeeeeeeeseseaees 416 8 4 4 Automatic Storage of Form Data cccceeccecceeeeeeeeteeeeeeeteeeees 417 8 5 Web Reporting ssr at eetet tis cad i orae en a a a E ge a ai 419 8 6 Hints for Usage in Multiple Threads Multithreading ccccceeeeeeees 420 o T E a a a COdCS iis e E aa 421 9 1 General Error COGS ccccccccceeeeeceeeeeeeeeee
397. rstField HLLJOB hJob UINT nFlags Task Returns an iterator for the first field The name does not have to be known the fields are returned in the order in which they are declared to List amp Label Parameter hJob List amp Label job handle 179 API Reference nFlags Flags for the allowed types of fields to be or ed LL TEXT LL BOOLEAN LL BARCODE LL DRAWING LL NUMERIC LL DATE LL_HTML LL_RTF LL_TYPEMASK to iterate all of them Return Value Iterator of first field or NULL if no field exists Hints During the iteration a call to L DefineFieldStart is prohibited See also LIEnumGetFirstVar LIEnumGetNextEntry LIEnumGetEntry LlEnumGetFirstVar Syntax HLISTPOS LlEnumGetFirstVar HLLJOB hJob UINT nFlags Task Returns an iterator for the first variable The name does not have to be known the variables are returned in the order in which they are declared to List amp Label Parameter hJob List amp Label job handle nFlags Flags for the allowed types of fields to be or ed LL TEXT LL BOOLEAN LL BARCODE LL DRAWING LL_NUMERIC LL DATE LL_RTF LL_HTML LL_TYPEMASK to iterate all of them Return Value Iterator of first variable or NULL if no further variable exists Hints During the iteration a call to L DefineVariableStart is prohibited Internal variables are not iterated See also LIEnumGetFirstField LlEnumGetNextEntry LIEnumGetEntry LIEnumGetNextEntry
398. rt Overview The PowerPoint export module creates documents in Microsoft PowerPoint format The creation is executed independently from the installation of the product it is therefore natively supported A full layout preserving export is executed Limitations Please note the following limitations and hints for the PowerPoint export module e Requires NET Framework 3 5 e Compatible with Microsoft PowerPoint 2007 and higher e It is recommended that the width of all columns of a line matches the total width of the report container During the design try to always justify the borders of different cells that occur in multiple table sections header line data line etc or multiple line definitions Otherwise the result can be falsified in Microsoft Word e Columns cannot be smaller than 0 54 cm 5 4mm All columns will be automatically resized to this Size by Microsoft PowerPoint 369 The Export Modules e Fonts will be reduced by 1 otherwise the result can be wrong in Microsoft PowerPoint e Table lines that contain a picture will be exported with a fixed height e A mix of different page formats is not supported To achieve an export of e g portrait and landscape format all pages of the same format can be each exported to a separate document e Tabulators are not supported e Issue print is not supported e Shadow Pages are not supported e Nested tables will be exported as image by default e The wrapping opt
399. rther information Parameters that are not defined prior to L DefineLayout or were defined with the PRIVATE Flag are not editable For example the application could pass the value for LL Mail To using an email field here EMAIL from a database L1SetDefaultProjectParameter hJob LL MAIL To EMAIL The user may then add a FIRSTNAME and NAME field in order to enhance the address FIRSTNAME NAME lt EMAIL gt The preview control automatically adopts the values of LL FAX and LL MAIL In addition the values are passed to the export modules these also use the user defined contents Please note a change in the behavior of the export modules up to version List amp Label 9 if the user enters an email address in the settings dialog the export result will always be sent to this address regardless of the settings made using LlXSetParameter We recommend setting all mail settings using the project parameter API Unchanged projects should behave as before 8 4 4 Automatic Storage of Form Data If you are using the form elements it is possible to perform automatic storage after completion of the preview with the project parameters Besides the automatic storage of form data these parameters can also be used to define the file names for 417 Miscellaneous Programming Topics sending e mail out of the preview and for defining the default settings for saving out of the preview For
400. s concerning the buffer return value Example The following example traverses the list of variables and prints all of them LL_TYPEMASK is the constant for all possible variable types HLISTPOS hPos LlEnumGetFirstVar hJob LL_TYPEMASK while hPos NULL TCHAR szName 64 1 TCHAR szContents 256 1 LlEnumGetEntry hJob hPos szName sizeof szName szContents sizeof szContents NULL NULL printf s Ss n szName szContents 178 Function Reference hPos LlEnumGetNextEntry hJob hPos LL_TYPEMASK See also LIEnumGetFirstVar LIEnumGetFirstField LIEnumGetFirstChartField LIEnumGetNextEntry LlIEnumGetFirstChartField Syntax HLISTPOS LlEnumGetFirstChartField HLLJOB hJob UINT nFlags Task Returns an iterator for the first chart field The name does not have to be known the chart fields are returned in the order in which they are declared to List amp Label Parameter hJob List amp Label job handle nFlags Flags for the allowed types of fields to be or ed LL TEXT LL BOOLEAN LL BARCODE LL DRAWING LL NUMERIC LL DATE LL HTML LL_RIF LL_TYPEMASK to iterate all of them Return Value terator of first chart field or NULL if no field exists Hints During the iteration a call to L DefineChartFieldStart is prohibited See also LIEnumGetFirstVar LIEnumGetFirstField LIEnumGetNextEntry LIEnumGetEntry LlEnumGetFirstField Syntax HLISTPOS LlEnumGetFi
401. s 5 characters in the range of 1 to 255 ASCII code resulting in 40 bit encryption The password is not absolutely secure as it is passed by an API However the barrier to stealing project files is quite high LL_OPTIONSTR_SAVEAS_PATH The passed parameter will be used as default path for save as from the preview The path may contain path and file name LL_OPTIONSTR_SHORTDATEFORMAT The string used to convert a date in a string in date lt Date gt x and for automatic type conversion L ExprEval Concat Format and Default See Windows API GetLocale nfo LOCALE_USER_ DEFAULT LOCALE SSHOATDATE LL_OPTIONSTR_THOUSAND This represents the string that is used as thousands separator in the fstr function The default is the value of the user settings in the system but this will be set to the respective locale value on LL_ OPTION _LCID LL_OPTIONSTR_VARALIAS This option enables you to localize the field and variable names for the Designer The provided alias will be displayed within the Designer instead of the field variable name Only the original names will be stored when saving the file The project can thus be localized by supplying suitable alias names The option string needs to be set for each name that should be localized in the form lt alias gt lt original name gt e g L1SetOptionString hJob LL_OPTIONSTR_VARALIAS Vorname FirstName L1DefineVariable hJob FirstName John
402. s JPEG 2 Object as embedded HTML Only the HTML text between the lt BODY gt and lt BODY gt tags will be exported Please note the hint on exporting limitations Default 2 HTML Title Specifies the title of the generated HTML document Default Title used with L PrintWithBoxStart Layouter Percentaged This option configures whether the layout should be defined in absolute values or with values expressed as percentage Value Meaning 0 Layout of the X coordinates in absolute values pixel 1 Layout of the X coordinates with values expressed as percentage Default 0 Layouter FixedPageHeight Configures whether all pages should be forced to have the same page height Value Meaning 0 Layout can shrink on the last page e g if no objects have been placed in the page footer 1 The page height is set as configured Default 1 Export Path Path where the exported files should be saved If this option is empty a file selection dialog will always be displayed Export File File name of the first HTML page Default index htm You may also use printf format strings like Yd in the file name ex Export Page d htm In this case the files for the pages will be named by replacing the placeholder with the correctly formatted page number Otherwise you will get a simple page numbering for the result files Export AllinOneFile Configures the export result format Value Meaning 0 Every printed page will be exported in a si
403. s example assumes that your database contains a field called EMAIL If you want to preset a specific address please note that you need to use single quotes as the passed parameter needs to be evaluated as the formula L1SetDefaultProjectParameter hJob LL Mail To abc xyz de 7 5 3 Sending Mail via 64 Bit Application To be able to send mails from a 32 Bit application via a 64 Bit application e g Microsoft Outlook 64 Bit use the mail proxy in the form of the two files cmMP21 exe cxMP21 exe These require registration via regserver with administrator rights Register both EXE to be able to address 32 Bit applications as well 7 6 Export Files as ZIP Compressed Archive Should for example the results of a picture or HTML export need to be sent by mail it is often more practical to send the export results as a ZIP archive All export formats support a programming interface for this purpose Data compression can be set by the user via a dialog by selecting the option ZIP archive zip from the list of available file filters Alternatively the output can be controlled by code The following options are available Export SaveAsZIP Activates the compression of exported data If this option is set the ZIP Filter will be selected in the dialog Value Meaning 0 Compression is not performed 1 The export data will be compressed into a ZIP archive Default 0 Please note that the user can modify the default settings via t
404. s special ways to use the List amp Label preview format For example you can start a PDF export from the control You can also customize the control to meet your specific needs by displaying hiding the toolbar buttons with the properties of the control It is also possible to respond to the click events of the buttons and store any separate handling routines that may be necessary 4 8 Working With Preview Files The List amp Label Storage API allows access to the LL preview files You can query general information or the specific pages merge several files and save user data To use the Storage API you have to integrate the unit cmbtls21 pas into your project 4 8 1 Opening a Preview File You can open the preview file with the L StgsysStorageOpen function General information about the file can now be accessed using a whole series of other functions 83 Programming With the VCL Component Delphi var hStg HLLSTG begin hStg L1StgsysStorageOpen c test 11 False False end 4 8 2 Merging Multiple Preview Files You can merge multiple preview files To do this you must first open the target file Since write access is required you must pass a false value for the second parameter ReadOnly Using the L StgSysAppend function you can then merge the files Delphi var hStgOrg hStgAppend HLLSTG begin hStgOrg L1StgsysStorageOpen c test1 11 False True hStgAppend L1StgsysStorageOpen c test2
405. s the printer configuration from the printer configuration file of List amp Label Parameter hJob List amp Label job handle nObjType LL PROJECT LABEL LL PROJECT_CARD or LL PROJECT LIST pszObjName File name of the project nPrinter Index of the printer to be queried O first 1 second If you pass values starting from 100 e g in a loop until you receive LL_ERR_PARAMETER as return value you can query the printer for the various layout regions corresponding to their order being set in the Designer via Project gt Page Setup If the project contains only one printer nPrinter must be 1 pszPrinter Address of buffer for printer name If this pointer is NULL and pnSizePrn is not NULL the necessary size of the buffer will be stored in onSizePrn pnSizePrn Address of variable with buffer size Size in characters therefore the doubled size in Bytes must be reserved for the Unicode API 193 API Reference pDM Address of buffer for the DEVMODE structure If this pointer is NULL and pnSizeDm non NULL the necessary size of the buffer will be stored in onSizeDm pnSizeDm Address of variable with buffer size Return Value Error code Hints The DEVMODE structure is defined and described in the Windows API Due to the possibility to define layout regions in the Designer the practical benefit of this function has been quite limited We recommend using the LL object model according to chapter Using the DOM API
406. sage boxes will be displayed only if Export Path was specified Default 0 TTY AdvanceAfterPrint Specities the behavior when the print job is finished Value Meaning FormFeed Form feed ToNextLabel Advances to the next label AfterNextLabel Leaves one blank label as separator TTY Emulation Specifies the emulation used for the export Value Meaning ESC P ESC P emulation ESC P 9Pin ESC P emulation for 9 pin dot matrix printers PlainTextANSI Plain text ANSI emulation PlainTextASCll Plain text ASCII emulation PlainTextUNICODE Plain text Unicode emulation NEC Pinwriter NEC Prinwriter emulation 387 The Export Modules Value Meaning IBM Proprinter XL24 IBM Proprinter XL24 emulation PCL PCL emulation TTY Destination Export target Possible values are LPT1 LPT2 FILE or FILE lt Filename gt If FILE is used a file selection dialog will be displayed TTY DefaultFilename Default file name for this dialog 7 3 13 Windows Fax Export You can send List amp Label documents directly as a fax using the fax service of Windows If you connect a fax modem to such an operating system the fax driver will be automatically installed in most versions of these operationg systems Additional information is needed for automatic fax sending that is no dialog will be displayed for the fax destination cover page etc You can preset these parameters using the LL_OPTIONSTR_FAX option strings see L SetOptionString
407. sed the first column has the index 0 the second 1 etc _rcSpacing Cell distances _pszContents This parameter provides the evaluated content of the cell currently being rendered e g Smith for a column that contains a field Person Lastname You can use this parameter to handle certain values specifically Return Value 0 Hints In this callback no List amp Label functions may be called which will produce output L Print etc 300 Callback Reference If you select a GDI object in these DCs or make other changes e g change the mapping mode you should reverse the changes before ending the routine Hint the API functions SaveDC RestoreDC can help considerably for complex changes the used functions are Windows API function Example case LL CMND_TABLEFIELD pSCF PSCLLTABLEFIELD pSC gt _1Param if pSCF gt _nIndex 1 FillRect pSCF gt _hPaintDC pSCF gt _rcPaint GetStockObject LTGRAY_BRUSBH pSC _ 1Result 0 break LL_CMND_TABLELINE Task Enables the programmer to modify the coloring of individual table lines e g to produce your own zebra mode every other line Activation L1SetOption hJob LL OPTION _ TABLE COLORING LL COLORING PROGRAM In this way the control of the coloring in tables is left to your program the corresponding setting possibilities won t appear LlSetOption hJob LL_OPTION_TABLE COLORING LL_COLORING_DONTCARE With this command List amp
408. ser is allowed to use a new file name for design in order to create a new project Default true AutoProjectType Sets the project type The different project types are described in section Project Types Default LIProject List AutoShowPrintOptions Sets if the print options dialog is displayed or suppressed Default true display AutoShowSelectFile Sets if the file selection dialog is displayed or suppressed Default true display AutoMasterMode Used together with the DataMember property to pass the master parent table of 1 n linked data structures as variables An example can be found in section Variables Fields and Data 2 3 Other Important Concepts 2 3 1 Data Providers Providing data in List amp Label is done with data providers These are classes that implement the interface IDataProvider from the combit ListLabel21 DataProviders namespace Within this namespace a lot of classes are already contained which can 24 Other Important Concepts act as a data provider A detailed class reference can be found in the NET component help For data formats that are apparently not directly supported a suitable provider is found in most cases anyway Business data from applications can generally be passed through the object data provider If the data is present in comma separated form the data provider from the Dataprovider sample can be used Many other data sources support the serialization to XML so that the XmID
409. sible An important effect of that is that functions and operators which get NULL values as parameter or operator generally also return NULL as the result An example is the following Designer formula Title Firstname Lastname If Title is filled with NULL the result of the formula is also NULL according to the standard To change this behaviour please refer to the option LL OPTION _NULL_IS NONDESTRUCTIVE 8 2 Rounding Please read the following important notes to ensure that you do not run into inconsistencies with the data from your database sum variables are not rounded so if you are not using only integers i e invoices we suggest that you use a rounding function or better do not use multiplication or division for sum variables 8 3 Optimizing Speed List amp Label s standard settings are a good compromise between file sizes and performance Change the following settings and mind the following hints to tweak performance for mission critical applications e Make sure a job is opened all the time This prevents the repetitive loading and unloading of DLLs e When printing to preview switch off compression see LL_OPTION_COMPRESSSTORAGE Keep in mind that this might lead to considerably larger preview files though e Set LL_ OPTION _VARSCASESENSITIVE to 1 Note that this will mean that all variables and fields are treated case sensitive from the moment of this change This may render existing projects unusabl
410. signer by Custom FuUnNCtiOn sssssssriressrsrrrrrrrerrrrrrrn 58 2 5 11 Join and Convert Preview Files sssesssssssssssererrrsssrerrrrrnseserrrrren 59 25 12 Sending E Mail kicn apn ea n 60 2 5 13 Store Project Files in a Database ccccccccceececeeeeeeeeeteteeenteeeees 61 25 14 NetWork Printing aspen veh wats eee ating Mini i carey 62 3 Programming With the OCX Component c cccccceeccceettttteeeeeeeeees 64 3 1 Integration of the COMPONENT ee eeeseeeeeeeeeeeeeeeaeeeeeeeeeeessnaeeeeeeens 64 3 2 Simple Print and Design Methods cc ccccceeeeeeeeeeeeeeeeeeeseesnteeeeeeees 64 3 2 1 Working PrinGip le sc uktvcacca celia maaan ten a e ea AS 64 3 2 2 Using the UserData Parametel cc cccccsceeeceeeeeeeteeeeeeeeeeeeeaes 65 3 3 Transferring Unbound Variables and FieldS sssssssesseseeeeeeeeees 65 3 3 1 BAA EUNA ETE Si fae lt A tant al cali I wudnt 66 3 3 2 Barcodes ptni e mankeebatias a a SaaS 66 3 4 Language Selection eeccssccceeeeeeeesseneeeeeeeeeeeessaaeeeeeeeeenesesaaeeeeeeess 66 3 5 Working With Events 0 0 00 cecccecccceeeeeeeeeenneeeeeeeeeeeeeeaeeeeeeeesseseeaaaeeeeeeens 66 3 6 Displaying a Preview File sssssssssessssesesseesesseeeeeeseeeeeesseseeeeeeess 67 3 7 Working With Preview Files ccccceeeessseeeeeeeeeeseeeeneeeeeeeeeeeesnaeeeeeenens 67 3 7 1 Openinga Preview Filey cai aesteeas disuse hdalenwuheavtehparnienlvebilvelans 67 3 7 2
411. signs the window title in the Designer You can use the format place holder s within the text to show the project name LL_DESIGNEROPTSTR_ PROJECTDESCRIPTION Assigns the project description which will also be shown in Open file dialog pszValue new value Return value Error code See also LIDesignerGetOptionString 172 Function Reference LIDIgEditLineEx Syntax INT L1D1lgEditLineEx HLLJOB Job HWND hWnd LPTSTR pszBuffer UINT nBufSize UINT nParaTypes LPCTSTR pszTitle BOOL bTable LPVOID pReserved Task This function is only available in the Enterprise edition Starts the List amp Label formula wizard independently of the Designer This means that List amp Label formulas can also be used at points in the application that are independent of printing Parameter hJob List amp Label job handle hWnd Window handle of the calling program pszBuffer Buffer for return value nBufSize Size of buffer nParaTypes Expected return type One or several ORed data type constants e g LL_TEXT LL_DATE pszTitle Window title Note that the title will be preceded by the word Edit bTable Defines whether only variables FALSE or fields 7JRUE will be available pReserved Reserved must be NULL or empty Hints See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value Return value Error code LIDomCreateSubobject Syntax INT L1lDomCreateSubobject
412. sions can be found as separate PDF document in the start menu group Documentation 12 1 Overview 12 1 1 General API e True NET 4 0 builds for the assemblies support new features see below Usage of NET 4 0 is highly recommended where possible 12 1 2 New features e Conditional formatting in the Designer e Browser independent Web Designer with real data preview NET only e Drag amp Drop overhauled create tables and subtables directly via D amp D drop variables on existing text paragraphs to append content e Enhanced color picker e Overriding specific default font properties e New toolwindow Formula Errors e AutoRecover for the Designer e Enhanced User and Sumvariable dialog with multiselect and copy paste e Optionally hide objects from include files e Support for nested includes e Streamlined Ruler Guides e The structure of the report container now hides relation names from the UI where they aren t needed e The report container itself now has a frame property e Support for Form Control objects in tables e Adapted look and feel for toolbars and property grid e New Colors tab in the formula wizard to ease the creation of formulas that need color parameters e mproved object tree scrolling when using Drag amp Drop e Using the standard Windows common dialog for search in the preview e Optional automatic position adaption of objects when flipping orientation e Enhanced PDF export with Type3 support dir
413. sired subobject e g Objects phDOMSubObj Pointer to DOM handle for return Return value Error code See also Chapter DOM Functions LIDomGetProject Syntax INT LlDomGetProject HLLJOB hJob PHLLDOMOBJ phDOMObj Task Provides the currently loaded project object Can be used e g after LIPrint WithBox Start to change the project during printout with DOM functions In order to create new projects or to edit projects before printout use L ProjectOpen L DomGetProject LiProjectSave and LiProjectClose Detailed application examples can be found in chapter DOM Functions Parameter hJob List amp Label job handle phDOMSubObj Pointer to DOM handle for return Return value Error code See also LIProjectOpen LIProjectSave LIProjectClose chapter DOM Functions LIDomGetProperty Syntax INT L1lDomGetProperty HLLDOMOBJ hDOMObj LPCTSTR pszName LPTSTR pszBuffer UINT nBufSize 175 API Reference Task Returns the content of the specified property Detailed application examples can be found in chapter DOM Functions Parameter hDomObj DOM handle for the object to be queried pszName Name of the desired property e g Condition for requesting the appearance condition of an object pszBuffer Buffer for the return value Can be NULL see notes nBufSize Size of buffer Return value Error code or required buffer size Hints If pszBuffer is NULL the return value is the le
414. sition Recordset MoveNext End If End Sub 3 2 2 Using the UserData Parameter The Print and Design methods allow a UserData parameter of the type integer to be passed This parameter makes it possible to prepare various data in the event for List amp Label For example using the parameter it would be possible to provide data for invoice printing as well as for a list of customers 3 3 Transferring Unbound Variables and Fields Transferring variables and fields follows the regular List amp Label principle There are three API variations available for the registration API Description LIDefineVariable Defines a variable of the type LL_TEXT and its content LIDefineVariableExt As described above additionally can be transferred along with the List amp Label data type LIDefineVariableExtHandle As described above except that the content must now be a handle One example in which a text type variable is registered looks like this 65 Programming With the OCX Component LL L1DefineVariableExt MyVariable Content LL_TEXT You can find the constants for the List amp Label data types in the cmll21 bas VB unit located in your List amp Label installation directory 3 3 1 Pictures To transfer picture files saved on your system use LL L1DefineVariableExt Picture lt file path gt LL_DRAWING Graphics are transferred using the API variation L DefineVariableExtHandle For more information about
415. space ReadOnlyObjects Add Demo LL Design LL Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Restrict Designer LL DesignerWorkspace ProhibitedActions Add LlDesignerAction FileNew LL DesignerWorkspace ProhibitedFunctions Add ProjectPath 36 Other Important Concepts LL DesignerWorkspace ReadOnlyObjects Add Demo LL Design LL Dispose Extend Designer The Designer can be extended by user specific functions objects and actions User specific functions can be used to move more complex calculations to the application or add functions which are not covered by the Designer by default An example for adding a new function can be found in the section Extend Designer by Custom Function Examples for user specific objects or actions as well as another user specific function can be found in the Designer Extension Sample for C and VB NET 2 3 7 Objects in the Designer Some objects in the Designer only serve for graphical design e g Line Rectangle Ellipse However most of the other objects interact with the provided data Specific data types are available for that or there are conversion functions which allow converting contents for use in the corresponding object The following paragraphs give an overview of the most frequently used objects their corresponding data types and Designer functions for converting contents The hints for the single objects are also val
416. sterMode LlAutoMasterMode AsVariables LL Design LL Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Order data as variables LL DataMember InvoiceHead LL AutoMasterMode LlAutoMasterMode AsVariables LL Design LL Dispose 31 Programming With NET At print time a merge print is automatically generated if e g an invoice form has been designed a single invoice with its own page numbering aggregation etc is created for each record from the invoice head table Master Data Detail Data 7 D y Effect of the option AutoMasterMode Left AsVariables right AsFields Data Types Variables and fields are passed in typed form i e depending on the content of the database as text number etc The databinding usually cares for that automatically an explicit passing assignment of the type is only necessary when custom data is passed additionally The correct data type is usually also preselected e g when passing DateTime objects The following table shows the most important data types Data type LIFieldType Text LIFieldType RTF LIFieldType Numeric LIFieldType Numeric_Integer LIFieldType Boolean LIFieldType Date LIFieldType Drawing 32 Usage Text RTF formatted text This field type can be used in a RTF field or RTF object in the Designer Integer The databinding automatically differs between floating point numbers and integer values
417. supported software suites is found on the machine After creation of the export file the signature process is started as usual Please note that this may change the file extension of the result file If the signature process is aborted or erroneous the export will continue after displaying the error reason if applicable For legal reasons a signature in Quiet mode is not possible the PIN always needs to be entered interactively This is only possible with the product digiSeal server 2 as it is a Server component requiring a mass signature card 7 4 2 Programming Interface The signature process can be influenced by many parameters Export SignResult Activates the signature of export files This option corresponds to the checkbox in the export target dialog The value is disregarded if no supported signature software is found on the machine Value Meaning 0 No digital signature 1 Exported files will be signed digitally Default 1 Export SignResultAvailable Can be used to suppress the checkbox for digital signature in the export target dialog Value Meaning 0 Hide checkbox 1 Show checkbox Default 1 Export SignatureProvider Allows selection of the software to be used if more than one of the supported products is installed Value eaning 0 Default no explicit choice of signature software 1 Sign using secrypt digiSeal office 2 Sign using OPENLIMiT SignCubes software 3 Sign using esiCAPI V 1 1 see Export S
418. t as text object 2 Object as picture Default 1 Verbosity RTF Configures how RTF objects should be exported Value Meaning 0 Ignore object 1 Object as picture Default 1 Verbosity Table Contigures how table objects should be exported Value Meaning 0 Ignore object 1 As a complete table object Default 1 Verbosity NestedTable Contigures how nested table objects should be exported 371 The Export Modules Value Meaning 0 Ignore object 1 Object as picture Default 1 Verbosity LLXObject Configures how LLX objects OLE HTML chart should be exported Value Meaning 0 Ignore object 1 Object as picture Default 1 PPTX FontScalingPercentage Scaling factor to correct font sizes Default 100 100 font size PPTX Animation Defines the used Transition for a slide change Value Meaning No Animation Cut Animation Fade Animation Push Animation Cover Animation oR WN gt o Wipe Animation Default 0 Export File Defines the file name of the generated Word document If empty the file selection dialog will be displayed Export Path Defines the path of the generated Word document Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 0 Export with user interaction dialogs 1 No dialogs or message boxes will be displayed only if Export File was specified Default 0 Export ShowResult Specifies whether the export result will be
419. t in a quality loss Default 75 Picture BitsPerPixel Defines the color depth of the generated picture Please note that the picture files will quickly get very large with higher color depths Not all picture formats can display all color depths 363 The Export Modules Value Meaning 1 Black amp White 4 16 Colors 8 256 Colors 24 24bit True Color Default JPEG PNG 24 Other 8 Picture CropFile Removes dispensable white frame Supported export formats PNG JPEG and TIFF This option is not supported when used in services e g IIS as GDI is not available there Value Meaning 0 Image will not be cropped 1 Image will be cropped Default 0 Picture CropFrameWidth Defines the border of a cropped file in pixel Export File File name containing d as format identifier The files for the pages will be named by replacing the placeholder by the page number If you do not set this option you will get a simple page numbering for the result files If this option is empty a file selection dialog will always be displayed Export Path Path where the exported files should be saved Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 0 With user interaction dialogs 1 No dialogs or message boxes will be displayed only if Export Path was specified Default 0 Export ShowResult Specifies whether the export result will be displayed automatically The
420. t to load the export modules from a different directory you should also use this option For example you can use c programs lt your application gt cmll21ex llx to load the export modules from your application directory 7 2 2 Switching Specific Export Modules On Off Using the option LL OPTIONSTR_EXPORTS_ AVAILABLE you can get a string containing all available export media separated by semicolons This list also contains the standard output formats PRN PRV and FILE The available export formats can be restricted by setting the option LL_ OPTIONSTR_EXPORTS_ ALLOWED This setting affects the available output formats in the dialog LiPrintOptionsDialog Please note 341 The Export Modules that the print destination parameter in L Print WithBox Start influences the export media as well You should therefore use LL_ OPTIONSTR_EXPORTS_ALLOWED after it Example of how to enable certain exporters L1PrintWithBoxStart LL_PRINT_EXPORT OnLy print to preview and HTML is allowed L1SetOptionString hJob LL_OPTIONSTR_EXPORTS_ALLOWED PRV HTML Mi ae LlPrintOptionsDialog Example of how to disable the export modules LlPrintWithBoxStart LL_PRINT_EXPORT Prohibits all export modules LlSetOptionString hJob LL_OPTIONSTR_EXPORTS_ALLOWED PRN PRV FILE IIi L1PrintOptionsDialog 7 2 3 Selecting Querying the Output Format The output format can be selected queried with a parame
421. t with spaces Default FALSE Tabs will be expanded by spaces for a column width of 8 characters This makes no sense for proportional fonts however LL_OPTION_UISTYLE Sets the style of the Designer interface LL_OPTION_UISTYLE_STANDARD Office 97 Look amp Feel LL_OPTION_UISTYLE_OFFICEXP Office XP Visual Studio NET Look amp Feel LL_OPTION_UISTYLE_OFFICE2003 Office 2003 Look amp Feel LL_OPTION_UNITS Description and values see LL_PRNOPT_UNIT LL_OPTION_USEBARCODESIZES Some barcodes have size limitations minimum and or maximum sizes If this option is set to TRUE the user is allowed to switch on the size limitation feature so that when resizing the barcode object only sizes in the standard size range will be allowed LL_OPTION_USECHARTFIELDS TRUE Chart objects will get their data through the chart API FALSE Compatible mode charts get their data through L PrintFields Default Please read the hints in the Chart chapter of this manual LL_OPTION_USEHOSTPRINTER TRUE List amp Label passes all printer device operations to the host application which then has more freedom but also has to work harder See LL_CMND_HOSTPRINTER FALSE List amp Label manages the printer device LL_OPTION_USE_JPEG_OPTIMIZATION TRUE List amp Label embeds JPEG files as JPEG stream into the preview meta files This leads to a significantly decreased file size but the meta files will only be readable from List
422. taneously for all exporters by passing an empty string as exporter name ex Export ShowResult The options supported by the export media will be listed in the following chapters Some of the options can be modified in the property dialog of the exporter by the end user These options will then be saved in the P file by List amp Label When using the export format PRV an export to a preview file can be done Please note that in for this format only the options Export File Export Path Export Quiet and Export ShowResult are supported 7 2 5 Export Without User Interaction Export without user interaction can be performed very easily using the methods already mentioned Example If you wish to export HTML without user interaction using the file Article lst and c temp as the destination directory you should use following code Mao L1XSetParameter hJob LL_LLX_EXTENSIONTYPE_EXPORT HTML Export File export htm L1XSetParameter hJob LL_LLX_EXTENSIONTYPE_EXPORT HTML Export Path c temp L1XSetParameter hJob LL_LLX_EXTENSIONTYPE_EXPORT HTML Export Quiet 1 L1PrintWithBoxStart hJob LL_PROJECT_LIST Article 1st LL_PRINT_EXPORT LL_BOXTYPE_BRIDGEMETER hWnd Exporting to HTML L1PrintSetOptionString hJob LL_PRNOPTSTR_EXPORT HTML normal printing Loop That s all The meaning of the export specific options can be found in the following chapters 7 2 6 Querying the Exp
423. temp ll prn ile aes LiPrintEnd LlJobClose hJob See also L1PrintGetOptionString LIPrintSetProjectParameter Syntax INT L1lPrintSetProjectParameter HLLJOB hLlJob LPCTSTR pszParameter LPCTSTR pszValue UINT nFlags Task Changes the value of a project parameter See project parameter chapter Parameter hJob List amp Label job handle pszParameter Parameter name pszValue Parameter value nFlags Parameter type see L SetDefaultProjectParameter Will only be used for new parameters Return value Error code Hints This function cannot be called before L Print WithBox Start See also LISetDefaultProjectParameter LIGetDefaultProjectParameter LIPrintGet ProjectParameter 235 API Reference LIPrintStart Syntax INT L1PrintStart HLLJOB hJob UINT nObjType LPCTSTR lpszObjName INT nPrintOptions INT nReserved Task starts the print job loads the project definition Parameter hJob List amp Label job handle nObjType LL PROJECT LABEL LL PROJECT LIST or LL_PROJECT_CARD IpszObjName The file name of the project nPrintOptions Print options Value Meaning LL_PRINT_ NORMAL output to printer LL_PRINT_PREVIEW output to preview LL PRINT FILE output to file LL_PRINT_EXPOAT output to an export module that can be defined with L PrintSetOptionString LL_PRN OPTSTR_EXPORT Optionally combined with LL PAINT MULTIPLE JOBS output in several smaller print jobs see bel
424. ter Pane in Preview 29 5 7 4 Supporting Expandable Regions in Preview 30 5 7 5 Supporting Interactive Sorting In Preview s s 31 5 7 6 Handling Chart and Crosstab Objects 0 ccccceeeeeteeteeeeetees 31 5 8 Using the DOM API Professional Enterprise Edition Only 55 133 5 8 1 Basi RrinGl ples ais ca mirae e i santas aga ea pea eee 33 5 8 2 Eina 0 EN RP eC EAN T 37 Gz API RETErenGe sicicisicinitieitinioinisiniticu tnt ten nates tents 142 6 1 i FUNCTION Referenc einna conte fas ceetecexceedevesceekecesceetouenseeeedeses 142 6 2 Callback Refere e rae aana arrear aar araa AEE aar aa ERA 283 6 3 Managing Preview Files cccccceeeseeseeeeeeeeeeeeeenaeeeeeeeeeeeeneeeeeeeeees 313 6 3 1 OVE MIE a ain A pe rra e eaa T aaa e e A 313 6 3 2 The Preview API a sssssesssirsssssesrerrsrsssterttrnsssetrternressrtrrrrrnnsreerte 314 7e The Export Mod l Saan atian an hana an a ida avi vedsvadeavhewdvvedvendsenees 341 FA OVENIEW orete a a a e E A teese sey 341 7 2 Programming Interface cccccccceeeeeeeeeeneeeeeeeeeeeeeneeeeeeeeeeeeseneeeeeeeeenss 341 7 2 1 Global De activation of the Export Modules 341 7 2 2 Switching Specific Export Modules On Off 341 7 2 3 Selecting Querying the Output Format cccecceeeeeeeeeeees 342 7 2 4 Setting Export specific Options ccccceccceecceeeeeeeeeeeteeenteeeees 344 Contents 7 2 5 Export Without User Interaction 0
425. ter for the methods L Print WithBox Start The following list shows the different values for this parameter Value Meaning LL PRINT NORMAL _ Printer output format will be default LL PRINT PREVIEW Preview output format will be default LL PRINT _FILE File output format will be default LL_ PRINT EXPORT An export module will be set as default output format After this you could use the method L PrintSetOption String LL_PRNOPTSTR_EXPOAT to specify the export module exactly You can also use L PrintSetOptionString LL_PRNOPTSTR_EXPOR7 to specify a certain output format which will also be the default output format in L PrintOptionsDialog Example in C of how to set the output format to RTF L1PrintWithBoxStart LL_PRINT_EXPORT L1PrintSetOptionString hJob LL_PRNOPTSTR_EXPORT RTF L1PrintOptionsDialog 342 Programming Interface If you wish to prohibit the end user from selecting the output format you could use the option LL_ OPTIONSTR_EXPORTS ALLOWED to disable the other formats Simply specify the output format you wish to force with this option The end user can specify the default output format in the Designer using Project gt Page Setup The selected export module will be set by List amp Label using the option LL_PRNOPTSTR_EXPOAT Your application should take account of this fact by determining the default output format directly or disabling this configuration opportunity in the Designer O
426. text of the edit field Creates a listbox control with lt Value gt as control name in the form The contents of the paragraphs of the object will be the entries in the listbox Creates a combobox control with lt Value gt as control name in the form The contents of the paragraphs of the object will be the entries in the list Creates a radiobutton control If the contents of the first paragraph contain T X or 1 the control will be checked Creates a checkbox control If the contents of the first paragraph contain T X or 1 the control will be checked Creates a button control The contents of the first paragraph will be the button text Programming Reference SUBMIT lt Value gt Creates a Submit button control The contents of the first paragraph will be the button text RESET lt Value gt Creates a Reset button control The contents of the first paragraph will be the button text lt Value gt is the name of the HTML form control Picture Objects Value Meaning IMAGE lt Value gt Creates an image control These form objects will be exported with the designed coordinates Normal objects can have other coordinates based on their displayed data e g as text objects that have not been filled completely Some input controls cannot be placed very precisely on a certain position Their size depends on the data they currently display Therefore a 1 1 representation of List amp Label to HTML is not possible
427. th LL_ DES GNERPRINTCALLBACK Start Event PREVIEW_START EXPORT_START Should you receive this Event you will have to create a thread and pass the start parameters to it This thread creates a new List amp Label job and causes the new job to basically lead to the execution of a standard print loop In addition to the normal print loop you will have to perform the following modifications e Before print start set the option LL OPTIONSTR_ORIG INALPROJECTFILENAME to the path as delivered by the structure e After starting the print job use L PrintSetOption hJob LL_PRNOPT_LASTPAGE _nPages to set the maximum number of pages to be printed as passed by the callback structure e After each L Print check if the number of pages has exceeded this value if so call function L PrintAbort This optimization can and should also be used for normal print jobs In this case you should not abort but end printing normally using L PrintEnd e Indicate the thread status using the provided event Event of the callback structure to List amp Label once at the start and once at the end of the thread It is important to synchronize the signaling of the event in a way that makes sure that the following call to QUEST JOBSTATE delivers the correct state RUNNING STOPPED As you re signaling the event from the thread you cannot use the thread status but will have to use a corresponding variable This process status has to be hand
428. the grouping functions has not been defined LIPrintCopyPrinterConfiguration File not found or wrong format LIPrintCopyPrinterConfiguration File write error network rights allow writing creation disk full Function not implemented yet Storage file contains no valid pages This command cannot be called in HOSTPRINTER mode L SetPrinter nPrinterFile LIPrintCopyPrinterConfiguration One or more objects have not been completely printed LI G SletOptionString LIPrint G SJetOptionString A buffer passed to List amp Label is not large enough for the data that should be stored in it The data is not complete LL_OPTION_CODEPAGE The code page is invalid NLS not installed A temporary file could not be created List amp Label has no valid print medium see LL_OPTIONSTRING_EXPORTS_ALLOWED LIPrintDeclareChartRow No chart object exists in the project Only in server web server applications The count of current users is above the number of licensed users Only in server web server applications The web server license file wsl is invalid or damaged Only in server web server applications The webserver license file wsl could not be found LiSystemTimeFromLocaleString invalid date format has been used A required drawing file could not be found see also LL OPTION ERR ON FILENOTFOUND 423 Error Codes ERR_NOUSERINTERACTION 54 ERR_BADDATABASESTRUCTURE 55 ERR_UNKNOWNPROPERTY
429. the basis for the data available in the Designer Therefore there is no stand alone design application the data is always provided directly by the application List amp Label itself never directly accesses the data The full call with a DataSet as data source in this example would be 20 First Steps C ListLabel LL new ListLabel LL DataSource CreateDataSet LL Design LL Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet LL Design LL Dispose By default a file selection dialog is displayed to the user where he can either provide a new name for the report file and therefore create a new report or select an existing ile for editing Of course this can also be suppressed the section Important Properties of the Component describes how to do that Using the Designer itself is explained in detail in the corresponding online help and in the Designer manual The result of the design process is generally four files that are created by the Designer The file extensions can be assigned freely by using the FileExtensions property of the ListLabel component The following table describes the files for the default case File Content lt Reportname gt st The actual project file It contains information about the formatting of the data to print but not the data itself lt Reportname gt Isv A JPEG file with a sketch thumbnail of the project for display in the file se
430. the buffer return value See also LIPrintlsVariableUsed LIPrintlsChartFieldUsed LIPrintlsFieldUsed LIGetSumVariableContents Syntax INT L1GetSumVariableContents HLLJOB hJob LPCTSTR lpszName LPTSTR lpszBuffer UINT nBufSize Task Returns the contents of the corresponding sum variable Parameter hJob Job handle IpszName Pointer to a string with the name of the sum variable IpszBuffer Address of buffer for contents nBufSize Maximum number of characters to be copied Return Value Error code LL ERR_UNKNOWN_FIELD or 0 Hints This function can be used in callback routines to ask for the contents of sum variables 195 API Reference See chapter Important Remarks on the Function Parameters of DLLs concerning the buffer return value See also LIDefineSumVariable LIGetUserVariableContents LIGetVariableContents LIGetUsedlidentifiers Syntax INT L1GetUsedIidentifiers HLLJOB hJob LPCTSTR lpszProjectName LPTSTR lpszBuffer UINT nBufSize Task Returns a list of variables fields and chart fields that are actually used within the given project file in order to increase performance as only these values need to be provided Parameter hJob List amp Label Job Handle IpszProjectName Pointer to a string with the project name pszBuffer Address of buffer for contents nBufSize Maximum number of characters to be copied Return Value Error code Hints See chapter Important Remarks on t
431. the documentation for ERING the LL QUERY_EXPR2HOSTEXPRESS ION callback and L PrintDbGetCurrentlableFilter Return Value Error code Hints If a table name contains a a schema will be used See the hints in chapter Printing Relational Data Example HLLJOB hJob hJob LlJobOpen 0 L1IDbAddTable hJob NULL L1IDbAddTable hJob Orders NULL L1DbAddTable hJob OrderDetails NULL LIDbAddTable hJob HumanResources Employee NULL schema info thar ap CEC meee L1JobClose hJob See also LIDbAddTableSortOrder LIDbAddTableRelation LIPrintDbGetCurrentTable LIPrintDbGetCurrentTableSortOrder LIPrintDbGetCurrentTableRelation LIDbAddTableRelation Syntax INT L1DbAddTableRelation HLLJOB hJob LPCTSTR pszTableID LPCTSTR pszParentTableID LPCTSTR pszRelationID LPCTSTR pszRelationDisplayName Task This method can be used to define relations between the tables added via LIDbAddTable List amp Label does not directly distinguish between different relation types You simply pass a relation and its ID and you can query the current relation later at print time using L PrintDbGetCurrentlableRelation 146 Function Reference Parameter hJob List amp Label job handle pszTablelD D of the child table Must be identical to the ID passed in LIDbAddTable pszParentTablelD D of the parent table Must be identical to the ID passed in LIDbAddTable pszRelationID Unique
432. the following pages is meant _nCmd subcommand see below _hWnd handle of the parent window needed for LL_ PRN_ED T ADC DC handle for the functions LL PRN_CREATE DC LL_PRN_DELETE DC and LL_PRN_RESET DC _nOrientation printer paper orientation DMORIENT HORIZONTAL DMORI ENT LANDSCAPE used for LL PRN_SET ORIENTATION and LL_PRN_GET ORIENTATION _bPhysPage BOOL indication of whether the physical or the printable area is to be used 289 API Reference _nBufSize _pszBuffer points to memory where the requested texts can be stored used for LL PRN_GET_ DEVICENAME LL_PRN_GET_DRIVERNAME and LL_PRN_GET_PORTNAME _nUniqueNumber unique number for this printer instance List amp Label might request some printers several times so this ID can be used to find out which printer is meant _nUniqueNumberCompare the unique number of the printer to be compared with the current one in case of a LL PRN_COMPARE_PRINTER command you need to return whether the printers in nUniqueNumber and nUniqueNumberCompare are the same _nPaperFormat paper format see DEVMODE dmPaperSize _xPaperSize paper size in mm 10 horizontal _yPaperSize paper size in mm 10 vertical Return value depends on the subcommand in _nCmd Value Meaning LL_PRN_CREATE_DC he printer DC shall be created and stored in ADC No change of the return value LL_PRN_DELETE DC he printer DC in ADC can be destroyed No change of the return value LL_PRN_SE
433. ther or not sum variables should also be calculated if data lines are suppressed The value selected in the Designer will then be saved in and loaded from the project file Default FALSE LL_OPTION_CALC_SUMVARS_ON_PARTIAL_LINES TRUE The sum variables are updated as soon as one data line for the record has been printed FALSE The sum variables are updated as soon as all data lines have been completely printed Default FALSE LL_OPTION_CALLBACKMASK The value can be any combination of the following values LL_CB_PAGE LL_CB_PROJECT LL_CB_OBJECT LL_CB HELP LL_CB_TABLELINE LL_CB_TABLEFIELD For the definition of parameters please read the chapter on callbacks LL_OPTION_CALLBACKPARAMETER Sets a parameter that is passed in the scCallback structure to any of the callbacks Please refer to the chapter on callbacks for further details LL_OPTION_CODEPAGE This option sets or reads the code page which is used for all SBCS DBCS and Unicode translations in List amp Label This applies to the A API of the DLL as well as reading writing project files This setting is used globally so it is valid for all List amp Label jobs in one task and the hJob parameter is ignored The code page has to be installed on the system NLS for this code page must be installed Default CP_ACP 1 NLS National Language Support 258 Function Reference LL_OPTION_COMPRESSRTF The text of an RTF control is stored in t
434. therwise your end user could be confused when he selects e g RTF in the Designer but then finds HTML as a default format for printing Example of how to take account of a selected export medium if no selection has been set by the end user in the Designer Preview will be set as default L1PrintGetOptionString hJob LL_PRNOPTSTR_EXPORT sMedia GetBuffer 256 256 sMedia ReleaseBuffer if sMedia no default setting L1PrintSetOptionString hJob LL_PRNOPTSTR_EXPORT TEXT PRV LlPrintOptionsDialog Example of how to disable the configuration option in the Designer LlSetOption hJob LL_OPTION_SUPPORTS_PRNOPTSTR_EXPORT FALSE VUE LlDefineLayout Use this option to determine which output format was selected by the end user in the L PrintOptionsDialog Example showing how to query the output format WH ai LlPrintOptionsDialog LlPrintGetOptionString hJob LL_PRNOPTSTR_EXPORT sMedia GetBuffer 256 256 sMedia ReleaseBuffer df sae if sMedia PRV L1PreviewDisplay L1PreviewDeleteFiles optional 343 The Export Modules 7 2 4 Setting Export specific Options The export specific options can be set using L XSetParameter and queried with L XGetParameter These options are export media specific therefore the name of the format must be specified for each function call Options which are supported by all export modules can be switched simul
435. they can be inserted into the project L1IDbAddTable hJob delete existing tables LIDbAddTable hJob Orders ORDERS L1IDbAddTable hJob OrderDetails ORDER DETAILS The first parameter is the usual job handle of the List amp Label job The second parameter is the table ID which will be returned during printout by 107 Programming Using the API L PrintDbGetCurrentlable The third parameter is the display name of the table in the Designer If you pass NULL or an empty string the table ID will be used as display name as well A special role is assigned to the table name LLStaticTable This is reserved and can be used for the insertion of static contents fixed texts or contents of variables chart signatures etc This type of static table is then available as Free content data source and can only be filled with data lines by the user in the Designer You must react accordingly to the table in your code a detailed explanation is provided in the Printing subchapter In the next step the relations between the tables will be defined List amp Label does not directly differ between different types relationships n m 1 n you declare a relation with a relation ID which can be queried at print time L1IDbAddTableRelation hJob OrderDetails Orders Orders20rderDetails NULL With this command you have established a relationship between the child table OrderDetails and the parent table Ord
436. this affects the whole page In this way you can define a different margin for even odd pages This relocation only affects the WYSIWYG viewer and printout not the Designer preview Example case LL CMND PAGE pSCP PSCLLPAGE pSC gt _1Param if pSCP gt _bPreDraw amp amp L1PrintGetCurrentPage hJob 2 1 SetWindowOrg pSCP gt _hPaintDC 100 0 break LL_CMND_PROJECT Task Enables the programmer to place additional drawings in a label or file card project an individual label for example This callback only occurs with label and file card projects With list objects it would be identical to LL_ CM ND_PAGE Activation L1SetOption hJob LL_OPTION_CALLBACKMASK lt other Flags gt LL_CB_ PROJECT 297 API Reference Parameters Param points to an scLIProject structure _nSize Size of the structure sizeof scLlProject _bPreDraw TRUE for a call before List amp Label draws the page FALSE for a call after List amp Label has drawn the page _bDesignerPreview TRUE if the call takes place from the Designer preview FALSE if the call takes place during the WYSIWYG preview or print _hPaintDC Device Context for the print _hRefDC Device Context for references _rcPaint Rectangle in which the object should be drawn The mapping mode is in the normal drawing units mm 10 inch 100 or inch 1000 Return Value 0 Hints In this callback no List amp Label function may be called which will pr
437. this purpose you can use the following project parameters SaveAs Format Desired export format e g XML Supported formats are TTY PDF EMF XPS PRN TIFF resp PICTURE _MULTITIFF JPEG resp PICTURE_JPEG PNG resp PICTURE_PNG LL resp PRV XML resp XFDF Further information can be found in chapter The Export Modules SaveAs Filename Output file name e g test xml SaveAs ShowDialog Allows the save dialog to be enabled 1 or disabled 0 SaveAs NoSaveQuery Disables the request as to whether the file should be saved after completion or not Example L1PrintSetProjectParameter hJob SaveAs Format XML LL_PARAMETERFLAG_VALUE L1PrintSetProjectParameter hJob SaveAs Filename test xml LL_PARAMETERFLAG_VALUE L1PrintSetProjectParameter hJob SaveAs ShowDialog e LL_PARAMETERFLAG_VALUE L1PrintSetProjectParameter hJob SaveAs NoSaveQuery 1 LL_PARAMETERFLAG_VALUE 418 Web Reporting 8 5 Web Reporting Using List amp Label with ASP NET is described in detail in chapter Web Reporting Of course you can also use other programming languages for web reporting In general the following requirements apply The server has to be a Windows system List amp Label can only be run on Windows platforms This restriction of course does not apply to the clients The user account under which the web application is running requires access to a printer driver The
438. tion The definition of the parameter nFunction and IParam can be found in chapter Callbacks and Notifications Example LPARAM STDCALL MyCallback UINT nFunction LPARAM lParam Fleeces HLLJOB hJob unsigned int wMsg hJob LlJobOpen 0 255 API Reference v L1SetNotificationCallbackExt hJob LL_CMND_CHANGE_DCPROPERTIES DOC MyCB PPS ec LlJobClose hJob See also LISetNotificationCallback LISetNotificationMessage Syntax UINT LlSetNotificationMessage HLLJOB hJob UINT nMessage Task Definition of a message number which differs from the presetting for callback USER objects Parameter hJob List amp Label job handle nMessage The new message number Return Value Error code Hints The default message number has the value of the function RegisterWindowMessage cmbtLLMessage he callback function has higher priority if this is defined no message is sent The definition of the parameter nFunction and IParam can be found in chapter Callbacks and Notifications Example HLLJOB hJob unsigned int wMsg L1SetDebug TRUE hJob LlJobOpen 0 v LlSetNotificationMessage hJob WM_USER 1 a LlJobClose hJob See also LIGetNotificationMessage LISetNotificationCallback 256 Function Reference LISetOption Syntax INT LlSetOption HLLJOB hJob INT nMode INT_PTR nValue Task Sets diverse options in List amp Label Parameter hJob List amp Label j
439. tion in the start menu s root level under Design gt Invoice gt Invoice with issue print 35 Programming With NET 2 3 6 Edit and Extend the Designer The Designer is not a Black Box for the application but can be manipulated in many ways Besides disabling functions and menu items user specific elements can be added that move calculations actions or outputs to the function logic Menu Items Objects and Functions Starting point for Designer restrictions is the DesignerWorkspace property of the ListLabel object In the following table the properties listed can be used to restrict the Designer Property Function ProhibitedActions This property s purpose is to remove single menu items from the Designer ProhibitedFunctions This property s purpose is to remove single functions from the Designer ReadOnlyObjects This property s purpose is to prevent objects editability in the Designer The objects are still visible however they can t be edited or deleted within the Designer The following example shows how the Designer can be adjusted so no new project can be created In addition the function ProjectPath will be removed and the object Demo is prevented from being edited C ListLabel LL new ListLabel LL DataSource CreateDataSet Restrict Designer LL DesignerWorkspace ProhibitedActions Add L1DesignerAction FileNew LL DesignerWorkspace ProhibitedFunctions Add ProjectPath LL DesignerWork
440. tions can be set using the ExportOptions enumeration of the ListLabel component Restriction of Export Formats If only specific export formats should be available for the end user the list of formats can be restricted exactly to these formats This is possible with the option LlOptionString Exports_Allowed A list of all available formats can be found in section Export C ListLabel LL new ListLabel LL DataSource CreateDataSet Only allow PDF and preview LL Core L1SetOptionString LlOptionString Exports_ Allowed PDF PRV Print LL Print LL Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Only allow PDF and preview LL Core L1SetOptionString LlOptionString Exports_Allowed PDF PRV Print LL Print LL Dispose 57 Programming With NET 2 5 10 Extend Designer by Custom Function The following example shows how a function can be added that allows querying a registry key within a report The result of the function could be used in appearance conditions for objects for example Of course the properties of the DesignerFunction class can also be set directly in the properties window of the development environment C ListLabel LL new ListLabel LL DataSource CreateDataSet Initialize function DesignerFunction RegQuery new DesignerFunction RegQuery FunctionName RegQuery RegQuery GroupName Registry RegQuery MinimalParameters
441. to end r e delete project file It is advisable to use a unique structure for both output types and then provide the address of the structure using LL OPTION_DESIGNERPREVIEWPARAMETER and LL_OPTION_DESIGNEREXPORTPARAMETER to List amp Label This structure should contain e a pointer to a object that manages the data source if necessary i e possible e a synchronization object CRITICAL SECTION e the thread handle of the thread in progress e the job handle of the worker thread e variables as copies of the start parameter 124 Advanced Programming f your data source only allows single threaded access you must set LL_OPTION_DESIGNERPRINT_SINGLETHREADED to TRUE This will be used by List amp Label so that during the preview calculation no export is possible and vice versa 5 7 2 Drilldown Reports in Preview Drilldown reporting means navigation in hierarchical data through different detail levels nitially only the top level will be printed to preview for example Customers With a click on a customer a new report for example Orders will be opend that contains detail information for this record In this manner you drill down through different levels until you reach for example the products a customer has ordered in a specific order One of the advantages is the performance gain by means of specialization Drilldown is available in preview Drilldown can be defined for table rows and table fields Using drilldo
442. tring for example a user name print date etc into the storage file pszBuffer Address of a 0 terminated string Return value Error code Hints Of course the storage file may not be opened with bReadOnly TRUE Example L1lStgsysSetJob hStg 1 L1StgsysSetPageOption hStg 1 LS_OPTION_USER Letters A B See also LIStgsysGetPageOptionValue 331 API Reference LIStgsysSetUILanguage Syntax INT LlStgsysSetUILanguage HLLSTG hStg INT nLanguage Tasks Sets the UI language Parameter hStg The handle returned by L StgsysStorageOpen nLanguage LCID of the language Return value 0 okay lt 0 Error code Example L1StgsysSetJob hStg 1 L1iStgsysSetUILanguage hStg 1033 LIStgsysStorageClose Syntax void LlStgsysStorageClose HLLSTG hStg Task Closes the access handle to the preview Parameter hStg The handle returned by L StgsysStorageOpen See also LIStgsysStorageOpen LIStgsysStorageConvert Syntax INT L1lStgsysStorageConvert LPCTSTR pszStgFilename LPCTSTR pszDstFilename LPCTSTR pszFormat Task Converts a preview file to another format Parameter pszStgFilename Name of the preview file pszDstFilename Name of the target file 332 Managing Preview Files pszFormat Target format For valid values and additional options see LIStgsysConvert Return value Hints lt 0 Errorcode 0 okay Example L1lStgsysStorageConvert c test
443. try to load the file into a temporary cache on the local hard disk if the URLMON DLL is registered on the system see below Please note that a browser is required that supports ActiveX Controls for example MS Internet Explorer 3 9 2 Registration The control can be registered in the usual way for example with the command REGSVR32 CMLL21V 0CX by the programming environment or by your setup program It cannot be used without registration See REDIST TXT for more information 3 9 3 Properties AsyncDownload in out BOOL This is an option to improve the screen update If the download is not asynchronous then the screen around the OCX will not be updated until the download is finished On the other hand you must be careful with the async download as you might not be able to set properties like Page until the download is finished see event LoadFinished After setting this option read the value again to check whether this feature is supported This has no effect on local files Default FALSE Enabled in out BOOL Defines whether the control is enabled or disabled This will have an effect on the user interface Default TRUE BackColor in out OLE_COLOR Defines the background color i e the color that is painted on e the whole background if no preview file can be displayed and e the background outside the paper Default RGB 192 192 192 light gray FileURL in out BSTR The most important property Defines
444. ts Text contents of the variable which is assigned to the object This value is only valid if the variable has been defined by LiDefineVariableExt otherwise the _ hPara value is valid _IPara Para of the variable which is assigned to the object LL_ DRAWING_USEROBJ or LL DRAWING_USEROBJ_DLG Refers to the 4 parameter of the call L DefineVariableExt _IpPtr pPtr of the variable which is assigned to the object Refers to the 5 parameter of the call L DefineVariableExt _hPara Handle contents of the variable which is assigned to the object This value is valid if the variable has been defined by L DefineVariableExtHandle otherwise the value _ pszContents is valid 283 API Reference _blsotropic TRUE the object should be drawn undistorted FALSE the drawing should be fitted into the rectangle _IpszParameters 1 for user defined objects as table field NULL 2 for LL DRAWING_USEROBJ Pointer to an empty string 3 for LL DRAWING_USEROBJ_DLG Pointer to the string the programmer has returned at LL_ CMND_EDIT_USEROBJ _hPaintDC Device Context for the printout _hRefDC Device Context for references _rcPaint Rectangle in which the object should be drawn The mapping mode is in the normal drawing units mm 10 inch 100 or inch 1000 _nPaintMode 1 on Designer preview 0 on Printer Multi page preview Return Value _IResult 0 Hints In this callback no List amp Label function may be called which will produce
445. ture 305 API Reference _nUserParam value you set LL_OPTION_DESIGNERPREVIEWPARAMETER to or assigned LL_ OPTION_DESIGNEREXPORTPARAMETER to _pszProjectName Name of the project to print This parameter is only valid with the command START otherwise NULL _pszOriginalProjectFileName Name of the original project This parameter is only valid with the command START otherwise NULL It is necessary so that relative paths and the function ProjectPath are correctly evaluated by List amp Label _nPages Maximum number of pages to be output This will have to be passed after print start via L1PrintSetOption hJob LL_PRNOPT_LASTPAGE nPages to the print job If nPages has the value 0 this means that the print should not be limited _nFunction Operations to be performed There are four different operations Start Break Finalize and Status query As there are two groups of operation EXPORT and PREVIEW this gives 8 constants LL_DESIGNERPRINTCALLBACK_PREVIEW_START LL_DESIGNERPRINTCALLBACK_PREVIEW_ABORT LL_DESIGNERPRINTCALLBACK_PREVIEW_FINALIZE LL_DESIGNERPRINTCALLBACK_PREVIEW_QUEST JOBSTATE LL_DESIGNERPRINTCALLBACK_EXPOART_START LL_DESIGNERPRINTCALLBACK_EXPORT ABORT LL_DESIGNERPRINTCALLBACK_EXPORT_FINALIZE LL_DESIGNERPRINTCALLBACK_EXPOART_QUEST JOBSTATE _hWnd Window handle The meaning of this structure member is described below _hEvent Event handle needed for communication and synchronization of your
446. u should not set this option LL_OPTIONSTR_LIST_PRJDESCR Use this parameter to set the description of the corresponding project type for the file dialogs LL_OPTIONSTR_LIST_PRJEXT The file extension for a list project Default Ist LL_OPTIONSTR_LIST_PRVEXT The file extension for the bitmap of a list project that will be shown in the File Open dialog Default Isv LL_OPTIONSTR_LIST_PRNEXT The file extension for the printer definition file of a list project Default Isp Function Reference LL_OPTIONSTR_LLFILEDESCR Sets the description for List amp Label preview files for the save as dialog in the preview LL_OPTIONSTR_LLXPATHLIST This option defines the extension modules LLX files to be loaded You must pass a list of file paths separated by semicolons for the extension modules that you want to use in your application The following extension modules are loaded automatically by default i e whenever opening a job or setting this option CMLL21PW LLX CMLL21HT LLX CMLL21EX LLX CMLL210C LLX Additionally for the Professional and Enterprise Edition CMLL21BC LLX These files are loaded from the DLL s path You can use Wildcards to load multiple modules simultaneously To suppress loading of a default extension pass its file name preceded by a e g CMLL21PW LLX To suppress all default extensions pass as first filename When this parameter is used for L GetOption
447. uired for output on fax printer pszMessage Will be shown in the title of the optional meter dialog and is also used as document name for the print job If NULL the entry from the preview file parameter of L PrintStart is used hWndParent Window handle to be used as parent for the meter dialog Return value Error code Hints Use this API routine if you want an easy way to print a page range from a preview file If a printer name is NULL List amp Label tries to get the printer and its settings from the values stored in the preview file i e the printer settings selected during creation If no printer with the given device name is present the default printer is selected See also LIStgsysPrint LsMailConfigurationDialog Syntax INT LsMailConfigurationDialog HWND hWndParent LPCTSTR pszSubkey UINT nFlags INT nLanguage Task Opens a configuration dialog for the mail parameters Can be used if the CMMxX21 DLL is used for sending export results by mail The settings will be saved in the registry under HKEY_ CURRENT USER software combit cmbtmx lt pszSubkey gt lt User Computer gt Parameter hWndParent Parent window handle for the dialog pszSubkey Subkey that is used for saving the values in the registry You should use your application s executable name excluding the path and file extension here The values will then be set automatically nFlags One or a combination of the following flags
448. upports a restricted CSS subset The correct rendering of entire web pages is not the main intent the component rather offers a quick and easy way to render simple HTML streams Drawing Constant LL DRAWING Content e g c temp sunny jpg Hint The variable content represents the name of a graphics file C C programmers note use a double with path specifications 96 Invoking the Designer Constant LL DRAWING_HMETA LL _DRAWING_HEMETA LL DRAWING_HBITMAP LL DRAWING_HICON Hint Variable content is a handle to a graphic of the respective type in the memory can only be defined using L DetineVariableExtHandle or L DefineFieldExtHandle Barcode Constant LL_ BARCODE Contents Barcode Text Hint The variable contents are the text to be printed in the barcode The format and character range of the barcodes are described in the online help Constant All constants starting with LL_ BARCODE User Object Constant LL DRAWING_USEROBJ LL_DRAWING_USEROBJ_DLG Hint This object is drawn by the application itself in a callback event procedure For LL DRAWING_USEROB _DLG the programmer can supply a custom properties dialog for the object available in the Designer The use of this variable type is a more advanced topic and is described later in this manual 5 3 Invoking the Designer 5 3 1 Basic Scheme In pseudo code calling the Designer is done as follows functions marked with are optional c
449. us Version e The browser plugin based DesignerControl was replaced with the browser independent Web Designer The required adjustments can be found in chapter Web Designer of the Programmer s Manual e Changed default for MaximumRecursionDepth of ObjectDataProvider to 3 before 10 e Changed default for FlattenStructure of ObjectDataProvider to true before false e The OracleConnectionDataProvider from combit ListLabel20 DataProviders Ora cle combit ListLabel20 OracleConnectionDataProvider dll was integrated into combit ListLabel21 DataProviders combit ListLabel21 dll and replaces the old and obsolete OracleConnectionDataProvider that was depending on the unsupported OracleClient from System Data OracleClient To use the new Oracle DataProvider ODP NET must be installed the ADO NET drivers 432 Updating to List amp Label 21 Oracle ManagedDataAccess Client recommended and Oracle DataAccess Cli ent are supported DbConnectionDataProvider has new property SupportsAdvancedFiltering that must be overridden LIGetOption now returns IntPtr Added support for the new 3 versions of Npgsql AddTableEventArgs was renamed to DefineTableEventArgs 12 2 3 Updating Projects Using the OCX e g Visual Basic Load the Visual Basic project vbp resp mak in a text editor Replace the line Object 2213E283 16BC 101D AFD4 040224009C14 20 0 0 CMLL200 0Ccx with the following Object 2213E283 16BC 101D AFD4 040224009C15 21
450. ve checkbox in the dialog Value Meaning 0 Checkbox will be hidden 1 Checkbox will be available Default 1 Export AllinOneFile Configures the export result format Value Meaning 0 Every printed page will be exported in a single TXT file If the filename contains the format identifier Yd this identifier will be repaced by the corresponding page number 1 The result is a single TXT file Export File containing all printed pages Default 1 TXT Charset Specifies the character set of the result file Value Meaning ANSI Ansi character set ASCII Ascii character set UNICODE Unicode character set 386 Programming Reference Default UNICODE 7 3 12 TTY Export Overview The TTY export format can be used to directly communicate with dot matrix printers This brings a great performance boost compared to the printer driver approach Programming Interface You can find a description of all options used in the TTY export module in this chapter The options can be modified using the methods L XSetParameter 7TY and read by calling L XGetParameter 7TY Export Path Path where the exported PRN file should be saved Export File File name of the PRN file If this option is empty a file selection dialog will always be displayed Export Quiet Use this option to configure the possibility of exporting without user interaction Value Meaning 0 Export with user interaction dialogs 1 No dialogs or mes
451. ver data with the SqliConnectionDataProvider Most database systems provide similar mechanisms At http ldataproviders codeplex com you ll find Open Source implementations for a range of other data sources like MySQL PostgreSQL SQLite DB2 and Oracle These may be a good starting point for your own implemetation as well 2 5 9 Export The export formats can be completely controlled remotely so that no interaction by the user is required anymore Additionally the selection of formats can be restricted as required or desired for the specific report Export Without User Interaction This can be easily done by using the ExportConfiguration class of the ListLabel component C ListLabel LL new ListLabel LL DataSource CreateDataSet Set target and path here PDF and project file ExportConfiguration expConfig new ExportConfiguration L1lExportTarget Pdf lt Target filename with path gt lt Project filename with path gt Show result expConfig ShowResult true Start export LL Export expConfig LL Dispose 56 Examples VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Set target and path here PDF and project file Dim expConfig As New ExportConfiguration LlExportTarget Pdf lt Target filename with path gt lt Project filename with path gt Show result expConfig ShowResult True Start export LL Export expConfig LL Dispose Many other op
452. voiceHeader LL AutoMasterMode LlAutoMasterMode AsVariables Call Designer LL Design 50 Examples Print LL Print LL Dispose VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Order data as variables LL DataMember Invoice head LL AutoMasterMode LlAutoMasterMode AsVariables Call Designer LL Design Print LL Print LL Dispose 2 5 4 Print Card With Simple Placeholders Printing a full page project which simply contains placeholders set by the application is achieved easily by binding it to a suitable object C public class DataSource public string Text1 get set public double Number1 get set Bie Prepare data source object dataSource new DataSource Text1 Test Number1 1 234 ListLabel LL new ListLabel LL DataSource new ObjectDataProvider dataSource LL AutoProjectType LlProject Card Call Designer LL Design Print LL Print LL Dispose 51 Programming With NET VB NET Public Class DataSource Dim _text1 As String Dim _number As Double Public Property Text1 As String Get Return _text1 End Get Set ByVal value As String _text1 value End Set End Property Public Property Number1 As Double Get Return _number End Get Set ByVal value As Double _number value End Set End Property End Class Prepare data source Dim dataSource As Object New DataSource dataSource Text1
453. void LL_AutoDefineField object sender AutoDefineElementEventArgs e if e Name EndsWith ID e Suppress true VB NET Dim LL As New ListLabel LL DataSource CreateDataSet Call Designer LL Design Print LL Print LL Dispose Sub LL_AutoDefineField sender As Object e As AutoDefineElementEventArgs _ Handles LL AutoDefineNewField If e Name EndsWith ID Then e Suppress True End If End Sub 55 Programming With NET Custom Data Structures Contents For data content apparently not directly supported a suitable provider is found in most cases anyway Business data from applications can generally be passed through the object data provider if the data is present in comma separated form the data provider from the Dataprovider sample can be used Many other data sources support the serialization to XML so that the XmIDataProvider can be used Your own class that implements the DataProvider interface can be used too of course A good starting point is the DataProvider sample which demonstrates a simple CSV data provider Often one of the existing classes can be used as base class If for example a data source is to be connected that implements the IDbConnection interface it can be inherited from DbConnectionDataProvider Only the Init method has to be overwritten where the available tables and relations have to be provided The component help for NET provides an example of how this is done for SOL Ser
454. w line objects should be exported Value Meaning 0 Ignore object 1 Object as complete Lineobject Default 1 Verbosity Text Configures how text objects should be exported Value Meaning 379 The Export Modules 0 Ignore object 1 Object as text object 2 Object as JPEG Default 1 Verbosity Text Frames Configures how text object frames should be exported Value Meaning 0 Single frames for top bottom left right 1 Complete frame as box Default 0 Verbosity RTF Contigures how RTF objects should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Verbosity Table Configures how table objects should be exported Value Meaning 0 Ignore object 1 As a table object Default 1 Verbosity Table Cell Configures how table cells should be exported Value Meaning 0 Ignore cell 1 As a cell object using the verbosity settings of the object types specified in the cell 2 Cells as JPEG Default 1 Verbosity Table Frames Configures how table frames should be exported Value Meaning 0 Ignore table frame 1 Only horizontal lines of table frames 2 The whole table line including all frames 3 Cell specific frames uses line objects Default 3 380 Programming Reference Verbosity LLXObject Configures how LLX objects e g chart object should be exported Value Meaning 0 Ignore object 1 Object as JPEG Default 1 Verbosity LLXObject HTMLObj Configures how the HTML object should
455. w text object at the beginning of the object list use HLLDOMOBJ hObj INT nRet L1DomCreateSubobject hObjList _T Text amp hObj You can create the following objects within the object list with the help of these functions for example Object type Required third parameter Line Line Rectangle Rectangle Ellipse Ellipse Drawing Drawing Text Text Template Template Barcode Barcode RTF RTFText HTML LLX LLHTMLObject Report container may contain tables ReportContainer charts and crosstabs Gauge Gauge PDF PDF Further possible values for other lists e g field list within a table can be found in the DOM Viewer s online help LIDomDeleteSubobject Deletes the specified subobject In order to delete the first object in the object list or example use the code INT nRet L1DomDeleteSubobject hObjList 135 Programming Using the API LIDomSetProperty Allows you to set a property for the specified object In order to allow the pagebreak for a text object for example you need INT nRet L1DomSetProperty hObj _T AllowPageWrap _T True The transfer parameter for the value must be a valid List amp Label formula A special feature results for properties that contain character strings e g the content of a text paragraph character strings must be set in quotation marks within the Designer to enable their use as a valid formula Therefore in order to transfer th
456. wPage you can register additional fields here AutoDefineVariable This event is invoked for each variable that is automatically created using data binding Using the Name and Value properties of the event arguments you can manipulate the names and content of each individual variable before passing it for printing AutoDefineField Analogous to AutoDefineVariable for fields AutoDefineTable This event is invoked for each table that has been registered via L DbAdaTable For example you can change the name or suppress passing AutoDefineTableSortOrder This event is invoked for each sort order that has been registered via L DbAdadTableSortOrder For example you can change the name or suppress passing AutoDefineTableRelation This event is invoked for each DataRelation that has been registered via L DbAdadTableRel ation For example you can change the name or suppress passing Please note that when using these events you must cast the sender object to the respective component types if you want to work with the triggering component instance Otherwise you may encounter problems with DrillDown or the preview in the Designer Example procedure TForm1 DBL21_1AutoDefineNewPage Sender TObject IsDesignMode Boolean begin sender as TDBL21_ L1DefineVariable MyCustomVariableName MyCustomVariableValue end 80 Simple Print and Design Methods 4 3 Simple Print and Design Methods 4 3 1 Working Principle
457. wn requires that your development system can handle callbacks or window notifications see chapter Callbacks and Notifications The NET and VCL components in databound mode support drilldown automatically if a data source is used that supports hierarchies and can be reset Most DataProviders comply with this requirement If using the component in this manner you can skip this chapter For C there is already a fully functional sample source code available You ll find it in the Samples program group for Visual C its title is Designer Preview and Drilldown For other development systems it is suggested to implement drilldown with different threads so tasks can be done in the background In this case you ll need to be able to start a thread with the printing procedure and you ll need synchronisation elements like mutex or critical section Your task is to initiate a real data print job with a corresponding filtered data source For this purpose information about the task start and end of a drilldown report is available in the callback Only minor changes to the normal print job routines are necessary Preparations To enable drilldown in List amp Label set the option LL_ OPTION_DRILLDOWNPARA METER to a value unequal to 0 125 Programming Using the API Please note that this option has to be set for each LL job that should support drilldown activate Drilldown for current LL Job L1SetOption hJob LL_OPTION_DRILLDO
458. xpression LL FilterExpression String filter expression 160 Function Reference The difference between defined and printed data records is that the user can apply a filter condition to the data records so that with every data record sent from the program the defined numbers increase but not necessarily the printed ones the latter values are only increased if the data record has been printed that is matches the filter condition Example HLLJOB hJob hJob LlJobOpen 0 L1DefineVariableStart hJob L1DefineVariable hJob Name Smith L1DefineVariable hJob forename George L1DefineVariableExt hJob residence Cambridge LL_ TEXT NULL L1DefineVariableExt hJob Postal Code CB1 LL_BARCODE_30F9 NULL eee CHOC eae L1lJobClose hJob See also LIDefineVariableStart LIDefineVariableExt LIDefineVariableExtHandle LIGet VariableContents LIGetVariableType LIDefineVariableExt Syntax INT L1lDefineVariableExt HLLJOB hJob LPCTSTR lpszName LPCTSTR lpszCont INT 1Para LPVOID lpPara Task Defines a variable and its contents Parameter hJob List amp Label job handle IpszName Pointer to a string with the name of the variable IpszCont Pointer to a string with the contents of the variable IPara Variable type LL_TEXT LL NUMERIC IpPara For future extensions must be NULL Return Value Error code Hints Please note the general hints in the s
459. xt LIPrintWillMatchFilter Syntax INT L1lPrintWillMatchFilter HLLJOB hJob Task Specifies whether the present data record matches the filter chosen by the user i e whether it will be printed with the next L Print or L PrintFields function 237 API Reference Parameter hJob List amp Label job handle Return Value lt 0 Error code 0 Not printed Printed Hints This function can only be called after L PrintStart or L PrintWithBoxStart The function calculates the filter value using the currently defined data variables or fields Example if L1PrintWillMatchFilter hJob See also LIPrintGetFilterExpression LIPrintDidMatchFilter LIPrintWithBoxStart Syntax INT L1PrintWithBoxStart HLLJOB hJob UINT nObjType LPCTSTR lpszObjName INT nPrintOptions INT nBoxType HWND hWnd LPCTSTR lpszTitle Task Starts the print job and opens the project file Supports an abort window Parameter hJob Job handle nObjType LL PROJECT LABEL LL PROJECT LIST or LL_PROJECT_CARD IpszObjName The file name of the project nPrintOptions Value Meaning LL_PRINT_ NORMAL output to printer LL_PRINT_PREVIEW output to preview LL PRINT FILE output to file LL_PRINT_EXPOAT output to an export module that can be defined with L PrintSetOptionString LL_PRN OPTSTR_EXPORT 238 Function Reference Optionally combined with one of the following flags Value Meaning LL PRINT MULTIPLE_JOBS output
460. y For this reason in file card or label projects only variables can be used while in list projects both variables and fields can occur For printing an invoice an application would typically declare the invoice header data such as customer name and address as variables while the item data such as article number unit price description etc would be passed as fields 1 3 4 Available User Interface Languages List amp Label is available in several languages Supplying additional languages is possible due to the modular architecture of List amp Label Besides the Designer the printer preview and export dialogs are localized by the language kits as long as they are not made up of common dialogs which are localized by the OS In order to integrate a language kit after purchase the Enterprise Edition already includes all available language kits use the corresponding language constant for LUJobOpen or set the Language property to the desired value when using a component Also supply your customers with the language files cmll21 Ing cmsl21 Ing List amp Label expects the files to be in the same path as the main DLL cmll21 dll 1 4 Getting Started With Programming 1 4 1 Overview The following picture shows the basic structure of List amp Label from a programmer s point of view 13 Introduction List amp Label DLL VCL Control ActiveX Control NET Control JAVA JNI Databinding VCL Control Application
461. y 78 GetFirstChartField 79 GetFirstField 79 GetFirstVar 80 GetNextEntry 80 LIExportOption 23 LIExprError 181 307 LIExprEvaluate 182 277 422 LIExprFree 83 LIExprGetUsedVars 83 LIExprGetUsedVarsEx 84 LIExprParse 85 LIExprType 86 LIGetChartFieldContents 87 LiGetDefaultPrinter 87 LIGetDefaultProjectParameter 88 415 LiGetErrortext 89 LIGetFieldContents 189 LIGetFieldType 90 198 LIGetNotificationMessage 20 190 LIGetOption 91 LIGetOptionString 92 275 442 LIPrintFi LIPrintGetChartObjectCount GetPrinterFromPrinterFile GetProjectParameter GetSumVariableContents GetUsedidentifiers 157 GetUsedidentifiersEx GetUserVariableContents GetVariableContents GetVariableType GetVersion JobClose JobOpen JobOpenLCID 92 98 192 92 98 LiJobStateRestore LiJobStateSave LocAddDesignLCID LocAddDictionaryEntry PreviewDeleteFiles PreviewDisplay LIPreviewDisplayEx LIPreviewSetTempPath Prin Print WithBox Start PrintAbort PrintCopyPrinterConfiguration LIPrintDbGetCurrentRelation LIPrintDbGetCurrentTable PrintDbGetCurrentTableFilter PrintDbGetCurrentTableRelation PrintDbGetCurrentTableSortOrder PrintDbGetRootTableCount LIPrintDeclareChartRow LIPrintDidMatchFilter PrintEnableObjec PrintEnd PrinterSetup PrintFields 218 eldsEnd PrintGetCurrentPage PrintGetFilterExpression PrintGetltemsPerPage PrintGetOption LIPrintGetOptionString 194 196 198
462. y List amp Label as a black box And when List amp Label has to print such an object it turns to your program to ask it to carry out this function This allows your application to extend the support for special objects for example graphics with formats not implemented in List amp Label This is easier than a whole COM interface because you need to supply only one function for the job Using the callback function you can add data to a page important for labels when needed you can add information like page no print date or similar onto a page outside of the labels which is controlled by the programmer and consequently cannot be removed by the user in the Designer Objects can be hidden this can also be done with L PrintEnableObject or the appearance condition of an object All this is possible if you implement one of the following e a callback routine is defined and its address is passed on to List amp Label by L SetNotificationCallback or e you react to messages sent by List amp Label via Windows messages These are sent by List amp Label to the window which is stated with L DefineLayout and L PrintWithBoxStart In both cases you obtain detailed information about the function which is to be carried out The rest of this chapter describes how to implement such a callback routine For an overview of all available callbacks see chapter Callback Reference 5 6 2 User Objects As List amp Label cannot draw al
463. y tabs for further use in the function L GetUsed dentifiers Parameter hJob List amp Label job handle pszTablelD Table ID to which this sort order applies Must be identical to the ID passed in L DbAdaTable pszSortOrderID Unique ID of the table sort order It is returned by LIPrintDbGetCurrentlableSortOrder at print time pszSortOrderDisplayName Name of the table sort order as displayed in the Designer If no name is given the display name and the unique name are identical pszField List of fields that are relevant for the sorting separated by tabs if they should be regarded in the function L GetUsed dentifiers Return Value Hints Error code See the hints in chapter Printing Relational Data Before using the call the able must be passed with L DbAddTable Example See also HLLJOB hJob hJob LlJobOpen 0 1DbAddTable hJob Orders NULL 1DbAddTableSortOrderEx hJob Orders Name ASC Name Orders Name Ti GUC nes lJobClose hJob b E E LIDbAddTableSortOrder LIDbAddTable LIDbAddTableRelation LIPrintDbGet CurrentTable LIPrintDoGetCurrentTableSortOrder LIPrintDbGetCurrentTable Relation LIDbSetMasterTable Syntax 150 INT L1lDbSetMasterTable HLLJOB hJob LPCTSTR pszTableID Function Reference Task If the master data is passed as variables List amp Label needs to know which table is the master table in order to be able to

Download Pdf Manuals

image

Related Search

Related Contents

GP Batteries Super Alkaline GP362  Hercules U26 EKORET SAPHIR  EVGA 256-P2-N749-LR GeForce 8500 GT graphics card  Toshiba Satellite C55-A5204  RI.MA.21 - Comune di Massa  Fujitsu Webcam USB    Frigidaire FFEC3005LB Product Specifications Sheet  Samsung MM-DS80M Manuel de l'utilisateur  SPEEDLINK THEBE  

Copyright © All rights reserved.
Failed to retrieve file