<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/tt/EnterpriseStudio/onlinemanual/rpt_query_based_reporting" xml:lang="en" UserLevel="Expert">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Query-based Reporting</Title>
		<Keyword ContextSensitive="No"><Level1>Reporting</Level1>
			<Level2>query-based reporting</Level2>
		</Keyword>
		<Keyword ContextSensitive="No"><Level1>Reporting</Level1>
			<Level2>reports</Level2>
		</Keyword>
		<Keyword ContextSensitive="No"><Level1>Reporting</Level1>
			<Level2>
                                    Reporting Studio
                                 </Level2>
		</Keyword>
	</Header>
	<GeneralSection><Paragraph class="Default">In Reporting Studio you can develop query-based reports that read data from the ERP LN database. A query-based report only reads data; it does not perform any transactions or updates, and therefore cannot be part of the business process.</Paragraph>
		<GeneralSection><SectionTitle>Architecture</SectionTitle>
			<Figure space-and-orientation="indented-estimated"><FigIntro>The following figure shows an architectural overview of the Reporting Studio and the Enterprise Server runtime environment.</FigIntro>
				<HTML:IMG height="347" width="697" SRC="../images/tr_graph_rpt_query_based_reporting1.gif" path="/enterpriseserver/tools/tt/enterprisestudio/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="tr_graph_rpt_query_based_reporting1.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tt/enterprisestudio/images/tr_graph_rpt_query_based_reporting1.gif" ID="IDA530AC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/><FigCaption>Query-based reporting architecture</FigCaption>
			</Figure>
			<Paragraph class="Default">
                                    Reporting Studio uses the Infor JDBC driver to connect to the ERP LN query-based data source. The Infor JDBC connector must be available on the development client machine. The JDBC connector uses the JBDB API to connect to the ERP LN database driver.</Paragraph>
		</GeneralSection>
		<Note><SectionTitle>
                                    Note
                                 </SectionTitle>
			<List><ListItem>In ERP LN, the report designs are stored in the Reports (ttadv330) table. The runtime files are stored in the report sources folder and have a ".rptdesign" filename extension.</ListItem>
				<ListItem>When you run a report, WebTop downloads the report design to your machine.</ListItem>
			</List>
		</Note>
		<GeneralSection><SectionTitle>Resource files</SectionTitle>
			<Paragraph class="Default">The report designs are language independent.</Paragraph>
			<Paragraph class="Default">When you want to insert label and text elements in a report, you specify resource keys rather than static text. The report design is linked to one or more resource files that contain the resource keys and their values.</Paragraph>
			<Paragraph class="Default">You can create resource files per ISO 639-1 language code and ISO 3166 country code.</Paragraph>
			<Paragraph class="Default">In this way you can localize report titles, column headings, chart titles, and other static labels.</Paragraph>
			<Paragraph class="Default">When you print a report, WebTop passes the locale to the Report Viewer. The locale of the machine is not used. Therefore, when you create resource files, you must use the same language – country codes as WebTop does.</Paragraph>
			<Paragraph class="Default">When you print a report, the Report Viewer uses the locale passed by WebTop, the resource keys, and resource files to find the appropriate text value to display.</Paragraph>
			<Figure space-and-orientation="indented-estimated"><FigIntro>See the following figure for an example.</FigIntro>
				<HTML:IMG height="542" width="640" SRC="../images/tr_graph_rpt_query_based_reporting2.gif" path="/enterpriseserver/tools/tt/enterprisestudio/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="tr_graph_rpt_query_based_reporting2.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tt/enterprisestudio/images/tr_graph_rpt_query_based_reporting2.gif" ID="IDAQ40AC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/><FigCaption>Sample resource files</FigCaption>
			</Figure>
			<List><ListIntro>The figure shows the following elements:</ListIntro>
				<ListItem>Resource files for English, German, French, and Dutch. Each file contains the resource key "customer", and the corresponding localized text value.</ListItem>
				<ListItem>Report design. The design is linked to the resource files, and contains the resource key "customer".</ListItem>
				<ListItem>Report output when the report is run in the English, German, French, and Dutch locales.</ListItem>
			</List>
			<Note><SectionTitle>
                                       Note
                                    </SectionTitle>
				<List><ListItem>In ERP LN, the resource files are stored in the Additional Files table (ttadv270). The runtime files are stored in the additional files folder and have a ".properties" filename extension.</ListItem>
					<ListItem>When you run a report, WebTop downloads the locale-specific resource file to your machine.</ListItem>
				</List>
			</Note>
		</GeneralSection>
		<GeneralSection><SectionTitle>Report libraries</SectionTitle>
			<Paragraph class="Default">
                                    Reporting Studio supports the use of shared report elements through libraries: You can create report libraries that contain code you want to share in multiple reports, and link them to your query-based report designs.</Paragraph>
			<Note><SectionTitle>
                                       Note
                                    </SectionTitle>
				<List><ListItem>In ERP LN, the report libraries are stored in the Reports (ttadv330) table. The runtime files are stored in the report sources folder and have a ".rptlibrary" filename extension.</ListItem>
					<ListItem>When you run a report, WebTop downloads the report libraries, which are linked to the report design, to your machine.</ListItem>
				</List>
			</Note>
		</GeneralSection>
		<GeneralSection><SectionTitle>Setup</SectionTitle>
			<ProcedureList><ListIntro>To set up query-based reporting, you must:</ListIntro>
				<ListItem>Create a report project. For details, refer to <Link href="/baanerp/tt/EnterpriseStudio/onlinemanual/rpt_create_report_project" role="manual">To create a report project</Link>.</ListItem>
				<ListItem>Create query-based report designs. For details, refer to <Link href="/baanerp/tt/EnterpriseStudio/onlinemanual/rpt_create_query_based_reports" role="manual">To create query-based reports</Link>. When you design a report, you must also create the required resource files and libraries, and link them to the report design. For details, refer to <Link href="/baanerp/tt/EnterpriseStudio/onlinemanual/rpt_create_resource_files" role="manual">To create resource files</Link> and <Link href="/baanerp/tt/EnterpriseStudio/onlinemanual/rpt_create_report_libraries" role="manual">To create report libraries</Link>.</ListItem>
				<ListItem>Add the report to a WebTop homepage, or create a 4GL session and link the report to this session. For details, refer to <Link href="/baanerp/tt/EnterpriseStudio/onlinemanual/rpt_create_print_session_for_query_based_reports" role="manual">To create a print session for query-based reports</Link>.</ListItem>
			</ProcedureList>
		</GeneralSection>
		<GeneralSection><SectionTitle>Implementation</SectionTitle>
			<Paragraph class="Default">You can execute a query-based report from a WebTop homepage, and through a 4GL print session on the ERP LN server.</Paragraph>
			<Paragraph class="Default">For details, refer to <Link href="/baanerp/tt/EnterpriseStudio/onlinemanual/rpt_run_query_based_reports" role="manual">To run query-based reports</Link>.</Paragraph>
		</GeneralSection>
	</GeneralSection>
</ManualTopic>
