

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
31 messages in org.openoffice.fr.prog[prog] Probleme concernant le datasou...| From | Sent On | Attachments |
|---|---|---|
| thom...@free.fr | Apr 15, 2005 5:51 am | |
| Laurent Godard | Apr 15, 2005 6:04 am | |
| thom...@free.fr | Apr 15, 2005 6:22 am | |
| thom...@free.fr | Apr 15, 2005 7:23 am | |
| Bernard Marcelly | Apr 15, 2005 7:43 am | |
| thom...@free.fr | Apr 15, 2005 7:59 am | |
| thom...@free.fr | Apr 18, 2005 12:05 am | |
| Bernard Marcelly | Apr 18, 2005 1:53 am | |
| thom...@free.fr | Apr 18, 2005 3:03 am | |
| thom...@free.fr | Apr 18, 2005 5:50 am | |
| thom...@free.fr | Apr 18, 2005 7:35 am | |
| Bernard Marcelly | Apr 18, 2005 9:40 am | |
| Thomas Coquery | Apr 20, 2005 5:48 am | |
| Thomas Coquery | Apr 20, 2005 6:35 am | |
| Thomas Coquery | Apr 20, 2005 7:55 am | |
| Laurent Godard | Apr 20, 2005 8:10 am | |
| Thomas Coquery | Apr 20, 2005 11:11 pm | |
| Josianne SAUVAGE | Apr 21, 2005 1:51 am | |
| will...@free.fr | Apr 21, 2005 2:07 am | |
| Thomas Coquery | Apr 21, 2005 2:08 am | |
| will...@free.fr | Apr 21, 2005 2:22 am | |
| Alain Nowak | Apr 21, 2005 7:30 am | |
| Josianne SAUVAGE | Apr 21, 2005 9:01 am | |
| Jean-Michel | Apr 21, 2005 9:06 am | |
| GV | Apr 21, 2005 10:20 am | |
| Josianne SAUVAGE | Apr 22, 2005 2:15 am | |
| Thomas Coquery | Apr 22, 2005 2:27 am | |
| Thomas Coquery | Apr 27, 2005 6:50 am | |
| Thomas Coquery | Apr 29, 2005 2:47 am | |
| Laurent Godard | Apr 29, 2005 3:06 am | |
| Thomas Coquery | Apr 29, 2005 6:15 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [prog] Probleme concernant le datasource dans un publipostage (ma table n'existe pas) | Actions... |
|---|---|---|
| From: | thom...@free.fr (thom...@free.fr) | |
| Date: | Apr 15, 2005 5:51:09 am | |
| List: | org.openoffice.fr.prog | |
Voilà, je dois réaliser un publipostage openoffice en le pilotant à partir d'une appli delphi. Ce publipostage concerne un .sxw et un .txt (avec des ";" comme séparateurs) Je sais réaliser un publipostage si la source existe dans openoffice, mon problème est que lors de l'installation de l'application , la source ne sera pas dans openoffice... Il me faut donc savoir la créer (on ne va pas demander à un utilisateur lambda de le faire). Je me suis donc renseigné et j'ai trouvé comment créer une DataSource... Celle ci se crée bien mais le problème est qu'elle ne contient aucune table... Comment puis je faire pour qu'elle en contienne ou que celles ci soient visibles.
Je vous passe mon code en même temps (juste pour la DataSource mais si quelqu'un veut le MailMerge en Delphi c'est tout à fait faisable)
procedure TTest.bt_creation_datasourceClick(Sender: TObject); var arguments:variant; PropertyValue :variant; CoreReflection: Variant; begin //création d'un database context qui contient toutes les sources de données //connait open office Datacontext:=OpenOffice.createInstance('com.sun.star.sdb.DatabaseContext'); //si openoffice connait la source src1 if Datacontext.hasbyname('src1') then Memo_Enumeration.Lines.Add('src1 trouvé') else begin // Core reflection est utilisé pour pouvoir créer des property value CoreReflection := OpenOffice.createInstance ('com.sun.star.reflection.CoreReflection'); // un tableau dynamique de propertyvalues arguments:= VarArrayCreate([0,7], varVariant);
CoreReflection.forName('com.sun.star.beans.PropertyValue').createObject(PropertyValue); PropertyValue.Name := 'Extension'; PropertyValue.Value := 'txt'; arguments[0]:= PropertyValue ; PropertyValue.Name := 'Charset'; PropertyValue.Value := 0; arguments[1]:= PropertyValue ; PropertyValue.Name := 'FixedLength'; PropertyValue.Value := true; arguments[2]:= PropertyValue ; PropertyValue.Name := 'HeaderLine'; PropertyValue.Value := true; arguments[3]:= PropertyValue ; PropertyValue.Name := 'FieldDelimiter'; PropertyValue.Value := ';'; arguments[4]:= PropertyValue ; PropertyValue.Name := 'StringDelimiter'; PropertyValue.Value := '"'; arguments[5]:= PropertyValue ; PropertyValue.Name := 'DecimalDelimiter'; PropertyValue.Value := '.'; arguments[6]:= PropertyValue ; PropertyValue.Name := 'ThousandDelimiter'; PropertyValue.Value := ','; arguments[7]:= PropertyValue ; //création de la datasource avec parametres Datasource:=OpenOffice.createInstance('com.sun.star.sdb.DataSource'); //enregistrement dans openoffice datacontext.registerObject('src1',Datasource); Datasource.URL:= 'sdbc:flat:file:///C:/Dossiers/coquery'; Datasource.Info:= arguments; connection:=datasource.getconnection('',''); {datasource.TableFilter.('essai'); datasource.TableTypeFilter.'TABLE';} datasource.TableTypeFilter.getType {connection.tables;} end; end; Je rappelle mon problème vient du fait que le MailMerge ne détecte pas ma table (essai) qui correspond au fichier .txt
Sinon toutes mes excuses à Laurent Godard que j'ai importuné sur un mail professionnel alors que cette liste existait...(je ne le savais pas encore)







