Run Report from Command Line
1 min
the dairycomp command line allows you to enter simple commands (such as or ) or saved, predefined command abbrevations (such as cowsdue or cow2dry ) to launch tools however, you can also enter command strings to run reports in this case, the command line syntax is a bit more complex it can be confusing if you don't recognize what the different parts of the command string represent for example, when you see the command below, would you know what each part represents and what you will see in the report after you run it? \<font color="#6b7280"> \</font> \<font color="#6b7280"> \</font> \<font color="#6b7280"> =4 \>90 \</font> if you're not quite sure, then the tutorial below is for you! once you begin to understand the basic command line syntax, you can craft reports that meet your exact needs tutorial create a report in the command line let's get started! open up dairycomp and then follow the steps below to create a simple report, customize the list, and then sort the results let's start by entering a report command in the command line, type \<font color="#6b7280"> \</font> and press enter congratulations, you have created a simple report! it shows ( ) the numbers ( ) and milk weights ( ) for all animals in your cowfile understanding the difference between and and are both commonly used commands in dairycomp that are used to create reports the important difference between them is that displays the report on the screen, while sends the report directly to the printer if printing is disabled, and behave in exactly the same way now suppose you decide you also want to see their lactation number press the escape (esc) key to get back to the command line, and then press the up‑arrow on your keyboard to bring the last command back then add the item to your command, and press enter to update your report \<font color="#6b7280"> \</font> now your report has the lactation numbers in it as well how did we know to use for lactation number? hint use the f1 key tip if you’re not sure what command you need to enter for a specific item, you can press f1 to view a pick list from there, you can double click on an item to add it to the command line at this point, note that your report includes quite a long list this is because it contains all of the animals in your cowfile suppose you only want to show animals in a certain pen, say for instance, in pen 4 that’s easy — just add =4 to the end of your command the first instance of the word tells the system to actually show the pen number the word in a command tells the report that you want to customize (i e , filter) your results down to specific conditions— in this case, to show only ids that are in pen 4 type the following command and press enter to update your report \<font color="#6b7280"> \</font> \<font color="#6b7280"> \</font> \<font color="#6b7280"> =4 \</font> tip remember you can click in the command line and press the up‑arrow on your keyboard to display the last command you entered the updated report still shows the animal ids, milk weights, and lactation numbers, but now it only shows them for the animals in pen 4 note that the total number of results at the bottom of the page has changed you can customize your list further if you want for instance, maybe you only want to include pen 4 animals that are milking over 90 pounds that’s easy too; just add another condition to your command in this case, you would add >90 \<font color="#6b7280"> \</font> \<font color="#6b7280"> \</font> \<font color="#6b7280"> =4 \</font> \<font color="#eab308"> \>90 \</font> the last thing you might want to do is sort your list to help bring some order to it this is easy as well the word by means sort low to high and sorts high to low so to sort your list from highest to lowest milk weight, just add to the end of your command \<font color="#6b7280"> \</font> \<font color="#6b7280"> \</font> \<font color="#6b7280"> =4 \>90 \</font> \<font color="#eab308"> \</font> tip note that the last command above is the same one you saw before starting the tutorial it should make much more sense now! there are many ways you can customize this simple report to meet your needs, but understanding the options above is the basis for all dairycomp report commands if you want to delve deeper into other command line options, see command line docid\ u nbrveqbf6nzsp1bc9e0