Suivez et participez au développement du nouvel OpenCellar : PLOC.co
> Open Cellar for Windows
> Help Center
> FAQ
> Download Center
> Enter the Forum
> Version history
> Developers resources
> Open Cellar for Mobile
> Help Center
> FAQ
> Download Center
> Enter the Forum
> Version history
> Open Cellar for Mac/Linux
> Help Center
> FAQ
> Download Center
> Enter the Forum
> Version history
> Developers resources
> My Account
> My Live services
> My pages
> My library
> My published wines
> My labels
> My posted messages
> Write a page
> Open Cellar Forum Index
> Windows Forum
> Mac/Linux Forum
> Mobile Forum
> Search for and import wines
> Search for labels
> Compare prices (Sniffer)
Search:
> Search with all engines
> Search in forums
> Search in personal pages
> Search on open-cellar.com
> Search in wine cards
> Search in labels
> Search in price comparison tool (Sniffer)
Welcome (
connect
-
create an account
)
Home
»
The forum
»
Open Cellar Home Edition (Windows)
Nuage de tags
Open Cellar
Scripts
Etiquette
PPP
Cellar book
Mac
Vista
Synchronisation
Excel export
vinoXml
usb
sniffer
backup
import
printing
chardonnet
palm
statistics
Linux
Impressions
10/09/2007
Reply
Impressions
Finot Jacques
3 posts
Comment faire pour Imprimer le contenu texte de ma cave
idem pour imprimer sous forme de tableau excel
Merci d'avance
J.Finot
[AdminEdit : déplacé, car posté sur le forum anglais.]
12/09/2007
Reply
Re : Impressions
Administrateur
3099 posts
Le script suivant vous imprimera les vins contenu dans la fenetre Ma cave - mode texte.
Pour l'executer pointez sur le menu Préférences -> Editeur de scripts
if(App.ActiveCellar == null) { MessageBox.Show("Aucune cave ouverte"); return; } App.SetCursor(true); // // Modifiez ici le titre du report // string reportName = "Liste des vins"; // // Creation entete report // ReportTable rt = new ReportTable(reportName); // // Région // ReportColumn rcArea = rt.NewColumn("Région"); rcArea.Size = 100; // // Appellation // ReportColumn rcApp = rt.NewColumn("Appellation"); rcApp.Size = 140; // // Classement // ReportColumn rcCl = rt.NewColumn("Classement"); rcCl.Size = 100; // // Nom // ReportColumn rcName = rt.NewColumn("Nom"); rcName.Size = 215; // // Couleur // ReportColumn rcColor = rt.NewColumn("Couleur"); rcColor.Size = 60; // // Année // ReportColumn rcYear = rt.NewColumn("Année"); rcYear.Size = 40; rcYear.ContentAlignment = ReportContentAlignment.Right; rcYear.DataType = ReportColumnType.Numeric; // // Nombre bouteilles // ReportColumn rcBottles = rt.NewColumn("Btles"); rcBottles.Size = 40; rcBottles.ContentAlignment = ReportContentAlignment.Right; rcBottles.DataType = ReportColumnType.Numeric; // // Prix // ReportColumn rcPrice = rt.NewColumn("Prix"); rcPrice.Size = 55; rcPrice.ContentAlignment = ReportContentAlignment.Right; rcPrice.DataType = ReportColumnType.Numeric; IWineListWindow listWindow = (IWineListWindow)App.GetWindow(WindowType.WineList); if(listWindow != null) { listWindow.Show(); BindingList list = listWindow.Wines; for (int i = 0; i < list.Count; i++) { Wine wine = list[i]; ReportRow row = rt.NewRow(); int colorIndex = 4; row[0] = wine.Area.Name; row[1] = wine.Appellation.Name; row[2] = wine.Classification.Name; row[3] = wine.Name; row[colorIndex] = "Champ"; if(wine.WineColor == ColorType.Red) { row[colorIndex] = "Rouge"; } else if(wine.WineColor == ColorType.White) { row[colorIndex] = "Blanc"; } else if(wine.WineColor == ColorType.Rosy) { row[colorIndex] = "Rosé"; } else if(wine.WineColor == ColorType.Yellow) { row[colorIndex] = "Champ"; } else if(wine.WineColor == ColorType.LiqueurLike) { row[colorIndex] = "Liq"; } else if(wine.WineColor == ColorType.Misc) { row[colorIndex] = "Autre"; } if(wine.Year != 0) { row[5] = wine.Year.ToString(); } // // Gestion manuelle // if(wine.ManualManagement) { row[6] = wine.Bottles.ToString(); } else { row[6] = wine.RackItems.Count.ToString(); } row[7] = wine.BuyPrice.ToString("f"); } } // // Tri des elements // rt.Sort("0-0;1-0"); // // Génération // System.Collections.ArrayList list2 = new System.Collections.ArrayList(); list2.Add(rt); IReport report = App.ReportEngine.GetSystemReport(PredefinedReport.Grid); string destFileName = App.Path + "Cache\\UserReport2.pdf"; bool success = false; try { report.Create(list2, destFileName); success = true; } catch(Exception ex) { MessageBox.Show("Erreur (1)"); } // // Affichage du report // if(success) { IShellWindow shellWindow = (IShellWindow)App.GetWindow(WindowType.Shell, null); if(shellWindow != null) { shellWindow.Start(destFileName); } } App.SetCursor(false);
Matthieu
25/10/2007
Reply
Re : Impressions
Clodi
2 posts
Bonjour,
est-il possible de choisir ce que l' on veut imprimer et dans quel ordre ? Par ex. Pays,appellation,nom,cépage,année,couleur,bouteille,commentaire.
29/10/2007
Reply
Re : Impressions
Clodi
2 posts
C' est ok pour moi. Problème résolu. Merci pour ce soft vraiment génial !
© 2006-2014
Matthieu DUCROCQ
- All rights reserved - Last update: january 2014 |
|
Support Open Cellar
|
Contact
|
About