home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
ib
/
setups
/
intrabld
/
data.z
/
NEWMSG.JRP
< prev
next >
Wrap
Text File
|
1996-12-11
|
9KB
|
306 lines
/****************************************************************************\
* *
* NewMsg.jrp -- TMD new messages report *
* *
* *
* Updated 9/19/96 by IntraBuilder Publications Group *
* $Revision: 1.0 $ *
* *
* Copyright (c) 1996, Borland International, Inc. All rights reserved. *
* *
\****************************************************************************/
var r = new NEWMSGReport();
try {
var f = NEWMSG.arguments[ 0 ].rowset.fields;
r.userID = f[ "User ID" ].value;
r.userName = f[ "User name" ].value.toUpperCase();
r.HMN = f[ "HMN" ].value;
}
catch ( Exception e ) {
r.userID = 0;
r.userName = "Unregistered" ;
r.HMN = 0;
}
r.streamSource1.rowset.filter = '"Message #" > ' + parseInt( r.HMN );
r.render();
return;
// {End Header} Do not remove this comment//
// Generated on 09/19/96
//
var r = new NEWMSGReport();
if (NEWMSG.arguments.length == 2) {
r.startPage = NEWMSG.arguments[0];
r.endPage = NEWMSG.arguments[1];
}
r.render();
class NEWMSGReport extends Report {
_sys.scripts.load("TMD.CC")
with (this) {
title = "New messages";
autoSort = false;
linkText = "Next Page";
}
with (this.messages1 = new messagesQuery()){
left = 0;
top = 0;
active = true;
}
with (this.printer) {
duplex = 1;
orientation = 1;
paperSource = 15;
paperSize = 1;
resolution = 4;
color = 1;
trueTypeFonts = 2;
}
with (this.streamSource1 = new StreamSource(this)){
}
with (this.streamSource1.group1 = new Group(this.streamSource1)){
groupBy = "Section";
}
with (this.streamSource1.group1.headerBand) {
height = 250;
}
with (this.streamSource1.group1.headerBand.html1 = new HTML(this.streamSource1.group1.headerBand)){
height = 255;
width = 9360;
color = "black";
text = {||"Section: " + this.parent.parent.parent.rowset.fields[ "Section" ].value};
}
with (this.streamSource1.group1.footerBand) {
height = 0;
}
with (this.streamSource1.group1.footerBand.HTML1 = new HTML(this.streamSource1.group1.footerBand)){
height = 200;
width = 9360;
variableHeight = true;
color = "red";
fontBold = false;
fontItalic = true;
text = {||"New messages: " + this.parent.parent.agCount({||this.parent.rowset.fields["Message #"].value})};
}
with (this.streamSource1.detailBand) {
height = 0;
}
with (this.streamSource1.detailBand.HTML1 = new HTML(this.streamSource1.detailBand)){
height = 1;
width = 1073;
variableHeight = true;
color = "black";
alignHorizontal = 2;
fontBold = false;
text = {||'<A HREF="javascript:gotoMessage(' + parseInt( this.form.messages1.rowset.fields["Message #"].value ) + ')">' + parseInt( this.form.messages1.rowset.fields["Message #"].value ) + '</A>'};
}
with (this.streamSource1.detailBand.HTML2 = new HTML(this.streamSource1.detailBand)){
height = 1;
left = 1562;
width = 1102;
variableHeight = true;
color = "black";
fontBold = false;
text = {||this.form.messages1.rowset.fields["From"].value};
canRender = class::highlightWaiting;
}
with (this.streamSource1.detailBand.HTML3 = new HTML(this.streamSource1.detailBand)){
height = 1;
left = 2808;
width = 936;
variableHeight = true;
color = "black";
fontBold = false;
text = {||this.form.messages1.rowset.fields["To"].value};
canRender = class::highlightWaiting;
}
with (this.streamSource1.detailBand.HTML4 = new HTML(this.streamSource1.detailBand)){
height = 1;
left = 3888;
width = 1210;
variableHeight = true;
color = "black";
fontBold = false;
text = {||this.form.messages1.rowset.fields["Subject"].value};
canRender = class::highlightWaiting;
}
with (this.streamSource1.detailBand.HTML5 = new HTML(this.streamSource1.detailBand)){
height = 1;
left = 5242;
width = 1512;
variableHeight = true;
color = "black";
fontBold = false;
text = {||this.form.messages1.rowset.fields["Posted"].value};
canRender = class::highlightWaiting;
}
with (this.pageTemplate1 = new PageTemplate(this)){
height = 15840;
width = 12240;
marginTop = 1080;
marginLeft = 1080;
marginBottom = 1080;
marginRight = 1080;
gridLineWidth = 1;
}
with (this.pageTemplate1.streamFrame1 = new StreamFrame(this.pageTemplate1)){
height = 11376;
left = 360;
top = 1584;
width = 9360;
}
with (this.pageTemplate1.HTML1 = new HTML(this.pageTemplate1)){
height = 342;
left = 360;
top = 360;
width = 9360;
color = "black";
text = "<H2>New messages</H2>";
}
with (this.pageTemplate1.HTML2 = new HTML(this.pageTemplate1)){
height = 255;
left = 360;
top = 712;
width = 9360;
color = "black";
text = {||new Date()};
}
with (this.pageTemplate1.HTML3 = new HTML(this.pageTemplate1)){
height = 360;
left = 360;
top = 1080;
width = 1148;
color = "black";
text = "<H3>#</H3>";
}
with (this.pageTemplate1.HTML4 = new HTML(this.pageTemplate1)){
height = 360;
left = 1877;
top = 1080;
width = 1147;
color = "black";
text = "<H3>From</H3>";
}
with (this.pageTemplate1.HTML5 = new HTML(this.pageTemplate1)){
height = 360;
left = 3168;
top = 1080;
width = 936;
color = "black";
text = "<H3>To</H3>";
}
with (this.pageTemplate1.HTML6 = new HTML(this.pageTemplate1)){
height = 360;
left = 4248;
top = 1080;
width = 1210;
color = "black";
text = "<H3>Subject</H3>";
}
with (this.pageTemplate1.HTML7 = new HTML(this.pageTemplate1)){
height = 360;
left = 5602;
top = 1080;
width = 1512;
color = "black";
text = "<H3>Posted</H3>";
}
with (this.reportGroup) {
groupBy = "";
}
with (this.reportGroup.headerBand) {
height = 0;
}
with (this.reportGroup.footerBand) {
height = 0;
}
with (this.reportGroup.footerBand.HTML1 = new HTML(this.reportGroup.footerBand)){
height = 200;
width = 9360;
variableHeight = true;
color = "red";
fontBold = false;
fontItalic = true;
text = {||"Total new messages: " + this.parent.parent.agCount({||this.parent.streamSource1.rowset.fields["Message #"].value})};
}
this.firstPageTemplate = this.form.pageTemplate1
this.form.pageTemplate1.nextPageTemplate = this.form.pageTemplate1
this.form.pageTemplate1.streamFrame1.streamSource = this.form.streamSource1
this.form.streamSource1.rowset = this.form.messages1.rowset
function highlightWaiting()
{
this.color = this.form.messages1.rowset.fields[ "To" ].value.toUpperCase() ==
this.form.userName ? "red" : "black";
return true;
}
function gotoMessage( nMsg )
{
// {Export} This comment causes this function body to be sent to the client
var f = parent.formFrame.document.forms[0]; // Get reference to formFrameÆs form
if ( f.target == "reportFrame" ) {
f.target = "_self"; // Make sure the target is the same frame
f.elements[ 1 ].value = "-1";
}
f.hiddenAction.value = "VIEWER"; // Run the Viewer form
f.hiddenMsg.value = "" + nMsg; // Goto the desired message #
f.submit(); // Submit the form
}
}