This topic is locked

Printer Friendly editer moving a field

6/10/2010 6:51:38 PM
PHPRunner General questions
C
cgetty author

Hi All
I looked on the forum before posting but diden't see an answer <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=14611&image=1&table=forumtopics' class='bbc_emoticon' alt=':(' />
I am printing a report. I would like to move a field from one part of the report

(where it is printed many times) to another part of the report (where it is only printed once).


This is how the reports looks now


This is what I tried but diden't work


This is how I'd like it to look


Any help would be greatly appreciated <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=14611&image=6&table=forumtopics' class='bbc_emoticon' alt=':)' />
Clark

A
ann 6/11/2010

Clark,
fields are filled in the grid only on the list and print pages. To move field to the custom header use custom event ("Insert PHP code snippet" option on the Visual Editor tab). Here is a sample:

$sql="select ter from TableName where Id=1";

$rs = CustomQuery($sql);

if($data=db_fetch_array($rs)){

echo $data["ter"];

}



where TableName is actual table name.

C
cgetty author 6/11/2010



Clark,
fields are filled in the grid only on the list and print pages. To move field to the custom header use custom event ("Insert PHP code snippet" option on the Visual Editor tab). Here is a sample:

$sql="select ter from TableName where Id=1";

$rs = CustomQuery($sql);

if($data=db_fetch_array($rs)){

echo $data["ter"];

}



where TableName is actual table name.


Thanks Ann for your response.
I Changed the Tablename to the proper name & tried it.

Below is the error I got back I ran it.
Unknown column 'Id' in 'where clause'
Did I forget something?

A
ann 6/15/2010

Clark,
change Id to your actual key field name.

J
joker 6/17/2010

Ann,
I have a similar problem I don't know if this is the same. I created a "Pickup" view and modified the list page to show child records. Everything under the blue line works correctly. I can't get the other fields (above the blue line) to show correctly.
Here is the form:


Here is my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML {$html_attrs}><HEAD><TITLE>Pickup</TITLE>

<link REL="stylesheet" href="include/style.css" type="text/css"><!--[if IE]><link REL="stylesheet" href="include/styleIE.css" type="text/css"><![endif]-->{BEGIN style_block}{END style_block}<!--[if IE]>{BEGIN iestyle_block}

<STYLE>

#toplinks_block{$id} * {margin:2px 3px;vertical-align:middle;}

#search_records_block{$id} * {margin:1px 1px;vertical-align:middle}

#recordcontrols{$id} *, #newrecordcontrols{$id} * {margin:1x 1px;vertical-align:middle}

</STYLE>

{END iestyle_block}<![endif]-->

<META content="MSHTML 6.00.2900.5969" name=GENERATOR></HEAD>

<BODY {$bodyattrs} marginwidth="0" marginheight="0">{BEGIN body}

<DIV id="height100{$id}"></DIV>

{BEGIN mastertable_block}<DIV id="mastertable_block{$id}">{$showmasterfile}

<A class=toplinks {$backtomasterlink_attrs}><B>Back to {$backtomasterlink_caption}</B></A>

<BR></DIV>{END mastertable_block}

<DIV></DIV>

<DIV>&nbsp;</DIV>

<DIV>&nbsp;</DIV>

<DIV></DIV>

<DIV>&nbsp;</DIV>

<DIV>&nbsp;</DIV>

<DIV>&nbsp;</DIV>

<DIV>&nbsp;</DIV>

<DIV><!------------------------------------- BEGIN NEW TABLE ----------------------------------------->

<TABLE id=center_block style="WIDTH: 700px; HEIGHT: 727px" cellSpacing=2

cellPadding=1 align=center bgColor=#ffffff border=0>

<TBODY>

<TR>

<TD id=contents_block

style="WIDTH: 700px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff"><B

class=xtop></B>

<DIV class=xboxcontentb id="main_block{$id}">

<DIV class=xboxcontentb id="inmain_block{$id}" style="WIDTH: 700px">

<TABLE id="fields_block{$id}" style="WIDTH: 700px" borderColor=#ffffff cellSpacing=0 cellPadding=4 border=0>

<TBODY>

<TR>{BEGIN WORKORDER_NUMBER_fieldblock}

<TD style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff"

colSpan=3><P align=left><FONT size=3><STRONG>{$event Pickup_Snippet1}</STRONG></FONT></P></TD>{END WORKORDER_NUMBER_fieldblock}</TR>

<TR height=33>

<TD

style="BORDER-BOTTOM: #000000 1px solid; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff"

colSpan=3>

<P align=center>&nbsp;<FONT size=3><STRONG>Asset Management Pickup

Work Order </P></STRONG></FONT></TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Sched

Date</STRONG> </TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Project

#</STRONG></TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Job#

</STRONG></TD></TR>

<TR height=19>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Rep</STRONG></TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff"><STRONG>&nbsp;Service

Plan</STRONG>&nbsp;</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Work

Order</STRONG> <FONT size=1></FONT></TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Parent

Tag</STRONG></TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Software

Load</STRONG></TD>

<TD style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">

<P align=center><STRONG><FONT

size=3></FONT></STRONG>&nbsp;</P></TD></TR>

<TR>

<TD

style="BORDER-TOP: #000000 1px solid; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff"

colSpan=3><FONT size=3><STRONG>&nbsp;<U>Pickup

Information</U></STRONG></FONT></TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Customer</STRONG>

</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Building</STRONG>

</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Name</STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

</TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Floor</STRONG>&nbsp;&nbsp;&nbsp;&nbsp;

</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Login/SSO</STRONG>

/</TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;&nbsp;&nbsp;

</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Column</STRONG>

</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Phone</STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Desk</STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;</TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff"

colSpan=3><STRONG>&nbsp;<U><FONT

size=3>Delivery&nbsp;Information</FONT></U></STRONG></TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;&nbsp;<STRONG>Customer</STRONG>

</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Building</STRONG>

CC</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UNASSIGNED

UNASSIGNED</STRONG></TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Cost

Center </STRONG></TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Floor</STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

1</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Login/SSO</STRONG>

<STRONG>UNASSIGNED</STRONG></TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;5481

CREEK RD</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff"><STRONG>&nbsp;Column&nbsp;&nbsp;*</STRONG></TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Phone</STRONG></TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;CINCINNATI,

OH</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Desk&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

*</STRONG></TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;</TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;45242-4001</TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Svc

Site</STRONG></TD>

<TD

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;</TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;</TD>

<TD style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff"

colSpan=2>&nbsp;<STRONG>Business

Unit&nbsp;&nbsp;</STRONG>&nbsp;</TD></TR>

<TR>

<TD

style="WIDTH: 129px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;</TD>

<TD style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff"

colSpan=2>&nbsp;<STRONG>Parent Business Unit</STRONG>&nbsp;</TD></TR>

<TR>

<TD

style="BORDER-TOP: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff"

colSpan=3>&nbsp;Comments&nbsp;</TD></TR></TBODY></TABLE>

<!------------------------------------- END NEW TABLE -----------------------------------------></DIV>

<DIV></DIV>

<DIV>

<DIV {$marginStyle} moveForSearch="move{$id}">{BEGIN grid_block}

<DIV id="grid_block{$id}">

<TABLE class=data style="WIDTH: 700px; HEIGHT: 63px" cellSpacing=0

cellPadding=3 align=center border=0 name="maintable">

{BEGIN grid_header}<THEAD>

<TR class=blackshade vAlign=top {$gridHeader_attrs}>{BEGIN record_header}

{BEGIN T_TAG_fieldheadercolumn}<TH class=headerlist style="WIDTH: 108px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff" align=middle>{BEGIN T_TAG_fieldheader}<FONT color=#000000>&nbsp;

</FONT><A class=tablelinks {$T_TAG_orderlinkattrs}><FONT

color=#000000>Asset Tag</FONT></A> &nbsp; {END T_TAG_fieldheader}</TH>{END T_TAG_fieldheadercolumn}

{BEGIN MODEL_NUMBER_fieldheadercolumn}<TH class=headerlist style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff" align=middle>{BEGIN MODEL_NUMBER_fieldheader}&nbsp; <A class=tablelinks

{$MODEL_NUMBER_orderlinkattrs}><FONT color=#000000>Model

Number</FONT></A> &nbsp; {END MODEL_NUMBER_fieldheader}</TH>{END MODEL_NUMBER_fieldheadercolumn}

{BEGIN MODEL_DESC_fieldheadercolumn}<TH class=headerlist style="WIDTH: 450px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff" align=middle>{BEGIN MODEL_DESC_fieldheader}<FONT color=#000000>&nbsp;

</FONT><A class=tablelinks {$MODEL_DESC_orderlinkattrs}><FONT

color=#000000>Description</FONT></A> &nbsp; {END MODEL_DESC_fieldheader}</TH>{END MODEL_DESC_fieldheadercolumn}

{BEGIN SERIAL_NUMBER_fieldheadercolumn}<TH class=headerlist_right2 style="WIDTH: 235px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff" align=middle>{BEGIN SERIAL_NUMBER_fieldheader}<FONT

color=#000000>&nbsp; </FONT><A class=tablelinks

{$SERIAL_NUMBER_orderlinkattrs}><FONT color=#000000>Serial

Number</FONT></A> &nbsp; {END SERIAL_NUMBER_fieldheader}</TH>{END SERIAL_NUMBER_fieldheadercolumn}{END record_header}</TR></THEAD>{END grid_header}

<TBODY>

{BEGIN grid_row}<TR vAlign=top {$rowattrs} {$rowstyle}>{BEGIN grid_record}

{BEGIN T_TAG_fieldcolumn}<TD class=borderbody style="WIDTH: 108px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff" vAlign=middle {$T_TAG_style}>{$T_TAG_value} </TD>{END T_TAG_fieldcolumn}

{BEGIN MODEL_NUMBER_fieldcolumn}<TD class=borderbody style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff" vAlign=middle {$MODEL_NUMBER_style}>{$MODEL_NUMBER_value} </TD>{END MODEL_NUMBER_fieldcolumn}

{BEGIN MODEL_DESC_fieldcolumn}<TD class=borderbody style="WIDTH: 450px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff" vAlign=middle {$MODEL_DESC_style}>{$MODEL_DESC_value} </TD>{END MODEL_DESC_fieldcolumn}

{BEGIN SERIAL_NUMBER_fieldcolumn}<TD style="WIDTH: 235px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff" vAlign=middle {$SERIAL_NUMBER_style}>&nbsp;{$SERIAL_NUMBER_value}</TD>{END SERIAL_NUMBER_fieldcolumn}{END grid_record}</TR>{END grid_row}{BEGIN grid_footer}

<TR class=blackshade>{BEGIN record_footer}

<TD class=blackshade

style="WIDTH: 108px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;</TD>

<TD class=blackshade

style="WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;</TD>

<TD class=blackshade

style="WIDTH: 450px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;</TD>{END record_footer}</TR></TFOOT>{END grid_footer}</TBODY></TABLE></DIV>{END grid_block}</DIV>

{BEGIN pagination_block}<DIV><B class=xtop><B class=xb1></B><B

class=xb2></B><B class=xb3></B><B class=xb4></B></B>

<DIV class=xboxcontent id="pagination_block{$id}">{$pagination}</DIV><B

class=xbottom><B class=xb4></B><B class=xb3></B><B class=xb2></B><B

class=xb1></B></B></DIV>{END pagination_block}

{BEGIN message_block}<DIV><B class=xtop><B class=xb1></B><B

class=xb2></B><B class=xb3></B><B class=xb4></B></B>

<DIV class=xboxcontent id=message_block>{$message}</DIV><B

class=xbottom><B class=xb4></B><B class=xb3></B><B class=xb2></B><B

class=xb1></B></B></DIV>{END message_block}{$footer} </DIV>

<DIV>&nbsp;</DIV>

<DIV>&nbsp;</DIV>

<DIV>&nbsp;</DIV>

<DIV>&nbsp;</DIV>

<DIV>&nbsp;</DIV>

<DIV>&nbsp;</DIV>

<DIV>&nbsp;</DIV>

<DIV>&nbsp;</DIV>

<DIV></DIV></DIV>

<DIV>

<TABLE style="WIDTH: 700px; HEIGHT: 33px" cellSpacing=1 cellPadding=1

width=700 border=0>

<TBODY>

<TR>

<TD

style="WIDTH: 700px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff"

colSpan=2>

<P>By signing this work order you as an employee/contractor agree

that you are responsible for</P></TD></TR>

<TR>

<TD style="WIDTH: 700px; BORDER-BOTTOM: #000000 1px solid"

colSpan=2>returning this equipment at exit or when requested by the

issuer.&nbsp;</TD></TR>

<TR>

<TD

style="WIDTH: 349px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>User

Signature&nbsp;</STRONG>&nbsp; &nbsp;&nbsp;

_____________________________</TD>

<TD style="WIDTH: 370px">&nbsp;<STRONG>Technician Name

</STRONG>_____________________________</TD></TR>

<TR>

<TD

style="WIDTH: 349px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>User

Name (Print)</STRONG>&nbsp;_____________________________</TD>

<TD style="WIDTH: 370px">&nbsp;<STRONG>Technician Badge

____________________</STRONG></TD></TR>

<TR>

<TD

style="WIDTH: 349px; WHITE-SPACE: normal; BACKGROUND-COLOR: #ffffff">&nbsp;<STRONG>Date

____________________</STRONG></TD>

<TD style="WIDTH: 370px">&nbsp;<FONT size=0>Alt

WorkOrder#</FONT><FONT size=0>{$PROJECT_CODE_value}&nbsp;WorkOrder#{$WORKORDER_NUMBER_value}</FONT></TD></TR></TBODY></TABLE></DIV></TD></TR>

<DIV></DIV></TBODY>

<DIV></DIV></DIV>{END body}</BODY></HTML>


Can you offer any suggestions? Is there something wrong with the code above? I tried your suggestion for inserting the php code snippet but it didn't work.
Thank you for all of your help,
-joker

A
ann 6/18/2010

Hi,
It's difficult to tell you what's happening without seeing actual files.

Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.