<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/tt/EnterpriseStudio/onlinemanual/to_create_a_form_for_a_print_session" xml:lang="en" TopicType="Overview">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">To create a form for a print session</Title>
		<Keyword ContextSensitive="No"><Level1>
                                    Infor ERP LN Development Tools
                                 </Level1>
			<Level2>form</Level2>
		</Keyword>
		<Keyword ContextSensitive="No"><Level1>
                                    Infor ERP LN Development Tools
                                 </Level1>
			<Level2>print session</Level2>
		</Keyword>
	</Header>
	<AimSection><Paragraph class="Default">When you create a print session, you must also create the form for the session.</Paragraph>
		<List><ListIntro>The form is used to enter selection ranges and processing options.</ListIntro>
			<ListItem>Selection ranges specify a lower and upper range. Ranges are typically used for key fields or alternate key fields. The fields that are inserted on the form need to correspond to the program script variables that are used in the main SQL statement that selects rows from the database. You can extend the SQL statement to add additional range variables.</ListItem>
			<ListItem>Processing options are used to specify additional conditions for selecting rows, or for specifying the sort order. Some processing options will change the report group number so that a different report is selected automatically for the user.</ListItem>
		</List>
	</AimSection>
	<Important><SectionTitle>
                                 Important!
                              </SectionTitle>
		<Paragraph class="Default">For detailed information on the Dynamic Form Editor, refer to the Dynamic Form Editor's online help.</Paragraph>
	</Important>
	<GeneralSection><SectionTitle>Review Program Script</SectionTitle>
		<Paragraph class="Default">Before you create the form, it is helpful to review the program script. This is particularly true if you created the program script when you created the print session. The program script will contain the default selection ranges.</Paragraph>
		<Paragraph class="Default">You may have to extend the generated program script to query references to parent tables.</Paragraph>
		<Paragraph class="Default">See the following program script for an example:</Paragraph>
		<CodeBlock space-and-orientation="indented-estimated">|**********************************************************
|* cxoes0421  0  VRC B61U a  dv00
|* 
|* Development User              
|* 2005-02-07
|**********************************************************
|* Main table cxoes021 Suppliers, Form Type 4
|**********************************************************
                                                                                
|****************************** declaration section *******
declaration:

  table   tcxoes021 | Suppliers
  table   tcxoes031 | Countries

   extern  domain  cxsuno           suno.f    fixed
   extern  domain  cxsuno           suno.t    fixed

|****************************** program section ************

|****************************** group section **************
group.1:
init.group:
   get.screen.defaults()

|****************************** choice section *************
choice.cont.process:
on.choice:
   execute(print.data)

choice.print.data:
on.choice:
   if rprt_open() then
       read.main.table()
       rprt_close()
   else
       choice.again()
   endif

|****************************** field section ***************
field.suno.f:
when.field.changes:
   suno.t = suno.f

|****************************** function section ************
functions:

function read.main.table()
{
    select cxoes021.*, cxoes031.*
    from cxoes021, cxoes031
    where   cxoes021._index1 inrange {:suno.f}
                                    and {:suno.t}
    and     cxoes021.ccty refers to cxoes031
    order by cxoes021._index1
   selectdo
       rprt_send()
   endselect
}
</CodeBlock>
	</GeneralSection>
	<ProcedureSection><SectionTitle>Edit the Form</SectionTitle>
		<ProcIntro><Paragraph class="Default">Create the form for the print session. While you can create a form in a variety of ways, this procedure shows you how a typical form is setup for a print session.</Paragraph>
		</ProcIntro>
		<Steps><Step><StepTitle>Insert a Group</StepTitle>
				<ProcedureList><ListIntro>To insert a group in the form:</ListIntro>
					<ListItem>In the <GUIRef href="" role="session">Sessions (ttadv2500m000)</GUIRef> session, select the session for which you want to create the form.</ListItem>
					<ListItem>Click <GUIRef href="" role="command">Edit Form ...</GUIRef>. The Dynamic Form Editor starts.</ListItem>
					<ListItem>Insert a group for selection ranges.</ListItem>
				</ProcedureList>
				<Figure space-and-orientation="indented-estimated"><HTML:IMG height="266" width="414" SRC="../images/nt_screen_to_create_a_form_for_a_print_session1.gif" path="/enterpriseserver/tools/tt/enterprisestudio/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_to_create_a_form_for_a_print_session1.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tt/enterprisestudio/images/nt_screen_to_create_a_form_for_a_print_session1.gif" ID="IDAJP0AC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/><FigCaption>Insert Group</FigCaption>
				</Figure>
			</Step>
			<Step><StepTitle>Insert Labels</StepTitle>
				<Paragraph class="Default">Insert a label only field, with the label corresponding to “From”. Note that the position indicator is “above”.</Paragraph>
				<Paragraph class="Default">See the following table for an example of the Field Properties:</Paragraph>
				<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><THEAD><TR><TD rowspan="1" colspan="1">Field</TD>
							<TD rowspan="1" colspan="1">Input Value</TD>
						</TR>
					</THEAD>
					<TBODY><TR><TD rowspan="1" colspan="1">Field Name</TD>
							<TD rowspan="1" colspan="1">label.only</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Use Field as Label Only</TD>
							<TD rowspan="1" colspan="1">Yes</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Label Code</TD>
							<TD rowspan="1" colspan="1">ttgen.from</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Position</TD>
							<TD rowspan="1" colspan="1">Above</TD>
						</TR>
					</TBODY>
				</TABLE>
				<Paragraph class="Default">Insert a second label only field with a label code corresponding to “To”. The “To” label field is a child of the from label field.</Paragraph>
				<Paragraph class="Default">See the following table for an example of the Field Properties:</Paragraph>
				<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><THEAD><TR><TD rowspan="1" colspan="1">Field</TD>
							<TD rowspan="1" colspan="1">Input Value</TD>
						</TR>
					</THEAD>
					<TBODY><TR><TD rowspan="1" colspan="1">Field Name</TD>
							<TD rowspan="1" colspan="1">label.only</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Use Field as Label Only</TD>
							<TD rowspan="1" colspan="1">Yes</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Label Code</TD>
							<TD rowspan="1" colspan="1">ttgen.to</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Position</TD>
							<TD rowspan="1" colspan="1">Above</TD>
						</TR>
					</TBODY>
				</TABLE>
				<Figure space-and-orientation="indented-estimated"><HTML:IMG height="268" width="415" SRC="../images/nt_screen_to_create_a_form_for_a_print_session2.gif" path="/enterpriseserver/tools/tt/enterprisestudio/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_to_create_a_form_for_a_print_session2.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tt/enterprisestudio/images/nt_screen_to_create_a_form_for_a_print_session2.gif" ID="IDASP0AC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/><FigCaption>Insert Label Fields</FigCaption>
				</Figure>
			</Step>
			<Step><StepTitle>Insert Selection Fields</StepTitle>
				<Paragraph class="Default">The selection fields you insert on the form must correspond to the variables that are used in the main SQL statement in the program script.</Paragraph>
				<Paragraph class="Default">Insert the "From" field corresponding to the first selection field. This field is denoted as a table field name appended with a “.f”.</Paragraph>
				<Paragraph class="Default">See the following table for an example of the Field Properties:</Paragraph>
				<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><THEAD><TR><TD rowspan="1" colspan="1">Field</TD>
							<TD rowspan="1" colspan="1">Input Value</TD>
						</TR>
					</THEAD>
					<TBODY><TR><TD rowspan="1" colspan="1">Field Name</TD>
							<TD rowspan="1" colspan="1">suno.f</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Use Field as Label Only</TD>
							<TD rowspan="1" colspan="1"></TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Domain</TD>
							<TD rowspan="1" colspan="1">cx suno</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Form Field</TD>
							<TD rowspan="1" colspan="1">Yes, fmin($#)</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Label Code</TD>
							<TD rowspan="1" colspan="1">oes021.suno</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Position</TD>
							<TD rowspan="1" colspan="1">Before</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Zoom</TD>
							<TD rowspan="1" colspan="1">Session</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Zoom To</TD>
							<TD rowspan="1" colspan="1">cxoes0121m000</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Return Field</TD>
							<TD rowspan="1" colspan="1">cxoes021.suno</TD>
						</TR>
					</TBODY>
				</TABLE>
				<Paragraph class="Default">Insert the "To" field corresponding to the first selection field. This field is denoted as a table field name appended with a “.t”.</Paragraph>
				<Paragraph class="Default">See the following table for an example of the Field Properties:</Paragraph>
				<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><THEAD><TR><TD rowspan="1" colspan="1">Field</TD>
							<TD rowspan="1" colspan="1">Input Value</TD>
						</TR>
					</THEAD>
					<TBODY><TR><TD rowspan="1" colspan="1">Field Name</TD>
							<TD rowspan="1" colspan="1">suno.t</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Use Field as Label Only</TD>
							<TD rowspan="1" colspan="1"></TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Domain</TD>
							<TD rowspan="1" colspan="1">cx suno</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Form Field</TD>
							<TD rowspan="1" colspan="1">Yes, fmax($#)</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Label Code</TD>
							<TD rowspan="1" colspan="1"></TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Position</TD>
							<TD rowspan="1" colspan="1"></TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Zoom</TD>
							<TD rowspan="1" colspan="1">Session</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Zoom To</TD>
							<TD rowspan="1" colspan="1">cxoes0121m000</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Return Field</TD>
							<TD rowspan="1" colspan="1">cxoes021.suno</TD>
						</TR>
					</TBODY>
				</TABLE>
				<Figure space-and-orientation="indented-estimated"><HTML:IMG height="267" width="417" SRC="../images/nt_screen_to_create_a_form_for_a_print_session3.gif" path="/enterpriseserver/tools/tt/enterprisestudio/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_to_create_a_form_for_a_print_session3.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tt/enterprisestudio/images/nt_screen_to_create_a_form_for_a_print_session3.gif" ID="IDA1P0AC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/><FigCaption>Insert Selection Range Fields</FigCaption>
				</Figure>
			</Step>
			<Step><StepTitle>Edit Standard Commands</StepTitle>
				<Paragraph class="Default">Click <GUIRef href="" role="command">Standard Commands</GUIRef> on the <GUIRef href="" role="manual">Tools</GUIRef> menu. The <GUIRef href="" role="session">Standard Commands (ttadv3110s000)</GUIRef> session starts. Edit the Standard Commands for the form so that the following commands are available:</Paragraph>
				<TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated"><THEAD><TR><TD rowspan="1" colspan="1">Commands</TD>
							<TD rowspan="1" colspan="1">Available</TD>
						</TR>
					</THEAD>
					<TBODY><TR><TD rowspan="1" colspan="1">Modify Record(s)</TD>
							<TD rowspan="1" colspan="1">Yes</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Print Report</TD>
							<TD rowspan="1" colspan="1">Yes</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Cancel</TD>
							<TD rowspan="1" colspan="1">Yes</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Make Job</TD>
							<TD rowspan="1" colspan="1">Yes (Optional)</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Save Defaults</TD>
							<TD rowspan="1" colspan="1">Yes (Optional)</TD>
						</TR>
						<TR><TD rowspan="1" colspan="1">Get Defaults</TD>
							<TD rowspan="1" colspan="1">Yes (Optional)</TD>
						</TR>
					</TBODY>
				</TABLE>
			</Step>
			<Step><StepTitle>Save the form</StepTitle>
				<Paragraph class="Default">Save the form.</Paragraph>
				<Paragraph class="Default">You can view the effect of your changes from within the form editor: On the <GUIRef href="" role="manual">File</GUIRef> menu, click <GUIRef href="" role="manual">Show Details Session</GUIRef>. The session starts.</Paragraph>
				<Figure space-and-orientation="indented-estimated"><HTML:IMG height="245" width="314" SRC="../images/nt_screen_to_create_a_form_for_a_print_session4.gif" path="/enterpriseserver/tools/tt/enterprisestudio/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_to_create_a_form_for_a_print_session4.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tt/enterprisestudio/images/nt_screen_to_create_a_form_for_a_print_session4.gif" ID="IDAHQ0AC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/><FigCaption>Form Result</FigCaption>
				</Figure>
				<Paragraph class="Default">Save and Exit the form.</Paragraph>
			</Step>
		</Steps>
	</ProcedureSection>
	<RelatedTopics><SectionTitle>
                                 Related topics
                              </SectionTitle>
		<RelTopic><Link href="/baanerp/tt/EnterpriseStudio/onlinemanual/forms" role="manual">Forms</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/EnterpriseStudio/onlinemanual/to_create_forms" role="manual">To create forms</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/EnterpriseStudio/onlinemanual/to_edit_forms" role="manual">To edit forms</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/EnterpriseStudio/onlinemanual/to_create_reports" role="manual">To create reports</Link>
		</RelTopic>
	</RelatedTopics>
</ManualTopic>
