<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/tt/onlinemanual/100130" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">4GL Reports Overview</Title>
		<Keyword ContextSensitive="No"><Level1>4GL Reports</Level1>
		</Keyword>
		<Keyword ContextSensitive="No"><Level1>Reports</Level1>
		</Keyword>
		<Keyword ContextSensitive="No"><Level1>Report scripts</Level1>
		</Keyword>
	</Header>
	<GeneralSection ID=""><Paragraph class="Default">
                              ERP LN 4GL reports are used to output data from the database to a variety of devices (for example, printers, displays, and files).</Paragraph>
		<Paragraph class="Default">One or more ERP LN 4GL reports must be linked either to an ERP LN print session or to an ERP LN SQL Query. The print session or SQL Query reads the data from the Database tables and the data will be printed by the Report objects.</Paragraph>
		<Paragraph class="Default">4GL reports can automatically generated on two ways:</Paragraph>
		<List><ListItem>By creating a Print session</ListItem>
			<ListItem>By creating a SQL Query</ListItem>
		</List>
		<Paragraph class="Default">
                              ERP LN 4GL reports contain one or more of the following layouts:</Paragraph>
		<List><ListItem><Link href="/baanerp/tt/domains/adv.layt#before.report" role="option">Before.report</Link>
			</ListItem>
			<ListItem><Link href="/baanerp/tt/domains/adv.layt#header" role="option">Header</Link>
			</ListItem>
			<ListItem><Link href="/baanerp/tt/domains/adv.layt#before.field" role="option">Before.field</Link>
			</ListItem>
			<ListItem><Link href="/baanerp/tt/domains/adv.layt#detail" role="option">Detail</Link>
			</ListItem>
			<ListItem><Link href="/baanerp/tt/domains/adv.layt#after.field" role="option">After.field</Link>
			</ListItem>
			<ListItem><Link href="/baanerp/tt/domains/adv.layt#footer" role="option">Footer</Link>
			</ListItem>
			<ListItem><Link href="/baanerp/tt/domains/adv.layt#after.report" role="option">After.report</Link>
			</ListItem>
		</List>
		<Paragraph class="Default">The contents and layouts of 4GL reports are defined in the data dictionary. In addition, you can link a report script to a report. In a report script, you can program actions that you want to be performed at particular stages of the report execution. For example, you can create a script to perform calculations on the report data or to read records from related tables that are not automatically available to the report.</Paragraph>
		<Paragraph class="Default">You program report scripts in the same way as you program 4GL program scripts, except that report scripts use different event sections and some special functions.</Paragraph>
		<Paragraph class="Default">A report script consists of one or more event sections in which you program actions to be performed at particular states of execution of the report to which the report script is linked. The statements programmed in a report script section consist of a combination of 3GL language statements and report script functions.</Paragraph>
		<Paragraph class="Default">Report scripts support the following event sections:</Paragraph>
		<List><ListItem>program sections</ListItem>
			<ListItem>report sections</ListItem>
			<ListItem>text field sections</ListItem>
		</List>
		<Paragraph class="Default">The following program sections can be used:</Paragraph>
		<List><ListItem>declaration</ListItem>
			<ListItem>before.program</ListItem>
			<ListItem>after.program</ListItem>
			<ListItem>after.receive.data</ListItem>
			<ListItem>functions</ListItem>
		</List>
		<Paragraph class="Default">The following report sections can be used:</Paragraph>
		<List><ListItem>before.report</ListItem>
			<ListItem>after.report</ListItem>
			<ListItem>header</ListItem>
			<ListItem>footer</ListItem>
			<ListItem>before.field</ListItem>
			<ListItem>after.field</ListItem>
			<ListItem>detail</ListItem>
		</List>
		<Note><SectionTitle>
                                 Note
                              </SectionTitle>
			<Paragraph class="Default">Report sections consist of a main section and a subsection. You use a main section to specify the particular layout for which the programmed actions are to be executed. You must follow a main section with either a <GUIRef href="" role="manual">before.layout</GUIRef> or an <GUIRef href="" role="manual">after.layout</GUIRef> subsection. These latter specify whether the actions are to be executed before or after the particular layout is printed.</Paragraph>
		</Note>
		<Paragraph class="Default">The following Special Report functions can be used in a Report script:</Paragraph>
		<List><ListItem>layout.again()</ListItem>
			<ListItem>need( expr )</ListItem>
			<ListItem>page()</ListItem>
			<ListItem>reset.suppress()</ListItem>
			<ListItem>skip( expr )</ListItem>
			<ListItem>skip.to( expr )</ListItem>
			<ListItem>to.page( expr )</ListItem>
		</List>
		<Paragraph class="Default">For details on Report scripts, refer to "Report Script Features" in the <DocRef>ERP LN 6.1 Programmer's Guide</DocRef> ( <Code>progguide.chm</Code> Help file), which is stored in the <Code>help</Code> folder in the installation folder of your Infor BW Client.</Paragraph>
		<Note><SectionTitle>
                                 Note
                              </SectionTitle>
			<Paragraph class="Default">The <Code>progguide.chm</Code> Help file is delivered with the Dynamic Form Editor ( DFE ). If the file is not present on your PC, you must first install the DFE from the ERP LN installation CD.</Paragraph>
		</Note>
	</GeneralSection>
	<RelatedTopics><SectionTitle>
                              Related topics
                           </SectionTitle>
		<RelTopic><Link href="/baanerp/tt/adv/ttadv3530m000" role="session">Reports (ttadv3530m000)</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/adv/ttadv3531m000" role="session">Report Layouts (ttadv3531m000)</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/adv/ttadv3532m000" role="session">Report Input Fields (ttadv3532m000)</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/stp/ttstpdisplay" role="session">Report Viewer (ttstpdisplay )</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/adv/ttadv3240m000" role="session">Compile Reports (ttadv3240m000)</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/adv/ttadv3144s000" role="session">Libraries by Report Script (ttadv3144s000)</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/adv/ttadv3430m000" role="session">Print Reports (ttadv3430m000)</Link>
		</RelTopic>
	</RelatedTopics>
</ManualTopic>
