├── Images ├── TLDesignerAction30.bmp ├── TListLabel30.bmp ├── TLlDesignerFunction30.bmp ├── TLlDesignerObject30.bmp ├── TLlPreviewControl30.bmp └── TLlRTFControl30.bmp ├── LICENSE ├── ListLabel30Components.dof ├── ListLabel30Components.dpk ├── ListLabel30Components.dproj ├── ListLabel30Components.dres ├── ListLabel30Components.res ├── ListLabel30ComponentsResource.rc ├── README.md └── Sources ├── LL30Report_Reg.pas ├── LLDataProvider.pas ├── LLDataSetDataProvider.pas ├── LLObjectEditor.dfm ├── LLObjectEditor.pas ├── LLPreview.pas ├── LLReport_Types.pas ├── LLThreads.pas ├── ListLabel30.pas ├── ListLabelDataProviderInterface.pas ├── ObjTree.pas ├── cmbtLL30.pas ├── cmbtLL30x.pas ├── cmbtLS30x.pas ├── l30CommonInterfaces.pas ├── l30FireDACInterfaces.pas └── l30dom.pas /Images/TLDesignerAction30.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/Images/TLDesignerAction30.bmp -------------------------------------------------------------------------------- /Images/TListLabel30.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/Images/TListLabel30.bmp -------------------------------------------------------------------------------- /Images/TLlDesignerFunction30.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/Images/TLlDesignerFunction30.bmp -------------------------------------------------------------------------------- /Images/TLlDesignerObject30.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/Images/TLlDesignerObject30.bmp -------------------------------------------------------------------------------- /Images/TLlPreviewControl30.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/Images/TLlPreviewControl30.bmp -------------------------------------------------------------------------------- /Images/TLlRTFControl30.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/Images/TLlRTFControl30.bmp -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) combit GmbH 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /ListLabel30Components.dof: -------------------------------------------------------------------------------- 1 | [Directories] 2 | SearchPath=.\Sources\ 3 | OutputDir=.\ 4 | UnitOutputDir=.\ 5 | PackageDLLOutputDir=.\ 6 | PackageDCPOutputDir=.\ 7 | -------------------------------------------------------------------------------- /ListLabel30Components.dpk: -------------------------------------------------------------------------------- 1 | package ListLabel30Components; 2 | 3 | {$R *.res} 4 | {$R *.dres} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO OFF} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION OFF} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES ON} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST OFF} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'combit List & Label 30 Components'} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | vcl, 34 | {$ifdef win32} 35 | DesignIde, 36 | {$endif} 37 | dbrtl, 38 | vclimg, 39 | rtl, 40 | FireDAC, 41 | FireDACCommonDriver, 42 | FireDACCommon; 43 | 44 | contains 45 | ListLabelDataProviderInterface in 'Sources\ListLabelDataProviderInterface.pas', 46 | LLDataSetDataProvider in 'Sources\LLDataSetDataProvider.pas', 47 | LLDataProvider in 'Sources\LLDataProvider.pas', 48 | {$ifdef win32} 49 | LLObjectEditor in 'Sources\LLObjectEditor.pas', 50 | {$endif} 51 | ObjTree in 'Sources\ObjTree.pas', 52 | LLThreads in 'Sources\LLThreads.pas', 53 | {$ifdef win32} 54 | LL30Report_Reg in 'Sources\LL30Report_Reg.pas', 55 | {$endif} 56 | LLReport_Types in 'Sources\LLReport_Types.pas', 57 | ListLabel30 in 'Sources\ListLabel30.pas', 58 | l30FireDACInterfaces in 'Sources\l30FireDACInterfaces.pas', 59 | l30CommonInterfaces in 'Sources\l30CommonInterfaces.pas', 60 | LLPreview in 'Sources\LLPreview.pas', 61 | cmbtLL30x in 'Sources\cmbtLL30x.pas', 62 | cmbtLS30x in 'Sources\cmbtLS30x.pas'; 63 | 64 | end. 65 | 66 | -------------------------------------------------------------------------------- /ListLabel30Components.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {85033385-2CDC-416E-9BA3-A9ED00CFC926} 4 | ListLabel30Components.dpk 5 | True 6 | Debug 7 | 3 8 | Package 9 | VCL 10 | 19.3 11 | Win32 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Cfg_1 29 | true 30 | true 31 | 32 | 33 | true 34 | Base 35 | true 36 | 37 | 38 | true 39 | Cfg_2 40 | true 41 | true 42 | 43 | 44 | .\$(Platform)\$(Config) 45 | ..\Sources\;$(DCC_UnitSearchPath) 46 | true 47 | true 48 | false 49 | Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) 50 | false 51 | 00400000 52 | ListLabel30Components 53 | false 54 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName= 55 | 1031 56 | false 57 | false 58 | combit List & Label 30 Components 59 | All 60 | 61 | 62 | vclimg;vcl;rtl;dbrtl;FireDAC;FireDACCommonDriver;FireDACCommon;$(DCC_UsePackage) 63 | true 64 | System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 65 | CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) 66 | 1033 67 | 68 | 69 | 0 70 | RELEASE;$(DCC_Define) 71 | 0 72 | false 73 | 74 | 75 | true 76 | 1033 77 | CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) 78 | 79 | 80 | DEBUG;$(DCC_Define) 81 | false 82 | true 83 | 84 | 85 | true 86 | 3 87 | 1033 88 | true 89 | CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) 90 | 91 | 92 | 93 | MainSource 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | LLFireDACInterf 115 | 116 | 117 | 118 | 119 | 120 | 121 | BITMAP 122 | TLDesignerAction30 123 | 124 | 125 | BITMAP 126 | TListLabel30 127 | 128 | 129 | BITMAP 130 | TLlDesignerFunction30 131 | 132 | 133 | BITMAP 134 | TLlDesignerObject30 135 | 136 | 137 | BITMAP 138 | TLlPreviewControl30 139 | 140 | 141 | BITMAP 142 | TLlRTFControl30 143 | 144 | 145 | Cfg_2 146 | Base 147 | 148 | 149 | Base 150 | 151 | 152 | Cfg_1 153 | Base 154 | 155 | 156 | 157 | Delphi.Personality.12 158 | Package 159 | 160 | 161 | 162 | ListLabel30Components.dpk 163 | 164 | 165 | Embarcadero C++Builder-Package für Office 2000-Server 166 | Embarcadero C++Builder-Package für Office XP-Server 167 | Microsoft Office 2000 Beispiele für gekapselte Komponenten für Automatisierungsserver 168 | Microsoft Office XP Beispiele für gekapselte Komponenten für Automation Server 169 | 170 | 171 | 172 | True 173 | True 174 | 175 | 176 | 177 | 178 | ListLabel30Components.bpl 179 | true 180 | 181 | 182 | 183 | 184 | 185 | 1 186 | 187 | 188 | 0 189 | 190 | 191 | 192 | 193 | classes 194 | 64 195 | 196 | 197 | classes 198 | 64 199 | 200 | 201 | 202 | 203 | classes 204 | 1 205 | 206 | 207 | classes 208 | 1 209 | 210 | 211 | 212 | 213 | res\xml 214 | 1 215 | 216 | 217 | res\xml 218 | 1 219 | 220 | 221 | 222 | 223 | library\lib\armeabi-v7a 224 | 1 225 | 226 | 227 | 228 | 229 | library\lib\armeabi 230 | 1 231 | 232 | 233 | library\lib\armeabi 234 | 1 235 | 236 | 237 | 238 | 239 | library\lib\armeabi-v7a 240 | 1 241 | 242 | 243 | 244 | 245 | library\lib\mips 246 | 1 247 | 248 | 249 | library\lib\mips 250 | 1 251 | 252 | 253 | 254 | 255 | library\lib\armeabi-v7a 256 | 1 257 | 258 | 259 | library\lib\arm64-v8a 260 | 1 261 | 262 | 263 | 264 | 265 | library\lib\armeabi-v7a 266 | 1 267 | 268 | 269 | 270 | 271 | res\drawable 272 | 1 273 | 274 | 275 | res\drawable 276 | 1 277 | 278 | 279 | 280 | 281 | res\values 282 | 1 283 | 284 | 285 | res\values 286 | 1 287 | 288 | 289 | 290 | 291 | res\values-v21 292 | 1 293 | 294 | 295 | res\values-v21 296 | 1 297 | 298 | 299 | 300 | 301 | res\values 302 | 1 303 | 304 | 305 | res\values 306 | 1 307 | 308 | 309 | 310 | 311 | res\drawable 312 | 1 313 | 314 | 315 | res\drawable 316 | 1 317 | 318 | 319 | 320 | 321 | res\drawable-xxhdpi 322 | 1 323 | 324 | 325 | res\drawable-xxhdpi 326 | 1 327 | 328 | 329 | 330 | 331 | res\drawable-xxxhdpi 332 | 1 333 | 334 | 335 | res\drawable-xxxhdpi 336 | 1 337 | 338 | 339 | 340 | 341 | res\drawable-ldpi 342 | 1 343 | 344 | 345 | res\drawable-ldpi 346 | 1 347 | 348 | 349 | 350 | 351 | res\drawable-mdpi 352 | 1 353 | 354 | 355 | res\drawable-mdpi 356 | 1 357 | 358 | 359 | 360 | 361 | res\drawable-hdpi 362 | 1 363 | 364 | 365 | res\drawable-hdpi 366 | 1 367 | 368 | 369 | 370 | 371 | res\drawable-xhdpi 372 | 1 373 | 374 | 375 | res\drawable-xhdpi 376 | 1 377 | 378 | 379 | 380 | 381 | res\drawable-mdpi 382 | 1 383 | 384 | 385 | res\drawable-mdpi 386 | 1 387 | 388 | 389 | 390 | 391 | res\drawable-hdpi 392 | 1 393 | 394 | 395 | res\drawable-hdpi 396 | 1 397 | 398 | 399 | 400 | 401 | res\drawable-xhdpi 402 | 1 403 | 404 | 405 | res\drawable-xhdpi 406 | 1 407 | 408 | 409 | 410 | 411 | res\drawable-xxhdpi 412 | 1 413 | 414 | 415 | res\drawable-xxhdpi 416 | 1 417 | 418 | 419 | 420 | 421 | res\drawable-xxxhdpi 422 | 1 423 | 424 | 425 | res\drawable-xxxhdpi 426 | 1 427 | 428 | 429 | 430 | 431 | res\drawable-small 432 | 1 433 | 434 | 435 | res\drawable-small 436 | 1 437 | 438 | 439 | 440 | 441 | res\drawable-normal 442 | 1 443 | 444 | 445 | res\drawable-normal 446 | 1 447 | 448 | 449 | 450 | 451 | res\drawable-large 452 | 1 453 | 454 | 455 | res\drawable-large 456 | 1 457 | 458 | 459 | 460 | 461 | res\drawable-xlarge 462 | 1 463 | 464 | 465 | res\drawable-xlarge 466 | 1 467 | 468 | 469 | 470 | 471 | res\values 472 | 1 473 | 474 | 475 | res\values 476 | 1 477 | 478 | 479 | 480 | 481 | 1 482 | 483 | 484 | 1 485 | 486 | 487 | 0 488 | 489 | 490 | 491 | 492 | 1 493 | .framework 494 | 495 | 496 | 1 497 | .framework 498 | 499 | 500 | 0 501 | 502 | 503 | 504 | 505 | 1 506 | .dylib 507 | 508 | 509 | 1 510 | .dylib 511 | 512 | 513 | 0 514 | .dll;.bpl 515 | 516 | 517 | 518 | 519 | 1 520 | .dylib 521 | 522 | 523 | 1 524 | .dylib 525 | 526 | 527 | 1 528 | .dylib 529 | 530 | 531 | 1 532 | .dylib 533 | 534 | 535 | 1 536 | .dylib 537 | 538 | 539 | 0 540 | .bpl 541 | 542 | 543 | 544 | 545 | 0 546 | 547 | 548 | 0 549 | 550 | 551 | 0 552 | 553 | 554 | 0 555 | 556 | 557 | 0 558 | 559 | 560 | 0 561 | 562 | 563 | 0 564 | 565 | 566 | 0 567 | 568 | 569 | 570 | 571 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 572 | 1 573 | 574 | 575 | 576 | 577 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 578 | 1 579 | 580 | 581 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 582 | 1 583 | 584 | 585 | 586 | 587 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 588 | 1 589 | 590 | 591 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 592 | 1 593 | 594 | 595 | 596 | 597 | 1 598 | 599 | 600 | 1 601 | 602 | 603 | 1 604 | 605 | 606 | 607 | 608 | 1 609 | 610 | 611 | 1 612 | 613 | 614 | 1 615 | 616 | 617 | 618 | 619 | 1 620 | 621 | 622 | 1 623 | 624 | 625 | 1 626 | 627 | 628 | 629 | 630 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 631 | 1 632 | 633 | 634 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 635 | 1 636 | 637 | 638 | 639 | 640 | 1 641 | 642 | 643 | 1 644 | 645 | 646 | 1 647 | 648 | 649 | 650 | 651 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 652 | 1 653 | 654 | 655 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 656 | 1 657 | 658 | 659 | 660 | 661 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 662 | 1 663 | 664 | 665 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 666 | 1 667 | 668 | 669 | 670 | 671 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 672 | 1 673 | 674 | 675 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 676 | 1 677 | 678 | 679 | 680 | 681 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 682 | 1 683 | 684 | 685 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 686 | 1 687 | 688 | 689 | 690 | 691 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 692 | 1 693 | 694 | 695 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 696 | 1 697 | 698 | 699 | 700 | 701 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 702 | 1 703 | 704 | 705 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 706 | 1 707 | 708 | 709 | 710 | 711 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 712 | 1 713 | 714 | 715 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 716 | 1 717 | 718 | 719 | 720 | 721 | 1 722 | 723 | 724 | 1 725 | 726 | 727 | 1 728 | 729 | 730 | 731 | 732 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 733 | 1 734 | 735 | 736 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 737 | 1 738 | 739 | 740 | 741 | 742 | 1 743 | 744 | 745 | 1 746 | 747 | 748 | 1 749 | 750 | 751 | 752 | 753 | 1 754 | 755 | 756 | 1 757 | 758 | 759 | 1 760 | 761 | 762 | 763 | 764 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 765 | 1 766 | 767 | 768 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 769 | 1 770 | 771 | 772 | 773 | 774 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 775 | 1 776 | 777 | 778 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 779 | 1 780 | 781 | 782 | 783 | 784 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 785 | 1 786 | 787 | 788 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 789 | 1 790 | 791 | 792 | 793 | 794 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 795 | 1 796 | 797 | 798 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 799 | 1 800 | 801 | 802 | 803 | 804 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 805 | 1 806 | 807 | 808 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 809 | 1 810 | 811 | 812 | 813 | 814 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 815 | 1 816 | 817 | 818 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 819 | 1 820 | 821 | 822 | 823 | 824 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 825 | 1 826 | 827 | 828 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 829 | 1 830 | 831 | 832 | 833 | 834 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 835 | 1 836 | 837 | 838 | ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 839 | 1 840 | 841 | 842 | 843 | 844 | 1 845 | 846 | 847 | 1 848 | 849 | 850 | 851 | 852 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 853 | 1 854 | 855 | 856 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 857 | 1 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 1 867 | 868 | 869 | 1 870 | 871 | 872 | 1 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | Contents\Resources 881 | 1 882 | 883 | 884 | Contents\Resources 885 | 1 886 | 887 | 888 | 889 | 890 | library\lib\armeabi-v7a 891 | 1 892 | 893 | 894 | library\lib\arm64-v8a 895 | 1 896 | 897 | 898 | 1 899 | 900 | 901 | 1 902 | 903 | 904 | 1 905 | 906 | 907 | 1 908 | 909 | 910 | 1 911 | 912 | 913 | 1 914 | 915 | 916 | 0 917 | 918 | 919 | 920 | 921 | library\lib\armeabi-v7a 922 | 1 923 | 924 | 925 | 926 | 927 | 1 928 | 929 | 930 | 1 931 | 932 | 933 | 934 | 935 | Assets 936 | 1 937 | 938 | 939 | Assets 940 | 1 941 | 942 | 943 | 944 | 945 | Assets 946 | 1 947 | 948 | 949 | Assets 950 | 1 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 12 967 | 968 | 969 | 970 | 971 | 972 | -------------------------------------------------------------------------------- /ListLabel30Components.dres: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/ListLabel30Components.dres -------------------------------------------------------------------------------- /ListLabel30Components.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/ListLabel30Components.res -------------------------------------------------------------------------------- /ListLabel30ComponentsResource.rc: -------------------------------------------------------------------------------- 1 | TLDesignerAction30 BITMAP "Images\\TLDesignerAction30.bmp" 2 | TListLabel30 BITMAP "Images\\TListLabel30.bmp" 3 | TLlDesignerFunction30 BITMAP "Images\\TLlDesignerFunction30.bmp" 4 | TLlDesignerObject30 BITMAP "Images\\TLlDesignerObject30.bmp" 5 | TLlPreviewControl30 BITMAP "Images\\TLlPreviewControl30.bmp" 6 | TLlRTFControl30 BITMAP "Images\\TLlRTFControl30.bmp" 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # List & Label Delphi Data Providers 2 | This repository is a community effort to write TListLabelDataProvider implementations for usage with the **List & Label Reporting Tool**. 3 | 4 | While the support for .NET has been around a long time, we're trying to build a similar ecosystem for Delphi through this repository. Any help is greatly appreciated. 5 | 6 | # What's Available so Far 7 | The sources feature a new VCL component (using FireDAC) that uses the data provider interface. This enables a number of great features that were previously unavailable to Delphi developers using our "old" (BDE) databound component: 8 | 9 | - Multiple report containers 10 | - Nested tables 11 | - Databound report parameters 12 | - Expandable regions in tables and crosstabs 13 | - Interactive sorting in table headers 14 | - Support of DesignerFunctions and DesignerObjects 15 | - Keep blocks together 16 | 17 | Samples showing how to use the component to bind to FireDAC data are also included in the full product setup or here on [GitHub](https://github.com/combit/ll-samples/tree/main/Delphi/FireDAC/Samples). You should be able to bind to Oracle, MS SQL Server, SQLite, DB2, MySQL, PostgreSQL to name just a few. 18 | 19 | Copy the contents of this repository to your List & Label installation under "..\Samples\Delphi\FireDAC". 20 | 21 | # Contributions 22 | We're happy to receive pull requests for any improvements on this repository. Please make sure with every contribution that the component needs to be "Delphi-like". 23 | 24 | Further fields of interest include: 25 | - Add additional data providers to bind to CSV, XML, JSON etc. 26 | 27 | A big special thank you goes to Andreas Müller of Nord-Vision IT - his contributions to this repository were invaluable. 28 | 29 | # About List & Label and Where to Get 30 | List & Label is our **Reporting Tool for Software Developers** for desktop, web and cloud applications. For further information and a fully functional free 30-day trial version please visit our [website](https://www.combit.com/reporting-tool/). 31 | 32 | # Contact 33 | Please contact us at [github@combit.com](mailto:github@combit.com) with any additional feedback. -------------------------------------------------------------------------------- /Sources/LL30Report_Reg.pas: -------------------------------------------------------------------------------- 1 | {================================================================================= 2 | 3 | Copyright © combit GmbH, Konstanz 4 | 5 | ---------------------------------------------------------------------------------- 6 | File : LL30Report_Reg.pas 7 | Module : List & Label 30 8 | Descr. : Implementation file for the List & Label 30 VCL-Component 9 | Version: 30.000 10 | ================================================================================== 11 | } 12 | 13 | unit LL30Report_Reg; 14 | {$define UNICODE} 15 | 16 | interface 17 | 18 | uses Forms, Dialogs, Classes, DesignIntf, DesignEditors; 19 | type 20 | TListLabel30Loader = class(TComponentEditor) 21 | public 22 | procedure Edit; override; 23 | function GetVerbCount: Integer; Override; 24 | function GetVerb(Index: Integer): string; Override; 25 | procedure ExecuteVerb(Index: Integer); Override; 26 | end; 27 | 28 | TDetailsSourcesPropertyEditor = class(TPropertyEditor) 29 | public 30 | function GetAttributes: TPropertyAttributes; override; 31 | function GetValue: string; override; 32 | procedure Edit; override; 33 | end; 34 | 35 | TDetailsSourcesKeyFieldProperty = class(TStringProperty) 36 | public 37 | function GetAttributes: TPropertyAttributes; override; 38 | procedure GetValueList(List: TStrings); virtual; 39 | procedure GetValues(Proc: TGetStrProc); override; 40 | function GetDataSourcePropName: string; virtual; 41 | end; 42 | 43 | procedure Register; 44 | 45 | implementation 46 | uses StrEdit, ListLabel30, LLReport_Types, LLObjectEditor, Typinfo, DB, LLPreview; 47 | 48 | procedure Register; 49 | begin 50 | 51 | RegisterComponentEditor(TListLabel30, TListLabel30Loader); 52 | RegisterComponents('combit', [TListLabel30, TLlPreviewControl30, TLlDesignerObject30, TLlDesignerFunction30, TLDesignerAction30, TLlRTFControl30]); 53 | RegisterPropertyEditor(TypeInfo(TDetailSourceList),TListLabel30, 'DetailSources', TDetailsSourcesPropertyEditor); 54 | RegisterPropertyEditor(TypeInfo(TDetailSourceList),TLLDataController, 'DetailSources',TDetailsSourcesPropertyEditor); 55 | 56 | end; 57 | 58 | {- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} 59 | { TLLDesignerLoader } 60 | {- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} 61 | procedure TListLabel30Loader.Edit; 62 | begin 63 | ExecuteDetailSourcesEditor( TListLabel30(Component).Name + '.DetailSources', 64 | Designer, 65 | 'DetailSources', 66 | TListLabel30(Component).DataController.DetailSources); 67 | end; 68 | 69 | 70 | function TListLabel30Loader.GetVerbCount: Integer; 71 | begin 72 | GetVerbCount:=inherited GetVerbCount+1; 73 | end; 74 | 75 | function TListLabel30Loader.GetVerb(Index: Integer): string; 76 | begin 77 | Case Index of 78 | 0: GetVerb:='Edit data structure...'; 79 | else GetVerb:=inherited GetVerb(index-1); 80 | end; 81 | end; 82 | 83 | procedure TListLabel30Loader.ExecuteVerb(Index: Integer); 84 | begin 85 | Case Index of 86 | 0: self.Edit; 87 | else inherited ExecuteVerb(index-1); 88 | end; 89 | end; 90 | 91 | 92 | function TDetailsSourcesPropertyEditor.GetAttributes: TPropertyAttributes; 93 | begin 94 | result := [paDialog, paReadOnly]; 95 | end; 96 | 97 | function TDetailsSourcesPropertyEditor.GetValue: string; 98 | begin 99 | result := '(TDetailSourceList)'; 100 | end; 101 | 102 | procedure TDetailsSourcesPropertyEditor.Edit; 103 | begin 104 | if GetComponent(0) is TLLDataController then 105 | Begin 106 | ExecuteDetailSourcesEditor( TLLDataController(GetComponent(0)).Owner.Name + '.DetailSources', 107 | Designer, 108 | 'DetailSources', 109 | TLLDataController(GetComponent(0)).DetailSources); 110 | end; 111 | end; 112 | 113 | 114 | 115 | function GetPropertyValue(Instance: TPersistent; const PropName: string): TPersistent; 116 | var 117 | PropInfo: PPropInfo; 118 | begin 119 | Result := nil; 120 | PropInfo := TypInfo.GetPropInfo(Instance.ClassInfo, PropName); 121 | if (PropInfo <> nil) and (PropInfo^.PropType^.Kind = tkClass) then 122 | Result := TObject(GetOrdProp(Instance, PropInfo)) as TPersistent; 123 | end; 124 | 125 | function TDetailsSourcesKeyFieldProperty.GetAttributes: TPropertyAttributes; 126 | Begin 127 | Result := [paValueList, paSortList, paMultiSelect]; 128 | end; 129 | 130 | procedure TDetailsSourcesKeyFieldProperty.GetValueList(List: TStrings); 131 | var 132 | DataSource: TDataSource; 133 | begin 134 | DataSource := GetPropertyValue(GetComponent(0), GetDataSourcePropName) as TDataSource; 135 | if (DataSource <> nil) and (DataSource.DataSet <> nil) then 136 | DataSource.DataSet.GetFieldNames(List); 137 | end; 138 | 139 | procedure TDetailsSourcesKeyFieldProperty.GetValues(Proc: TGetStrProc); 140 | var 141 | I: Integer; 142 | Values: TStringList; 143 | begin 144 | Values := TStringList.Create; 145 | try 146 | GetValueList(Values); 147 | for I := 0 to Values.Count - 1 do Proc(Values[I]); 148 | finally 149 | Values.Free; 150 | end; 151 | 152 | 153 | End; 154 | 155 | function TDetailsSourcesKeyFieldProperty.GetDataSourcePropName: string; 156 | Begin 157 | if GetPropInfo.Name = 'DetailKeyField' then Exit('DataSource'); 158 | if GetPropInfo.Name = 'PrimaryKeyField' then Exit('DataSource'); 159 | Result := 'MasterSource'; 160 | End; 161 | 162 | end. 163 | -------------------------------------------------------------------------------- /Sources/LLDataProvider.pas: -------------------------------------------------------------------------------- 1 | {================================================================================= 2 | 3 | Copyright © combit GmbH, Konstanz 4 | 5 | ---------------------------------------------------------------------------------- 6 | File : LLDataProvider.pas 7 | Module : List & Label 30 8 | Descr. : Implementation file for the List & Label 30 VCL-Component 9 | Version: 30.000 10 | ================================================================================== 11 | } 12 | 13 | unit LLDataProvider; 14 | 15 | interface 16 | {$WEAKPACKAGEUNIT ON} 17 | uses ListLabelDataProviderInterface, system.Generics.Collections, Classes, windows, llreport_types; 18 | 19 | type 20 | TListLabelDataProvider = class; 21 | TListLabelTable = class; 22 | TListLabelTableRow = class; 23 | 24 | TDataProviderInterfaceProxyBase = class(TInterfacedObject) 25 | private 26 | FDataProvider: TListLabelDataProvider; 27 | FTable: TListLabelTable; 28 | FSortDescription: String; 29 | FParent: TComponent; 30 | FFilter: String; 31 | FAdvancedFilter: String; 32 | procedure SetDataProvider(const Value: TListLabelDataProvider); 33 | procedure SetAdvancedFilter(const Value: String); 34 | procedure SetFilter(const Value: String); 35 | procedure SetParent(const Value: TComponent); 36 | procedure SetSortDescription(const Value: String); 37 | procedure SetTable(const Value: TListLabelTable); 38 | procedure DefineData(Row: TListLabelTableRow; Level: Integer); 39 | 40 | protected 41 | property Provider: TListLabelDataProvider read FDataProvider write SetDataProvider; 42 | property Parent: TComponent read FParent write SetParent; 43 | property Table: TListLabelTable read FTable write SetTable; 44 | property SortDescription: String read FSortDescription write SetSortDescription; 45 | property Filter: String read FFilter write SetFilter; 46 | property AdvancedFilter: String read FAdvancedFilter write SetAdvancedFilter; 47 | function ApplySortOrder(const pszSortOrder: PWideChar): HResult; stdcall; 48 | function ApplyFilter(const arvFields: Variant; const arvValues: Variant): HResult; stdcall; 49 | function ApplyAdvancedFilter(const pszFilter: PWideChar; const arvValues: Variant): HResult; stdcall; 50 | function SetUsedIdentifiers(const arvVieldRestriction: Variant): HResult; stdcall; 51 | function SetOption(nIndex: integer; const pvValue: Variant): HResult; stdcall; 52 | function GetOption(nIndex: integer; var pvValue: Variant): HResult; stdcall; 53 | function DefineDelayedInfo(nInfo: integer): HResult; stdcall; 54 | end; 55 | 56 | TDataProviderInterfaceProxyRoot = class(TDataProviderInterfaceProxyBase, ILlDataProvider) 57 | private 58 | function OpenTable(const pszTableName: PWideChar; out ppUnkOfNewDataProvider: ILlDataProvider): HResult; stdcall; 59 | function OpenChildTable(const pszRelation: PWideChar; out ppUnkOfNewDataProvider: ILlDataProvider): HResult; stdcall; 60 | function GetRowCount(var pnRows: integer): HResult; stdcall; 61 | function MoveNext(): HResult; stdcall; 62 | function DefineRow(enDefineRowMode: DefineDelayedInfoType; const arvRelations: Variant): HResult; stdcall; 63 | function Dispose(): HResult; stdcall; 64 | public 65 | constructor Create(ListLabel: TComponent; AProvider: TListLabelDataProvider); 66 | destructor Destroy; override; 67 | end; 68 | 69 | TDataProviderInterfaceProxyNode = class(TDataProviderInterfaceProxyBase, ILlDataProvider) 70 | private 71 | FEnumerator: TEnumerator; 72 | function OpenTable(const pszTableName: PWideChar; out ppUnkOfNewDataProvider: ILlDataProvider): HResult; stdcall; 73 | function OpenChildTable(const pszRelation: PWideChar; out ppUnkOfNewDataProvider: ILlDataProvider): HResult; stdcall; 74 | function GetRowCount(var pnRows: integer): HResult; stdcall; 75 | function MoveNext(): HResult; stdcall; 76 | function DefineRow(enDefineRowMode: DefineDelayedInfoType; const arvRelations: Variant): HResult; stdcall; 77 | function Dispose(): HResult; stdcall; 78 | procedure PrepareTable; 79 | procedure SetEnumerator(const Value: TEnumerator); 80 | property Enumerator: TEnumerator read FEnumerator write SetEnumerator; 81 | public 82 | constructor Create(AProvider: TListLabelDataProvider; ListLabel: TComponent; ATable: TListLabelTable); 83 | destructor Destroy; override; 84 | end; 85 | 86 | TListLabelTableRelation = class; 87 | TListLabelDataProvider = class 88 | public 89 | function Tables: TObjectList; virtual; abstract; 90 | function Relations: TObjectList; virtual; abstract; 91 | function GetTable(TableName: string): TListLabelTable; virtual; abstract; 92 | function GetRelation(RelationName: string) : TListLabelTableRelation; virtual; abstract; 93 | end; 94 | 95 | TListLabelTableRelation = class 96 | function RelationName: String; virtual; abstract; 97 | function ParentColumnName: String; virtual; abstract; 98 | function ChildColumnName: String; virtual; abstract; 99 | function ParentTableName: String; virtual; abstract; 100 | function ChildTableName: String; virtual; abstract; 101 | end; 102 | 103 | TListLabelTable = class 104 | function SupportsCount: Boolean; virtual; abstract; 105 | function SupportsSorting: Boolean; virtual; abstract; 106 | function SupportsAdvancedSorting: Boolean; virtual; abstract; 107 | function SupportsFiltering: Boolean; virtual; abstract; 108 | procedure ApplySort(SortDescription: String); virtual; abstract; 109 | procedure ApplyFilter(Filter: String); virtual; abstract; 110 | function Count: Integer; virtual; abstract; 111 | function TableName: String; virtual; abstract; 112 | function Rows: TEnumerable; virtual; abstract; 113 | function SortDescriptions: TList; virtual; abstract; 114 | function SchemaRow: TListLabelTableRow; virtual; abstract; 115 | end; 116 | 117 | TListLabelTableColumn = class 118 | function ColumnName: String; virtual; abstract; 119 | function Content: String; virtual; abstract; 120 | function ImgHandle: Cardinal; virtual; abstract; 121 | function FieldType: Integer; virtual; abstract; 122 | end; 123 | 124 | TListLabelTableRow = class 125 | function SupportsGetParentRow: Boolean; virtual; abstract; 126 | function TableName: String; virtual; abstract; 127 | function Columns: TObjectList; virtual; abstract; 128 | function GetChildTable(Relation: TListLabelTableRelation): TListLabelTable; virtual; abstract; 129 | function GetParentRow(Relation: TListLabelTableRelation): TListLabelTableRow; virtual; abstract; 130 | end; 131 | 132 | implementation 133 | uses sysutils, ListLabel30; 134 | { TDataProviderRoot } 135 | 136 | constructor TDataProviderInterfaceProxyRoot.Create(ListLabel: TComponent; AProvider: TListLabelDataProvider); 137 | begin 138 | inherited create; 139 | Provider := AProvider; 140 | Parent := ListLabel; 141 | Table := nil; 142 | end; 143 | 144 | destructor TDataProviderInterfaceProxyRoot.Destroy; 145 | begin 146 | inherited; 147 | end; 148 | 149 | function TDataProviderInterfaceProxyRoot.Dispose: HResult; 150 | begin 151 | Result := S_OK; 152 | end; 153 | 154 | function TDataProviderInterfaceProxyRoot.DefineRow(enDefineRowMode: DefineDelayedInfoType; const arvRelations: Variant): HResult; 155 | begin 156 | Result := E_NOTIMPL; 157 | end; 158 | 159 | 160 | function TDataProviderInterfaceProxyRoot.GetRowCount(var pnRows: integer): HResult; 161 | begin 162 | Result := E_NOTIMPL; 163 | end; 164 | 165 | function TDataProviderInterfaceProxyRoot.MoveNext: HResult; 166 | begin 167 | Result := E_NOTIMPL; 168 | end; 169 | 170 | function TDataProviderInterfaceProxyRoot.OpenChildTable(const pszRelation: PWideChar; 171 | out ppUnkOfNewDataProvider: ILlDataProvider): HResult; 172 | begin 173 | ppUnkOfNewDataProvider:=nil; 174 | Result := E_NOTIMPL; 175 | end; 176 | 177 | function TDataProviderInterfaceProxyRoot.OpenTable(const pszTableName: PWideChar; 178 | out ppUnkOfNewDataProvider: ILlDataProvider): HResult; 179 | var Table: TListLabelTable; 180 | TableInterface: ILlDataProvider; 181 | begin 182 | Table := Provider.GetTable(pszTableName); 183 | 184 | if (Table <> nil) then 185 | begin 186 | TableInterface := ILlDataProvider(TDataProviderInterfaceProxyNode.Create(FDataProvider, Parent, Table)); 187 | ppUnkOfNewDataProvider := TableInterface; 188 | end; 189 | Result := S_OK; 190 | end; 191 | 192 | { TDataProviderNode } 193 | 194 | constructor TDataProviderInterfaceProxyNode.Create(AProvider: TListLabelDataProvider;ListLabel: TComponent; ATable: TListLabelTable); 195 | begin 196 | inherited create; 197 | Provider := AProvider; 198 | Parent := ListLabel; 199 | Table := ATable; 200 | Enumerator := nil; 201 | end; 202 | 203 | 204 | function TDataProviderInterfaceProxyNode.DefineRow(enDefineRowMode: DefineDelayedInfoType; const arvRelations: Variant): HResult; 205 | var Row: TListLabelTableRow; 206 | begin 207 | 208 | if (Enumerator = nil) 209 | Or (enDefineRowMode = DefineDelayedInfoType.diSortOrdersDesigning) 210 | then 211 | begin 212 | result := S_FALSE; 213 | exit; 214 | end; 215 | 216 | Row:= Enumerator.Current; 217 | DefineData(Row, 1); 218 | Row.Free; 219 | result:=S_OK; 220 | end; 221 | 222 | destructor TDataProviderInterfaceProxyNode.Destroy; 223 | begin 224 | inherited; 225 | Dispose; 226 | end; 227 | 228 | function TDataProviderInterfaceProxyNode.Dispose: HResult; 229 | begin 230 | if Assigned(Enumerator) then FreeAndNil(FEnumerator); 231 | if Assigned(FTable) then FreeAndNil(FTable); 232 | Result := S_OK; 233 | end; 234 | 235 | function TDataProviderInterfaceProxyNode.GetRowCount(var pnRows: integer): HResult; 236 | begin 237 | if Table.SupportsCount then 238 | begin 239 | pnRows := Table.Count; 240 | Result := S_OK; 241 | end 242 | else 243 | Result := S_FALSE; 244 | end; 245 | 246 | function TDataProviderInterfaceProxyNode.MoveNext: HResult; 247 | var bInitFirstTime: boolean; 248 | begin 249 | bInitFirstTime := False; 250 | if Enumerator = nil then 251 | begin 252 | bInitFirstTime := True; 253 | PrepareTable; 254 | end; 255 | 256 | if Enumerator = nil then 257 | begin 258 | result := S_FALSE; 259 | exit; 260 | end; 261 | 262 | if (not bInitFirstTime) and (not Enumerator.MoveNext) then 263 | begin 264 | Dispose(); 265 | result := S_FALSE; 266 | exit; 267 | end; 268 | 269 | result := S_OK; 270 | 271 | end; 272 | 273 | function TDataProviderInterfaceProxyNode.OpenChildTable(const pszRelation: PWideChar; out ppUnkOfNewDataProvider: ILlDataProvider): HResult; 274 | var 275 | TableRelation: TListLabelTableRelation; 276 | TableRow: TListLabelTableRow; 277 | ChildTable: TListLabelTable; 278 | ChildProvider: ILlDataProvider; 279 | begin 280 | ppUnkOfNewDataProvider:= nil; 281 | Result := E_NOTIMPL; 282 | 283 | TableRelation := Provider.GetRelation(pszRelation); 284 | if(Assigned(TableRelation))then 285 | begin 286 | TableRow := Enumerator.Current; 287 | ChildTable := TableRow.GetChildTable(TableRelation); 288 | ChildProvider := ILlDataProvider(TDataProviderInterfaceProxyNode.Create(FDataProvider, Parent, ChildTable)); 289 | ppUnkOfNewDataProvider := ChildProvider; 290 | TableRow.Free; 291 | Result := S_OK; 292 | end; 293 | end; 294 | 295 | 296 | function TDataProviderInterfaceProxyNode.OpenTable(const pszTableName: PWideChar; 297 | out ppUnkOfNewDataProvider: ILlDataProvider): HResult; 298 | begin 299 | ppUnkOfNewDataProvider:= nil; 300 | Result := E_NOTIMPL; 301 | end; 302 | 303 | 304 | procedure TDataProviderInterfaceProxyNode.PrepareTable; 305 | var Enumerable : TEnumerable; 306 | begin 307 | if (Table <> nil) then 308 | begin 309 | Table.ApplyFilter(Filter); 310 | 311 | if (SortDescription <> '') and (Table.SupportsSorting or Table.SupportsAdvancedSorting) then 312 | Table.ApplySort(SortDescription); 313 | Enumerable := Table.Rows; 314 | Enumerator := Enumerable.GetEnumerator(); 315 | FreeAndNil(Enumerable); 316 | end; 317 | end; 318 | 319 | procedure TDataProviderInterfaceProxyNode.SetEnumerator( 320 | const Value: TEnumerator); 321 | begin 322 | FEnumerator := Value; 323 | end; 324 | 325 | { TDataProviderInterfaceProxyBase } 326 | 327 | function TDataProviderInterfaceProxyBase.ApplyAdvancedFilter( 328 | const pszFilter: PWideChar; const arvValues: Variant): HResult; 329 | begin 330 | AdvancedFilter := pszFilter; 331 | result := S_OK; 332 | end; 333 | 334 | function TDataProviderInterfaceProxyBase.ApplyFilter(const arvFields, 335 | arvValues: Variant): HResult; 336 | begin 337 | result := S_OK; 338 | end; 339 | 340 | function TDataProviderInterfaceProxyBase.ApplySortOrder( 341 | const pszSortOrder: PWideChar): HResult; 342 | begin 343 | SortDescription:=pszSortOrder; 344 | result := S_OK; 345 | end; 346 | 347 | procedure TDataProviderInterfaceProxyBase.DefineData(Row: TListLabelTableRow; 348 | Level: Integer); 349 | var Column: TListLabelTableColumn; 350 | ColumnList: TObjectList; 351 | AsVariables: Boolean; 352 | begin 353 | ColumnList := Row.Columns; 354 | ColumnList.OwnsObjects := True; 355 | AsVariables:= (TListLabel30(Parent).DataController.DataMember = Row.TableName) and (TListLabel30(Parent).DataController.AutoMasterMode = TLlAutoMasterMode.mmAsVariables); 356 | 357 | if ((TListLabel30(Parent).AutoProjectType) <> TLlProject.ptList) then 358 | begin 359 | if Assigned(TListLabel30(Parent).OnAutoDefineNewPage) then 360 | TListLabel30(Parent).OnAutoDefineNewPage(self, false); 361 | end; 362 | 363 | 364 | for Column in ColumnList do 365 | begin 366 | if Column.ImgHandle > 0 Then 367 | begin 368 | if AsVariables then 369 | TListLabel30(Parent).Core.LlDefineVariableExtHandle(Row.TableName+'.'+Column.ColumnName, Column.ImgHandle, Column.FieldType) 370 | else 371 | TListLabel30(Parent).Core.LlDefineFieldExtHandle(Row.TableName+'.'+Column.ColumnName, Column.ImgHandle, Column.FieldType) 372 | end 373 | else 374 | begin 375 | if AsVariables then 376 | TListLabel30(Parent).Core.LlDefineVariableExt(Row.TableName+'.'+Column.ColumnName, Column.Content, Column.FieldType) 377 | else 378 | TListLabel30(Parent).Core.LlDefineFieldExt(Row.TableName+'.'+Column.ColumnName, Column.Content, Column.FieldType); 379 | end; 380 | end; 381 | ColumnList.Clear; 382 | ColumnList.Free; 383 | end; 384 | 385 | function TDataProviderInterfaceProxyBase.DefineDelayedInfo( 386 | nInfo: integer): HResult; 387 | begin 388 | result := S_OK; 389 | end; 390 | 391 | function TDataProviderInterfaceProxyBase.GetOption(nIndex: integer; 392 | var pvValue: Variant): HResult; 393 | begin 394 | result := S_FALSE; 395 | end; 396 | 397 | procedure TDataProviderInterfaceProxyBase.SetAdvancedFilter( 398 | const Value: String); 399 | begin 400 | FAdvancedFilter := Value; 401 | end; 402 | 403 | procedure TDataProviderInterfaceProxyBase.SetDataProvider( 404 | const Value: TListLabelDataProvider); 405 | begin 406 | FDataProvider := Value; 407 | end; 408 | 409 | procedure TDataProviderInterfaceProxyBase.SetFilter(const Value: String); 410 | begin 411 | FFilter := Value; 412 | end; 413 | 414 | function TDataProviderInterfaceProxyBase.SetOption(nIndex: integer; 415 | const pvValue: Variant): HResult; 416 | begin 417 | result := S_OK; 418 | end; 419 | 420 | procedure TDataProviderInterfaceProxyBase.SetParent(const Value: TComponent); 421 | begin 422 | FParent := Value; 423 | end; 424 | 425 | procedure TDataProviderInterfaceProxyBase.SetSortDescription( 426 | const Value: String); 427 | begin 428 | FSortDescription := Value; 429 | end; 430 | 431 | procedure TDataProviderInterfaceProxyBase.SetTable( 432 | const Value: TListLabelTable); 433 | begin 434 | FTable := Value; 435 | end; 436 | 437 | function TDataProviderInterfaceProxyBase.SetUsedIdentifiers( 438 | const arvVieldRestriction: Variant): HResult; 439 | begin 440 | result := S_OK; 441 | end; 442 | 443 | end. 444 | -------------------------------------------------------------------------------- /Sources/LLDataSetDataProvider.pas: -------------------------------------------------------------------------------- 1 | {================================================================================= 2 | 3 | Copyright © combit GmbH, Konstanz 4 | 5 | ---------------------------------------------------------------------------------- 6 | File : LLDataSetDataProvider.pas 7 | Module : List & Label 30 8 | Descr. : Implementation file for the List & Label 30 VCL-Component 9 | Version: 30.000 10 | ================================================================================== 11 | } 12 | 13 | unit LLDataSetDataProvider; 14 | 15 | interface 16 | {$WEAKPACKAGEUNIT ON} 17 | uses LLDataProvider, 18 | Vcl.StdCtrls, Data.DB, Classes, 19 | system.Generics.Collections, 20 | FireDac.Comp.DataSet,FireDac.Comp.Client, 21 | FireDac.Stan.Intf, LLReport_Types; 22 | 23 | type 24 | 25 | PFilterDescription = ^TFilterDescription; 26 | TFilterDescription = Record 27 | ParentTable : String; 28 | ParentKeyField: String; 29 | ChildTable : String; 30 | ChildKeyField : String; 31 | KeyValue : STring; 32 | End; 33 | 34 | 35 | TDataSetDescription = Class (TObject) 36 | FKeyField : String; 37 | FDataSet : TDataSet; 38 | FFilter : String; 39 | FSortDescription: String; 40 | Public 41 | Constructor Create(ADataset: TDataSet; AKeyField: String;ASortDescription: String; AFilter: String); 42 | Destructor Destroy; Override; 43 | Property KeyField: String read FKeyField write FKeyField; 44 | Property DataSet : TDataSet read FDataSet write FDataSet; 45 | Property SortDescription: String read FSortDescription write FSortDescription; 46 | Property Filter : String read FFilter write FFilter; 47 | End; 48 | 49 | 50 | 51 | TDataSetTableRelation = Class(TListLabelTableRelation) 52 | FRelationName : STring; 53 | FChildTable : String; 54 | FParentTable : String; 55 | FParentKeyField : String; 56 | FChildKeyField : STring; 57 | function RelationName: String; Override; 58 | function ParentColumnName: String; Override; 59 | function ChildColumnName: String; Override; 60 | function ParentTableName: String; Override; 61 | function ChildTableName: String; Override; 62 | public 63 | Constructor Create(ARelationName,AParentTable, AChildTable, AParentKeyField, AChildKeyField: STring); 64 | end; 65 | 66 | TDataSetDataProvider = class(TListLabelDataProvider) 67 | private 68 | FDataSets : TStrings; 69 | FRelations : TStrings; 70 | FImageStorage : TImageStorage; 71 | public 72 | constructor Create; 73 | destructor Destroy; override; 74 | function Tables: TObjectList; override; 75 | function Relations: TObjectList; override; 76 | function GetTable(TableName: string): TListLabelTable; override; 77 | function GetRelation(RelationName: string) : TListLabelTableRelation; override; 78 | procedure AddDataSet(TableName: String; ADataSet: TDataSet; AKeyField: String; ASortDescription: String; AFilter: String ); 79 | Procedure AddRelation (ARelationName,AParentTable, AChildTable, AParentKeyField, AChildKeyField: String); 80 | Function GetDataSetInf(ATableName: String): TDataSetDescription; 81 | Function HasChildTable(ATableName: String): Boolean; 82 | Function SyncDataSet(ATableName: String; KeyField: STring; KeyValues: Variant): Boolean; 83 | Function ApplySorting(ATableName: String; ASortDescription: String): Boolean; 84 | Function ApplyFiltering(ATableName: String; AFilter: String):Boolean; 85 | 86 | Procedure Clear; 87 | end; 88 | 89 | TDataSetTable = class(TListLabelTable) 90 | private 91 | FTableName: String; 92 | FProvider : TDataSetDataProvider; 93 | FDataSet : TDataSet; 94 | public 95 | function SupportsCount: Boolean; override; 96 | function SupportsSorting: Boolean; override; 97 | function SupportsAdvancedSorting: Boolean; override; 98 | function SupportsFiltering: Boolean; override; 99 | procedure ApplySort(SortDescription: String); override; 100 | procedure ApplyFilter(Filter: String); override; 101 | function Count: Integer; override; 102 | function TableName: String; override; 103 | function Rows: TEnumerable; override; 104 | function SortDescriptions: TList; override; 105 | function SchemaRow: TListLabelTableRow; override; 106 | constructor Create(AProvider: TDataSetDataProvider; TableName: String; ADataSet: TDataSet); 107 | end; 108 | 109 | TDataSetTableRow = class(TListLabelTableRow) 110 | private 111 | FTable : TDataSetTable; 112 | FProvider: TDataSetDataProvider; 113 | FDataSet : TDataSet; 114 | public 115 | function SupportsGetParentRow: Boolean; override; 116 | function TableName: String; override; 117 | function Columns: TObjectList; override; 118 | function GetChildTable(Relation: TListLabelTableRelation): TListLabelTable; override; 119 | function GetParentRow(Relation: TListLabelTableRelation): TListLabelTableRow; override; 120 | constructor Create(AProvider: TDataSetDataProvider;Table: TDataSetTable; ADataSet : TDataSet); 121 | end; 122 | 123 | TDataSetTableRowEnumerable = class(TEnumerable) 124 | private 125 | FTableName: String; 126 | FProvider : TDataSetDataProvider; 127 | protected 128 | function DoGetEnumerator: TEnumerator; override; 129 | public 130 | constructor Create(AProvider:TDataSetDataProvider; TableName: string); 131 | end; 132 | 133 | TDataSetTableRowEnumerator = class(TEnumerator) 134 | private 135 | FTableName : String; 136 | FProvider : TDataSetDataProvider; 137 | FMemDataSet : TFDMemTable; 138 | FNeedSyncMaster: Boolean; 139 | FKeyField : STring; 140 | FDataSetInf : TDataSetDescription; 141 | protected 142 | function DoGetCurrent: TListLabelTableRow; override; 143 | function DoMoveNext: Boolean; override; 144 | Procedure ApplySorting; 145 | Procedure ApplyFiltering; 146 | public 147 | constructor Create(AProvider:TDataSetDataProvider; TableName: string); 148 | Destructor Destroy; override; 149 | end; 150 | 151 | TTFieldsTableRow = class(TListLabelTableRow) 152 | private 153 | FTableName: String; 154 | FProvider : TDataSetDataProvider; 155 | FDataSet : TDataSet; 156 | public 157 | function SupportsGetParentRow: Boolean; override; 158 | function TableName: String; override; 159 | function Columns: TObjectList; override; 160 | function GetChildTable(Relation: TListLabelTableRelation): TListLabelTable; override; 161 | function GetParentRow(Relation: TListLabelTableRelation): TListLabelTableRow; override; 162 | constructor Create(AProvider: TDataSetDataProvider; TableName: String; ADataSet: TDataSet); 163 | end; 164 | 165 | TTFieldTableColumn = class(TListLabelTableColumn) 166 | private 167 | FFieldName: String; 168 | FFieldContent: String; 169 | FFieldType: Integer; 170 | FHandle : Cardinal; 171 | FProvider : TDataSetDataProvider; 172 | public 173 | function ColumnName: String; override; 174 | function Content: String; override; 175 | function ImgHandle: Cardinal; override; 176 | function FieldType: Integer; override; 177 | constructor Create(AProvider: TDataSetDataProvider; Field: TField); 178 | end; 179 | 180 | { --------------------------------------------------------------------------- } 181 | 182 | const 183 | dummy_rtf = '{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl' + 184 | '{\f0\fswiss\fcharset0 Arial;}}\viewkind4\uc1\pard\f0\fs20\par}'; 185 | 186 | implementation 187 | uses Sysutils, cmbtll30x, Windows, dialogs, vcl.graphics, vcl.imaging.jpeg; 188 | 189 | Constructor TDataSetDescription.Create(ADataset: TDataSet; AKeyField: String; ASortDescription: String; AFilter: String ); 190 | Begin 191 | inherited Create; 192 | FKeyField := AKeyField; 193 | FDataSet := ADataSet; 194 | FSortDescription := ASortDescription; 195 | FFilter := AFilter; 196 | End; 197 | 198 | Destructor TDataSetDescription.Destroy; 199 | Begin 200 | FDataSet:=Nil; 201 | inherited Destroy; 202 | End; 203 | 204 | {=== TDataSetDataProvider =====================================================} 205 | Constructor TDataSetTableRelation.Create( ARelationName, 206 | AParentTable, 207 | AChildTable, 208 | AParentKeyField, 209 | AChildKeyField : STring); 210 | Begin 211 | inherited Create; 212 | FRelationName := ARelationName; 213 | FParentTable := AParentTable; 214 | FChildTable := AChildTable; 215 | FParentKeyField := AParentKeyField; 216 | FChildKeyField := AChildKeyField; 217 | End; 218 | 219 | function TDataSetTableRelation.RelationName: String; 220 | Begin 221 | result:=FRelationName; 222 | End; 223 | 224 | function TDataSetTableRelation.ParentColumnName: String; 225 | Begin 226 | result:=FParentKeyField; 227 | End; 228 | 229 | function TDataSetTableRelation.ChildColumnName: String; 230 | Begin 231 | result:=FChildKeyField; 232 | End; 233 | 234 | function TDataSetTableRelation.ParentTableName: String; 235 | Begin 236 | Result:=FParentTable; 237 | End; 238 | 239 | function TDataSetTableRelation.ChildTableName: String; 240 | Begin 241 | result:=FChildTable 242 | End; 243 | 244 | 245 | { ====== TDataSetDataProvider =================================================} 246 | 247 | procedure TDataSetDataProvider.AddDataSet( TableName : String; 248 | ADataSet : TDataSet; 249 | AKeyField : String; 250 | ASortDescription: String; 251 | AFilter : String ); 252 | begin 253 | FDataSets.AddObject(TableName, TDataSetDescription.Create(ADataSet,AKeyField, ASortDescription,AFilter)); 254 | end; 255 | 256 | Procedure TDataSetDataProvider.AddRelation ( ARelationName, 257 | AParentTable, 258 | AChildTable, 259 | AParentKeyField, 260 | AChildKeyField: String); 261 | Begin 262 | FRelations.AddObject(ARelationName, 263 | TDataSetTableRelation.Create(ARelationName, 264 | AParentTable, 265 | AChildTable, 266 | AParentKeyField, 267 | AChildKeyField)); 268 | End; 269 | 270 | Function TDataSetDataProvider.GetDataSetInf(ATableName: String): TDataSetDescription; 271 | Var i : INteger; 272 | Begin 273 | 274 | i:=FDataSets.IndexOf(ATableName); 275 | if i>-1 then 276 | result:=TDataSetDescription(FDataSets.Objects[i]) 277 | else 278 | result:=nil; 279 | 280 | End; 281 | 282 | Function TDataSetDataProvider.HasChildTable(ATableName: String): Boolean; 283 | Var i: Integer; 284 | Begin 285 | for i:=0 to FRelations.Count-1 do 286 | Begin 287 | if TDataSetTableRelation(FRelations.Objects[i]).ParentTableName=ATableName then Exit(True); 288 | End; 289 | result:=False; 290 | End; 291 | 292 | Function TDataSetDataProvider.SyncDataSet(ATableName: String; KeyField: STring; KeyValues: Variant): Boolean; 293 | Var i: Integer; 294 | Begin 295 | i:=FDataSets.IndexOf(ATableName); 296 | if i>-1 then 297 | result:=TDataSetDescription(FDataSets.Objects[i]).DataSet.Locate(KeyField,KeyValues,[]) 298 | else 299 | result:=False; 300 | End; 301 | 302 | Function TDataSetDataProvider.ApplyFiltering(ATableName: String; AFilter: String):Boolean; 303 | Var p : TDataSetDescription; 304 | Begin 305 | p:=GetDataSetInf(ATableName); 306 | With p do 307 | Begin 308 | Filter:=AFilter; 309 | result:=True; 310 | End; 311 | End; 312 | 313 | Function TDataSetDataProvider.ApplySorting(ATableName: String; ASortDescription: STring): Boolean; 314 | Begin 315 | With GetDataSetInf(ATableName) do 316 | Begin 317 | SortDescription:=ASortDescription; 318 | result:=True; 319 | End; 320 | End; 321 | 322 | Procedure TDataSetDataProvider.Clear; 323 | Begin 324 | FRelations.Clear; 325 | FDataSets.Clear; 326 | End; 327 | 328 | constructor TDataSetDataProvider.Create; 329 | begin 330 | inherited Create; 331 | FDataSets := TStringlist.Create(True); 332 | FRelations := TStringlist.Create(True); 333 | FImageStorage := TImageStorage.Create; 334 | FImageStorage.OwnsObjects:=True; 335 | end; 336 | 337 | destructor TDataSetDataProvider.Destroy; 338 | begin 339 | FDataSets.Free; 340 | FRelations.Free; 341 | FImageStorage.Free; 342 | inherited Destroy; 343 | end; 344 | 345 | function TDataSetDataProvider.GetRelation(RelationName: string): TListLabelTableRelation; 346 | Var i : Integer; 347 | begin 348 | result := nil; 349 | i:=FRelations.IndexOf(RelationName); 350 | if i>-1 then 351 | result:=TDataSetTableRelation(FRelations.Objects[i]); 352 | end; 353 | 354 | function TDataSetDataProvider.GetTable(TableName: string): TListLabelTable; 355 | Var i : Integer; 356 | begin 357 | result := nil; 358 | i:=FDataSets.IndexOf(TableName); 359 | if i>-1 then 360 | Begin 361 | result:=TDataSetTable.Create(self,TableName, TDataSetDescription(FDataSets.Objects[i]).DataSet); 362 | End; 363 | end; 364 | 365 | function TDataSetDataProvider.Relations: TObjectList; 366 | Var RelationList: TObjectList; 367 | ARelation : TDataSetTableRelation; 368 | i : Integer; 369 | begin 370 | RelationList:=TObjectList.Create(True); 371 | for I := 0 to FRelations.Count-1 do 372 | Begin 373 | ARelation:=TDataSetTableRelation(FRelations.Objects[i]); 374 | RelationList.Add(TDataSetTableRelation.Create( ARelation.RelationName, 375 | ARelation.ParentTableName, 376 | ARelation.ChildTableName, 377 | ARelation.ParentColumnName, 378 | ARelation.ChildColumnName)); 379 | End; 380 | result:=RelationList; 381 | end; 382 | 383 | function TDataSetDataProvider.Tables: TObjectList; 384 | var TableList : TObjectList; 385 | i : INteger; 386 | begin 387 | TableList:=TObjectList.Create(True); 388 | for i:=0 to FDataSets.Count-1 do 389 | Begin 390 | TableList.Add( TDataSetTable.Create(self, 391 | FDataSets[i], TDataSetDescription(FDataSets.Objects[i]).DataSet)); 392 | end; 393 | result:=TableList; 394 | end; 395 | 396 | 397 | { ====== TDataSetTable =======================================================================} 398 | 399 | procedure TDataSetTable.ApplyFilter(Filter: String); 400 | begin 401 | inherited; 402 | end; 403 | 404 | procedure TDataSetTable.ApplySort(SortDescription: String); 405 | begin 406 | inherited; 407 | FProvider.ApplySorting(FTableName,SortDescription); 408 | end; 409 | 410 | function TDataSetTable.Count: Integer; 411 | begin 412 | result:=FDataSet.RecordCount; 413 | end; 414 | 415 | constructor TDataSetTable.Create(AProvider: TDataSetDataProvider; TableName: String; ADataSet: TDataSet); 416 | begin 417 | inherited Create; 418 | FProvider := AProvider; 419 | FTableName := TableName; 420 | FDataSet := ADataSet; 421 | end; 422 | 423 | function TDataSetTable.Rows: TEnumerable; 424 | begin 425 | result:=TDataSetTableRowEnumerable.Create(FProvider, TableName); 426 | end; 427 | 428 | function TDataSetTable.SchemaRow: TListLabelTableRow; 429 | begin 430 | result := nil; 431 | end; 432 | 433 | function TDataSetTable.SortDescriptions: TList; 434 | begin 435 | result := nil; 436 | end; 437 | 438 | function TDataSetTable.SupportsAdvancedSorting: Boolean; 439 | begin 440 | result := true; 441 | end; 442 | 443 | function TDataSetTable.SupportsCount: Boolean; 444 | begin 445 | result := True; 446 | end; 447 | 448 | function TDataSetTable.SupportsFiltering: Boolean; 449 | begin 450 | result := True; 451 | end; 452 | 453 | function TDataSetTable.SupportsSorting: Boolean; 454 | begin 455 | result := True; 456 | end; 457 | 458 | function TDataSetTable.TableName: String; 459 | begin 460 | result := FTableName; 461 | end; 462 | 463 | {=== TDataSetTableRow ========================================================================} 464 | 465 | function TDataSetTableRow.Columns: TObjectList; 466 | begin 467 | result:=TTFieldsTableRow.Create(FProvider,TableName, FDataSet).Columns; 468 | result.OwnsObjects:=True; 469 | end; 470 | 471 | constructor TDataSetTableRow.Create(AProvider: TDataSetDataProvider; Table: TDataSetTable; ADataSet : TDataSet); 472 | begin 473 | FProvider:= AProvider; 474 | FTable := Table; 475 | FDataSet := ADataSet; 476 | end; 477 | 478 | function TDataSetTableRow.GetChildTable( Relation: TListLabelTableRelation): TListLabelTable; 479 | var Table: TListLabelTable; 480 | TableList: TObjectList; 481 | begin 482 | result := nil; 483 | TableList := FProvider.Tables; 484 | for Table in TableList do 485 | begin 486 | if Table.TableName = Relation.ChildTableName then 487 | begin 488 | TableList.OwnsObjects := false; 489 | result := Table; 490 | TableList.Remove(result); 491 | TableList.OwnsObjects := true; 492 | break; 493 | end; 494 | end; 495 | TableList.Free; 496 | end; 497 | 498 | function TDataSetTableRow.GetParentRow( 499 | Relation: TListLabelTableRelation): TListLabelTableRow; 500 | begin 501 | result := nil; 502 | end; 503 | 504 | function TDataSetTableRow.SupportsGetParentRow: Boolean; 505 | begin 506 | result := False; 507 | end; 508 | 509 | function TDataSetTableRow.TableName: String; 510 | begin 511 | result:=FTable.TableName; 512 | end; 513 | 514 | 515 | {=== TDataSetTableRowEnumerable ===============================================} 516 | constructor TDataSetTableRowEnumerable.Create(AProvider:TDataSetDataProvider; TableName: string); 517 | begin 518 | FTableName := TableName; 519 | FProvider := AProvider; 520 | end; 521 | 522 | function TDataSetTableRowEnumerable.DoGetEnumerator: TEnumerator; 523 | begin 524 | result:=TDataSetTableRowEnumerator.Create(FProvider, FTableName); 525 | end; 526 | 527 | {=== TDataSetTableRowEnumerator ================================================} 528 | 529 | constructor TDataSetTableRowEnumerator.Create(AProvider:TDataSetDataProvider;TableName: String); 530 | Var i : Integer; 531 | begin 532 | FProvider := AProvider; 533 | FTableName := TableName; 534 | 535 | FDataSetInf := FProvider.GetDataSetInf(TableName); 536 | 537 | FKeyField := FDataSetInf.KeyField; 538 | FNeedSyncMaster := FProvider.HasChildTable(TableName); 539 | 540 | FMemDataSet:=TFDMemTable.Create(nil); 541 | 542 | FDataSetInf.DataSet.Active:=True; 543 | FMemDataSet.CopyDataSet(FDataSetInf.DataSet,[coStructure,coRestart, coAppend]); 544 | 545 | // CopyDataSet ignores Blobfield Subtypes 546 | for i:=0 to FMemDataSet.Fields.Count-1 do 547 | Begin 548 | if FMemDataSet.Fields[i].IsBlob then 549 | Begin 550 | TBlobField( FMemDataSet.Fields[i]).BlobType := 551 | TBlobField(FDataSetInf.DataSet.FieldByName(FMemDataSet.Fields[i].FieldName)).BlobType; 552 | end 553 | End; 554 | 555 | if FDataSetInf.SortDescription<>'' then ApplySorting; 556 | if FDataSetInf.Filter<>'' then ApplyFiltering; 557 | 558 | if not(FMemDataSet.Active) Then FMemDataSet.Active:=True; 559 | FMemDataSet.First; 560 | 561 | if FNeedSyncMaster then 562 | FProvider.SyncDataSet(FTableName,FKeyField,FMemDataSet.FieldByName(FKeyfield).Value); 563 | end; 564 | 565 | Procedure TDataSetTableRowEnumerator.ApplyFiltering; 566 | Begin 567 | if FDataSetInf.Filter='' then Exit; 568 | with FMemDataSet do 569 | Begin 570 | Filter := FDataSetInf.Filter; 571 | Filtered := True; 572 | if FNeedSyncMaster then 573 | FProvider.SyncDataSet(FTableName,FKeyField,FMemDataSet.FieldByName(FKeyfield).Value); 574 | End; 575 | End; 576 | 577 | Procedure TDataSetTableRowEnumerator.ApplySorting; 578 | Begin 579 | if FDataSetInf.SortDescription='' then Exit; 580 | 581 | with FMemDataSet.Indexes.Add do 582 | Begin 583 | Name := 'IDX_Main'; 584 | Fields := StringReplace(FDataSetInf.SortDescription, chr(9), ';', [rfReplaceAll, rfIgnoreCase]); 585 | Active := True; 586 | FMemDataSet.IndexName := Name; 587 | End; 588 | End; 589 | 590 | Destructor TDataSetTableRowEnumerator.Destroy; 591 | Begin 592 | inherited Destroy; 593 | FreeAndNil(FMemDataSet); 594 | End; 595 | 596 | function TDataSetTableRowEnumerator.DoGetCurrent: TListLabelTableRow; 597 | begin 598 | result:=TTFieldsTableRow.Create(FProvider,FTableName, FMemDataSet); 599 | end; 600 | 601 | function TDataSetTableRowEnumerator.DoMoveNext: Boolean; 602 | begin 603 | result:=False; 604 | if not FMemDataSet.Eof then 605 | begin 606 | FMemDataSet.Next; 607 | if FNeedSyncMaster then 608 | FProvider.SyncDataSet(FTableName,FKeyField,FMemDataSet.FieldByName(FKeyfield).Value); 609 | 610 | if FMemDataSet.Eof then Exit(False); 611 | result := True; 612 | end; 613 | end; 614 | 615 | {=== TTFieldsTableRow ========================================================================} 616 | constructor TTFieldsTableRow.Create(AProvider: TDataSetDataProvider;TableName: String; ADataSet: TDataSet); 617 | begin 618 | FTableName:=TableName; 619 | FProvider := AProvider; 620 | FDataSet := ADataSet; 621 | end; 622 | 623 | function TTFieldsTableRow.GetChildTable( Relation: TListLabelTableRelation): TListLabelTable; 624 | var Table: TListLabelTable; 625 | TableList: TObjectList; 626 | begin 627 | result := nil; 628 | try 629 | TableList := FProvider.Tables; 630 | for Table in TableList do 631 | begin 632 | if Table.TableName = Relation.ChildTableName then 633 | begin 634 | result:= FProvider.GetTable(Table.TableName); 635 | break; 636 | end; 637 | end; 638 | finally 639 | FreeandNil(TableList); 640 | end; 641 | end; 642 | 643 | function TTFieldsTableRow.Columns: TObjectList; 644 | var 645 | ResultList: TObjectList; 646 | Field: TField; 647 | Fields: TFields; 648 | begin 649 | Fields:=FDataSet.Fields; 650 | ResultList:=TObjectList.Create(True); 651 | for Field in Fields do 652 | begin 653 | ResultList.Add(TTFieldTableColumn.Create(FProvider, Field)); 654 | end; 655 | result:=ResultList; 656 | end; 657 | 658 | function TTFieldsTableRow.GetParentRow( 659 | Relation: TListLabelTableRelation): TListLabelTableRow; 660 | begin 661 | result := nil; 662 | end; 663 | 664 | function TTFieldsTableRow.SupportsGetParentRow: Boolean; 665 | begin 666 | result := false; 667 | end; 668 | 669 | function TTFieldsTableRow.TableName: String; 670 | begin 671 | result := FTableName; 672 | end; 673 | 674 | {=== TTFieldTableColumn =======================================================} 675 | function TTFieldTableColumn.ColumnName: String; 676 | begin 677 | result:=FFieldName; 678 | end; 679 | 680 | function TTFieldTableColumn.Content: String; 681 | begin 682 | result:=FFieldContent; 683 | end; 684 | 685 | function TTFieldTableColumn.ImgHandle: Cardinal; 686 | begin 687 | result:=FHandle; 688 | end; 689 | 690 | constructor TTFieldTableColumn.Create(AProvider: TDataSetDataProvider; Field: TField); 691 | Var BufferStream : TMemoryStream; 692 | BlobStream : TStream; 693 | dummy : TStrings; 694 | PictureStream : TStream; 695 | PicContainer : TPicture; 696 | wic : TWICImage; 697 | const DigitBool: array[Boolean] of string = ('0', '1'); 698 | 699 | begin 700 | BufferStream:=nil; 701 | BlobStream:=nil; 702 | wic := nil; 703 | FProvider:= AProvider; 704 | FFieldName := Field.FieldName; 705 | FFieldContent := '(NULL)'; 706 | 707 | case Field.DataType of 708 | ftInteger, ftsmallint, ftAutoInc, 709 | ftWord, ftLargeint: 710 | Begin 711 | FFieldType := LL_NUMERIC_INTEGER; 712 | if not(Field.IsNull)then FFieldContent := Field.AsString; 713 | End; 714 | ftFloat, 715 | ftCurrency: 716 | begin 717 | FFieldType := LL_NUMERIC; 718 | if not(Field.IsNull)then FFieldContent := Field.AsString; 719 | end; 720 | ftDate, ftDateTime, ftTimeStamp: {date} 721 | begin 722 | FFieldType := LL_DATE_DELPHI; 723 | if not(Field.IsNull)then FFieldContent := FloatToStr(StrToDateTime(Field.AsString)); 724 | end; 725 | ftBoolean: {boolean} 726 | begin 727 | FFieldType := LL_BOOLEAN; 728 | if not(Field.IsNull)then FFieldContent := DigitBool[Field.AsBoolean]; 729 | end; 730 | ftBCD, 731 | ftfmtBCD: 732 | begin 733 | FFieldType := LL_NUMERIC; 734 | if not(Field.IsNull)then FFieldContent := Field.AsString 735 | end; 736 | ftWideString: 737 | begin 738 | FFieldType:=LL_TEXT; 739 | if not(Field.IsNull)then FFieldContent:=TWideStringField(Field).Value; 740 | end; 741 | ftGraphic, ftBlob: 742 | Begin 743 | Try 744 | PictureStream := Field.DataSet.CreateBlobStream(Field, bmRead); 745 | if PictureStream <> Nil then 746 | Begin 747 | PictureStream.Seek(0, soBeginning); 748 | if PictureStream.Size > 0 then 749 | begin 750 | wic := TWICImage.Create; 751 | try 752 | wic.LoadFromStream(PictureStream); 753 | except on e: EInvalidGraphic do 754 | begin 755 | try 756 | //special handling for northwind pictures 757 | PictureStream.Position:= 78; 758 | wic.LoadFromStream(PictureStream); 759 | //if the blobcontent is not a image we create one empty 760 | except on e: EInvalidGraphic do 761 | begin 762 | FFieldType:=LL_DRAWING_HBITMAP; 763 | FHandle:= 0; exit; 764 | end; 765 | end; 766 | end; 767 | end; 768 | PicContainer := FProvider.FImageStorage.AddItem; 769 | PicContainer.Bitmap.Assign(wic); 770 | if PicContainer.Graphic is TMetafile then 771 | begin 772 | FFieldType:=LL_DRAWING_HMETA; 773 | FHandle:=PicContainer.Metafile.Handle; 774 | end 775 | else if PicContainer.Graphic is TBitmap then begin 776 | FFieldType:=LL_DRAWING_HBITMAP; 777 | FHandle:=PicContainer.Bitmap.Handle; 778 | end 779 | else if PicContainer.Graphic is TIcon then begin 780 | FFieldType:=LL_DRAWING_HICON; 781 | FHandle:=PicContainer.Icon.Handle; 782 | end; 783 | end else 784 | Begin 785 | // Table was empty .... analyzing not possible -> set do default Image 786 | wic := TWICImage.Create; 787 | FFieldType := LL_DRAWING_HBITMAP; 788 | FHandle:= 0; 789 | End; 790 | end; 791 | 792 | finally 793 | if Assigned(wic) then 794 | begin 795 | FreeAndNil(wic); 796 | end 797 | else 798 | begin 799 | FFieldType := LL_TEXT; 800 | if not(Field.IsNull)then FFieldContent := Field.AsString; 801 | end; 802 | if Assigned(PictureStream) then FreeAndNil(PictureStream); 803 | 804 | end; 805 | End; 806 | 807 | ftFmtMemo: 808 | Begin 809 | FFieldType := LL_RTF; 810 | Try 811 | BlobStream := Field.DataSet.CreateBlobStream(Field, bmRead); 812 | BlobStream.Seek(0,0); 813 | BufferStream := TMemoryStream.Create; 814 | BufferStream.LoadFromStream(BlobStream); 815 | if BufferStream.Size = 0 then 816 | begin 817 | dummy := TStringList.Create; 818 | dummy.Text := dummy_rtf; 819 | dummy.SaveToStream(BufferStream); 820 | dummy.Free; 821 | end; 822 | 823 | FFieldContent := StrPas(PWideChar(BufferStream.Memory)); 824 | finally 825 | BufferStream.Free; 826 | BlobStream.Free; 827 | end; 828 | if not(Field.IsNull)then FFieldContent := PWideChar(Field.AsString); 829 | end; 830 | else 831 | begin { Rest wird als Text exportiert } 832 | FFieldType := LL_TEXT; 833 | if not(Field.IsNull)then FFieldContent := Field.AsString; 834 | end; 835 | end; 836 | end; 837 | 838 | function TTFieldTableColumn.FieldType: Integer; 839 | begin 840 | result:=FFieldType; 841 | end; 842 | 843 | end. 844 | -------------------------------------------------------------------------------- /Sources/LLObjectEditor.dfm: -------------------------------------------------------------------------------- 1 | object DetailSourcesEditor: TDetailSourcesEditor 2 | Left = 0 3 | Top = 0 4 | BorderStyle = bsDialog 5 | Caption = 'DetailSources bearbeiten' 6 | ClientHeight = 411 7 | ClientWidth = 385 8 | Color = clBtnFace 9 | Font.Charset = DEFAULT_CHARSET 10 | Font.Color = clWindowText 11 | Font.Height = -11 12 | Font.Name = 'Tahoma' 13 | Font.Style = [] 14 | OldCreateOrder = False 15 | Position = poScreenCenter 16 | OnHide = FormHide 17 | OnShow = FormShow 18 | PixelsPerInch = 96 19 | TextHeight = 13 20 | object DisplayTree: TTreeView 21 | Left = 0 22 | Top = 28 23 | Width = 385 24 | Height = 383 25 | Align = alClient 26 | Indent = 19 27 | TabOrder = 0 28 | OnMouseUp = DisplayTreeMouseUp 29 | Items.NodeData = { 30 | 0301000000260000000000000000000000FFFFFFFFFFFFFFFF00000000000000 31 | 000000000001045400650073007400} 32 | end 33 | object ToolBar: TToolBar 34 | AlignWithMargins = True 35 | Left = 3 36 | Top = 3 37 | Width = 379 38 | Height = 22 39 | AutoSize = True 40 | Caption = 'ToolBar' 41 | Images = TB_Images 42 | List = True 43 | TabOrder = 1 44 | object ToolButton1: TToolButton 45 | Left = 0 46 | Top = 0 47 | Action = AC_New_Root 48 | end 49 | object ToolButton2: TToolButton 50 | Left = 23 51 | Top = 0 52 | Width = 8 53 | Caption = 'ToolButton2' 54 | ImageIndex = 1 55 | Style = tbsSeparator 56 | end 57 | object ToolButton4: TToolButton 58 | Left = 31 59 | Top = 0 60 | Action = AC_New_Child 61 | end 62 | object ToolButton3: TToolButton 63 | Left = 54 64 | Top = 0 65 | Action = AC_Delete 66 | end 67 | object ToolButton5: TToolButton 68 | Left = 77 69 | Top = 0 70 | Width = 8 71 | Caption = 'ToolButton5' 72 | ImageIndex = 2 73 | Style = tbsSeparator 74 | end 75 | end 76 | object Actions: TActionList 77 | Images = TB_Images 78 | Left = 304 79 | Top = 16 80 | object AC_New_Root: TAction 81 | Caption = 'Neue Datenquelle hinzuf'#252'gen' 82 | ImageIndex = 0 83 | OnExecute = AC_New_RootExecute 84 | end 85 | object AC_New_Child: TAction 86 | Caption = 'Neue Detail-Datenquelle hinzuf'#252'gen' 87 | Hint = 'Neue Datenquelle hinzuf'#252'gen' 88 | ImageIndex = 1 89 | OnExecute = AC_New_ChildExecute 90 | end 91 | object AC_Delete: TAction 92 | Caption = 'Datenquelle L'#246'schen' 93 | Hint = 'Datenquelle l'#246'schen' 94 | ImageIndex = 2 95 | OnExecute = AC_DeleteExecute 96 | end 97 | end 98 | object TB_Images: TImageList 99 | Left = 344 100 | Top = 16 101 | Bitmap = { 102 | 494C010103000500040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 103 | 0000000000003600000028000000400000001000000001002000000000000010 104 | 0000000000000000000000000000000000000000000000000000000000000000 105 | 0000000000000000000000000000000000000000000000000000000000000000 106 | 0000000000000000000000000000000000000000000000000000000000000000 107 | 000000000000000000007E7E7E007E7E7E007E7E7E007E7E7E007E7E7E007E7E 108 | 7E007E7E7E007E7E7E0000000000000000000000000000000000000000000000 109 | 0000000000000000000000000000000000000000000000000000000000000000 110 | 0000000000000000000000000000000000000000000000000000000000000000 111 | 0000000000000000000000000000000000000000000000000000000000000000 112 | 000000000000000000000000000000000000000000000000000000000000B0A0 113 | 9000604830006048300060483000604830006048300060483000604830006048 114 | 3000604830006048300000000000000000000000000000000000000000000000 115 | 0000000000000000000083838300FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 116 | FF00FFFFFF008483840000000000000000000000000000000000C8A78F00685B 117 | 4900B3957E000000000000000000000000000000000000000000000000000000 118 | 0000000000000000000000000000000000000000000000000000000000000000 119 | 0000000000000000000000000000000000000000000000000000000000000000 120 | 000000000000000000000000000000000000000000000000000000000000B0A0 121 | 9000FFFFFF00B0A09000B0A09000B0A09000B0A09000B0A09000B0A09000B0A0 122 | 9000B0A090006048300000000000000000000000000000000000000000000000 123 | 000033333300000000008A8B8A00FFFFFF00DADAD900DADAD900DADAD900DADA 124 | D900FFFFFF008B8B8B000000000000000000000000000000000080715F001010 125 | 1000534A4300D5B39B0000000000000000000000000000000000000000000000 126 | 00008D786700C7A8910000000000000000000000000000000000000000000000 127 | 0000000000000000000000000000000000000000000000000000000000000000 128 | 000000000000000000000000000000000000000000000000000000000000B0A0 129 | 9000FFFFFF00FFFFFF00FFF8FF00F0F0F000F0E8E000F0E0D000E0D0D000E0C8 130 | C000B0A090006048300000000000000000000000000000000000333333003333 131 | 3300333333003333330092929300FFFFFF00E1E1E000E1E1E100F4F5F4006F98 132 | 6F00005600006F986F00FEFEFE00000000000000000000000000B29986002018 133 | 100030282000927C6A0000000000000000000000000000000000000000000000 134 | 0000393C3200D8B8A10000000000000000000000000000000000000000000000 135 | 0000000000000000000000000000000000000000000000000000000000000000 136 | 000000000000000000000000000000000000000000000000000000000000B0A0 137 | 9000FFFFFF00FFFFFF00FFFFFF00FFF8F000F0F0F000F0E0E000F0D8D000E0D0 138 | C000B0A090006048300000000000000000000000000000000000333333000000 139 | 000033333300000000009A9B9B00FFFFFF00ECECEC00F8F8F800FFFFFF000089 140 | 000029C1390000890000FFFFFF00FEFEFE000000000000000000000000007063 141 | 5A002C23290048444100D1B6A20000000000000000000000000000000000544E 142 | 49007D6F64000000000000000000000000000000000000000000000000000000 143 | 0000000000000000000000000000000000000000000000000000000000000000 144 | 000000000000000000000000000000000000000000000000000000000000B0A0 145 | 9000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF0F000F0E8E000F0E0E000E0D8 146 | D000B0A090006048300000000000000000000000000000000000333333000000 147 | 00000000000000000000A3A3A300FFFFFF00F8F8F8006FB56F00005600000056 148 | 00003FD0580000560000005600006FB56F00000000000000000000000000DFC4 149 | B10047423E0020202000615A54000000000000000000000000007E7167003B3A 150 | 3800DFC4AF000000000000000000000000000000000000000000000000000000 151 | 0000000000000000000000000000000000000000000000000000000000000000 152 | 000000000000000000000000000000000000000000000000000000000000C0A8 153 | 9000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF8F000F0F0F000F0E8E000F0D8 154 | D000B0A090006048300000000000000000000000000000000000333333000000 155 | 00000000000000000000AAABAA00FFFFFF00FFFFFF00008900005EE982005EE9 156 | 82005EE982005EE982005EE98200008900000000000000000000000000000000 157 | 0000E2CAB600554A3F00302820006F615F00D2BBA600645B540030303000A28F 158 | 7F00000000000000000000000000000000000000000000000000000000000000 159 | 0000000000000000000000000000000000000000000000000000000000000000 160 | 000000000000000000000000000000000000000000000000000000000000C0A8 161 | A000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF8F000F0E8E000F0E0 162 | E000B0A090006048300000000000000000007E7E7E007E7E7E007E7E7E007E7E 163 | 7E007E7E7E007E7E7E00AEAFAF00FFFFFF00FFFFFF006FB56F00008900000089 164 | 00006DF6990000890000008900006FB56F000000000000000000000000000000 165 | 000000000000E2CBB700554A3F00303030003030300040383000483E42000000 166 | 0000000000000000000000000000000000000000000000000000000000000000 167 | 0000000000000000000000000000000000000000000000000000000000000000 168 | 000000000000000000000000000000000000000000000000000000000000C0B0 169 | A000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF8FF00F0F0F000F0E8 170 | E000B0A0900060483000000000000000000083838300FFFFFF00FFFFFF00FFFF 171 | FF00FFFFFF00FFFFFF00AEAFAF00AEAFAF00AEAFAF00AEAFAF00FFFFFF000089 172 | 0000D4FFFF0000890000FFFFFF00000000000000000000000000000000000000 173 | 00000000000000000000C8B5A400303030004038400048454200000000000000 174 | 0000000000000000000000000000000000000000000000000000000000000000 175 | 0000000000000000000000000000000000000000000000000000000000000000 176 | 000000000000000000000000000000000000000000000000000000000000D0B0 177 | A000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFF8F000F0F0 178 | F000B0A090006048300000000000000000008A8B8A00FFFFFF00DADAD900DADA 179 | D900DADAD900DADAD900FFFFFF008B8B8B000000000000000000000000006FB5 180 | 6F00008900006FB56F0000000000000000000000000000000000000000000000 181 | 000000000000D8C4B300625E5A00403830003C3A39003C3A39006F6155000000 182 | 0000000000000000000000000000000000000000000000000000000000000000 183 | 0000000000000000000000000000000000000000000000000000000000000000 184 | 000000000000000000000000000000000000000000000000000000000000D0B8 185 | A000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00B0A0 186 | 9000B0A0900060483000000000000000000092929300FFFFFF00E1E1E000E1E1 187 | E100E1E2E000E2E1E100FFFFFF00939393000000000000000000000000000000 188 | 0000000000000000000000000000000000000000000000000000000000000000 189 | 0000A99B9000404040004040400090877F00D8C3B40091827E0040404000887E 190 | 7500000000000000000000000000000000000000000000000000000000000000 191 | 0000000000000000000000000000000000000000000000000000000000000000 192 | 000000000000000000000000000000000000000000000000000000000000D0B8 193 | B000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00B0A090006048 194 | 3000604830006048300000000000000000009A9B9B00FFFFFF00ECECEC00ECEC 195 | EC00ECECEC00D4D4D300D4D4D3009B9B9B000000000000000000000000000000 196 | 0000000000000000000000000000000000000000000000000000CCBBAC007A73 197 | 6C004040400040404000857E770000000000000000000000000085786C004040 198 | 4000888376000000000000000000000000000000000000000000000000000000 199 | 0000000000000000000000000000000000000000000000000000000000000000 200 | 000000000000000000000000000000000000000000000000000000000000D0C0 201 | B000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00C0A89000D0C8 202 | C00060483000000000000000000000000000A3A3A300FFFFFF00F8F8F800F8F8 203 | F800E5BB7B00C58C3300C58C3300C58C33000000000000000000000000000000 204 | 00000000000000000000000000000000000000000000B5A79B007A736D004038 205 | 300040404000A69691000000000000000000000000000000000000000000CDBC 206 | AE005A515700867D760000000000000000000000000000000000000000000000 207 | 0000000000000000000000000000000000000000000000000000000000000000 208 | 000000000000000000000000000000000000000000000000000000000000E0C0 209 | B000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00C0A8A0006048 210 | 300000000000000000000000000000000000AAABAA00FFFFFF00FFFFFF00FFFF 211 | FF00E5BB7B00FFD4A800FFFFE400E5BB7B000000000000000000000000000000 212 | 00000000000000000000000000000000000000000000B5AB9C00404040004B49 213 | 4800C6B5AB000000000000000000000000000000000000000000000000000000 214 | 000000000000A9A1930000000000000000000000000000000000000000000000 215 | 0000000000000000000000000000000000000000000000000000000000000000 216 | 000000000000000000000000000000000000000000000000000000000000E0C0 217 | B000E0C0B000E0C0B000E0C0B000E0C0B000D0C0B000D0B8B000D0B0A0000000 218 | 000000000000000000000000000000000000AEAFAF00FFFFFF00FFFFFF00FFFF 219 | FF00E5BB7B00FFFFE400E5BB7B00000000000000000000000000000000000000 220 | 00000000000000000000000000000000000000000000DCC9BD007A6F7100D1BF 221 | B500000000000000000000000000000000000000000000000000000000000000 222 | 0000000000000000000000000000000000000000000000000000000000000000 223 | 0000000000000000000000000000000000000000000000000000000000000000 224 | 0000000000000000000000000000000000000000000000000000000000000000 225 | 0000000000000000000000000000000000000000000000000000000000000000 226 | 000000000000000000000000000000000000AEAFAF00AEAFAF00AEAFAF00AEAF 227 | AF00E5BB7B00E5BB7B0000000000000000000000000000000000000000000000 228 | 0000000000000000000000000000000000000000000000000000000000000000 229 | 0000000000000000000000000000000000000000000000000000000000000000 230 | 0000000000000000000000000000000000000000000000000000000000000000 231 | 0000000000000000000000000000000000000000000000000000000000000000 232 | 000000000000000000000000000000000000424D3E000000000000003E000000 233 | 2800000040000000100000000100010000000000800000000000000000000000 234 | 000000000000000000000000FFFFFF00FFFFFC03FFFF0000E003FC03C7FF0000 235 | E003F403C3F30000E003C001C3F30000E003D400E1E70000E003DC00E1C70000 236 | E003DC00F00F0000E0030000F81F0000E0030001FC3F0000E00300E3F81F0000 237 | E00300FFF00F0000E00300FFC1C70000E00700FF83E30000E00F00FF87FB0000 238 | E01F01FF8FFF0000FFFF03FFFFFF000000000000000000000000000000000000 239 | 000000000000} 240 | end 241 | end 242 | -------------------------------------------------------------------------------- /Sources/LLObjectEditor.pas: -------------------------------------------------------------------------------- 1 | {================================================================================= 2 | 3 | Copyright © combit GmbH, Konstanz 4 | 5 | ---------------------------------------------------------------------------------- 6 | File : LLObjectEditor.pas 7 | Module : List & Label 30 8 | Descr. : Implementation file for the List & Label 30 VCL-Component 9 | Version: 30.000 10 | ================================================================================== 11 | } 12 | 13 | unit LLObjectEditor; 14 | 15 | interface 16 | {$WEAKPACKAGEUNIT ON} 17 | uses 18 | Windows, Messages, SysUtils, Classes, Graphics, 19 | Controls, Dialogs, Forms, DesignIntf, ObjTree, Vcl.ComCtrls, Vcl.Buttons, Vcl.ExtCtrls, Vcl.ActnList, 20 | Vcl.ImgList, Vcl.ToolWin, System.ImageList, System.Actions ; 21 | 22 | 23 | const 24 | sInvalidParameter = 'Parameter %s von %s darf nicht %s'; 25 | 26 | type 27 | TDetailSourcesEditor = class(TForm) 28 | DisplayTree: TTreeView; 29 | ToolBar: TToolBar; 30 | ToolButton1: TToolButton; 31 | ToolButton2: TToolButton; 32 | Actions: TActionList; 33 | TB_Images: TImageList; 34 | AC_New_Child: TAction; 35 | ToolButton3: TToolButton; 36 | AC_Delete: TAction; 37 | AC_New_Root: TAction; 38 | ToolButton4: TToolButton; 39 | ToolButton5: TToolButton; 40 | procedure DisplayTreeMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); 41 | procedure AC_New_RootExecute(Sender: TObject); 42 | procedure AC_DeleteExecute(Sender: TObject); 43 | procedure AC_New_ChildExecute(Sender: TObject); 44 | procedure FormHide(Sender: TObject); 45 | procedure FormShow(Sender: TObject); 46 | private 47 | { Private-Deklarationen } 48 | OldSelection : IDesignerSelections; 49 | protected 50 | IgnoreChange: Boolean; 51 | function GetSelectedObject(ASelectedNode: TTreeNode): TObjTreeNode; 52 | function GetItemText(Item: TObjTreeNode): string; 53 | procedure ItemSelectionChanged(Item: TObjTreeNode); 54 | procedure ItemRefreshDesign(Sender: TObject); 55 | procedure ResetForm; 56 | public 57 | { Public-Deklarationen } 58 | RootNodes: TObjTree; 59 | Designer : IDesigner; 60 | PropertyName: string; // Name of property being edited 61 | Component: TComponent; // Handle to component being edited 62 | procedure Reload; 63 | procedure SetSelection(Instance: TPersistent; Selected: Boolean); virtual; 64 | procedure Update; override; 65 | destructor Destroy; override; 66 | end; 67 | 68 | procedure ExecuteDetailSourcesEditor(ACaption: string; ADesigner: IDesigner; APropertyName: string; 69 | ACollection : TObjTree); 70 | 71 | 72 | var 73 | DetailSourcesEditor: TDetailSourcesEditor; 74 | 75 | implementation 76 | {$R *.dfm} 77 | 78 | procedure ExecuteDetailSourcesEditor(ACaption: string; ADesigner: IDesigner; APropertyName: string; 79 | ACollection : TObjTree); 80 | Begin 81 | if ACollection = nil then 82 | raise EInvalidOperation.Create(Format(sInvalidParameter, ['ACollection', 'fcExecuteCollectionEditor', 'nil'])); 83 | 84 | if DetailSourcesEditor = nil then 85 | DetailSourcesEditor := TDetailSourcesEditor.Create(Application) 86 | else 87 | DetailSourcesEditor.ResetForm; 88 | 89 | 90 | 91 | with DetailSourcesEditor do 92 | begin 93 | PropertyName := APropertyName; 94 | ACollection.Designer := DetailSourcesEditor; 95 | Designer := ADesigner; 96 | 97 | if (ACollection <> RootNodes) and (RootNodes <> nil) then 98 | RootNodes.Designer := nil; { Detach previous collection } 99 | 100 | RootNodes := ACollection; 101 | Reload; 102 | Caption := ACaption; 103 | Show; 104 | end 105 | End; 106 | 107 | // =============================================================================================================== 108 | // TDetailSourcesEditor 109 | // =============================================================================================================== 110 | 111 | function TDetailSourcesEditor.GetSelectedObject(ASelectedNode: TTreeNode): TObjTreeNode; 112 | begin 113 | result := TObjTreeNode(ASelectedNode.Data); 114 | if result = nil then 115 | raise EInvalidOperation.Create('GetSelectedComponent lieferte Nil-Pointer'); 116 | end; 117 | 118 | function TDetailSourcesEditor.GetItemText(Item: TObjTreeNode): string; 119 | var 120 | DisplayName: string; 121 | begin 122 | DisplayName := Item.DisplayName; 123 | if (DisplayName = '') and (Item.GetInstance(PropertyName) is TComponent) then 124 | DisplayName := (Item.GetInstance(PropertyName) as TComponent).Name; 125 | result := DisplayName; 126 | end; 127 | 128 | procedure TDetailSourcesEditor.ItemSelectionChanged(Item: TObjTreeNode); 129 | Var 130 | i: Integer; 131 | begin 132 | i:=0; 133 | while i < DisplayTree.Items.Count do 134 | Begin 135 | if DisplayTree.Items[i].Data = Item then 136 | Begin 137 | DisplayTree.Selected := DisplayTree.Items[i]; 138 | end; 139 | inc(i); 140 | End; 141 | end; 142 | 143 | procedure TDetailSourcesEditor.DisplayTreeMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; 144 | X, Y: Integer); 145 | Var 146 | Selections: IDesignerSelections; 147 | i : Integer; 148 | begin 149 | if (csDestroying in ComponentState) then 150 | Exit; 151 | 152 | AC_Delete.Enabled := DisplayTree.Selected <> nil; 153 | 154 | if (Designer = nil) or IgnoreChange then 155 | Exit; 156 | 157 | Selections := CreateSelectionList; 158 | 159 | for i := 0 to DisplayTree.Items.Count - 1 do 160 | if DisplayTree.Items[i].Selected then 161 | Selections.Add(GetSelectedObject(DisplayTree.Items[i]).GetInstance(PropertyName)); 162 | if Selections.Count > 0 then 163 | Designer.SetSelections(Selections); 164 | 165 | { if ObjectTree.SelectionCount = 1 then 166 | GetSelectedComponent(ObjectTree.Selected).GotSelected; } 167 | end; 168 | 169 | 170 | procedure TDetailSourcesEditor.Reload; 171 | // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 172 | Procedure LoadSubtree(ParentNode: TTreeNode; AChildList: TObjTreeNode); 173 | Var 174 | i: Integer; 175 | node : TTreeNode; 176 | Begin 177 | for i:= 0 to AChildList.Count - 1 do 178 | begin 179 | node := DisplayTree.Items.AddChildObject(ParentNode, GetItemText(AChildList[i]), AChildList[i]); 180 | AChildList[i].OnItemSelected := ItemSelectionChanged; 181 | if AChildList[i].Count > 0 then 182 | LoadSubtree(node, AChildList[i]); 183 | end 184 | end; 185 | // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 186 | Var 187 | i: Integer; 188 | tn : TTreeNode; 189 | begin 190 | DisplayTree.Items.BeginUpdate; 191 | DisplayTree.Items.Clear; 192 | for i := 0 to RootNodes.Count - 1 do 193 | Begin 194 | tn := DisplayTree.Items.AddObject(nil, GetItemText(RootNodes.Items[i]), RootNodes.Items[i]); 195 | if RootNodes.Items[i].Count > 0 then 196 | LoadSubtree(tn, RootNodes.Items[i]); 197 | End; 198 | DisplayTree.FullExpand; 199 | DisplayTree.Items.EndUpdate; 200 | end; 201 | 202 | procedure TDetailSourcesEditor.ResetForm; 203 | begin 204 | IgnoreChange := True; 205 | DisplayTree.Items.Clear; 206 | IgnoreChange := False; 207 | end; 208 | 209 | procedure TDetailSourcesEditor.ItemRefreshDesign(Sender: TObject); 210 | begin 211 | Reload; 212 | end; 213 | 214 | procedure TDetailSourcesEditor.SetSelection(Instance: TPersistent; Selected: Boolean); 215 | var 216 | i: Integer; 217 | begin 218 | IgnoreChange := True; 219 | for i := 0 to DisplayTree.Items.Count - 1 do 220 | if DisplayTree.Items[i].Data = Instance then 221 | Begin 222 | if Selected then 223 | DisplayTree.Selected := DisplayTree.Items[i]; 224 | Break; 225 | end; 226 | IgnoreChange := False; 227 | end; 228 | 229 | procedure TDetailSourcesEditor.Update; 230 | begin 231 | inherited Update; 232 | Reload; 233 | end; 234 | 235 | procedure TDetailSourcesEditor.AC_DeleteExecute(Sender: TObject); 236 | var 237 | OldItemIndex: Integer; 238 | node: TObjTreeNode; 239 | begin 240 | // Prevent OnChange event from firing. 241 | IgnoreChange := True; 242 | 243 | if DisplayTree.Selected = nil then 244 | Exit; 245 | 246 | node := GetSelectedObject(DisplayTree.Selected); 247 | 248 | OldItemIndex := Node.Index; 249 | 250 | if node.ParentNode <> Nil then 251 | node.ParentNode.Delete(OldItemIndex) 252 | Else 253 | Node.RootTree.Delete(OldItemIndex); 254 | 255 | 256 | Self.Reload; 257 | 258 | // Allow OnChange event to fire. 259 | IgnoreChange := False; 260 | 261 | // Set the currently selected ListView item to be selected 262 | DisplayTreeMouseUp(DisplayTree, mbLeft, [], 0, 0); 263 | 264 | if Designer <> nil then 265 | Designer.Modified; 266 | end; 267 | 268 | procedure TDetailSourcesEditor.AC_New_ChildExecute(Sender: TObject); 269 | Var 270 | node: TObjTreeNode; 271 | begin 272 | // Prevent OnChange event from firing. 273 | 274 | IgnoreChange := True; 275 | 276 | if DisplayTree.Selected = nil then 277 | Exit; 278 | 279 | node := GetSelectedObject(DisplayTree.Selected); 280 | 281 | node.AddChildNode; 282 | IgnoreChange := False; 283 | Reload; 284 | 285 | if Designer <> nil then 286 | Designer.Modified; 287 | end; 288 | 289 | procedure TDetailSourcesEditor.AC_New_RootExecute(Sender: TObject); 290 | begin 291 | RootNodes.Add; 292 | 293 | Reload; 294 | 295 | if Designer <> nil then 296 | Designer.Modified; 297 | end; 298 | 299 | destructor TDetailSourcesEditor.Destroy; 300 | begin 301 | RootNodes.Designer := nil; 302 | DetailSourcesEditor := nil; 303 | inherited Destroy; 304 | end; 305 | 306 | procedure TDetailSourcesEditor.FormHide(Sender: TObject); 307 | begin 308 | if Designer <> nil then 309 | Begin 310 | Designer.SetSelections(OldSelection); 311 | Designer.Modified; 312 | Designer.SelectItemName('DataController'); 313 | Designer.SelectItemName('DetailSources'); 314 | End; 315 | end; 316 | 317 | procedure TDetailSourcesEditor.FormShow(Sender: TObject); 318 | begin 319 | if Designer <> nil then 320 | begin 321 | OldSelection := CreateSelectionList; 322 | Designer.GetSelections(OldSelection); 323 | end; 324 | end; 325 | 326 | initialization 327 | // nix zu tun 328 | finalization 329 | DetailSourcesEditor.Free; 330 | DetailSourcesEditor:= nil; 331 | 332 | end. 333 | -------------------------------------------------------------------------------- /Sources/LLPreview.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/Sources/LLPreview.pas -------------------------------------------------------------------------------- /Sources/LLReport_Types.pas: -------------------------------------------------------------------------------- 1 | {================================================================================= 2 | 3 | Copyright © combit GmbH, Konstanz 4 | 5 | ---------------------------------------------------------------------------------- 6 | File : LLReport_Types.pas 7 | Module : LLReport_Types.pas 8 | Descr. : Implementation file for the List & Label 30 VCL-Component 9 | Version: 30.000 10 | ================================================================================== 11 | } 12 | 13 | unit LLReport_Types; 14 | 15 | interface 16 | {$WEAKPACKAGEUNIT ON} 17 | Uses 18 | Windows, Classes, DB, Graphics, ObjTree, System.Contnrs, cmbtll30x, Dialogs, System.UITypes; 19 | 20 | Type 21 | 22 | cmbtHWND = DWORD_PTR; // needed for C++Builder compatibility 23 | 24 | // initialized enum values need to be continued - otherwise they cannot be used directly 25 | // as designer property, because it will disapear in the designer! 26 | // Please also see class TEnumTranslater with static translation functions 27 | 28 | TLlExtensionType =( 29 | 30 | Export = LL_LLX_EXTENSIONTYPE_EXPORT, 31 | Barcode = LL_LLX_EXTENSIONTYPE_BARCODE, 32 | Obj = LL_LLX_EXTENSIONTYPE_OBJECT, 33 | Wizard = LL_LLX_EXTENSIONTYPE_WIZARD 34 | ); 35 | 36 | TLlExportOption =(ExportAllInOneFile, 37 | ExportFile, 38 | ExportPath, 39 | ExportTarget, 40 | ExportQuiet, 41 | ExportShowResult, 42 | ExportShowResultAvailable, 43 | ExportSendAsMail, 44 | ExportSendAsMailAvailable, 45 | ExportMailBody, 46 | ExportMailHtmlBody, 47 | ExportMailAttachmentList, 48 | ExportMailSecureConnection, 49 | ExportMailSmtpServerTimeOut, 50 | ExportMailSmtpServerAddress, 51 | ExportMailSmtpServerPort, 52 | ExportMailSmtpUser, 53 | ExportMailSmtpPassword, 54 | ExportMailSmtpProxyType, 55 | ExportMailSmtpProxyAddress, 56 | ExportMailSmtpProxyPort, 57 | ExportMailSmtpProxyUser, 58 | ExportMailSmtpProxyPassword, 59 | ExportMailSmtpSenderAddress, 60 | ExportMailSmtpSenderName, 61 | ExportMailSmtpReplyTo, 62 | ExportMailSmtpFrom, 63 | ExportMailSmtpPopBeforeSmtp, 64 | ExportMailSmtpServerUser, 65 | ExportMailSmtpServerPassword, 66 | ExportMailTo, 67 | ExportMailCc, 68 | ExportMailBcc, 69 | ExportMailProvider, 70 | ExportMailSubject, 71 | ExportMailShowDialog, 72 | ExportMailSendResultAs, 73 | ExportSaveAsZip, 74 | ExportSaveAsZipAvailable, 75 | ExportZipFile, 76 | ExportZipPath, 77 | ExportOnlyTableData, 78 | ExportInfinitePage, 79 | ExportSignResult, 80 | ExportSignResultAvailable, 81 | ExportSignatureProvider, 82 | ExportSignatureProviderOption, 83 | ExportSignatureFormat, 84 | PictureFormat, 85 | PictureJpegEncoding, 86 | PictureJpegQuality, 87 | PictureBitsPerPixel, 88 | PictureCropFile, 89 | PictureCropFrameWidth, 90 | UsePosFrame, 91 | VerbosityRectangle, 92 | VerbosityBarcode, 93 | VerbosityDrawing, 94 | VerbosityEllipse, 95 | VerbosityLine, 96 | VerbosityText, 97 | VerbosityTextFrames, 98 | VerbosityRtf, 99 | VerbosityRtfFrames, 100 | VerbosityTable, 101 | VerbosityTableCell, 102 | VerbosityTableFrames, 103 | VerbosityLLXObject, 104 | VerbosityLLXObjectHtmlObject, 105 | HtmlTitle, 106 | HtmlFormHeader, 107 | HtmlFormFooter, 108 | LayouterPercentaged, 109 | LayouterFixedPageHeight, 110 | PdfTitle, 111 | PdfSubject, 112 | PdfKeywords, 113 | PdfAuthor, 114 | PdfCreator, 115 | PdfEncryptionEncryptFile, 116 | PdfEncryptionEnablePrinting, 117 | PdfEncryptionEnableChanging, 118 | PdfEncryptionEnableCopying, 119 | PdfEncryptionEnableFillingForms, 120 | PdfEncryptionEnableAnnotating, 121 | PdfOwnerPassword, 122 | PdfEncryptionLevel, 123 | PdfCompressStreamMethod, 124 | PdfUserPassword, 125 | PdfExcludedFonts, 126 | PdfFileAttachments, 127 | PdfConformance, 128 | PdfUseSimpleFrames, 129 | Resolution, 130 | TxtFrameChar, 131 | TxtSeparatorChar, 132 | TxtIgnoreGroupLines, 133 | TxtIgnoreHeaderFooterLines, 134 | TxtCharset, 135 | TtyEmulation, 136 | TtyDestination, 137 | TtyDefaultFilename, 138 | TtyAdvanceAfterPrint, 139 | TiffCompressionType, 140 | TiffCompressionQuality, 141 | XlsFontScalingPercentage, 142 | XlsPrintingZoom, 143 | XlsIgnoreGroupLines, 144 | XlsIgnoreHeaderFooterLines, 145 | XlsIgnoreLineWrapForDataOnlyExport, 146 | XlsConvertNumeric, 147 | XlsAllPagesOneSheet, 148 | XlsWorksheetName, 149 | XlsFileFormat, 150 | XlsAutoFit, 151 | XmlTitle, 152 | XhtmlUseAdvancedCss, 153 | XhtmlToolbarType, 154 | XhtmlTitle, 155 | XhtmlUseSeparateCss, 156 | JqmTitle, 157 | JqmCDN, 158 | JqmListDataFilter, 159 | JqmUseDividerLines, 160 | JqmBaseTheme, 161 | JqmHeaderTheme, 162 | JqmDividerTheme, 163 | JqmColumnMode, 164 | DocxFontScalingPercentage, 165 | DocxAllPagesOneFile, 166 | DocxCellScalingPercentageHeight, 167 | DocxCellScalingPercentageWidth, 168 | DocxFloatingTableMode, 169 | SvgTitle, 170 | PdfZUGFeRDConformanceLevel, 171 | PdfZUGFeRDXmlPath, 172 | PdfZUGFeRDVersion, 173 | PptxFontScalingPercentage, 174 | PptxAnimation, 175 | ExportMailPop3SocketTimeout, 176 | ExportMailPop3SenderDomain, 177 | ExportMailPop3ServerPort, 178 | ExportMailPop3ServerAddress, 179 | ExportMailPop3ServerUser, 180 | ExportMailPop3ServerPassword, 181 | ExportMailPop3ProxyAddress, 182 | ExportMailPop3ProxyPort, 183 | ExportMailPop3ProxyUser, 184 | ExportMailPop3ProxyPassword, 185 | ExportMailXmapiServerUser, 186 | ExportMailXmapiServerPassword, 187 | ExportMailXmapiSuppressLogonFailure, 188 | ExportMailXmapiDeleteAfterSend, 189 | ExportMailSignatureName, 190 | JsonIndent, 191 | DocxAuthor, 192 | DocxTitle, 193 | DocxKeywords, 194 | DocxSubject, 195 | XhtmlEnableAccessibility, 196 | XhtmlFixedHeader, 197 | XlsAutoFormula, 198 | XlsProtectionProtectSheets, 199 | XlsProtectionProtectSheetsPassword, 200 | XlsProtectionProtectSheetsMode, 201 | XlsHeaderContent, 202 | XlsHeaderMargin, 203 | XlsFooterContent, 204 | XlsFooterMargin, 205 | ExportMailGraphAuthType, 206 | ExportMailGraphClientId, 207 | ExportMailGraphTenantId, 208 | ExportMailGraphScope, 209 | ExportMailGraphRedirectUri, 210 | ExportMailGraphSecretClientKeyId, 211 | ExportMailGraphSecretClientKeyValue, 212 | ExportMailGraphUserName, 213 | ExportMailGraphUserObjectId, 214 | ExportMailGraphUserPassword, 215 | ExportMailGraphBearerToken, 216 | ExportMailSmtpOAuth2BearerToken 217 | ); 218 | 219 | TLlExportTarget = (Pdf, 220 | Html, 221 | Rtf, 222 | Bitmap, 223 | MetaFile, 224 | Tiff, 225 | MultiTiff, 226 | Jpeg, 227 | Png, 228 | Xls, 229 | Xlsx, 230 | Docx, 231 | Xps, 232 | Mhtml, 233 | Xhtml, 234 | Svg, 235 | Jqm, 236 | Xml, 237 | Text, 238 | TextLayout, 239 | Tty, 240 | Preview, 241 | Pptx, 242 | Json); 243 | 244 | TLlAutoBoxType = (btNormalMeter, 245 | btBridgeMeter, 246 | btNormalwait, 247 | btBridgeWait, 248 | btEmptyWait, 249 | btEmptyAbort, 250 | btStandardWait, 251 | btStandardAbort, 252 | btMarquee, 253 | btNone); 254 | 255 | TLlPrintMode = (pmNormal, 256 | pmPreview, 257 | //pmPreviewControl, 258 | pmFile, 259 | pmExport, 260 | pmMultipleJobs, 261 | pmKeepJob); 262 | 263 | TLlProject = (ptUnknown = 0, 264 | ptLabel = LL_PROJECT_LABEL, 265 | ptList = LL_PROJECT_LIST, 266 | ptCard = LL_PROJECT_CARD); 267 | 268 | TLlUnits = (uMillimeter_1_1000, 269 | uMillimeter_1_100, 270 | uMillimeter_1_10, 271 | uInch_1_100, 272 | uInch_1_1000, 273 | uSysDefault, 274 | uSysDefaultLoRes, 275 | uSysDefaultHiRes); 276 | 277 | 278 | TLlDebug = (dEnabled, 279 | dDWG, 280 | dNoCallbacks, 281 | dNoStorage, 282 | dLogToFile, 283 | dNoSysInfo, 284 | dPrinterInfo, 285 | dLicInfo); 286 | TLlDebugFlags = Set Of TLlDebug; 287 | 288 | TLlTableColoring = (tcListLabel, 289 | tcProgram, 290 | tcDontCare); 291 | 292 | TLlLanguage = (lDefault, 293 | lGerman, 294 | lEnglish, 295 | //lArabic, 296 | //lAfrikaans, 297 | //lAlbanian, 298 | //lBasque, 299 | //lBulgarian, 300 | //lByelorussian, 301 | //lCatalan, 302 | lChinese, 303 | //lCroatian, 304 | lCzech, 305 | //lDanish, 306 | lDutch, 307 | //lEstonian, 308 | //lFaeroese, 309 | //lFarsi, 310 | //Finnish, 311 | lFrench, 312 | //lGreek, 313 | //lHebrew, 314 | //lHungarian, 315 | //lIcelandic, 316 | //lIndonesian, 317 | lItalian, 318 | lJapanese, 319 | //lKorean, 320 | //lLatvian, 321 | //lLithuanian, 322 | //lNorwegian, 323 | //lPolish, 324 | lPortuguese, 325 | //lRomanian, 326 | //lRussian, 327 | lSlovak, 328 | //lSlovenian, 329 | //lSerbian, 330 | lSpanish 331 | //lSwedish, 332 | //lThai, 333 | //lTurkish, 334 | //lUkrainian, 335 | //lSerbianLatin, 336 | //lChineseTraditional, 337 | //lPortugueseBrazilian, 338 | //lSpanishColombia 339 | ); 340 | 341 | TLlAutoMasterMode = (mmNone, 342 | mmAsFields, 343 | mmAsVariables); 344 | 345 | TLLCPrintOption = (poSetupDialog, 346 | poExtSetupDialog, 347 | poDialogOnPreview, 348 | poPrintWithoutBox); 349 | 350 | TLLCDefineMode = (dmVariable, dmFields); 351 | 352 | TLlPrintOption =( 353 | Copies = LL_PRNOPT_COPIES, 354 | StartPage = LL_PRNOPT_STARTPAGE, 355 | Page = LL_PRNOPT_PAGE, 356 | Offset = LL_PRNOPT_OFFSET, 357 | Copies_Supported = LL_PRNOPT_COPIES_SUPPORTED, 358 | Units = LL_PRNOPT_UNITS, 359 | FirstPage = LL_PRNOPT_FIRSTPAGE, 360 | LastPage = LL_PRNOPT_LASTPAGE, 361 | JobPages = LL_PRNOPT_JOBPAGES, 362 | PrintOrder = LL_PRNOPT_PRINTORDER, 363 | PrintOrder_Printer1 = 9, 364 | PrintOrder_Printer2 = 10, 365 | DefaultPrinterInstalled = LL_PRNOPT_DEFPRINTERINSTALLED, 366 | Dialog_DestinationMask = LL_PRNOPT_PRINTDLG_DESTMASK, 367 | Dialog_Destination = LL_PRNOPT_PRINTDLG_DEST, 368 | Dialog_OnlyPrinterCopies = LL_PRNOPT_PRINTDLG_ONLYPRINTERCOPIES, 369 | UseMemoryMetafile = LL_PRNOPT_USEMEMORYMETAFILE, 370 | PageIndex = 18 371 | ); 372 | 373 | TLlOption =( 374 | NewExpressions = LL_OPTION_NEWEXPRESSIONS, 375 | OnlyOneTable = LL_OPTION_ONLYONETABLE, 376 | TableColoring = LL_OPTION_TABLE_COLORING, 377 | SuperVisor = LL_OPTION_SUPERVISOR, 378 | OptionUnits = LL_OPTION_UNITS, 379 | TabStops = LL_OPTION_TABSTOPS, 380 | CallbackMask = LL_OPTION_CALLBACKMASK, 381 | CallbackParameter = LL_OPTION_CALLBACKPARAMETER, 382 | HelpAvailable = LL_OPTION_HELPAVAILABLE, 383 | SortVariables = LL_OPTION_SORTVARIABLES, 384 | SupportPagebreak = LL_OPTION_SUPPORTPAGEBREAK, 385 | ShowPredefinedVariables = LL_OPTION_SHOWPREDEFVARS, 386 | UseHostprinter = LL_OPTION_USEHOSTPRINTER, 387 | ExtendedEvaluation = LL_OPTION_EXTENDEDEVALUATION, 388 | TabRepresentationCode = LL_OPTION_TABREPRESENTATIONCODE, 389 | Metric = LL_OPTION_METRIC, 390 | AddVarsToFields = LL_OPTION_ADDVARSTOFIELDS, 391 | ConvertCRLF = LL_OPTION_CONVERTCRLF, 392 | Wizard_FileNew = LL_OPTION_WIZ_FILENEW, 393 | ReturnRepresentationCode = LL_OPTION_RETREPRESENTATIONCODE, 394 | Preview_Zoom_Percent = LL_OPTION_PRVZOOM_PERC, 395 | Preview_RectLeft = LL_OPTION_PRVRECT_LEFT, 396 | Preview_RectTop = LL_OPTION_PRVRECT_TOP, 397 | Preview_RectWidth = LL_OPTION_PRVRECT_WIDTH, 398 | Preview_RectHeight = LL_OPTION_PRVRECT_HEIGHT, 399 | StorageSystem = LL_OPTION_STORAGESYSTEM, 400 | CompressStorage = LL_OPTION_COMPRESSSTORAGE, 401 | NoParameterCheck = LL_OPTION_NOPARAMETERCHECK, 402 | NoNoTableCheck = LL_OPTION_NONOTABLECHECK, 403 | DrawFooterLineOnPrint = LL_OPTION_DRAWFOOTERLINEONPRINT, 404 | Preview_Zoom_Left = LL_OPTION_PRVZOOM_LEFT, 405 | Preview_Zoom_Top = LL_OPTION_PRVZOOM_TOP, 406 | Preview_Zoom_Width = LL_OPTION_PRVZOOM_WIDTH, 407 | Preview_Zoom_Height = LL_OPTION_PRVZOOM_HEIGHT, 408 | SpaceOptimization = LL_OPTION_SPACEOPTIMIZATION, 409 | Realtime = LL_OPTION_REALTIME, 410 | AutoMultiPage = LL_OPTION_AUTOMULTIPAGE, 411 | UseBarcodeSizes = LL_OPTION_USEBARCODESIZES, 412 | MaxRtfVersion = LL_OPTION_MAXRTFVERSION, 413 | VarsCaseSensitive = LL_OPTION_VARSCASESENSITIVE, 414 | DelayTableHeader = LL_OPTION_DELAYTABLEHEADER, 415 | EmfResolution = LL_OPTION_EMFRESOLUTION, 416 | SetCreationInfo = LL_OPTION_SETCREATIONINFO, 417 | XlatVarnames = LL_OPTION_XLATVARNAMES, 418 | TranslationFlags = LL_OPTION_TRANSLATIONFLAGS, 419 | PhantomspaceRepresentationCode = LL_OPTION_PHANTOMSPACEREPRESENTATIONCODE, 420 | LockNextCharRepresentationCode = LL_OPTION_LOCKNEXTCHARREPRESENTATIONCODE, 421 | ExpressionSeparatorRepresentationCode = LL_OPTION_EXPRSEPREPRESENTATIONCODE, 422 | OptionDefaultPrinterInstalled = LL_OPTION_DEFPRINTERINSTALLED, 423 | NoFooterPagewrap = LL_OPTION_NOFOOTERPAGEWRAP, 424 | ImmediateLastpage = LL_OPTION_IMMEDIATELASTPAGE, 425 | LCID = LL_OPTION_LCID, 426 | TextquoteRepresentationCode = LL_OPTION_TEXTQUOTEREPRESENTATIONCODE, 427 | DefaultDefaultFont = LL_OPTION_DEFDEFFONT, 428 | Codepage = LL_OPTION_CODEPAGE, 429 | ForceFontCharset = LL_OPTION_FORCEFONTCHARSET, 430 | CompressRtf = LL_OPTION_COMPRESSRTF, 431 | AllowLlxExporters = LL_OPTION_ALLOW_LLX_EXPORTERS, 432 | Supports_PRNOPSTR_Export = LL_OPTION_SUPPORTS_PRNOPTSTR_EXPORT, 433 | DebugFlag = LL_OPTION_DEBUGFLAG, 434 | SkipReturnAtEndOfRtf = LL_OPTION_SKIPRETURNATENDOFRTF, 435 | InterCharSpacing = LL_OPTION_INTERCHARSPACING, 436 | IncludeFontDescent = LL_OPTION_INCLUDEFONTDESCENT, 437 | ResolutioncompatibleTo9x = LL_OPTION_RESOLUTIONCOMPATIBLETO9X, 438 | UseChartFields = LL_OPTION_USECHARTFIELDS, 439 | OpenFileDialog_NoPlacesBar = LL_OPTION_OFNDIALOG_NOPLACESBAR, 440 | SketchColorDepth = LL_OPTION_SKETCH_COLORDEPTH, 441 | LLXInterface = 53, 442 | UIStyle = LL_OPTION_UISTYLE, 443 | NoFileVersionUpgradeWarning = LL_OPTION_NOFILEVERSIONUPGRADEWARNING, 444 | ScalableFontsOnly = LL_OPTION_SCALABLEFONTSONLY, 445 | NoPrintJobSupervision = LL_OPTION_NOPRINTJOBSUPERVISION, 446 | ProhibitUserInteraction = LL_OPTION_PROHIBIT_USERINTERACTION, 447 | EscClosesPreview = LL_OPTION_ESC_CLOSES_PREVIEW, 448 | IncrementalPreview = LL_OPTION_INCREMENTAL_PREVIEW, 449 | NoPrinterPathCheck = 137, // LL_OPTION_NOPRINTERPATHCHECK (137) 450 | CalcSumVarsOnPartialLines = LL_OPTION_CALC_SUMVARS_ON_PARTIAL_LINES, 451 | NoAutoPropertyCorrection = LL_OPTION_NOAUTOPROPERTYCORRECTION, 452 | DesignerPreviewParameter = LL_OPTION_DESIGNERPREVIEWPARAMETER, 453 | DesignerExportParameter = LL_OPTION_DESIGNEREXPORTPARAMETER, 454 | Reserved = LL_OPTION_SKETCH_COLORDEPTH, 455 | DesignerPrintSingleThreaded = LL_OPTION_DESIGNERPRINT_SINGLETHREADED, 456 | DrillDownParameter = 162, 457 | RoundingStrategy = 163, 458 | CalcSumVarsOnInvisibleLines = LL_OPTION_CALCSUMVARSONINVISIBLELINES, 459 | RibbonDefaultEnabledState = 217, 460 | AllowCombinedCollectingOfDataForCollectionControls = 222, 461 | SuppressLoadErrorMessages = LL_OPTION_SUPPRESS_LOADERRORMESSAGES, 462 | ReportParameterJobParameter = 234, //LL_OPTION_RP_REALDATAJOBPARAMETER 463 | ExpandableRegionsJobParameter = 235, //LL_OPTION_EXPANDABLE_REGIONS_REALDATAJOBPARAMETER 464 | InteractiveSortingJobParameter = 237, // LL_OPTION_INTERACTIVESORTING_REALDATAJOBPARAMETER 465 | DataproviderThreadedness = 257, // LL_OPTION_DATAPROVIDER_THREADEDNESS 466 | ScriptingEngineEnabled = 276, // LL_OPTION_SCRIPTENGINE_ENABLED 467 | ScriptingEngineTimeoutMs = 277, // LL_OPTION_SCRIPTENGINE_TIMEOUTMS 468 | ScriptingEngineAutoExecute = 278, // LL_OPTION_SCRIPTENGINE_AUTOEXECUTE 469 | ProjectBackup = LL_OPTION_PROJECTBACKUP, 470 | PrintedRecordsCount = LL_OPTION_COUNTALLPRINTEDDATA_LASTPRINT, 471 | /// Customize the auto recovery dialogue by providing a combination of supported modes (combine flags of ). 472 | AutoRecoverySaveOptions = LL_OPTION_AUTORECOVERY_SAVEOPTIONS, 473 | /// For report parameter choices from the data source, this option lets the designer show only distinct display values (instead of removing duplicates from the real values only). 474 | ForceUniqueReportParameterDisplayValues = LL_OPTION_FORCE_UNIQUE_PARAMETERUISTRING, 475 | /// Use flags (0x1: Designer, 0x2: Preview Window) to decide where to match the physical size on screen. Requires Win 8.1 or newer. 476 | PreviewScalesRelativeToPhysicalSize = 316, // LL_OPTION_PREVIEW_SCALES_RELATIVE_TO_PHYSICAL_SIZE 477 | /// Use flags (0x1: Main variable/fields window, 0x2: variable treeview in fuction wizard) to enable or disable the filter edit control. Default: all enabled. 478 | TreeviewFilterVisibilityFlags = 318, // LL_OPTION_TREEVIEWFILTER_VISIBILITYFLAGS 479 | /// Limits the recursion depth when searching in the variable tree when tables have cyclic relations. 480 | TreeviewFilterMaximumRecursionDepth = 320, // LL_OPTION_TREEVIEWFILTER_MAXIMUM_RECURSION_SEARCH_DEPTH 481 | GetCurrentProjectType = 328, // LL_OPTION_GET_CURRENT_PROJECTTYPE returns the project type of the currently loaded project (list/card/label) or LL_ERR_NOPROJECT 482 | ImprovedTableLineAnchoring = 236, // LL_OPTION_IMPROVED_TABLELINEANCHORING 483 | SaveProjectInUtf8 = 178, // LL_OPTION_SAVE_PROJECT_IN_UTF8 (178) /* BOOL, default 0 (meaning: project is saved as UNICODE if A API is not used) */ 484 | Printerless = 375, 485 | UseSimpleWindowsPenStyleFrameDrawing = 389, // LL_OPTION_USESIMPLEWINDOWSPENSTYLE_FRAMEDRAWING (389) /* default: false */ 486 | UseSvg2Bmp = LL_OPTION_USE_SVG2BMP, 487 | MultiSectionPrintMerge = LL_OPTION_MULTISECTIONPRINT_MERGE 488 | ); 489 | 490 | TExportEnumHelper = class 491 | public 492 | 493 | class function GetExportOptionString(const exportOption: TLlExportOption): string; static; 494 | class function GetTargetFromString(const target: string): TLlExportTarget; static; 495 | class function GetExtensionFromExportTarget(exportTarget: TLlExportTarget): string; static; 496 | class function GetString(exportTarget: TLlExportTarget): string; static; 497 | 498 | end; 499 | 500 | TEnumTranslator = class 501 | public 502 | class function TranslateAutoBoxType(AutoBoxType: TLlAutoBoxType): Integer; static; 503 | class function TranslatePrintMode(PrintMode: TLlPrintMode): Integer; static; 504 | class function TranslateProjectType(ProjectType: TLlProject): Integer; static; 505 | class function TranslateUnits(Units: TLlUnits): Integer; static; 506 | class function TranslateDebugFlags(DebugFlags: TLlDebugFlags): Integer; static; 507 | class function TranslateTableColoring(TableColoring: TLlTableColoring): Integer; 508 | class function TranslateLanguage(Language: TLlLanguage): Integer; 509 | End; 510 | 511 | TDataSetScrolledEvent = procedure (Sender: TObject; Distance: Integer) of object; 512 | TDataSetRecordChangedEvent = procedure (Sender: TObject; Field: TField) of object; 513 | 514 | TLLDataLink = Class (TDataLink) 515 | private 516 | FOnActiveChanged : TNotifyEvent; 517 | FOnRecordChanged : TDataSetRecordChangedEvent; 518 | FOnDataSetChanged : TNotifyEvent; 519 | FOnDataSetScrolled: TDataSetScrolledEvent; 520 | FControl : TComponent; 521 | protected 522 | procedure ActiveChanged; override; 523 | procedure RecordChanged(Field: TField); override; 524 | Procedure DataSetChanged; Override; 525 | procedure DataSetScrolled(Distance: Integer); Override; 526 | public 527 | constructor Create; 528 | property Control: TComponent read FControl write FControl; 529 | property OnActiveChanged : TNotifyEvent read FOnActiveChanged write FOnActiveChanged; 530 | property OnRecordChanged : TDataSetRecordChangedEvent read FOnRecordChanged write FOnRecordChanged; 531 | property OnDataSetChanged : TNotifyEvent read FOnDataSetChanged write FOnDataSetChanged; 532 | property OnDataSetScrolled: TDataSetScrolledEvent read FOnDataSetScrolled write FOnDataSetScrolled; 533 | end; 534 | 535 | TDetailSourceList = Class; 536 | 537 | TDetailSourceItem = class(TObjTreeNode) 538 | private 539 | FName: String; 540 | FOnSetName : TNotifyEvent; 541 | FDataLink : TLLDataLink; 542 | FPrimaryKeyField: String; 543 | FMasterKeyField : String; 544 | FDetailKeyField : String; 545 | FSortDescription: String; 546 | FParentName: String; 547 | 548 | procedure SetName(const Value: string); 549 | function GetDataSource: TDataSource; 550 | procedure SetDataSource(Value: TDataSource); 551 | function GetMasterSource: TDataSource; 552 | procedure LoadCompProperty(Reader: TReader); 553 | procedure StoreCompProperty(Writer: TWriter); 554 | protected 555 | function GetOwner: TComponent; reintroduce; 556 | function GenerateName: string; virtual; 557 | function GetDisplayName: string; override; 558 | function GetItem(Index: Integer): TDetailSourceItem; 559 | procedure SetItem(Index: Integer; Value: TDetailSourceItem); 560 | procedure AssignTo(Dest: TPersistent); Override; 561 | 562 | procedure DefineProperties(Filer: TFiler); Override; 563 | Public 564 | property Owner: TComponent read GetOwner; 565 | property OnSetName: TNotifyEvent read FOnSetName write FOnSetName; 566 | constructor Create(Collection: TCollection); override; 567 | Destructor Destroy; Override; 568 | function Add: TDetailSourceItem; reintroduce; 569 | function FindItemByName(Const AName: String): TDetailSourceItem; 570 | property Items[Index: Integer]: TDetailSourceItem read GetItem write SetItem; default; 571 | 572 | Property ParentName: String read FParentName write FParentName; //deprecated 573 | published 574 | Property Tag; 575 | property Name: string read FName write SetName; 576 | Property DataSource: TDataSource read GetDataSource Write SetDataSource; 577 | Property PrimaryKeyField: string read FPrimaryKeyField write FPrimaryKeyField; 578 | Property DetailKeyField: string read FDetailKeyField write FDetailKeyField; 579 | Property MasterSource: TDataSource read GetMasterSource; 580 | Property SortDescription: STring read FSortDescription write FSortDescription; 581 | Property MasterKeyField: string read FMasterKeyField write FMasterKeyField; 582 | 583 | End; 584 | 585 | TDetailSourceItemClass = class of TDetailSourceItem; 586 | 587 | TDetailSourceList = Class(TObjTree) 588 | private 589 | function GetItem(Index: Integer): TDetailSourceItem; 590 | procedure SetItem(Index: Integer; Value: TDetailSourceItem); 591 | protected 592 | function GetOwner: TComponent; reintroduce; 593 | Procedure ReorderOldParentName; 594 | property OwnerComponent: TComponent read GetOwner; 595 | public 596 | constructor Create(AOwner: TComponent; ADetailSourceItemClass: TDetailSourceItemClass); 597 | Destructor Destroy ; override; 598 | function Add: TDetailSourceItem; 599 | function ItemByName(Const AName: String): TDetailSourceItem; 600 | function FindItemByName(Const AName: String): TDetailSourceItem; 601 | property Items[Index: Integer]: TDetailSourceItem read GetItem write SetItem; default; 602 | End; 603 | 604 | TLLDataController = Class(TPersistent) 605 | Private 606 | FDatasource : TDataSource; 607 | FDetailSources : TDetailSourceList; 608 | FOwner : TComponent; 609 | FSortDescription: String; 610 | 611 | FDataMember: String; 612 | FAutoMasterMode: TLlAutoMasterMode; 613 | 614 | Private 615 | procedure SetDataMember(const Value: String); 616 | procedure SetAutoMasterMode(const Value: TLlAutoMasterMode); 617 | 618 | public 619 | constructor Create(AOwner: TComponent); 620 | destructor Destroy; Override; 621 | Property Owner: TComponent read FOwner write FOwner; 622 | 623 | Published 624 | Property DataSource: TDataSource read FDatasource write FDatasource; 625 | Property SortDescription: STring read FSortDescription write FSortDescription; 626 | Property DetailSources: TDetailSourceList read FDetailSources write FDetailSources; 627 | 628 | Property DataMember: String read FDataMember write SetDataMember; 629 | Property AutoMasterMode: TLlAutoMasterMode read FAutoMasterMode write SetAutoMasterMode default TLlAutoMasterMode.mmAsFields; 630 | End; 631 | 632 | TImageStorage = class(System.Contnrs.TObjectList) 633 | private 634 | function GetItem(Index: Integer): TPicture; 635 | procedure SetItem(Index: Integer; Value: TPicture); 636 | public 637 | function AddItem: TPicture; 638 | property Items[Index: Integer]: TPicture read GetItem write SetItem; default; 639 | end; 640 | 641 | //-------------------------------------------------------------------------------------------------------------------- 642 | 643 | 644 | Resourcestring 645 | rsInternesDesignerRegisterNil = 'Internes DesignerRegister ist NIL'; 646 | rsInternesReportRegisterNil = 'Internes ReportRegister ist NIL'; 647 | rsInternesControllerRegisterNil = 'Internes ControllerRegister ist NIL'; 648 | rsObjectNil = 'Übergebenes Objekt ist NIL'; 649 | rsNotRegistered = 'Objekt nicht registriert'; 650 | rsDetailSourceAlreadyExists = 'Eine Detail-Source mit dem Namen %s existiert bereits.'; 651 | 652 | implementation 653 | 654 | uses TypInfo, SysUtils; 655 | 656 | //============================================================================== 657 | // TExportEnumHelper 658 | //============================================================================== 659 | 660 | class function TExportEnumHelper.GetExportOptionString(const exportOption: TLlExportOption): string; 661 | begin 662 | 663 | case TLlExportOption(exportOption) of 664 | ExportFile: 665 | result:= 'Export.File'; 666 | ExportPath: 667 | result:= 'Export.Path'; 668 | ExportAllInOneFile: 669 | result:= 'Export.AllInOneFile'; 670 | ExportTarget: 671 | result:= 'Export.Target'; 672 | ExportQuiet: 673 | result:= 'Export.Quiet'; 674 | ExportShowResult: 675 | result:= 'Export.ShowResult'; 676 | ExportShowResultAvailable: 677 | result:= 'Export.ShowResultAvailable'; 678 | ExportSendAsMail: 679 | result:= 'Export.SendAsMail'; 680 | ExportSendAsMailAvailable: 681 | result:= 'Export.SendAsMailAvailable'; 682 | ExportMailBody: 683 | result:= 'Export.Mail.Body'; 684 | ExportMailHtmlBody: 685 | result:= 'Export.Mail.Body:text/html'; 686 | ExportMailSecureConnection: 687 | result:= 'Export.Mail.SecureConnection'; 688 | ExportMailAttachmentList: 689 | result:= 'Export.Mail.AttachmentList'; 690 | ExportMailSmtpServerTimeOut: 691 | result:= 'Export.Mail.SMTP.ServerTimeOut'; 692 | ExportMailSmtpServerAddress: 693 | result:= 'Export.Mail.SMTP.ServerAddress'; 694 | ExportMailSmtpServerPort: 695 | result:= 'Export.Mail.SMTP.ServerPort'; 696 | ExportMailSmtpUser: 697 | result:= 'Export.Mail.SMTP.User'; 698 | ExportMailSmtpPassword: 699 | result:= 'Export.Mail.SMTP.Password'; 700 | ExportMailSmtpProxyType: 701 | result:= 'Export.Mail.SMTP.ProxyType'; 702 | ExportMailSmtpProxyAddress: 703 | result:= 'Export.Mail.SMTP.ProxyAddress'; 704 | ExportMailSmtpProxyPort: 705 | result:= 'Export.Mail.SMTP.ProxyPort'; 706 | ExportMailSmtpProxyUser: 707 | result:= 'Export.Mail.SMTP.ProxyUser'; 708 | ExportMailSmtpProxyPassword: 709 | result:= 'Export.Mail.SMTP.ProxyPassword'; 710 | ExportMailSmtpSenderAddress: 711 | result:= 'Export.Mail.SMTP.SenderAddress'; 712 | ExportMailSmtpSenderName: 713 | result:= 'Export.Mail.SMTP.SenderName'; 714 | ExportMailSmtpReplyTo: 715 | result:= 'Export.Mail.SMTP.ReplyTo'; 716 | ExportMailSmtpFrom: 717 | result:= 'Export.Mail.SMTP.From'; 718 | ExportMailSmtpPopBeforeSmtp: 719 | result:= 'Export.Mail.SMTP.POPBeforeSMTP'; 720 | ExportMailSmtpServerUser: 721 | result:= 'Export.Mail.SMTP.ServerUser'; 722 | ExportMailSmtpServerPassword: 723 | result:= 'Export.Mail.SMTP.ServerPassword'; 724 | ExportMailTo: 725 | result:= 'Export.Mail.To'; 726 | ExportMailCc: 727 | result:= 'Export.Mail.CC'; 728 | ExportMailBcc: 729 | result:= 'Export.Mail.BCC'; 730 | ExportMailProvider: 731 | result:= 'Export.Mail.Provider'; 732 | ExportMailSubject: 733 | result:= 'Export.Mail.Subject'; 734 | ExportMailShowDialog: 735 | result:= 'Export.Mail.ShowDialog'; 736 | ExportMailSendResultAs: 737 | result:= 'Export.Mail.SendResultAs'; 738 | ExportSaveAsZip: 739 | result:= 'Export.SaveAsZIP'; 740 | ExportSaveAsZipAvailable: 741 | result:= 'Export.SaveAsZIPAvailable'; 742 | ExportZipFile: 743 | result:= 'Export.ZIPFile'; 744 | ExportZipPath: 745 | result:= 'Export.ZIPPath'; 746 | ExportOnlyTableData: 747 | result:= 'Export.OnlyTableData'; 748 | ExportInfinitePage: 749 | result:= 'Export.InfinitePage'; 750 | ExportSignResult: 751 | result:= 'Export.SignResult'; 752 | ExportSignResultAvailable: 753 | result:= 'Export.SignResultAvailable'; 754 | ExportSignatureProvider: 755 | result:= 'Export.SignatureProvider'; 756 | ExportSignatureProviderOption: 757 | result:= 'Export.SignatureProvider.Option'; 758 | ExportSignatureFormat: 759 | result:= 'Export.SignatureFormat'; 760 | PictureJpegEncoding: 761 | result:= 'Picture.JpegEncoding'; 762 | PictureFormat: 763 | result:= 'Picture.Format'; 764 | PictureJpegQuality: 765 | result:= 'Picture.JPEGQuality'; 766 | PictureBitsPerPixel: 767 | result:= 'Picture.BitsPerPixel'; 768 | PictureCropFile: 769 | result:= 'Picture.CropFile'; 770 | PictureCropFrameWidth: 771 | result:= 'Picture.CropFrameWidth'; 772 | UsePosFrame: 773 | result:= 'UsePosFrame'; 774 | VerbosityRectangle: 775 | result:= 'Verbosity.Rectangle'; 776 | VerbosityBarcode: 777 | result:= 'Verbosity.Barcode'; 778 | VerbosityDrawing: 779 | result:= 'Verbosity.Drawing'; 780 | VerbosityEllipse: 781 | result:= 'Verbosity.Ellipse'; 782 | VerbosityLine: 783 | result:= 'Verbosity.Line'; 784 | VerbosityText: 785 | result:= 'Verbosity.Text'; 786 | VerbosityTextFrames: 787 | result:= 'Verbosity.Text.Frames'; 788 | VerbosityRtf: 789 | result:= 'Verbosity.RTF'; 790 | VerbosityRtfFrames: 791 | result:= 'Verbosity.RTF.Frames'; 792 | VerbosityTable: 793 | result:= 'Verbosity.Table'; 794 | VerbosityTableCell: 795 | result:= 'Verbosity.Table.Cell'; 796 | VerbosityTableFrames: 797 | result:= 'Verbosity.Table.Frames'; 798 | VerbosityLLXObject: 799 | result:= 'Verbosity.LLXObject'; 800 | VerbosityLLXObjectHtmlObject: 801 | result:= 'Verbosity.LLXObject.HTMLObj'; 802 | HtmlTitle: 803 | result:= 'HTML.Title'; 804 | HtmlFormHeader: 805 | result:= 'HTML.FormHeader'; 806 | HtmlFormFooter: 807 | result:= 'HTML.FormFooter'; 808 | LayouterPercentaged: 809 | result:= 'Layouter.Percentaged'; 810 | LayouterFixedPageHeight: 811 | result:= 'Layouter.FixedPageHeight'; 812 | PdfTitle: 813 | result:= 'PDF.Title'; 814 | PdfSubject: 815 | result:= 'PDF.Subject'; 816 | PdfKeywords: 817 | result:= 'PDF.Keywords'; 818 | PdfAuthor: 819 | result:= 'PDF.Author'; 820 | PdfCreator: 821 | result:= 'PDF.Creator'; 822 | PdfEncryptionEncryptFile: 823 | result:= 'PDF.Encryption.EncryptFile'; 824 | PdfEncryptionEnablePrinting: 825 | result:= 'PDF.Encryption.EnablePrinting'; 826 | PdfEncryptionEnableChanging: 827 | result:= 'PDF.Encryption.EnableChanging'; 828 | PdfEncryptionEnableCopying: 829 | result:= 'PDF.Encryption.EnableCopying'; 830 | PdfEncryptionEnableFillingForms: 831 | result:= 'PDF.Encryption.EnableFillingForms'; 832 | PdfEncryptionEnableAnnotating: 833 | result:= 'PDF.Encryption.EnableAnnotating'; 834 | PdfEncryptionLevel: 835 | result:= 'PDF.Encryption.Level'; 836 | PdfOwnerPassword: 837 | result:= 'PDF.OwnerPassword'; 838 | PdfUserPassword: 839 | result:= 'PDF.UserPassword'; 840 | PdfExcludedFonts: 841 | result:= 'PDF.ExcludedFonts'; 842 | PdfCompressStreamMethod: 843 | result:= 'PDF.CompressStreamMethod'; 844 | PdfFileAttachments: 845 | result:= 'PDF.FileAttachments'; 846 | PdfConformance: 847 | result:= 'PDF.Conformance'; 848 | PdfUseSimpleFrames: 849 | result:= 'PDF.UseSimpleFrames'; 850 | PdfZUGFeRDXmlPath: 851 | result:= 'PDF.ZUGFeRDXmlPath'; 852 | PdfZUGFeRDConformanceLevel: 853 | result:= 'PDF.ZUGFeRDConformanceLevel'; 854 | PdfZUGFeRDVersion: 855 | result:= 'PDF.ZUGFeRDVersion'; 856 | Resolution: 857 | result:= 'Resolution'; 858 | TxtFrameChar: 859 | result:= 'TXT.FrameChar'; 860 | TxtSeparatorChar: 861 | result:= 'TXT.SeparatorChar'; 862 | TxtIgnoreGroupLines: 863 | result:= 'TXT.IgnoreGroupLines'; 864 | TxtIgnoreHeaderFooterLines: 865 | result:= 'TXT.IgnoreHeaderFooterLines'; 866 | TxtCharset: 867 | result:= 'TXT.Charset'; 868 | TtyEmulation: 869 | result:= 'TTY.Emulation'; 870 | TtyDestination: 871 | result:= 'TTY.Destination'; 872 | TtyDefaultFilename: 873 | result:= 'TTY.DefaultFilename'; 874 | TtyAdvanceAfterPrint: 875 | result:= 'TTY.AdvanceAfterPrint'; 876 | TiffCompressionType: 877 | result:= 'TIFF.CompressionType'; 878 | TiffCompressionQuality: 879 | result:= 'TIFF.CompressionQuality'; 880 | XlsFontScalingPercentage: 881 | result:= 'XLS.FontScalingPercentage'; 882 | XlsPrintingZoom: 883 | result:= 'XLS.PrintingZoom'; 884 | XlsIgnoreGroupLines: 885 | result:= 'XLS.IgnoreGroupLines'; 886 | XlsIgnoreHeaderFooterLines: 887 | result:= 'XLS.IgnoreHeaderFooterLines'; 888 | XlsIgnoreLineWrapForDataOnlyExport: 889 | result:= 'XLS.IgnoreLinewrapForDataOnlyExport'; 890 | XlsConvertNumeric: 891 | result:= 'XLS.ConvertNumeric'; 892 | XlsAllPagesOneSheet: 893 | result:= 'XLS.AllPagesOneSheet'; 894 | XlsWorksheetName: 895 | result:= 'XLS.WorksheetName'; 896 | XlsAutoFit: 897 | result:= 'XLS.AutoFit'; 898 | XmlTitle: 899 | result:= 'XML.Title'; 900 | XhtmlUseAdvancedCss: 901 | result:= 'XHTML.UseAdvancedCSS'; 902 | XhtmlToolbarType: 903 | result:= 'XHTML.ToolbarType'; 904 | XhtmlTitle: 905 | result:= 'XHTML.Title'; 906 | XhtmlUseSeparateCss: 907 | result:= 'XHTML.UseSeparateCSS'; 908 | JqmTitle: 909 | result:= 'JQM.Title'; 910 | JqmCDN: 911 | result:= 'JQM.CDN'; 912 | JqmListDataFilter: 913 | result:= 'JQM.ListDataFilter'; 914 | JqmUseDividerLines: 915 | result:= 'JQM.UseDividerLines'; 916 | JqmBaseTheme: 917 | result:= 'JQM.BaseTheme'; 918 | JqmHeaderTheme: 919 | result:= 'JQM.HeaderTheme'; 920 | JqmDividerTheme: 921 | result:= 'JQM.DividerTheme'; 922 | JqmColumnMode: 923 | result:= 'JQM.ColumnMode'; 924 | DocxFontScalingPercentage: 925 | result:= 'DOCX.FontScalingPercentage'; 926 | DocxAllPagesOneFile: 927 | result:= 'DOCX.AllPagesOneFile'; 928 | DocxCellScalingPercentageWidth: 929 | result:= 'DOCX.CellScalingPercentageWidth'; 930 | DocxCellScalingPercentageHeight: 931 | result:= 'DOCX.CellScalingPercentageHeight'; 932 | DocxFloatingTableMode: 933 | result:= 'DOCX.FloatingTableMode'; 934 | SvgTitle: 935 | result:= 'SVG.Title'; 936 | XlsFileFormat: 937 | result:= 'XLS.FileFormat'; 938 | PptxFontScalingPercentage: 939 | result:= 'PPTX.FontScalingPercentage'; 940 | PptxAnimation: 941 | result:= 'PPTX.Animation'; 942 | ExportMailPop3SocketTimeout: 943 | result:= 'Export.Mail.POP3.SocketTimeout'; 944 | ExportMailPop3SenderDomain: 945 | result:= 'Export.Mail.POP3.SenderDomain'; 946 | ExportMailPop3ServerPort: 947 | result:= 'Export.Mail.POP3.ServerPort'; 948 | ExportMailPop3ServerAddress: 949 | result:= 'Export.Mail.POP3.ServerAddress'; 950 | ExportMailPop3ServerUser: 951 | result:= 'Export.Mail.POP3.ServerUser'; 952 | ExportMailPop3ServerPassword: 953 | result:= 'Export.Mail.POP3.ServerPassword'; 954 | ExportMailPop3ProxyAddress: 955 | result:= 'Export.Mail.POP3.ProxyAddress'; 956 | ExportMailPop3ProxyPort: 957 | result:= 'Export.Mail.POP3.ProxyPort'; 958 | ExportMailPop3ProxyUser: 959 | result:= 'Export.Mail.POP3.ProxyUser'; 960 | ExportMailPop3ProxyPassword: 961 | result:= 'Export.Mail.POP3.ProxyPassword'; 962 | ExportMailXmapiServerUser: 963 | result:= 'Export.Mail.XMAPI.ServerUser'; 964 | ExportMailXmapiServerPassword: 965 | result:= 'Export.Mail.XMAPI.ServerPassword'; 966 | ExportMailXmapiSuppressLogonFailure: 967 | result:= 'Export.Mail.XMAPI.SuppressLogonFailure'; 968 | ExportMailXmapiDeleteAfterSend: 969 | result:= 'Export.Mail.XMAPI.DeleteAfterSend'; 970 | ExportMailSignatureName: 971 | result:= 'Export.Mail.SignatureName'; 972 | JsonIndent: 973 | result:= 'JSON.Indent'; 974 | DocxAuthor: 975 | result := 'DOCX.Author'; 976 | DocxTitle: 977 | result := 'DOCX.Title'; 978 | DocxKeywords: 979 | result := 'DOCX.Keywords'; 980 | DocxSubject: 981 | result := 'DOCX.Subject'; 982 | XhtmlFixedHeader: 983 | result := 'XHTML.FixedHeader'; 984 | XhtmlEnableAccessibility: 985 | result := 'XHTML.EnableAccessibility'; 986 | XlsAutoFormula: 987 | result := 'XLS.AutoFormula'; 988 | XlsProtectionProtectSheets: 989 | result := 'XLS.Protection.ProtectSheets'; 990 | XlsProtectionProtectSheetsPassword: 991 | result := 'XLS.Protection.ProtectSheetsPassword'; 992 | XlsProtectionProtectSheetsMode: 993 | result := 'XLS.Protection.ProtectSheetsMode'; 994 | XlsHeaderContent: 995 | result := 'XLS.HeaderContent'; 996 | XlsHeaderMargin: 997 | result := 'XLS.HeaderMargin'; 998 | XlsFooterContent: 999 | result := 'XLS.FooterContent'; 1000 | XlsFooterMargin: 1001 | result := 'XLS.FooterMargin'; 1002 | ExportMailGraphAuthType: 1003 | result := 'Export.Mail.Graph.AuthType'; 1004 | ExportMailGraphClientId: 1005 | result := 'Export.Mail.Graph.ClientId'; 1006 | ExportMailGraphTenantId: 1007 | result := 'Export.Mail.Graph.TenantId'; 1008 | ExportMailGraphScope: 1009 | result := 'Export.Mail.Graph.Scope'; 1010 | ExportMailGraphRedirectUri: 1011 | result := 'Export.Mail.Graph.RedirectUri'; 1012 | ExportMailGraphSecretClientKeyId: 1013 | result := 'Export.Mail.Graph.SecretClientKeyId'; 1014 | ExportMailGraphSecretClientKeyValue: 1015 | result := 'Export.Mail.Graph.SecretClientKeyValue'; 1016 | ExportMailGraphUserName: 1017 | result := 'Export.Mail.Graph.UserName'; 1018 | ExportMailGraphUserObjectId: 1019 | result := 'Export.Mail.Graph.UserObjectId'; 1020 | ExportMailGraphUserPassword: 1021 | result := 'Export.Mail.Graph.UserPassword'; 1022 | ExportMailGraphBearerToken: 1023 | result := 'Export.Mail.Graph.BearerToken'; 1024 | ExportMailSmtpOAuth2BearerToken: 1025 | result := 'Export.Mail.SMTP.OAUTH2.BearerToken'; 1026 | else 1027 | result:= ''; 1028 | end; 1029 | 1030 | end; 1031 | 1032 | class function TExportEnumHelper.GetTargetFromString(const target: string): TLlExportTarget; 1033 | begin 1034 | 1035 | if UpperCase(target) = 'HTML5' then 1036 | Result := TLlExportTarget.Pdf 1037 | else if UpperCase(target) = 'PDF' then 1038 | Result := TLlExportTarget.Pdf 1039 | else if UpperCase(target) = 'HTML' then 1040 | Result := TLlExportTarget.Html 1041 | else if UpperCase(target) = 'RTF' then 1042 | Result := TLlExportTarget.Rtf 1043 | else if UpperCase(target) = 'PICTURE_BMP' then 1044 | Result := TLlExportTarget.Bitmap 1045 | else if UpperCase(target) = 'PICTURE_EMF' then 1046 | Result := TLlExportTarget.MetaFile 1047 | else if UpperCase(target) = 'PICTURE_TIFF' then 1048 | Result := TLlExportTarget.Tiff 1049 | else if UpperCase(target) = 'PICTURE_MULTITIFF' then 1050 | Result := TLlExportTarget.MultiTiff 1051 | else if UpperCase(target) = 'PICTURE_JPEG' then 1052 | Result := TLlExportTarget.Jpeg 1053 | else if UpperCase(target) = 'PICTURE_PNG' then 1054 | Result := TLlExportTarget.Png 1055 | else if UpperCase(target) = 'XLS' then 1056 | Result := TLlExportTarget.Xls 1057 | else if UpperCase(target) = 'XLSX' then 1058 | Result := TLlExportTarget.Xlsx 1059 | else if UpperCase(target) = 'DOCX' then 1060 | Result := TLlExportTarget.Docx 1061 | else if UpperCase(target) = 'XPS' then 1062 | Result := TLlExportTarget.Xps 1063 | else if UpperCase(target) = 'MHTML' then 1064 | Result := TLlExportTarget.Mhtml 1065 | else if UpperCase(target) = 'XHTML' then 1066 | Result := TLlExportTarget.Xhtml 1067 | else if UpperCase(target) = 'SVG' then 1068 | Result := TLlExportTarget.Svg 1069 | else if UpperCase(target) = 'JQM' then 1070 | Result := TLlExportTarget.Jqm 1071 | else if UpperCase(target) = 'XML' then 1072 | Result := TLlExportTarget.Xml 1073 | else if UpperCase(target) = 'TXT' then 1074 | Result := TLlExportTarget.Text 1075 | else if UpperCase(target) = 'TXT_LAYOUT' then 1076 | Result := TLlExportTarget.TextLayout 1077 | else if UpperCase(target) = 'TTY' then 1078 | Result := TLlExportTarget.Tty 1079 | else if UpperCase(target) = 'PRV' then 1080 | Result := TLlExportTarget.Preview 1081 | else if UpperCase(target) = 'PPTX' then 1082 | Result := TLlExportTarget.Pptx 1083 | else if UpperCase(target) = 'JSON' then 1084 | Result := TLlExportTarget.Json 1085 | else 1086 | raise Exception.Create(target + ' is an unknown export target'); 1087 | 1088 | end; 1089 | 1090 | class function TExportEnumHelper.GetExtensionFromExportTarget(exportTarget: TLlExportTarget): string; 1091 | begin 1092 | case exportTarget of 1093 | TLlExportTarget.Pdf: 1094 | Result := 'pdf'; 1095 | TLlExportTarget.Html, TLlExportTarget.Xhtml, TLlExportTarget.Jqm: 1096 | Result := 'htm'; 1097 | TLlExportTarget.Rtf: 1098 | Result := 'rtf'; 1099 | TLlExportTarget.Bitmap: 1100 | Result := 'bmp'; 1101 | TLlExportTarget.MetaFile: 1102 | Result := 'emf'; 1103 | TLlExportTarget.Tiff, TLlExportTarget.MultiTiff: 1104 | Result := 'tif'; 1105 | TLlExportTarget.Jpeg: 1106 | Result := 'jpg'; 1107 | TLlExportTarget.Png: 1108 | Result := 'png'; 1109 | TLlExportTarget.Xls: 1110 | Result := 'xls'; 1111 | TLlExportTarget.Xlsx: 1112 | Result := 'xlsx'; 1113 | TLlExportTarget.Docx: 1114 | Result := 'docx'; 1115 | TLlExportTarget.Xps: 1116 | Result := 'xps'; 1117 | TLlExportTarget.Mhtml: 1118 | Result := 'mhtml'; 1119 | TLlExportTarget.Xml: 1120 | Result := 'xml'; 1121 | TLlExportTarget.Text, TLlExportTarget.TextLayout: 1122 | Result := 'txt'; 1123 | TLlExportTarget.Tty: 1124 | Result := 'tty'; 1125 | TLlExportTarget.Preview: 1126 | Result := 'll'; 1127 | TLlExportTarget.Svg: 1128 | Result := 'svg'; 1129 | TLlExportTarget.Pptx: 1130 | Result := 'pptx'; 1131 | TLlExportTarget.Json: 1132 | Result := 'json'; 1133 | else 1134 | Result := ''; 1135 | end; 1136 | end; 1137 | 1138 | class function TExportEnumHelper.GetString(exportTarget: TLlExportTarget): string; 1139 | begin 1140 | case exportTarget of 1141 | TLlExportTarget.Pdf: 1142 | Result := 'PDF'; 1143 | TLlExportTarget.Html: 1144 | Result := 'HTML'; 1145 | TLlExportTarget.Rtf: 1146 | Result := 'RTF'; 1147 | TLlExportTarget.Bitmap: 1148 | Result := 'PICTURE_BMP'; 1149 | TLlExportTarget.MetaFile: 1150 | Result := 'PICTURE_EMF'; 1151 | TLlExportTarget.Tiff: 1152 | Result := 'PICTURE_TIFF'; 1153 | TLlExportTarget.MultiTiff: 1154 | Result := 'PICTURE_MULTITIFF'; 1155 | TLlExportTarget.Jpeg: 1156 | Result := 'PICTURE_JPEG'; 1157 | TLlExportTarget.Png: 1158 | Result := 'PICTURE_PNG'; 1159 | TLlExportTarget.Xls, TLlExportTarget.Xlsx: 1160 | Result := 'XLS'; 1161 | TLlExportTarget.Docx: 1162 | Result := 'DOCX'; 1163 | TLlExportTarget.Xps: 1164 | Result := 'XPS'; 1165 | TLlExportTarget.Mhtml: 1166 | Result := 'MHTML'; 1167 | TLlExportTarget.Xhtml: 1168 | Result := 'XHTML'; 1169 | TLlExportTarget.Jqm: 1170 | Result := 'JQM'; 1171 | TLlExportTarget.Xml: 1172 | Result := 'XML'; 1173 | TLlExportTarget.Text: 1174 | Result := 'TXT'; 1175 | TLlExportTarget.TextLayout: 1176 | Result := 'TXT_LAYOUT'; 1177 | TLlExportTarget.Tty: 1178 | Result := 'TTY'; 1179 | TLlExportTarget.Preview: 1180 | Result := 'PRV'; 1181 | TLlExportTarget.Svg: 1182 | Result := 'SVG'; 1183 | TLlExportTarget.Pptx: 1184 | Result := 'PPTX'; 1185 | TLlExportTarget.Json: 1186 | Result := 'JSON'; 1187 | else 1188 | Result := ''; 1189 | end; 1190 | end; 1191 | 1192 | //============================================================================== 1193 | // TEnumTranslater 1194 | //============================================================================== 1195 | 1196 | class function TEnumTranslator.TranslateAutoBoxType(AutoBoxType: TLlAutoBoxType): Integer; 1197 | begin 1198 | 1199 | // pre-define with default value in LL 1200 | Result := LL_BOXTYPE_STDABORT; 1201 | 1202 | case AutoBoxType of 1203 | TLlAutoBoxType.btNormalMeter: Result := LL_BOXTYPE_NORMALMETER; 1204 | TLlAutoBoxType.btBridgeMeter: Result := LL_BOXTYPE_BRIDGEMETER; 1205 | TLlAutoBoxType.btNormalwait: Result := LL_BOXTYPE_NORMALWAIT; 1206 | TLlAutoBoxType.btBridgeWait: Result := LL_BOXTYPE_BRIDGEWAIT; 1207 | TLlAutoBoxType.btEmptyWait: Result := LL_BOXTYPE_EMPTYWAIT; 1208 | TLlAutoBoxType.btEmptyAbort: Result := LL_BOXTYPE_EMPTYABORT; 1209 | TLlAutoBoxType.btStandardWait: Result := LL_BOXTYPE_STDWAIT; 1210 | TLlAutoBoxType.btStandardAbort: Result := LL_BOXTYPE_STDABORT; 1211 | TLlAutoBoxType.btNone: Result := LL_BOXTYPE_NONE; 1212 | TLlAutoBoxType.btMarquee: Result := 1008; 1213 | end; 1214 | 1215 | end; 1216 | 1217 | class function TEnumTranslator.TranslatePrintMode(PrintMode: TLlPrintMode): Integer; 1218 | begin 1219 | 1220 | // pre-define with default value in LL 1221 | Result := LL_PRINT_EXPORT; 1222 | 1223 | case PrintMode of 1224 | TLlPrintMode.pmNormal: Result := LL_PRINT_NORMAL; 1225 | TLlPrintMode.pmPreview: Result := LL_PRINT_PREVIEW; 1226 | // TLlPrintMode.pmPreviewControl: Result := 3; 1227 | TLlPrintMode.pmFile: Result := LL_PRINT_FILE; 1228 | TLlPrintMode.pmExport: Result := LL_PRINT_EXPORT; 1229 | TLlPrintMode.pmMultipleJobs: Result := LL_PRINT_MULTIPLE_JOBS; 1230 | TLlPrintMode.pmKeepJob: Result := LL_PRINT_KEEPJOB; 1231 | end; 1232 | 1233 | end; 1234 | 1235 | class function TEnumTranslator.TranslateProjectType(ProjectType: TLlProject): Integer; 1236 | begin 1237 | 1238 | // pre-define with default value in LL 1239 | Result := LL_PROJECT_LIST; 1240 | 1241 | case ProjectType of 1242 | TLlProject.ptLabel: Result := LL_PROJECT_LABEL; 1243 | TLlProject.ptList: Result := LL_PROJECT_LIST; 1244 | TLlProject.ptCard: Result := LL_PROJECT_CARD; 1245 | end; 1246 | 1247 | end; 1248 | 1249 | class function TEnumTranslator.TranslateTableColoring(TableColoring: TLlTableColoring): Integer; 1250 | begin 1251 | 1252 | // pre-define with default value in LL 1253 | Result := LL_COLORING_LL; 1254 | 1255 | case TableColoring of 1256 | TLlTableColoring.tcListLabel: Result := LL_COLORING_LL; 1257 | TLlTableColoring.tcProgram: Result := LL_COLORING_PROGRAM; 1258 | TLlTableColoring.tcDontCare: Result := LL_COLORING_DONTCARE; 1259 | end; 1260 | 1261 | end; 1262 | 1263 | class function TEnumTranslator.TranslateDebugFlags(DebugFlags: TLlDebugFlags): Integer; 1264 | begin 1265 | 1266 | // pre-define with default value in LL 1267 | Result := 0; 1268 | 1269 | if TLlDebug.dEnabled in DebugFlags then 1270 | begin 1271 | 1272 | Result := Result + LL_DEBUG_CMBTLL; 1273 | 1274 | end; 1275 | 1276 | if TLlDebug.dDWG in DebugFlags then 1277 | begin 1278 | 1279 | Result := Result + LL_DEBUG_CMBTDWG; 1280 | 1281 | end; 1282 | 1283 | if TLlDebug.dNoCallbacks in DebugFlags then 1284 | begin 1285 | 1286 | Result := Result + LL_DEBUG_CMBTLL_NOCALLBACKS; 1287 | 1288 | end; 1289 | 1290 | if TLlDebug.dNoStorage in DebugFlags then 1291 | begin 1292 | 1293 | Result := Result + LL_DEBUG_CMBTLL_NOSTORAGE; 1294 | 1295 | end; 1296 | 1297 | if TLlDebug.dLogToFile in DebugFlags then 1298 | begin 1299 | 1300 | Result := Result + LL_DEBUG_CMBTLL_LOGTOFILE; 1301 | 1302 | end; 1303 | 1304 | if TLlDebug.dNoSysInfo in DebugFlags then 1305 | begin 1306 | 1307 | Result := Result + LL_DEBUG_CMBTLL_NOSYSINFO; 1308 | 1309 | end; 1310 | 1311 | if TLlDebug.dPrinterInfo in DebugFlags then 1312 | begin 1313 | 1314 | Result := Result + LL_DEBUG_PRNINFO; 1315 | 1316 | end; 1317 | 1318 | if TLlDebug.dLicInfo in DebugFlags then 1319 | begin 1320 | 1321 | Result := Result + 512; 1322 | 1323 | end; 1324 | 1325 | end; 1326 | 1327 | class function TEnumTranslator.TranslateUnits(Units: TLlUnits): Integer; 1328 | begin 1329 | 1330 | // pre-define with default value in LL 1331 | Result := LL_UNITS_SYSDEFAULT; 1332 | 1333 | case Units of 1334 | TLlUnits.uMillimeter_1_1000: Result := LL_UNITS_MM_DIV_1000; 1335 | TLlUnits.uMillimeter_1_100: Result := LL_UNITS_MM_DIV_100; 1336 | TLlUnits.uMillimeter_1_10: Result := LL_UNITS_MM_DIV_10; 1337 | TLlUnits.uInch_1_100: Result := LL_UNITS_INCH_DIV_100; 1338 | TLlUnits.uInch_1_1000: Result := LL_UNITS_INCH_DIV_1000; 1339 | TLlUnits.uSysDefault: Result := LL_UNITS_SYSDEFAULT; 1340 | TLlUnits.uSysDefaultLoRes: Result := LL_UNITS_SYSDEFAULT_LORES; 1341 | TLlUnits.uSysDefaultHiRes: Result := LL_UNITS_SYSDEFAULT_HIRES; 1342 | end; 1343 | 1344 | end; 1345 | 1346 | class function TEnumTranslator.TranslateLanguage(Language: TLlLanguage): Integer; 1347 | begin 1348 | 1349 | //pre-define with default value in LL 1350 | Result := CMBTLANG_DEFAULT; 1351 | 1352 | case Language of 1353 | TLlLanguage.lDefault: Result := CMBTLANG_DEFAULT; 1354 | TLlLanguage.lGerman: Result := CMBTLANG_GERMAN; 1355 | TLlLanguage.lEnglish: Result := CMBTLANG_ENGLISH; 1356 | //TLlLanguage.lArabic: Result := CMBTLANG_ARAB; 1357 | //TLlLanguage.lAfrikaans: Result := CMBTLANG_AFRIKAANS; 1358 | //TLlLanguage.lAlbanian: Result := CMBTLANG_ALBANIAN; 1359 | //TLlLanguage.lBasque: Result := CMBTLANG_BASQUE; 1360 | //TLlLanguage.lBulgarian: Result := CMBTLANG_BULGARIAN; 1361 | //TLlLanguage.lByelorussian: Result := CMBTLANG_BYELORUSSIAN; 1362 | //TLlLanguage.lCatalan: Result := CMBTLANG_CATALAN; 1363 | TLlLanguage.lChinese: Result := CMBTLANG_CHINESE; 1364 | //TLlLanguage.lCroatian: Result := CMBTLANG_CROATIAN; 1365 | TLlLanguage.lCzech: Result := CMBTLANG_CZECH; 1366 | //TLlLanguage.lDanish: Result := CMBTLANG_DANISH; 1367 | TLlLanguage.lDutch: Result := CMBTLANG_DUTCH; 1368 | //TLlLanguage.lEstonian: Result := CMBTLANG_ESTONIAN; 1369 | //TLlLanguage.lFaeroese: Result := CMBTLANG_FAEROESE; 1370 | //TLlLanguage.lFarsi: Result := CMBTLANG_FARSI; 1371 | //TLlLanguage.Finnish: Result := CMBTLANG_FINNISH; 1372 | TLlLanguage.lFrench: Result := CMBTLANG_FRENCH; 1373 | //TLlLanguage.lGreek: Result := CMBTLANG_GREEK; 1374 | //TLlLanguage.lHebrew: Result := CMBTLANG_HEBREW; 1375 | //TLlLanguage.lHungarian: Result := CMBTLANG_HUNGARIAN; 1376 | //TLlLanguage.lIcelandic: Result := CMBTLANG_ICELANDIC; 1377 | //TLlLanguage.lIndonesian: Result := CMBTLANG_INDONESIAN; 1378 | TLlLanguage.lItalian: Result := CMBTLANG_ITALIAN; 1379 | TLlLanguage.lJapanese: Result := CMBTLANG_JAPANESE; 1380 | //TLlLanguage.lKorean: Result := CMBTLANG_KOREAN; 1381 | //TLlLanguage.lLatvian: Result := CMBTLANG_LATVIAN; 1382 | //TLlLanguage.lLithuanian: Result := CMBTLANG_LITHUANIAN; 1383 | //TLlLanguage.lNorwegian: Result := CMBTLANG_NORWEGIAN; 1384 | //TLlLanguage.lPolish: Result := CMBTLANG_POLISH; 1385 | TLlLanguage.lPortuguese: Result := CMBTLANG_PORTUGUESE; 1386 | //TLlLanguage.lRomanian: Result := CMBTLANG_ROMANIAN; 1387 | //TLlLanguage.lRussian: Result := CMBTLANG_RUSSIAN; 1388 | TLlLanguage.lSlovak: Result := CMBTLANG_SLOVAK; 1389 | //TLlLanguage.lSlovenian: Result := CMBTLANG_SLOVENIAN; 1390 | //TLlLanguage.lSerbian: Result := CMBTLANG_SERBIAN; 1391 | TLlLanguage.lSpanish: Result := CMBTLANG_SPANISH; 1392 | //TLlLanguage.lSwedish: Result := CMBTLANG_SWEDISH; 1393 | //TLlLanguage.lThai: Result := CMBTLANG_THAI; 1394 | //TLlLanguage.lTurkish: Result := CMBTLANG_TURKISH; 1395 | //TLlLanguage.lUkrainian: Result := CMBTLANG_UKRAINIAN; 1396 | //TLlLanguage.lSerbianLatin: Result := CMBTLANG_SERBIAN_LATIN; 1397 | //TLlLanguage.lChineseTraditional: Result := CMBTLANG_CHINESE_TRADITIONAL; 1398 | //TLlLanguage.lPortugueseBrazilian: Result := CMBTLANG_PORTUGUESE_BRAZILIAN; 1399 | //TLlLanguage.lSpanishColombia: Result := CMBTLANG_SPANISH_COLOMBIA; 1400 | end; 1401 | 1402 | end; 1403 | 1404 | //============================================================================== 1405 | // TLLDataLink 1406 | //============================================================================== 1407 | 1408 | constructor TLLDataLink.Create; 1409 | Begin 1410 | Inherited Create; 1411 | VisualControl := True; 1412 | end; 1413 | 1414 | procedure TLLDataLink.ActiveChanged; 1415 | begin 1416 | //inherited; 1417 | if Assigned(FOnActiveChanged) then FOnActiveChanged(Self); 1418 | end; 1419 | 1420 | Procedure TLLDataLink.DataSetChanged; 1421 | Begin 1422 | // inherited; 1423 | if Assigned(FOnDataSetChanged) then FOnDataSetChanged(Self); 1424 | end; 1425 | 1426 | procedure TLLDataLink.RecordChanged(Field: TField); 1427 | begin 1428 | if Assigned(FOnRecordChanged) then FOnRecordChanged(Self,Field); 1429 | end; 1430 | 1431 | procedure TLLDataLink.DataSetScrolled(Distance: Integer); 1432 | Begin 1433 | //inherited; 1434 | if Assigned(FOnDataSetScrolled) then FOnDataSetScrolled(Self,Distance); 1435 | end; 1436 | 1437 | // === TLLDataController =========================================================================== 1438 | 1439 | constructor TLLDataController.Create(AOwner: TComponent); 1440 | Begin 1441 | inherited Create; 1442 | FOwner:=AOwner; 1443 | FDetailSources := TDetailSourceList.Create(AOwner, TDetailSourceItem); 1444 | FAutoMasterMode := TLlAutoMasterMode.mmAsFields; 1445 | End; 1446 | 1447 | destructor TLLDataController.Destroy; 1448 | 1449 | Begin 1450 | FDetailSources.Clear; 1451 | 1452 | FDetailSources.Free; 1453 | inherited Destroy; 1454 | End; 1455 | 1456 | procedure TLLDataController.SetAutoMasterMode(const Value: TLlAutoMasterMode); 1457 | begin 1458 | FAutoMasterMode := Value; 1459 | end; 1460 | 1461 | procedure TLLDataController.SetDataMember(const Value: String); 1462 | begin 1463 | FDataMember := Value; 1464 | end; 1465 | 1466 | // ===================================================================== 1467 | // TDetailSourcesItem 1468 | // ===================================================================== 1469 | constructor TDetailSourceItem.Create(Collection: TCollection); 1470 | Begin 1471 | inherited Create(Collection); 1472 | 1473 | Collection.BeginUpdate; 1474 | FName := GenerateName; 1475 | 1476 | OnSetName := UpdateEditorDisplay; 1477 | 1478 | FDataLink := TLLDataLink.Create; 1479 | 1480 | Collection.EndUpdate; 1481 | End; 1482 | 1483 | destructor TDetailSourceItem.Destroy; 1484 | Begin 1485 | FOnSetName := Nil; 1486 | 1487 | if Assigned(FDataLink) then 1488 | FDataLink.Free; 1489 | FDataLink := nil; 1490 | inherited Destroy; 1491 | End; 1492 | 1493 | function TDetailSourceItem.Add: TDetailSourceItem; 1494 | begin 1495 | Result := inherited Add as TDetailSourceItem; 1496 | end; 1497 | 1498 | function TDetailSourceItem.FindItemByName(Const AName: String): TDetailSourceItem; 1499 | var 1500 | I: Integer; 1501 | Temp: TDetailSourceItem; 1502 | Begin 1503 | //Item within the entire tree 1504 | Temp := Nil; 1505 | for I := 0 to Count - 1 do 1506 | Begin 1507 | if AnsiCompareText(Self.Items[I].Name, AName) = 0 then 1508 | Begin 1509 | Temp := Self.Items[I]; 1510 | Break; 1511 | End 1512 | else begin 1513 | Temp := Self.Items[I].FindItemByName(AName); 1514 | if Temp <> Nil then 1515 | begin 1516 | Break; 1517 | end; 1518 | end; 1519 | End; 1520 | 1521 | Result := Temp; 1522 | end; 1523 | 1524 | function TDetailSourceItem.GetDisplayName: string; 1525 | Var 1526 | DS_Name: STring; 1527 | begin 1528 | if Assigned(Datasource) then 1529 | DS_Name := Datasource.Name 1530 | else 1531 | DS_Name := 'empty'; 1532 | 1533 | Result := FName + ' [' + DS_Name + ']'; 1534 | 1535 | if Result = '' then 1536 | Result := inherited GetDisplayName; 1537 | end; 1538 | 1539 | function TDetailSourceItem.GetItem(Index: Integer): TDetailSourceItem; 1540 | Begin 1541 | Result := inherited GetItem(Index) as TDetailSourceItem; 1542 | End; 1543 | 1544 | procedure TDetailSourceItem.SetItem(Index: Integer; Value: TDetailSourceItem); 1545 | begin 1546 | inherited SetItem(Index, Value); 1547 | end; 1548 | 1549 | procedure TDetailSourceItem.AssignTo(Dest: TPersistent); 1550 | begin 1551 | if Dest <> nil then 1552 | begin 1553 | if Dest is TDetailSourceItem then 1554 | begin 1555 | TDetailSourceItem(Dest).PrimaryKeyField := Self.PrimaryKeyField; 1556 | TDetailSourceItem(Dest).MasterKeyField := Self.MasterKeyField; 1557 | TDetailSourceItem(Dest).DetailKeyField := Self.DetailKeyField; 1558 | TDetailSourceItem(Dest).SortDescription := Self.SortDescription; 1559 | TDetailSourceItem(Dest).Name := Self.Name; 1560 | TDetailSourceItem(Dest).DataSource := Self.DataSource; 1561 | end; 1562 | end; 1563 | end; 1564 | 1565 | procedure TDetailSourceItem.LoadCompProperty(Reader: TReader); 1566 | Var 1567 | s: String; 1568 | begin 1569 | if FParentName = '' then 1570 | begin 1571 | s:=Reader.ReadString; 1572 | if s <> '' then 1573 | FParentName := s; 1574 | end; 1575 | end; 1576 | 1577 | procedure TDetailSourceItem.StoreCompProperty(Writer: TWriter); 1578 | begin 1579 | if FParentName <> '' then 1580 | Writer.WriteString(FParentName); 1581 | end; 1582 | 1583 | procedure TDetailSourceItem.DefineProperties(Filer: TFiler); 1584 | begin 1585 | inherited; { allow base classes to define properties } 1586 | // deprecated, only available for compatibility reasons 1587 | Filer.DefineProperty('ParentName', LoadCompProperty, StoreCompProperty, (Self.FParentName <> '')); 1588 | end; 1589 | 1590 | function TDetailSourceItem.GenerateName: string; 1591 | var 1592 | i: Integer; 1593 | begin 1594 | i := 0; 1595 | repeat 1596 | Result := 'DetailSource' + IntToStr(i); 1597 | inc(i); 1598 | until TDetailSourceList(Collection).ItemByName(Result) = nil; 1599 | end; 1600 | 1601 | function TDetailSourceItem.GetOwner: TComponent; 1602 | begin 1603 | result := nil; 1604 | try 1605 | if Collection is TDetailSourceList then 1606 | Result := TDetailSourceList(Collection).OwnerComponent 1607 | else if (Self.GetRootTree is TDetailSourceList) then 1608 | Result := TDetailSourceList(Self.GetRootTree).OwnerComponent; 1609 | except 1610 | Result := nil; 1611 | end; 1612 | end; 1613 | 1614 | procedure TDetailSourceItem.SetName(const Value: string); 1615 | Begin 1616 | if FName <> Value then 1617 | begin 1618 | if (TDetailSourceList(Collection).ItemByName(Value) <> nil) then 1619 | raise EInvalidOperation.CreateFmt(rsDetailSourceAlreadyExists, [Value]); 1620 | FName := Value; 1621 | Changed(False); 1622 | if Assigned(FOnSetName) then 1623 | FOnSetName(self); 1624 | end; 1625 | end; 1626 | 1627 | Function TDetailSourceItem.GetDataSource: TDataSource; 1628 | begin 1629 | result := Nil; 1630 | if Assigned(FDataLink.DataSource) then 1631 | Result := FDataLink.Datasource; 1632 | end; 1633 | 1634 | Procedure TDetailSourceItem.SetDataSource(Value: TDataSource); 1635 | var 1636 | IsLoading: Boolean; 1637 | Begin 1638 | IsLoading := False; 1639 | 1640 | if Self.RootTree <> Nil then 1641 | Begin 1642 | IsLoading := (csLoading in TDetailSourceList(Self.RootTree).OwnerComponent.ComponentState); 1643 | End; 1644 | 1645 | if not(IsLoading and FDataLink.DataSourceFixed) and (FDataLink.DataSource <> Value) then 1646 | Begin 1647 | FDataLink.Datasource := Value; 1648 | 1649 | if Assigned(FOnSetName) then 1650 | FOnSetName(Self); 1651 | End; 1652 | end; 1653 | 1654 | function TDetailSourceItem.GetMasterSource: TDataSource; 1655 | Begin 1656 | if ParentNode<>nil then 1657 | result:=TDetailSourceItem(ParentNode).Datasource 1658 | else 1659 | result:=nil; 1660 | End; 1661 | 1662 | // ===================================================================== 1663 | // TDetailSourcesList = TObjTree 1664 | // ===================================================================== 1665 | 1666 | constructor TDetailSourceList.Create(AOwner: TComponent; ADetailSourceItemClass: TDetailSourceItemClass); 1667 | Begin 1668 | inherited Create(AOwner, ADetailSourceItemClass); 1669 | end; 1670 | 1671 | Destructor TDetailSourceList.Destroy; 1672 | Begin 1673 | inherited Destroy; 1674 | End; 1675 | 1676 | function TDetailSourceList.GetItem(Index: Integer): TDetailSourceItem; 1677 | begin 1678 | Result := TDetailSourceItem(inherited GetItem(Index)); 1679 | end; 1680 | 1681 | procedure TDetailSourceList.SetItem(Index: Integer; Value: TDetailSourceItem); 1682 | begin 1683 | inherited SetItem(Index, Value); 1684 | end; 1685 | 1686 | function TDetailSourceList.GetOwner: TComponent; 1687 | begin 1688 | result := inherited GetOwner as TComponent; 1689 | end; 1690 | 1691 | Procedure TDetailSourceList.ReorderOldParentName; 1692 | var 1693 | i: Integer; 1694 | PName, MyName: String; 1695 | Element: TDetailSourceItem; 1696 | begin 1697 | // Converts the old flat structure to the new tree structure at runtime and in design mode. 1698 | // Only applied to the first level nodes and only if the old property "ParentName" is still present in the DFM. 1699 | for I := (Self.Count - 1) downto 0 do 1700 | begin 1701 | Try 1702 | if (Self.Items[i].ParentName <> '') then 1703 | begin 1704 | //old entry, must be moved, but only if it has no subentries 1705 | PName := Self.Items[i].ParentName; 1706 | Element := Self.FindItemByName(PName); 1707 | MyName := Self.Items[i].Name; 1708 | if Element <> Nil then 1709 | begin 1710 | if (Element.OwnCollection <> Nil) then 1711 | begin 1712 | Self.Items[i].ParentName := ''; 1713 | Self.Items[i].Collection := Element.OwnCollection; 1714 | end; 1715 | end; 1716 | end; 1717 | Except 1718 | on E:exception do 1719 | begin 1720 | if Self.OwnerComponent is TComponent then 1721 | begin 1722 | if MessageDlg('Reorder: ' +MyName + ' on ' +Self.OwnerComponent.ClassName+'.'+TComponent(Self.OwnerComponent).Name+ ': '+E.Message, mtError, mbOKCancel, 0) = mrCancel then 1723 | begin 1724 | Break; 1725 | end; 1726 | end 1727 | else begin 1728 | if MessageDlg('Reorder: ' +MyName + ' on ' +Self.OwnerComponent.ClassName+ ': '+E.Message, mtError, mbOKCancel, 0) = mrCancel then 1729 | begin 1730 | Break; 1731 | end; 1732 | end; 1733 | end; 1734 | End; 1735 | end; 1736 | end; 1737 | 1738 | function TDetailSourceList.Add: TDetailSourceItem; 1739 | begin 1740 | Result := TDetailSourceItem(inherited Add); 1741 | end; 1742 | 1743 | function TDetailSourceList.ItemByName(Const AName: String): TDetailSourceItem; 1744 | var 1745 | i: Integer; 1746 | begin 1747 | //Item within your own collection 1748 | result := nil; 1749 | for I := 0 to Count - 1 do 1750 | Begin 1751 | if AnsiCompareText(Items[I].Name, AName) = 0 then 1752 | Begin 1753 | result := Items[I]; 1754 | Break; 1755 | End; 1756 | End; 1757 | end; 1758 | 1759 | function TDetailSourceList.FindItemByName(Const AName: String): TDetailSourceItem; 1760 | var 1761 | I: Integer; 1762 | Temp: TDetailSourceItem; 1763 | begin 1764 | //Item within the entire tree 1765 | Temp := Nil; 1766 | for i := 0 to Count - 1 do 1767 | Begin 1768 | if AnsiCompareText(Items[i].Name, AName) = 0 then 1769 | Begin 1770 | Temp := Items[I]; 1771 | Break; 1772 | End 1773 | else begin 1774 | Temp := Items[I].FindItemByName(AName); 1775 | if Temp <> Nil then 1776 | begin 1777 | Break; 1778 | End; 1779 | End; 1780 | end; 1781 | 1782 | Result := Temp; 1783 | end; 1784 | 1785 | // ===================================================================== 1786 | // TImageStorage 1787 | // ===================================================================== 1788 | 1789 | function TImageStorage.GetItem(Index: Integer): TPicture; 1790 | begin 1791 | Result := TPicture(inherited GetItem(Index)); 1792 | end; 1793 | 1794 | procedure TImageStorage.SetItem(Index: Integer; Value: TPicture); 1795 | Begin 1796 | inherited SetItem(Index, Value); 1797 | End; 1798 | 1799 | function TImageStorage.AddItem: TPicture; 1800 | var 1801 | APicture: TPicture; 1802 | Begin 1803 | APicture := TPicture.Create; 1804 | inherited Add(APicture); 1805 | Result := APicture; 1806 | End; 1807 | 1808 | end. 1809 | -------------------------------------------------------------------------------- /Sources/LLThreads.pas: -------------------------------------------------------------------------------- 1 | {================================================================================= 2 | 3 | Copyright © combit GmbH, Konstanz 4 | 5 | ---------------------------------------------------------------------------------- 6 | File : LLThreads.pas 7 | Module : List & Label 30 8 | Descr. : Implementation file for the List & Label 30 VCL-Component 9 | Version: 30.000 10 | ================================================================================== 11 | } 12 | 13 | unit LLThreads; 14 | 15 | interface 16 | {$WEAKPACKAGEUNIT ON} 17 | uses 18 | Classes, SysUtils, Windows, ListLabel30; 19 | 20 | type 21 | 22 | TPrintPreviewThread = class(TThread) 23 | private 24 | FPrintInstance : TListLabel30; 25 | FProjectFile : string; 26 | FOriginalProjectFile: string; 27 | FExportFormat : String; 28 | FControlHandle : HWND; 29 | FEventHandle : Cardinal; 30 | FPageCount : integer; 31 | FDoExport : boolean; 32 | FTerminated : boolean; 33 | FIsPrinting : boolean; 34 | procedure DesignerPrintPreview(); 35 | protected 36 | procedure Execute; override; 37 | public 38 | 39 | procedure FinalizePrinting(); 40 | procedure Abort(); 41 | 42 | property PrintInstance: TListLabel30 read FPrintInstance write FPrintInstance; 43 | Property ProjectFile : string read FProjectFile write FProjectFile; 44 | Property OriginalProjectFile: string read FOriginalProjectFile write FOriginalProjectFile; 45 | Property ExportFormat: String read FExportFormat write FExportFormat; 46 | Property ControlHandle : HWND read FControlHandle write FControlHandle; 47 | Property EventHandle : Cardinal read FEventHandle write FEventHandle; 48 | Property PageCount : integer read FPageCount write FPageCount; 49 | Property DoExport : boolean read FDoExport write FDoExport; 50 | Property Terminated : boolean read FTerminated write FTerminated; 51 | Property IsPrinting : boolean read FIsPrinting write FIsPrinting; 52 | end; 53 | 54 | TDrillDownThread = class(TThread) 55 | private 56 | FUserParam : integer; 57 | FPreviewFileName: String; 58 | FTabText : String; 59 | FProjectFileName: String; 60 | FParentKey : String; 61 | FParentTableName: String; 62 | FAttachInfo : THandle; 63 | FPrintInstance : TListLabel30; 64 | FTerminated : boolean; 65 | FKeyValue : String; 66 | FJobID : longint; 67 | FTooltipText : String; 68 | FRelationName : String; 69 | FWindowHandle : HWND; 70 | FChildKey : String; 71 | FChildTableName : String; 72 | procedure DoDrillDown; 73 | protected 74 | procedure Execute; override; 75 | public 76 | property Terminated: boolean read FTerminated write FTerminated; 77 | property PrintInstance: TListLabel30 read FPrintInstance write FPrintInstance; 78 | property UserParam: integer read FUserParam write FUserParam; 79 | property ParentTableName: String read FParentTableName write FParentTableName; 80 | property RelationName: String read FRelationName write FRelationName; 81 | property ChildTableName: String read FChildTableName write FChildTableName; 82 | property ParentKey: String read FParentKey write FParentKey; 83 | property ChildKey: String read FChildKey write FChildKey; 84 | property KeyValue: String read FKeyValue write FKeyValue; 85 | property ProjectFileName: String read FProjectFileName write FProjectFileName; 86 | property PreviewFileName: String read FPreviewFileName write FPreviewFileName; 87 | property TooltipText: String read FTooltipText write FTooltipText; 88 | property TabText: String read FTabText write FTabText; 89 | property WindowHandle: HWND read FWindowHandle write FWindowHandle; 90 | property JobID: longint read FJobID write FJobID; 91 | property AttachInfo: THandle read FAttachInfo write FAttachInfo; 92 | procedure FinalizePrinting(); 93 | end; 94 | 95 | implementation 96 | uses cmbtLS30x, LLDataSetDataProvider; 97 | procedure TPrintPreviewThread.Abort; 98 | begin 99 | PrintInstance.AbortPrinting; 100 | Terminated := True; 101 | IsPrinting := False; 102 | Terminated := True; 103 | end; 104 | 105 | procedure TPrintPreviewThread.DesignerPrintPreview; 106 | begin 107 | 108 | Try 109 | IsPrinting:=True; 110 | PostMessage(controlHandle, LS_VIEWERCONTROL_UPDATE_TOOLBAR, 0, 0); 111 | if (not DoExport) then 112 | printInstance.DoPreviewAndDrilldown(ControlHandle, False, ProjectFile, OriginalProjectFile, PageCount,'',nil,0) 113 | else 114 | printInstance.DoExport(FControlHandle, ProjectFile, OriginalProjectFile, PageCount, ExportFormat); 115 | Finally 116 | Terminated := true; 117 | IsPrinting := False; 118 | End; 119 | 120 | 121 | end; 122 | 123 | procedure TPrintPreviewThread.Execute; 124 | begin 125 | IsPrinting := false; 126 | Synchronize(DesignerPrintPreview); 127 | end; 128 | 129 | procedure TPrintPreviewThread.FinalizePrinting(); 130 | begin 131 | Abort(); 132 | end; 133 | 134 | //============================================================================== 135 | // TDrillDownThread 136 | //============================================================================== 137 | 138 | procedure TDrillDownThread.DoDrillDown; 139 | Var Filter : TFilterDescription; 140 | Function StripField(AName:String): STring; 141 | Var p : INteger; 142 | Begin 143 | p:=Pos('.',AName); 144 | if p>0 then 145 | result:=Copy(Aname,p+1,Length(AName)) 146 | else 147 | result:=''; 148 | End; 149 | begin 150 | Try 151 | Filter.ParentTable := FParentTableName; 152 | Filter.ParentKeyField := StripField(FParentKey); 153 | Filter.ChildTable := FChildTableName; 154 | Filter.ChildKeyField := StripField(FChildKey); 155 | Filter.KeyValue := FKeyValue; 156 | 157 | printInstance.DoPreviewAndDrilldown( FWindowHandle, 158 | True, 159 | ProjectFileName, 160 | '', 161 | 0, 162 | PreviewFileName, 163 | @Filter, 164 | AttachInfo); 165 | Finally 166 | Terminated := true; 167 | End; 168 | end; 169 | 170 | procedure TDrillDownThread.Execute; 171 | begin 172 | DoDrillDown; 173 | end; 174 | 175 | procedure TDrillDownThread.FinalizePrinting; 176 | begin 177 | Terminated := True; 178 | end; 179 | 180 | end. 181 | -------------------------------------------------------------------------------- /Sources/ListLabelDataProviderInterface.pas: -------------------------------------------------------------------------------- 1 | {================================================================================= 2 | 3 | Copyright © combit GmbH, Konstanz 4 | 5 | ---------------------------------------------------------------------------------- 6 | File : ListLabelDataProviderInterface.pas 7 | Module : List & Label 30 8 | Descr. : Implementation file for the List & Label 30 VCL-Component 9 | Version: 30.000 10 | ================================================================================== 11 | } 12 | 13 | unit ListLabelDataProviderInterface; 14 | 15 | interface 16 | {$WEAKPACKAGEUNIT ON} 17 | Type 18 | DefineDelayedInfoType = (diSortOrdersDesigning = 0, diSortOrdersPrinting = 1); 19 | 20 | Type 21 | ILlDataProvider=Interface 22 | ['{3cbae450-8880-11d2-96a3-0060086fefff}'] 23 | function OpenTable(const pszTableName: PWideChar; out ppUnkOfNewDataProvider: ILlDataProvider): HResult; stdcall; 24 | function OpenChildTable(const pszRelation: PWideChar; out ppUnkOfNewDataProvider: ILlDataProvider): HResult; stdcall; 25 | function GetRowCount(var pnRows: integer): HResult; stdcall; 26 | function DefineDelayedInfo(nInfo: integer): HResult; stdcall; 27 | function MoveNext(): HResult; stdcall; 28 | function DefineRow(diDefineDelayInfoType: DefineDelayedInfoType; const arvRelations: Variant): HResult; stdcall; 29 | function Dispose(): HResult; stdcall; 30 | function SetUsedIdentifiers(const arvVieldRestriction: Variant): HResult; stdcall; 31 | function ApplySortOrder(const pszSortOrder: PWideChar): HResult; stdcall; 32 | function ApplyFilter(const arvFields: Variant; const arvValues: Variant): HResult; stdcall; 33 | function ApplyAdvancedFilter(const pszFilter: PWideChar; const arvValues: Variant): HResult; stdcall; 34 | function SetOption(nIndex: integer; const pvValue: Variant): HResult; stdcall; 35 | function GetOption(nIndex: integer; var pvValue: Variant): HResult; stdcall; 36 | End; 37 | 38 | implementation 39 | 40 | end. 41 | -------------------------------------------------------------------------------- /Sources/ObjTree.pas: -------------------------------------------------------------------------------- 1 | {================================================================================= 2 | 3 | Copyright © combit GmbH, Konstanz 4 | 5 | ---------------------------------------------------------------------------------- 6 | File : ObjTree.pas 7 | Module : List & Label 30 8 | Descr. : Implementation file for the List & Label 30 VCL-Component 9 | Version: 30.000 10 | ================================================================================== 11 | } 12 | 13 | unit ObjTree; 14 | 15 | interface 16 | {$WEAKPACKAGEUNIT ON} 17 | uses Classes, Controls, Windows, ActiveX, SysUtils, Dialogs; 18 | 19 | type 20 | TObjTreeNode = class; 21 | TObjTree = class; 22 | 23 | //Enable access to protected functions 24 | TOwnedCollectionAccess = class(TOwnedCollection); 25 | 26 | TObjSelectionProc = procedure(Item: TObjTreeNode) of object; 27 | 28 | //TObjTreeNodeList is no longer needed 29 | TObjTreeNodeList = Class(TStringList) 30 | Private 31 | Function GetNode(Index: Integer) :TObjTreeNode; 32 | Procedure SetNode(Index: Integer; Value: TObjTreeNode); 33 | Public 34 | Constructor Create; 35 | function AddNode(ANode: TObjTreeNode): Integer; 36 | function DeleteNode(ANode: TObjTreeNode): Boolean; 37 | function DeleteNodeNr(index: Integer): Boolean; 38 | property Nodes[Index: Integer]: TObjTreeNode read GetNode write SetNode; 39 | End deprecated; 40 | 41 | //TObjTreeNode is both data holder in derived classes, and root node for 42 | //child nodes of the same type 43 | TObjTreeNode = class(TCollectionItem) 44 | private 45 | FSelectionProc: TObjSelectionProc; 46 | FTag : Integer; 47 | FRootTree: TObjTree; 48 | FOwnItems: TOwnedCollection; 49 | FParentNode: TObjTreeNode; //only related for AsPlainList 50 | 51 | function GetCount: Integer; inline; 52 | Procedure SetInternParentNode(AValue: TObjTreeNode); 53 | 54 | protected 55 | procedure DoOnItemSelected(Value: TObjSelectionProc); virtual; 56 | 57 | { TPersistent } 58 | procedure DefineProperties(Filer: TFiler); override; 59 | procedure ReadOwnItemsProperty(Reader: TReader); virtual; 60 | procedure WriteOwnItemsProperty(Writer: TWriter); virtual; 61 | 62 | function GetRootTree: TObjTree; 63 | Procedure SetRootTree(Value: TObjTree); 64 | function GetItem(Index: Integer): TObjTreeNode; 65 | procedure SetItem(Index: Integer; Value: TObjTreeNode); 66 | function GetParentNode: TObjTreeNode; 67 | 68 | procedure SetCollection(Value: TCollection); override; 69 | public 70 | constructor Create(Collection: TCollection); override; 71 | Destructor Destroy; Override; 72 | function GetInstance(const PropertyName: string): TPersistent; virtual; 73 | procedure UpdateEditorDisplay(Sender: TObject); 74 | 75 | property OwnCollection: TOwnedCollection read FOwnItems; 76 | function Add: TObjTreeNode; virtual; //Add subnode 77 | Function AddChildNode: TObjTreeNode; virtual; //Alias for Add for compatibility reasons 78 | Procedure Delete(Index: Integer); virtual; 79 | function IndexOf(Objekt: TObjTreeNode): Integer; virtual; 80 | Function IsRootNode: Boolean; //Returns True for root nodes (TObjTree Items) otherwise False 81 | Procedure AsPlainList(var ACollection: TCollection); //Returns ALL subnodes from here on as a flat list in a copy 82 | 83 | property Count: Integer read GetCount; //Number of own subnodes 84 | property OnItemSelected: TObjSelectionProc read FSelectionProc write DoOnItemSelected; 85 | Property ParentNode: TObjTreeNode read GetParentNode; //Pointer to the parent TObjTreeNode or Nil at root node. 86 | property Tag: Integer read FTag write FTag default 0; 87 | property Items[Index: Integer]: TObjTreeNode read GetItem write SetItem; default; //List of own subnodes 88 | property RootTree: TObjTree read GetRootTree write SetRootTree; //Pointer to the TObjTree structure 89 | end; 90 | 91 | //Root node for all child TObjTreeNode types. 92 | //The tree structure is stored in the DFM, including all properties of derived classes if Published 93 | TObjTree = class(TOwnedCollection) 94 | private 95 | FDesigner: TControl; 96 | protected 97 | procedure SetDesigner(Value: TControl); virtual; 98 | function GetItem(Index: Integer): TObjTreeNode; 99 | procedure SetItem(Index: Integer; Value: TObjTreeNode); 100 | public 101 | constructor Create(AOwner: TPersistent; ItemClass: TCollectionItemClass); 102 | destructor Destroy; override; 103 | function AddItem: TObjTreeNode; virtual; //Alias for Add for compatibility reasons 104 | function Add: TObjTreeNode; //Add subnode 105 | Procedure AsPlainList(var ACollection: TCollection); //Returns ALL subnodes from here on as a flat list in a copy 106 | 107 | property Designer: TControl read FDesigner write SetDesigner; 108 | property Items[Index: Integer]: TObjTreeNode read GetItem write SetItem; //List of own subnodes 109 | end; 110 | 111 | implementation 112 | //===================================================================================================================== 113 | // TObjTreeNodeList 114 | //===================================================================================================================== 115 | Constructor TObjTreeNodeList.Create; 116 | Begin 117 | inherited Create; 118 | Self.OwnsObjects := True; 119 | End; 120 | 121 | function TObjTreeNodeList.AddNode(ANode: TObjTreeNode): Integer; 122 | Begin 123 | result:=AddObject('',ANode); 124 | End; 125 | 126 | function TObjTreeNodeList.DeleteNode(ANode: TObjTreeNode): Boolean; 127 | var 128 | i: Integer; 129 | Begin 130 | Result := False; 131 | for i := 0 to Count-1 do 132 | Begin 133 | if Objects[i] = ANode then 134 | Begin 135 | Delete(i); 136 | Result := True; 137 | Break; 138 | End; 139 | End; 140 | End; 141 | 142 | function TObjTreeNodeList.DeleteNodeNr(index: Integer): Boolean; 143 | var 144 | MaxCount: Integer; 145 | Begin 146 | MaxCount := Count - 1; 147 | if (Index < 0) or (Index > (MaxCount)) then 148 | ERangeError.Create('Index ['+Index.ToString+'] out of range (0..'+MaxCount.ToString+')'); 149 | 150 | Delete(index); 151 | Result := true; 152 | End; 153 | 154 | Function TObjTreeNodeList.GetNode(Index: Integer) :TObjTreeNode; 155 | var 156 | MaxCount: Integer; 157 | Begin 158 | MaxCount := Count - 1; 159 | if (Index < 0) or (Index > (MaxCount)) then 160 | ERangeError.Create('Index ['+Index.ToString+'] out of range (0..'+MaxCount.ToString+')'); 161 | 162 | result:= TObjTreeNode(Objects[Index]); 163 | End; 164 | 165 | Procedure TObjTreeNodeList.SetNode(Index: Integer; Value: TObjTreeNode); 166 | var 167 | MaxCount: Integer; 168 | Begin 169 | MaxCount := Count - 1; 170 | if (Index < 0) or (Index > (MaxCount)) then 171 | ERangeError.Create('Index ['+Index.ToString+'] out of range (0..'+MaxCount.ToString+')'); 172 | 173 | Objects[Index]:=Value; 174 | End; 175 | 176 | //===================================================================================================================== 177 | // TObjTreeNode 178 | //===================================================================================================================== 179 | 180 | constructor TObjTreeNode.Create(Collection: TCollection); 181 | Begin 182 | inherited Create(Collection); 183 | FRootTree := Nil; 184 | FOwnItems := TOwnedCollection.Create(Self, Collection.ItemClass); 185 | End; 186 | 187 | Destructor TObjTreeNode.Destroy; 188 | Begin 189 | FRootTree := Nil; 190 | FParentNode := Nil; 191 | FOwnItems.Clear; 192 | FOwnItems.Free; 193 | 194 | inherited Destroy; 195 | End; 196 | 197 | function TObjTreeNode.GetInstance(const PropertyName: string): TPersistent; 198 | begin 199 | result := self; 200 | end; 201 | 202 | function TObjTreeNode.GetCount: Integer; 203 | Begin 204 | result := FOwnItems.Count; 205 | end; 206 | 207 | Procedure TObjTreeNode.SetInternParentNode(AValue: TObjTreeNode); 208 | Begin 209 | FParentNode := AValue; 210 | End; 211 | 212 | procedure TObjTreeNode.DefineProperties(Filer: TFiler); 213 | Begin 214 | inherited; 215 | Filer.DefineProperty('InternalOwnItems', ReadOwnItemsProperty, WriteOwnItemsProperty, 216 | (FOwnItems.Count > 0)); 217 | End; 218 | 219 | procedure TObjTreeNode.ReadOwnItemsProperty(Reader: TReader); 220 | var 221 | Val: TValueType; 222 | begin 223 | Val := Reader.ReadValue; 224 | if Val = vaCollection then 225 | begin 226 | Reader.ReadCollection(Self.FOwnItems); 227 | end; 228 | End; 229 | 230 | procedure TObjTreeNode.WriteOwnItemsProperty(Writer: TWriter); 231 | begin 232 | Writer.WriteCollection(Self.FOwnItems); 233 | end; 234 | 235 | procedure TObjTreeNode.DoOnItemSelected(Value: TObjSelectionProc); 236 | begin 237 | end; 238 | 239 | procedure TObjTreeNode.UpdateEditorDisplay(Sender: TObject); 240 | begin 241 | if FRootTree <> Nil then 242 | Begin 243 | if FRootTree.Designer <> Nil then 244 | FRootTree.Designer.Update; 245 | End; 246 | end; 247 | 248 | function TObjTreeNode.GetRootTree: TObjTree; 249 | function GetRootNode(ANode: TObjTreeNode): TObjTreeNode; 250 | begin 251 | if ANode.ParentNode <> Nil then 252 | Result := GetRootNode(ANode.ParentNode) 253 | else begin 254 | Result := ANode; 255 | end; 256 | end; 257 | var 258 | Temp: TObjTreeNode; 259 | begin 260 | //Returns the original TObjTree type, no matter from which TObjTreeNode node. 261 | //once determined, the pointer is stored in FRootTree and returned 262 | Result := Nil; 263 | 264 | if FRootTree <> Nil then 265 | Result := FRootTree 266 | else begin 267 | if Self.ParentNode = Nil then 268 | begin 269 | if Self.GetOwner is TObjTree then 270 | begin 271 | FRootTree := Self.GetOwner as TObjTree; 272 | Result := FRootTree; 273 | end; 274 | end 275 | else begin 276 | Temp := GetRootNode(Self); 277 | if Temp <> Nil then 278 | begin 279 | if Temp.GetOwner is TObjTree then 280 | begin 281 | FRootTree := Temp.GetOwner as TObjTree; 282 | Result := FRootTree; 283 | end; 284 | end; 285 | end; 286 | end; 287 | end; 288 | 289 | Procedure TObjTreeNode.SetRootTree(Value: TObjTree); 290 | Begin 291 | //Will be used for the Add routine to pass the TObjTree object to its own child nodes. 292 | if FRootTree <> Value then 293 | FRootTree := Value; 294 | End; 295 | 296 | function TObjTreeNode.GetItem(Index: Integer): TObjTreeNode; 297 | begin 298 | Result := TObjTreeNode(FOwnItems.Items[Index]); 299 | end; 300 | 301 | procedure TObjTreeNode.SetItem(Index: Integer; Value: TObjTreeNode); 302 | begin 303 | TObjTreeNode(FOwnItems.Items[Index]).Assign(Value); 304 | end; 305 | 306 | function TObjTreeNode.GetParentNode: TObjTreeNode; 307 | begin 308 | //Returns the parent node, if present. 309 | Result := Nil; 310 | 311 | //FParentNode is assigned only in the function AsPlainList 312 | if FParentNode <> Nil then 313 | Exit(FParentNode); 314 | 315 | if Self.GetOwner <> Nil then 316 | begin 317 | if Self.GetOwner is TOwnedCollection then 318 | begin 319 | if TOwnedCollectionAccess(Self.GetOwner).GetOwner <> Nil then 320 | begin 321 | if TOwnedCollectionAccess(Self.GetOwner).GetOwner is TObjTreeNode then 322 | Result := TOwnedCollectionAccess(Self.GetOwner).GetOwner as TObjTreeNode; 323 | end; 324 | end; 325 | end; 326 | end; 327 | 328 | procedure TObjTreeNode.SetCollection(Value: TCollection); 329 | begin 330 | inherited SetCollection(Value); 331 | end; 332 | 333 | function TObjTreeNode.Add: TObjTreeNode; 334 | Begin 335 | result := FOwnItems.Add as TObjTreeNode; 336 | result.RootTree := Self.FRootTree; 337 | End; 338 | 339 | Function TObjTreeNode.AddChildNode: TObjTreeNode; 340 | Begin 341 | result := Self.Add; 342 | End; 343 | 344 | Procedure TObjTreeNode.Delete(Index: Integer); 345 | Begin 346 | FOwnItems.Delete(Index); 347 | End; 348 | 349 | function TObjTreeNode.IndexOf(Objekt: TObjTreeNode): Integer; 350 | var 351 | i: Integer; 352 | begin 353 | Result := -1; 354 | for i := 0 to FOwnItems.Count-1 do 355 | begin 356 | if FOwnItems.Items[i] = Objekt then 357 | Begin 358 | Result := FOwnItems.Items[i].Index; 359 | Break; 360 | End; 361 | end; 362 | end; 363 | 364 | function TObjTreeNode.IsRootNode: Boolean; 365 | begin 366 | Result := Self.ParentNode = Nil; 367 | end; 368 | 369 | Procedure TObjTreeNode.AsPlainList(var ACollection: TCollection); 370 | var 371 | I: Integer; 372 | Item: TObjTreeNode; 373 | begin 374 | //Flat list of ALL child nodes with parent relationship, in copy. 375 | //ACollection must be created and released beforehand 376 | if ACollection = Nil then 377 | Exit; 378 | 379 | for I := 0 to FOwnItems.Count - 1 do 380 | Begin 381 | Item := ACollection.Add as TObjTreeNode; 382 | Item.Assign(FOwnItems.Items[i]); 383 | Item.SetInternParentNode(Self); 384 | 385 | if TObjTreeNode(FOwnItems.Items[i]).Count > 0 then 386 | TObjTreeNode(FOwnItems.Items[i]).AsPlainList(ACollection); 387 | End; 388 | End; 389 | 390 | //===================================================================================================================== 391 | // TObjTree 392 | //===================================================================================================================== 393 | constructor TObjTree.Create(AOwner: TPersistent;ItemClass: TCollectionItemClass); 394 | Begin 395 | Inherited Create(AOwner, ItemClass); 396 | end; 397 | 398 | destructor TObjTree.Destroy; 399 | begin 400 | if Designer <> nil then 401 | Designer.Free; 402 | 403 | inherited; 404 | end; 405 | 406 | function TObjTree.AddItem: TObjTreeNode; 407 | begin 408 | result := Self.Add; 409 | end; 410 | 411 | function TObjTree.Add: TObjTreeNode; 412 | begin 413 | result := inherited Add as TObjTreeNode; 414 | result.RootTree := Self; 415 | end; 416 | 417 | Procedure TObjTree.AsPlainList(var ACollection: TCollection); 418 | var 419 | i: Integer; 420 | begin 421 | //Flat list of ALL child nodes with parent relationship, in copy. 422 | //ACollection must be created and released beforehand 423 | 424 | if ACollection = Nil then 425 | Exit; 426 | 427 | for I := 0 to Self.Count-1 do 428 | begin 429 | ACollection.Add.Assign(Self.Items[I]); 430 | //Jetzt auf Unterknoten prüfen 431 | if TObjTreeNode(Self.Items[I]).Count > 0 then 432 | TObjTreeNode(Self.Items[I]).AsPlainList(ACollection); 433 | end; 434 | end; 435 | 436 | function TObjTree.GetItem(Index: Integer): TObjTreeNode; 437 | begin 438 | result := TObjTreeNode(inherited Items[Index]); 439 | end; 440 | 441 | procedure TObjTree.SetItem(Index: Integer; Value: TObjTreeNode); 442 | begin 443 | TObjTreeNode(Items[Index]).Assign(Value); 444 | end; 445 | 446 | procedure TObjTree.SetDesigner(Value: TControl); 447 | begin 448 | FDesigner := Value; 449 | end; 450 | 451 | end. 452 | -------------------------------------------------------------------------------- /Sources/cmbtLL30.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/Sources/cmbtLL30.pas -------------------------------------------------------------------------------- /Sources/cmbtLL30x.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/Sources/cmbtLL30x.pas -------------------------------------------------------------------------------- /Sources/l30CommonInterfaces.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/Sources/l30CommonInterfaces.pas -------------------------------------------------------------------------------- /Sources/l30FireDACInterfaces.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/Sources/l30FireDACInterfaces.pas -------------------------------------------------------------------------------- /Sources/l30dom.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/combit/DelphiDataProviders/41d984e3ec865edaaddf19b5e29a3c4573ce6b6a/Sources/l30dom.pas --------------------------------------------------------------------------------