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
Rapport - Livre de cave (Filtre = que les vins en cave)
21/04/2006
Reply
Rapport - Livre de cave (Filtre = que les vins en cave)
Administrateur
3099 posts
// Imprimer livre de cave avec bouteilles > 0
App.Animate(AnimationType.Work, true);
// Affiche le curseur d'attente
App.SetCursor(true);
ArrayList wines = new ArrayList();
OpenCellar.Framework.Core.ObjectCollection winesCol = App.ActiveCellar.GetCollection((ushort)OpenCellar.Framework.Core.ObjectType.Wine);
// Alimente la source de données du report
for (int i = 0; i < winesCol.Count; i++)
{
// Filtrage
if(((OpenCellar.Framework.Core.Wine)winesCol[i]).RackItems.Count > 0)
{
wines.Add(winesCol[i]);
}
}
if(wines.Count > 0)
{
// Recupere une reference vers le report
IReport report = App.ReportEngine.GetSystemReport(PredefinedReport.WineCellarBook);
if(report != null)
{
string destFileName = App.Path + "Cache\\ListeDesVins2.pdf";
bool success = false;
try
{
report.Create(wines, destFileName);
success = true;
}
catch(Exception ex)
{
MessageBox.Show("Erreur");
}
// Rapport généré
if(success)
{
// On lance le fichier généré
IShellWindow shellWindow = (IShellWindow)App.GetWindow(WindowType.Shell, null);
if(shellWindow != null)
{
shellWindow.Start(destFileName);
}
}
}
}
App.SetCursor(false);
App.StopAnimate();
© 2006-2014
Matthieu DUCROCQ
- All rights reserved - Last update: january 2014 |
|
Support Open Cellar
|
Contact
|
About