welcome to today's video in this video I'll show you how to retrieve the available pipelines from the RTM report the available pipeline allows you to extract report data from an existing report Table and reform using SQL language this includes action like sorting column or grouping as a new pipeline tailored to your specific needs in today's tutorial we'll teach you on sorting invoice reports by delivery date and item code such as arranging invoices from the earliest to the latest by default reports display data in the order they are entered this tutorial will show you how to
customize the Sorting to fix your needs let's get started step one declaration variables to continue with our main topic of sorting by delivery date and item code click on the calculation icon then select declarations here you'll need to create a name for your variable we recommend following a sequential naming convention such as SQL 5 in this case to make it easier to differentiate once that's done right click and select compile to check for errors and ensure accuracy step two procedure Global uncreate click on event here you'll need to input the SQL query for SQL 5
from document detail and sort by delivery date and item code then start by ksql 5 colon equals select asterisk the asterisk captures all fields from the documentor detail table if you prefer to capture specific Fields you can replace the asterisk with Fields such as docky delivery date item code Etc continue by typing from document detail ensuring it is enclosed in straight quotes add a plus symbol and open another set of straight quotes to specify the Sorting criteria using order by docky delivery date item code to sort by docky delivery date and item code close the
straight quotes and finish the statement with a semicolon finally right click and select compile next we will move on to step three procedure report before print step 3.1 local SQL select click on event handl and select procedure report before print in some cases the RTM report might not display the report before print option in event handlers if this happens simply right click select events and then click on report to locate the before print option after that click on language and select utility drag the local SQL select function into the calculation area and you'll see parameters
that need to be filled in accordingly for the parameter ADB pipeline this represents the data pipeline where the query result will be stored in this example you need to input plsql 5 which you renamed earlier note that PL is required as part of sql's naming convention followed by SQL 5 you declared earlier finally the parameter a sort by specifies the Sorting field which in this case is docky delivery date and item code remember to input docky first then only enter the Sorting Fields as delivery date item code enclosed in straight quotes once every everything is
entered correctly you can proceed to the next steps to complete the configuration step 3.2 set data pipeline field link example of a data pipeline field link is not required the set data pipeline field link is used to link to other data pipeline however for reports like sales invoice 3 sales discount where the main data pipeline plsql 0 is already used as the primary data linking to other data pipeline is unnecessary now we will show you an example of how to set data pipeline link since detail pipeline is a new field we are creating it needs
to be properly linked to the main data pipeline to establish this connection we will use docky as the linking key the docky ensures that the data in the main tab is correctly matched with the data in the document details when the docky values in both the main data and the document details are the same it confirms that the two sections are successfully linked and can be used together for further processing preview the report and you'll see that the docky values matches 68 next we will move on to set data pipeline field link this is the
formula that we need to key and follow by the parameters the set data pipeline field link function is used to link the master and detail data pipeline a master data pipeline refers to the main data pipeline while a detail data pipeline refers to the newly create data pipeline a master fields are the key fields in the master data Pipeline and AD detail fields are the corresponding fields in the detailed data pipeline in order to link to main data pipeline start by typing set data pipeline field link then open the bracket first input main which represents
the master data pipeline followed by a comma next input plsql 5 which is the detail data pipeline we set up earlier after that input the linking Fields by typing docky enclosed in straight quotes followed by a comma and then input docky the reason we use docky here is that it serves as the key linking the two pipelines together it is crucial to ensure that the docky fields in both Pipelines match once the formula is complete right click and select compile to check for errors sometimes errors may occur if compile or save was not clicked during
the earlier steps don't worry you can resolve this by clicking save as to save it as a new report after reopening the report right click and select compile again as you can see the errors should no longer appear lastly we need to update the main to new pipeline which is changed to plsql 5 in the main and change all the fields to plsql five for the document detail as well as a result the items are now sorted by delivery date and those with the same date are further sorted by item code in alphabetical order instead
of the original invoice entry sequence and that's all for today's video thanks for watching subscribe to our YouTube for the latest video follow our Facebook for the latest update go to our website for reports and guides it's so easy