Page 1 of 1

How to add practice logo to Statement, Receipt, Invoice.

Posted: Mon May 12, 2014 8:27 pm
by dieutan
Dear Everyone,

Please advice how to add practice logo to Statement, Receipt, and Invoice.

Thanks in advance!

Re: How to add practice logo to Statement, Receipt, Invoice.

Posted: Mon May 12, 2014 9:10 pm
by jsalmon
There's currently a feature request out there to move statements, receipts, and invoices to our sheets framework which would make them completely customizable for all users.
http://www.opendental.com/manual/featurerequests.html

Or are you asking how to do it programmatically?

Re: How to add practice logo to Statement, Receipt, Invoice.

Posted: Wed May 14, 2014 12:26 am
by dieutan
Hi Jason,

Yes, I am asking how to do it programmatically.
I would like to add practice logo at the place of practice's name and address.

Thanks,
Dennis

Re: How to add practice logo to Statement, Receipt, Invoice.

Posted: Wed May 14, 2014 8:08 am
by jsalmon
Ah yes, then you want to get your C# magic on in FormRpStatement.CreateDocument(). That's located in OpenDental > Forms Reports. 8)

Re: How to add practice logo to Statement, Receipt, Invoice.

Posted: Wed May 14, 2014 10:20 am
by dieutan
Hi Jason,

I know exact code location. I need to know how to add a logo image - might be a bit map. how to get the image into the statement, receipt, and invoice documents. I saw a toothchart class and know how to call it, draw toothchart image on the document but I don't know how to create a new toothchart class, add new image.

Thanks and regards,
Dennis

Re: How to add practice logo to Statement, Receipt, Invoice.

Posted: Wed May 14, 2014 12:19 pm
by jsalmon
MigraDocHelper.DrawBitmap() is probably what you want to use in that particular part of the code.

Re: How to add practice logo to Statement, Receipt, Invoice.

Posted: Wed May 14, 2014 11:22 pm
by dieutan
Hi Jason,

Thanks for the information. Could you describe more details from the beginning of setting a bitmap, get the bitmap in, and how to point to it from drawbitmap()?
Dennis

Re: How to add practice logo to Statement, Receipt, Invoice.

Posted: Thu May 15, 2014 8:48 am
by jsalmon
I think you might need to do a little more homework before altering our source code by the sounds of things.

http://msdn.microsoft.com/en-us/library ... .110).aspx

Re: How to add practice logo to Statement, Receipt, Invoice.

Posted: Wed May 21, 2014 10:36 pm
by dieutan
Here it is:
1. create an ImageList
private ImageList imageListThumbnails;

// imageListThumbnails
//
this.imageListThumbnails.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListThumbnails.ImageStream")));
this.imageListThumbnails.TransparentColor = System.Drawing.Color.Transparent;
this.imageListThumbnails.Images.SetKeyName(0, "OpenDental.jpg");

2. Create bitmap
Bitmap bitmap = new Bitmap(imageListThumbnails.Images[0]);

3. Draw bitmap
MigraDoc.DocumentObjectModel.Document doc= new MigraDoc.DocumentObjectModel.Document();
MigraDoc.DocumentObjectModel.Section section=doc.AddSection();
TextFrame frame;
frame=section.AddTextFrame();
MigraDocHelper.DrawBitmap(frame, bitmap,50,50);

Thanks,

Re: How to add practice logo to Statement, Receipt, Invoice.

Posted: Thu Jul 31, 2014 9:37 am
by alanemin
If you want a quick solution:
1- Go to Setup->Modules->Manage tab->uncheck "Show return Address"
2- Let your printer add the logo for you. You can achieve this easily from your printer's preferences.