Snippets contain predefined calculations that can be used in projects. This article walks you through the steps required to download and install snippets into the Jet Data Manager. We will also show an example of how one would use a snippet within a project and how to view the results.
1. To download snippets go the download page at https://www.jetreports.com/downloads/?product=jet-enterprise
2. Click Download Jet Enterprise .
3. Once your download has completed, navigate to the 1 - Jet Enterprise - REQUIRED folder.
Export the Snippet Library XML to a location on your machine.
1. Open the Jet Data Manager and Navigate to the Tools Tab → Administration → Snippets.
2. In the Snippets windows, click on the Import in the lower left-hand corner.
3. Locate the Snippet Library XML file and click Open.
4. When the Import Snippets window opens, click on Select All or select the snippets you want to import, then click OK.
5. Once back at the Snippet window, you should see your imported Snippets. Click Close.
Using a Snippet
Each snippet may be used differently depending on the application. For example there are snippets that calculate percents, time periods, inventory etc.. Use of a snippet will depend on the needs and requirements of the business.
In this example we will create a snippet that returns the sum for a given period.
1. From the Cubes tab navigate to the cube you would like to add your snippet to → Right Click Measures → Add Snippet → Time → Periods to Date (XTD)
2. The Snippet Measure Dialog will open. Provide a name in the Name field.
3. In the Format String filed add #,#. This will round to the nearest whole number.
Entering #,#.00 will format your string to add decimals
4. In the Associated Measure Group choose the measure group that the business function will belong to. In this example we will choose Posted Sales Transactions .
5. In the Parameters section under the Value filed select your Hierarchy Level . In this example we will select Month because we want to look at the quantity by month. Next Select your Measure. In this example select Quantity. Click OK to save your changes.
6. Deploy and execute your cube to put the changes into affect.
Viewing the Results in Excel
1. Open a connection to your cube. In this example we will connect to the Sales Cube. Under the Posted Sales Transaction measure group select Quantity and Quantity Month to Date
2. Next we will select our dimensions. Select Date YQMD and by Line Type
3. Expand a year and drill down to the month level. Here we can see the total quantity vs the Quantity Month to Date. Notice how the Quantity Month to Date keeps a running total. On 1/05/08 we see the value increase to 28,285 and on 1/07/08 we again see an increase to 46,021. This provides us with a very granular view of our data.