home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / progs / ite / ite10d1.exe / DATA.Z / KBRESULT.JRP < prev    next >
Encoding:
Text File  |  1996-09-07  |  9.9 KB  |  336 lines

  1. /****************************************************************************\
  2. *                                                                            *
  3. * KBResult.jrp  --  Knowledge Base Search Results Report                     *
  4. *                                                                            *
  5. * KBResult.jrp is part of the Knowledge Base solution application. It is     *
  6. * called by the kbsearch.jfm form to show a list of documents that match the *
  7. * search criteria. The report file takes one parameter, which is a sql       *
  8. * statement that is used to search for data. Each of the document titles     *
  9. * is used to link to the kbdoc.jfm form.                                     *
  10. *                                                                            *
  11. * Dependencies:  knowbs31.gif                                                *
  12. *                homepg31.gif                                                *
  13. *                paper_22.gif                                                *
  14. *                apps\shared\controls.cc                                     *
  15. *                                                                            *
  16. * Links to:      ibapps/index.htm                                            *
  17. *                svr/intrasrv.isv?apps/knowbase/kbsearch.jfm                 *
  18. *                svr/intrasrv.isv?apps/knowbase/kbdoc.jfm(<DocID>)           *
  19. *                                                                            *
  20. * Updated 8/27/96 by IntraBuilder Samples Group                              *
  21. * $Revision:   1.17  $                                                       *
  22. *                                                                            *
  23. * Copyright (c) 1996, Borland International, Inc. All rights reserved.       *
  24. *                                                                            *
  25. \****************************************************************************/
  26. // This heading is used in place of the standard report heading, to get
  27. // the query string for the report. Since the page numbers are not
  28. // passed in, this report prints all at once.
  29. var r = new KBRESULTReport();
  30. if (KBRESULT.arguments.length == 1) {
  31.    r.query1.sql = KBRESULT.arguments[0];
  32. }
  33. r.render();
  34. return;
  35. // {End Header} Do not remove this comment//
  36. // Generated on 08/27/1996
  37. //
  38. var r = new KBRESULTReport();
  39. if (KBRESULT.arguments.length == 2) {
  40.    r.startPage = KBRESULT.arguments[0];
  41.    r.endPage = KBRESULT.arguments[1];
  42. }
  43. r.render();
  44. class KBRESULTReport extends Report {
  45.    _sys.scripts.load(_sys.env.home() + "APPS\\SHARED\\CONTROLS.CC");
  46.    with (this) {
  47.       title = "Knowledge Base Search Results";
  48.       linkText = "Next Page";
  49.    }
  50.  
  51.  
  52.    with (this.ibapps1 = new Database()){
  53.       left = 49;
  54.       top = 3;
  55.       databaseName = "IBAPPS";
  56.       active = true;
  57.    }
  58.  
  59.  
  60.    with (this.query1 = new Query()){
  61.       left = 570;
  62.       top = 0;
  63.       database = parent.ibapps1;
  64.       sql = "@kbresult.sql";
  65.       active = true;
  66.    }
  67.  
  68.  
  69.    with (this.query1.rowset) {
  70.  
  71.    }
  72.  
  73.  
  74.    with (this.pageTemplate1 = new PageTemplate(this)){
  75.       height = 15840;
  76.       width = 12240;
  77.       marginTop = 1080;
  78.       marginLeft = 1080;
  79.       marginBottom = 1080;
  80.       marginRight = 1080;
  81.       gridLineWidth = 0;
  82.       color = "silver";
  83.       background = "filename PAPER_22.GIF";
  84.    }
  85.  
  86.  
  87.    with (this.pageTemplate1.streamFrame1 = new StreamFrame(this.pageTemplate1)){
  88.       height = 13000;
  89.       left = 360;
  90.       top = 360;
  91.       width = 9360;
  92.    }
  93.  
  94.  
  95.    with (this.streamSource1 = new StreamSource(this)){
  96.  
  97.    }
  98.  
  99.  
  100.    with (this.streamSource1.detailBand) {
  101.       height = 1200;
  102.    }
  103.  
  104.  
  105.    with (this.streamSource1.detailBand.TitleHTML = new HTML(this.streamSource1.detailBand)){
  106.       height = 192;
  107.       width = 1500;
  108.       color = "black";
  109.       fontBold = false;
  110.       text = "Title ";
  111.    }
  112.  
  113.  
  114.    with (this.streamSource1.detailBand.TitleFieldHTML = new HTML(this.streamSource1.detailBand)){
  115.       height = 192;
  116.       left = 2000;
  117.       width = 7000;
  118.       color = "black";
  119.       fontBold = false;
  120.       text = {||"<A HREF='/svr/intrasrv.isv?apps/knowbase/kbdoc.jfm(" + parseInt(this.form.query1.rowset.fields["DocumentID"].value) + ")'>" + this.form.query1.rowset.fields["Title"].value + "</A>"};
  121.    }
  122.  
  123.  
  124.    with (this.streamSource1.detailBand.DocumentIdHTML = new HTML(this.streamSource1.detailBand)){
  125.       height = 192;
  126.       top = 192;
  127.       width = 1500;
  128.       color = "black";
  129.       fontBold = false;
  130.       text = "Document Number ";
  131.    }
  132.  
  133.  
  134.    with (this.streamSource1.detailBand.DocumentIdFieldHTML = new HTML(this.streamSource1.detailBand)){
  135.       height = 192;
  136.       left = 2000;
  137.       top = 192;
  138.       width = 1000;
  139.       color = "black";
  140.       fontBold = false;
  141.       text = {||parseInt(this.form.query1.rowset.fields["DocumentID"].value)};
  142.    }
  143.  
  144.  
  145.    with (this.streamSource1.detailBand.ProdCatHTML = new HTML(this.streamSource1.detailBand)){
  146.       height = 192;
  147.       top = 384;
  148.       width = 1500;
  149.       color = "black";
  150.       fontBold = false;
  151.       text = "Product / Category ";
  152.    }
  153.  
  154.  
  155.    with (this.streamSource1.detailBand.ProdCatFieldsHTML = new HTML(this.streamSource1.detailBand)){
  156.       height = 192;
  157.       left = 2000;
  158.       top = 387;
  159.       width = 5000;
  160.       color = "black";
  161.       fontBold = false;
  162.       text = {||this.form.query1.rowset.fields["ProdDescript"].value + " / " + this.form.query1.rowset.fields["CatDescript"].value};
  163.    }
  164.  
  165.  
  166.    with (this.streamSource1.detailBand.KeywordHTML = new HTML(this.streamSource1.detailBand)){
  167.       height = 192;
  168.       top = 576;
  169.       width = 1500;
  170.       color = "black";
  171.       fontBold = false;
  172.       text = "Key words ";
  173.    }
  174.  
  175.  
  176.    with (this.streamSource1.detailBand.KeywordFieldHTML = new HTML(this.streamSource1.detailBand)){
  177.       height = 192;
  178.       left = 2000;
  179.       top = 576;
  180.       width = 8383;
  181.       color = "black";
  182.       fontBold = false;
  183.       text = {||this.form.query1.rowset.fields["Keyword"].value};
  184.    }
  185.  
  186.  
  187.    with (this.streamSource1.detailBand.rule1 = new Rule(this.streamSource1.detailBand)){
  188.       top = 900;
  189.       size = 2;
  190.       right = 9000;
  191.    }
  192.  
  193.  
  194.    with (this.printer) {
  195.       duplex = 1;
  196.       orientation = 1;
  197.       paperSource = 15;
  198.       paperSize = 1;
  199.       resolution = 4;
  200.       color = 2;
  201.       trueTypeFonts = 2;
  202.    }
  203.  
  204.  
  205.    with (this.reportGroup) {
  206.       groupBy = "";
  207.    }
  208.  
  209.  
  210.    with (this.reportGroup.headerBand) {
  211.       height = 1600;
  212.    }
  213.  
  214.  
  215.    with (this.reportGroup.headerBand.KnowledgeBaseLogo = new Image(this.reportGroup.headerBand)){
  216.       height = 1255;
  217.       width = 1265;
  218.       dataSource = "filename KNOWBS31.GIF";
  219.       alignment = 4;
  220.    }
  221.  
  222.  
  223.    with (this.reportGroup.headerBand.HeadingHTML = new HTML(this.reportGroup.headerBand)){
  224.       height = 435;
  225.       left = 2000;
  226.       width = 7000;
  227.       color = "navy";
  228.       text = {||'<H1><FONT SIZE="+4"><FONT COLOR="maroon">K</FONT></FONT>nowledge <FONT SIZE="+4"><FONT COLOR="maroon">B</FONT></FONT>ase <FONT SIZE="+4"><FONT COLOR="maroon">R</FONT></FONT>esults</H1>'};
  229.    }
  230.  
  231.  
  232.    with (this.reportGroup.headerBand.rule1 = new Rule(this.reportGroup.headerBand)){
  233.       top = 1400;
  234.       size = 2;
  235.       right = 9000;
  236.    }
  237.  
  238.  
  239.    with (this.reportGroup.footerBand) {
  240.       height = 3560;
  241.    }
  242.  
  243.  
  244.    with (this.reportGroup.footerBand.MatchesHTML = new HTML(this.reportGroup.footerBand)){
  245.       height = 200;
  246.       width = 9000;
  247.       color = "maroon";
  248.       fontBold = false;
  249.       fontItalic = true;
  250.       text = {||"Number of matches: " + this.parent.parent.agCount({||this.parent.streamSource1.rowset.fields["DocumentID"].value})};
  251.    }
  252.  
  253.  
  254.    with (this.reportGroup.footerBand.rule1 = new Rule(this.reportGroup.footerBand)){
  255.       top = 300;
  256.       size = 2;
  257.       right = 9000;
  258.    }
  259.  
  260.  
  261.    with (this.reportGroup.footerBand.SearchLinkImage = new Image(this.reportGroup.footerBand)){
  262.       height = 1245;
  263.       top = 500;
  264.       width = 1240;
  265.       dataSource = "filename KNOWBS31.GIF";
  266.       alignment = 4;
  267.       onImageClick = class::link_to_search_page;
  268.    }
  269.  
  270.  
  271.    with (this.reportGroup.footerBand.SearchLinkHTML = new HTML(this.reportGroup.footerBand)){
  272.       height = 250;
  273.       left = 2005;
  274.       top = 500;
  275.       width = 6500;
  276.       color = "black";
  277.       fontBold = false;
  278.       text = {||'<A HREF="/svr/intrasrv.isv?apps/knowbase/kbsearch.jfm">Start a New Search</A>'};
  279.    }
  280.  
  281.  
  282.    with (this.reportGroup.footerBand.HomePageLinkImage = new Image(this.reportGroup.footerBand)){
  283.       height = 1215;
  284.       top = 1800;
  285.       width = 1255;
  286.       dataSource = "filename HOMEPG31.GIF";
  287.       alignment = 4;
  288.       onImageClick = class::link_to_home_page;
  289.    }
  290.  
  291.  
  292.    with (this.reportGroup.footerBand.HomePageLinkHTML = new HTML(this.reportGroup.footerBand)){
  293.       height = 250;
  294.       left = 2005;
  295.       top = 1800;
  296.       width = 6500;
  297.       color = "black";
  298.       fontBold = false;
  299.       text = {||'<A HREF="/ibapps/index.htm">Return to Home Page</A>'};
  300.    }
  301.  
  302.  
  303.    with (this.reportGroup.footerBand.rule2 = new Rule(this.reportGroup.footerBand)){
  304.       top = 3150;
  305.       size = 2;
  306.       right = 9000;
  307.    }
  308.  
  309.  
  310.    with (this.reportGroup.footerBand.GeneratedHTML = new GeneratedHTML(this.reportGroup.footerBand)){
  311.       height = 200;
  312.       top = 3350;
  313.       width = 9000;
  314.       fontBold = false;
  315.    }
  316.  
  317.    this.firstPageTemplate = this.form.pageTemplate1
  318.    this.form.pageTemplate1.nextPageTemplate = this.form.pageTemplate1
  319.    this.form.pageTemplate1.streamFrame1.streamSource = this.form.streamSource1
  320.    this.form.streamSource1.rowset = this.form.query1.rowset
  321.  
  322.    function link_to_home_page()
  323.    {
  324.    // {Export} This comment causes this function body to be sent to the client
  325.    location.href="/ibapps/index.htm";
  326.    }
  327.  
  328.    function link_to_search_page()
  329.    {
  330.    // {Export} This comment causes this function body to be sent to the client
  331.    location.href="/svr/intrasrv.isv?apps/knowbase/kbsearch.jfm";
  332.    }
  333.  
  334.  
  335. }
  336.