Contents SAS/IntrNet 9.1: SAS Design-Time Controls Previous Next

Modifying Output from the Controls

You can manually modify the Web page content that the Design-Time Control generates. For example, if you use the SAS Table Control to generate a SAS table and then want to add text to one of the column labels, you can either write a custom stored program to produce the desired output or you can manually change the output of the control.

If you choose to manually modify the control output, then you need to know a few things about the structure of the control in your Web page. The following example contains the Web page source code for a SAS Table Control.

  <!--metadata type="DesignerControl" startspan
  <object classid="clsid:6ED5010A-D596-11D3-87D7-00C04F2C0BF6" id="Table1"
  dtcid="1" width="48" height="48">
    <param name="_Version" value="65536">
    <param name="_ExtentX" value="1270">
    <param name="_ExtentY" value="1270">
    <param name="_StockProps" value="0">
    <param name="BrokerURL" value="/cgi-bin/broker.exe">
    <param name="DataSet" value="SASHELP.RETAIL">
    <param name="Debug" value="0">
    <param name="ProcessingMode" value="build">
    <param name="Program" value="sashelp.websdk1.ds2htm2.scl">
    <param name="Service" value="default">
    <param name="WebServer" value="mydomain.com">
  </object>
  -->
  <P>
 
  <TABLE BORDER="1" WIDTH="0%" CELLPADDING="1" CELLSPACING="1">
    <TR>
      <TH ALIGN="CENTER" VALIGN="MIDDLE"><FONT
  FACE="Arial,Helvetica,sans-serif">Retail sales in millions of $</FONT></TH>
      <TH ALIGN="CENTER" VALIGN="MIDDLE"><FONT
  FACE="Arial,Helvetica,sans-serif">DATE</FONT></TH>
      <TH ALIGN="CENTER" VALIGN="MIDDLE"><FONT
  FACE="Arial,Helvetica,sans-serif">YEAR</FONT></TH>
      <TH ALIGN="CENTER" VALIGN="MIDDLE"><FONT
  FACE="Arial,Helvetica,sans-serif">MONTH</FONT></TH>
      <TH ALIGN="CENTER" VALIGN="MIDDLE"><FONT
  FACE="Arial,Helvetica,sans-serif">DAY</FONT></TH>
    </TR>
  </TABLE>

  <P>
  <!--metadata type="DesignerControl" endspan-->

The control's source code begins and ends with HTML comments (highlighted in green). The starting comment is marked by the word startspan. The ending comment is marked by the word endspan. Within the starting comment is an OBJECT tag. The HTML code in the OBJECT tag specifies the stored parameter values for the control. These values represent the selections that were made in the Properties dialog for this control. Between the starting and ending comments is the table that the control generates (highlighted in blue).

Making Changes Permanent

In most HTML editors, you will need to remove the starting and ending comments in order to make your changes permanent. Otherwise, when you modify the control's properties or save the page, the control will regenerate its output and overwrite your changes.

In most HTML editors, you have to remove the starting and ending comments by hand. If you can access the Web page's HTML source code and find the control, delete the entire starting and ending HTML comment sections and then save the page.

If you use Microsoft Visual InterDev, then the editor helps you to remove the comments.

  1. Switch to Source mode by selecting the Source tab at the bottom of the document window.

  2. Bring up the pop-up menu for the control and select Convert to Run-time Text. Selecting this option cause the starting and ending comments to be removed and converts the control so that the output is all that remains. Now you can edit the content and your changes will remain.

Note: After you remove the starting and ending comments, you can no longer easily change the content back into a Design-Time Control.


Contents SAS/IntrNet 9.1: SAS Design-Time Controls Previous Next