issue69:libreoffice
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue69:libreoffice [2013/04/30 16:10] – [1] auntiee | issue69:libreoffice [2013/05/09 12:05] (Version actuelle) – [5] fcm_-_ekel | ||
---|---|---|---|
Ligne 15: | Ligne 15: | ||
Les requêtes interrogent la base de données pour des informations spécifiques qui s'y trouvent. Il y a trois façons de créer une requête : avec l' | Les requêtes interrogent la base de données pour des informations spécifiques qui s'y trouvent. Il y a trois façons de créer une requête : avec l' | ||
- | Cliquez sur Requêtes dans le volet Base de données, puis cliquez sur Créer une requête en mode Ébauche dans le volet Tâches. Une ébauche de Requête s' | + | Cliquez sur Requêtes dans le volet Base de données, puis cliquez sur Créer une requête en mode Ébauche dans le volet Tâches. Une ébauche de Requête s' |
===== 2 ===== | ===== 2 ===== | ||
- | You now have a query to use in creating multiple reports for your database. If you're curious about the SQL used to create your query, you can right-click on the newly created query and select Edit in SQL View. This brings up the SQL View with the complete SQL statement for the query you just created. I wouldn' | + | **You now have a query to use in creating multiple reports for your database. If you're curious about the SQL used to create your query, you can right-click on the newly created query and select Edit in SQL View. This brings up the SQL View with the complete SQL statement for the query you just created. I wouldn' |
Creating A Report | Creating A Report | ||
Ligne 26: | Ligne 26: | ||
There is only one way to create a report – use the wizard. Select Reports in the Database pane and click on Use Wizard to Create Report. A report template window will appear with the report wizard. You can actually watch your template fill in as you go through the steps of the wizard, giving you some ideas about how your final report will look. | There is only one way to create a report – use the wizard. Select Reports in the Database pane and click on Use Wizard to Create Report. A report template window will appear with the report wizard. You can actually watch your template fill in as you go through the steps of the wizard, giving you some ideas about how your final report will look. | ||
- | In step 1, you will pick your query and the fields to use in the report. If not selected already, select the AllFields query we just created. Move all the fields into the Fields in report box by clicking on the >> button. If you wanted to create a report that uses just some of the fields, you would just select the required fields. For our report, we will use all the fields. Click Next. | + | In step 1, you will pick your query and the fields to use in the report. If not selected already, select the AllFields query we just created. Move all the fields into the Fields in report box by clicking on the >> button. If you wanted to create a report that uses just some of the fields, you would just select the required fields. For our report, we will use all the fields. Click Next.** |
+ | |||
+ | Vous avez maintenant une requête que vous pouvez utiliser pour créer des rapports multiples pour votre base de données. Si vous souhaitez en savoir plus sur le SQL utilisé pour créer votre requête, vous pouvez faire un clic droit sur la requête nouvellement créée et sélectionner Modifier en mode SQL. Le mode SQL s' | ||
+ | |||
+ | La création d'un rapport | ||
+ | |||
+ | Un rapport exécute une requête et met les résultats de celle-ci en un format utilisable. Vous pouvez créer beaucoup de rapports différents avec la requête que nous avons créée - selon votre façon de regrouper les données trouvées par la requête. Nous allons créer un rapport pour le tri des livres par type de média et je suggérerai comment vous pourrez créer d' | ||
+ | |||
+ | Il n'y a qu'une seule façon de créer un rapport : utiliser l' | ||
+ | |||
+ | À la première étape, vous choisirez la requête et les champs qui seront utilisés pour le rapport. Si vous ne l'avez pas déjà fait, sélectionnez la requête TouslesChamps que nous venons de créer. Déplacez tous les champs de Champs disponibles vers Champs du rapport en cliquant sur le bouton >>. Si vous vouliez créer un rapport qui ne se sert que de quelques-uns des champs, vous ne sélectionneriez que les champs voulus. Pour notre rapport, nous allons utiliser tous les champs. Cliquez sur Suivant. | ||
===== 3 ===== | ===== 3 ===== | ||
- | Step 2 is labeling our fields. Here we specify how the fields are labeled in our report. Change the label for Type to Media Type, and Name to Author(s). Click Next. | + | **Step 2 is labeling our fields. Here we specify how the fields are labeled in our report. Change the label for Type to Media Type, and Name to Author(s). Click Next. |
We create our groupings in step 3. Groupings control how the fields are consolidated and arranged in the report. Grouping is important, because we can use it to create a whole different report depending on how we group the fields. For example, if you wanted to create a report of titles by author, you would make Name your first grouping, then Title as a sub-group. For our report, we are creating a report of Titles by Media Type, so our grouping order is Type, Title, Published. We add published because, if there is more than one author, the published date will repeat in the report template, a byproduct we don't want. We exclude the Name field because if there is more than one author, we want them listed together. Click Next. | We create our groupings in step 3. Groupings control how the fields are consolidated and arranged in the report. Grouping is important, because we can use it to create a whole different report depending on how we group the fields. For example, if you wanted to create a report of titles by author, you would make Name your first grouping, then Title as a sub-group. For our report, we are creating a report of Titles by Media Type, so our grouping order is Type, Title, Published. We add published because, if there is more than one author, the published date will repeat in the report template, a byproduct we don't want. We exclude the Name field because if there is more than one author, we want them listed together. Click Next. | ||
- | Sorting is done in step 4, but we don't have much use for it here. You will notice that you can change only whether the sorting is ascending or descending for our groupings. In the fourth box, select Name and leave on Ascending. Click Next. | + | Sorting is done in step 4, but we don't have much use for it here. You will notice that you can change only whether the sorting is ascending or descending for our groupings. In the fourth box, select Name and leave on Ascending. Click Next.** |
+ | |||
+ | Il faut maintenant (étape 2) étiqueter les champs. C'est ici que nous précisons comment les champs doivent être étiquetés dans le rapport. Changez le nom de Type en Type de média et le Nom en Auteur(s). Cliquez sur Suivant. | ||
+ | |||
+ | Lors de l' | ||
+ | |||
+ | Le tri est fait à l' | ||
===== 4 ===== | ===== 4 ===== | ||
- | In step 5, we can choose a layout for the data and the header. There are several for each, and they change the look of the report. I left mine at the defaults, but feel free to play around with these options. Under the Layout of data list box, you can select whether the report is landscape or portrait. For this report, I think portrait will work best. Click Next. | + | **In step 5, we can choose a layout for the data and the header. There are several for each, and they change the look of the report. I left mine at the defaults, but feel free to play around with these options. Under the Layout of data list box, you can select whether the report is landscape or portrait. For this report, I think portrait will work best. Click Next. |
- | The final step is where we create the report. You can give it a title, indicate how the report is used, and what to do with the report. For this report, give it a title of TitleByType. Now, we need to answer the two questions. What type of report do you want to create? A static report is a one time report. It cannot change. Once it is created, the data is fixed. If, however, you want a report you can re-use, you want a dynamic report. A dynamic report is just a template you can use over again. For this report, we want a dynamic report we can use again, so select Dynamic. How do you want to proceed after creating report? Modify report layout will allow you to edit the report as a writer document. Create report now is obvious; it will fill in the data and generate the report. We can always edit the layout later, so we will select Create report now. Click Finish. | + | The final step is where we create the report. You can give it a title, indicate how the report is used, and what to do with the report. For this report, give it a title of TitleByType. Now, we need to answer the two questions. What type of report do you want to create? A static report is a one time report. It cannot change. Once it is created, the data is fixed. If, however, you want a report you can re-use, you want a dynamic report. A dynamic report is just a template you can use over again. For this report, we want a dynamic report we can use again, so select Dynamic. How do you want to proceed after creating report? Modify report layout will allow you to edit the report as a writer document. Create report now is obvious; it will fill in the data and generate the report. We can always edit the layout later, so we will select Create report now. Click Finish.** |
+ | |||
+ | C'est à l' | ||
+ | |||
+ | L' | ||
===== 5 ===== | ===== 5 ===== | ||
- | Base generates our report and displays it in a Writer window. This generated report is read-only. If you want to edit the text or layout of the report, close it. In the Reports pane, right-click your report and edit. This opens the report template in Writer, where you can add text, graphics, etc, just like you would in any Writer document. Just take care when changing anything in the cells where the data is plugged in. | + | **Base generates our report and displays it in a Writer window. This generated report is read-only. If you want to edit the text or layout of the report, close it. In the Reports pane, right-click your report and edit. This opens the report template in Writer, where you can add text, graphics, etc, just like you would in any Writer document. Just take care when changing anything in the cells where the data is plugged in. |
In this How-to, we created a query and a report. Play around with the grouping and sorting settings in the report wizard and see just how many different reports you can create from the one query we created. | In this How-to, we created a query and a report. Play around with the grouping and sorting settings in the report wizard and see just how many different reports you can create from the one query we created. | ||
- | Next time, we will use macros to create enhancements to our database and make it act more like an application. | + | Next time, we will use macros to create enhancements to our database and make it act more like an application.** |
+ | |||
+ | Base génère notre rapport et l' | ||
+ | |||
+ | Dans ce tutoriel, nous avons créé une requête et un rapport. Jouez un peu avec les paramètres de groupe et de tri dans l' | ||
+ | |||
+ | La prochaine fois, nous utiliserons des macros pour améliorer notre base de données de sorte qu' |
issue69/libreoffice.1367331047.txt.gz · Dernière modification : 2013/04/30 16:10 de auntiee