home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / borland / ib / setups / intrabld / data.z / PHONEDEP.JRP < prev    next >
Text File  |  1996-12-11  |  8KB  |  252 lines

  1. /****************************************************************************\
  2. *                                                                            *
  3. * PhoneDep.jrp  --  Department Phone List                                    *
  4. *                                                                            *
  5. * PhoneDep.jrp is part of the Phone Book solution application. It is used    *
  6. * to view the employee phone book, with each department grouped together.    *
  7. * The sorting of the table is done in the employee1.rowset.sql property. The *
  8. * physical grouping of the department on the report is accomplished through  *
  9. * the streamSource1.group1 object. Each employee's name becomes a link to    *
  10. * the employee.jfm file. This link includes a parameter containing the       *
  11. * employeeID of the employee.                                                *
  12. *                                                                            *
  13. * Dependencies:  phonbk31.gif                                                *
  14. *                apps\shared\controls.cc                                     *
  15. *                                                                            *
  16. * Links to:      ibapps/index.htm                                            *
  17. *                svr/intrasrv.isv?apps/phone/phonedep.jrp                    *
  18. *                svr/intrasrv.isv?apps/phone/phoneemp.jrp                    *
  19. *                svr/intrasrv.isv?apps/phone/update.jfm                      *
  20. *                                                                            *
  21. * Updated 11/09/96 by IntraBuilder Samples Group                             *
  22. * $Revision:   1.19  $                                                       *
  23. *                                                                            *
  24. * Copyright (c) 1996, Borland International, Inc. All rights reserved.       *
  25. *                                                                            *
  26. \****************************************************************************/
  27. // {End Header} Do not remove this comment//
  28. // Generated on 11/09/96
  29. //
  30. var r = new PHONEDEPReport();
  31. if (PHONEDEP.arguments.length == 2) {
  32.    r.startPage = PHONEDEP.arguments[0];
  33.    r.endPage = PHONEDEP.arguments[1];
  34. }
  35. r.render();
  36. class PHONEDEPReport extends Report {
  37.    _sys.scripts.load(_sys.env.home() + "APPS\\SHARED\\CONTROLS.CC")
  38.    with (this) {
  39.       preRender = class::Form_preRender;
  40.       title = "Department Phone List";
  41.       linkText = "Next Page";
  42.    }
  43.  
  44.  
  45.    with (this.ibapps1 = new Database()){
  46.       left = 47;
  47.       top = 0;
  48.       databaseName = "IBAPPS";
  49.       active = true;
  50.    }
  51.  
  52.  
  53.    with (this.employee1 = new Query()){
  54.       left = 795;
  55.       top = 0;
  56.       database = parent.ibapps1;
  57.       sql = "SELECT * FROM employee ORDER BY Department";
  58.       active = true;
  59.    }
  60.  
  61.  
  62.    with (this.employee1.rowset) {
  63.  
  64.    }
  65.  
  66.  
  67.    with (this.department1 = new Query()){
  68.       left = 1455;
  69.       top = 0;
  70.       database = parent.ibapps1;
  71.       sql = "select * from departmt";
  72.       active = true;
  73.    }
  74.  
  75.  
  76.    with (this.department1.rowset) {
  77.       masterRowset = parent.parent.employee1.rowset;
  78.       masterFields = "Department";
  79.    }
  80.  
  81.  
  82.    with (this.pageTemplate1 = new PageTemplate(this)){
  83.       height = 15000;
  84.       width = 9000;
  85.       marginTop = 0;
  86.       marginLeft = 0;
  87.       marginBottom = 0;
  88.       marginRight = 0;
  89.       gridLineWidth = 5;
  90.       color = "cae4ff";
  91.    }
  92.  
  93.  
  94.    with (this.pageTemplate1.streamFrame1 = new StreamFrame(this.pageTemplate1)){
  95.       height = 12000;
  96.       top = 1300;
  97.       width = 9000;
  98.    }
  99.  
  100.  
  101.    with (this.pageTemplate1.PhoneBookLogo = new Image(this.pageTemplate1)){
  102.       height = 1225;
  103.       width = 1235;
  104.       dataSource = "filename PHONBK31.GIF";
  105.       alignment = 4;
  106.    }
  107.  
  108.  
  109.    with (this.pageTemplate1.HeadingHTML = new HTML(this.pageTemplate1)){
  110.       height = 1155;
  111.       left = 1270;
  112.       width = 6460;
  113.       color = "853a1a";
  114.       alignVertical = 1;
  115.       alignHorizontal = 1;
  116.       text = '<font size="+3"><B><CENTER>Department List</CENTER></B></font>';
  117.    }
  118.  
  119.  
  120.    with (this.pageTemplate1.LinksHTML = new HTML(this.pageTemplate1)){
  121.       height = 300;
  122.       top = 13500;
  123.       width = 9000;
  124.       color = "black";
  125.       fontBold = false;
  126.       text = {||'</TABLE><A HREF="/ibapps/index.htm">[Home]</A> <A HREF="/svr/intrasrv.isv?apps/phone/phoneemp.jrp">[List by Employee]</A> <A HREF="/svr/intrasrv.isv?apps/phone/update.jfm">[Update Data]</A><HR>'};
  127.    }
  128.  
  129.  
  130.    with (this.pageTemplate1.generatedHTML = new GeneratedHTML(this.pageTemplate1)){
  131.       height = 255;
  132.       top = 13800;
  133.       width = 9000;
  134.    }
  135.  
  136.  
  137.    with (this.streamSource1 = new StreamSource(this)){
  138.  
  139.    }
  140.  
  141.  
  142.    with (this.streamSource1.group1 = new Group(this.streamSource1)){
  143.       groupBy = "Department";
  144.    }
  145.  
  146.  
  147.    with (this.streamSource1.group1.headerBand) {
  148.       height = 400;
  149.    }
  150.  
  151.  
  152.    with (this.streamSource1.group1.headerBand.groupHeading = new HTML(this.streamSource1.group1.headerBand)){
  153.       height = 400;
  154.       width = 9000;
  155.       color = "853a1a";
  156.       alignVertical = 1;
  157.       alignHorizontal = 1;
  158.       text = {||"<CENTER><H3>"+this.parent.parent.parent.parent.department1.rowset.fields["Department"].value+"</H3></CENTER>"};
  159.    }
  160.  
  161.  
  162.    with (this.streamSource1.group1.footerBand) {
  163.       height = 0;
  164.    }
  165.  
  166.  
  167.    with (this.streamSource1.detailBand) {
  168.       height = 0;
  169.    }
  170.  
  171.  
  172.    with (this.streamSource1.detailBand.PhoneHTML = new HTML(this.streamSource1.detailBand)){
  173.       height = 1;
  174.       width = 700;
  175.       variableHeight = true;
  176.       color = "black";
  177.       fontBold = false;
  178.       text = {||'x'+this.parent.parent.rowset.fields["Phone"].value};
  179.    }
  180.  
  181.  
  182.    with (this.streamSource1.detailBand.FullnameHTML = new HTML(this.streamSource1.detailBand)){
  183.       height = 1;
  184.       left = 700;
  185.       width = 2000;
  186.       variableHeight = true;
  187.       color = "black";
  188.       fontBold = false;
  189.       text = {||'<A HREF="/svr/intrasrv.isv?apps/phone/employee.jfm(' + parseInt(this.parent.parent.rowset.fields["Employee ID"].value) + ')">' + this.parent.parent.rowset.fields["Full Name"].value + '</A>'};
  190.    }
  191.  
  192.  
  193.    with (this.streamSource1.detailBand.TitleHTML = new HTML(this.streamSource1.detailBand)){
  194.       height = 1;
  195.       left = 2700;
  196.       width = 3000;
  197.       variableHeight = true;
  198.       color = "black";
  199.       fontBold = false;
  200.       text = {||this.parent.parent.rowset.fields["Title"].value};
  201.    }
  202.  
  203.  
  204.    with (this.streamSource1.detailBand.PhoneNoteHTML = new HTML(this.streamSource1.detailBand)){
  205.       height = 1;
  206.       left = 5700;
  207.       width = 3300;
  208.       variableHeight = true;
  209.       color = "black";
  210.       fontBold = false;
  211.       text = {||this.parent.parent.rowset.fields["Phone Note"].value};
  212.    }
  213.  
  214.  
  215.    with (this.printer) {
  216.       duplex = 1;
  217.       orientation = 1;
  218.       paperSource = 15;
  219.       paperSize = 1;
  220.       resolution = 4;
  221.       color = 2;
  222.       trueTypeFonts = 2;
  223.    }
  224.  
  225.  
  226.    with (this.reportGroup) {
  227.       groupBy = "";
  228.    }
  229.  
  230.  
  231.    with (this.reportGroup.headerBand) {
  232.       height = 0;
  233.    }
  234.  
  235.  
  236.    with (this.reportGroup.footerBand) {
  237.       height = 0;
  238.    }
  239.  
  240.    this.firstPageTemplate = this.form.pageTemplate1
  241.    this.form.pageTemplate1.nextPageTemplate = this.form.pageTemplate1
  242.    this.form.pageTemplate1.streamFrame1.streamSource = this.form.streamSource1
  243.    this.form.streamSource1.rowset = this.form.employee1.rowset
  244.  
  245.    function Form_preRender()
  246.    {
  247.       this.department1.rowset.masterRowset = this.employee1.rowset;
  248.       this.department1.rowset.masterFields = "Department";
  249.    }
  250.  
  251. }
  252.