Error when mailmerge Images

Hi,

I use syncfusion for a while now but an error recently occured in this case :
- I have a word template with many mailmerges for images.
- In my application, I create graphs and others pictures in a row which are added in my datatable.
- I mailmerge

Sometimes, everything goes right. But the rest of the time, that's what I have :
at System.Drawing.Image.get_Width()
at System.Drawing.Image.get_Size()
at Syncfusion.DLS.ImageShape.ConvertSize(Image image)
at Syncfusion.DLS.Picture.LoadImage(Image image)
at Syncfusion.DocIO.DLS.MailMerge.UpdateImageFieldValue(IWMergeField field, IWParagraph paragraph, IRowsEnumerator rowsEnum)
at Syncfusion.DocIO.DLS.MailMerge.ExecuteForParagraphs(IWParagraphCollection paragraphs, IRowsEnumerator rowsEnum)
at Syncfusion.DocIO.DLS.MailMerge.ExecuteForSection(IWSection sec, IRowsEnumerator rowsEnum)
at Syncfusion.DocIO.DLS.MailMerge.ExecuteImpl(IRowsEnumerator rowsEnum)
at Syncfusion.DocIO.DLS.MailMerge.Execute(DataTable table)

Considering that pictures are not nothing and have a normal width and height (about 630x400 px) and also in the same execution, some mailmerges are good, what's wrong ?


5 Replies

JJ Jisha Joy Syncfusion Team December 12, 2007 02:28 PM UTC

Hi Marie,

Thank you for your interest in Syncfusion Products.

I am afraid that I was not able to reproduce the issue. I have tested this issue in the following browser sample that is shipped with our products and is available in the following location:
{installation drive}\Documents and Settings\{username}\My Documents\Syncfusion\EssentialStudio\6.1.0.34\Windows\DocIO.Windows\Samples\2.0\Mailmerge\EmployeeReport

Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample or send us the reproducing steps so that we could sort out the cause of the issue and provide you a solution?
Regards,
Jisha




MG Marie GERARD December 19, 2007 03:26 PM UTC

Well, I tried many times. and now, at every execution, I have this error.

That is a part of my code :

GRAPH as datatable with 4 columns

'open the doc for graph
doc_graphique = New WordDocument(Constantes.ETAT_DIRECTORY & "\" & "Graphiques.dot").clone

'set the graphs
Dim rw As DataRow = GRAPH.NewRow
rw("ETAT_MOYEN") = Me.GraphEtatMoyen() 'return a bitmap, by default new bitmap(300,300)
rw("ETAT") = Me.GraphEtat() 'return a bitmap, by default new bitmap(300,300)

rw("RENOUVELLEMENT") = Me.GraphRenouvellement() 'return a bitmap, by default new bitmap(300,300)

rw("PLAN_MASSE") = ClassTools.Dxf2Jpg(chemin) 'return a bitmap, by default my.ressources.plan_masse_error

GRAPH.Rows.Add(rw)

'Publish
doc_graphique.MailMerge.Execute(GRAPH)
GRAPH.Clear()
doc_master.Fusionner(doc_graphique) 'merge 2 documents (copy paragraph form the doc_graphique to the doc_master)

doc_master.SaveAs(filepath)




JJ Jisha Joy Syncfusion Team December 20, 2007 09:40 AM UTC

Hi Marie,

Thank you for your update.

We have tested the mail merge by loading images from NorthWind database and we are not able to reproduce the issue. Could you please upload us a minimal sample to reproduce the issue here. This will help us to analyze the issue further.

Please let me know if you need further assistance.
Regards,
Jisha



MG Marie GERARD January 10, 2008 08:52 AM UTC

Hello,

I tried many times and it appears that I cannot reproduce this error too. Well I think there was something wrong in another part of my application. Thanks for helping me.

Marie

PS : One of the potential reasons could be disposing the image before publishing.



JJ Jisha Joy Syncfusion Team January 11, 2008 10:10 AM UTC

Hi Marie,

Thank you for your update.
Please let me know if you need further assistance.
Regards,
Jisha


Loader.
Up arrow icon