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

This forum is for programmers who have questions about the source code.
Post Reply
dieutan
Posts: 10
Joined: Mon May 12, 2014 8:12 pm

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

Post by dieutan » Mon May 12, 2014 8:27 pm

Dear Everyone,

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

Thanks in advance!

User avatar
jsalmon
Posts: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

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

Post by jsalmon » Mon May 12, 2014 9:10 pm

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?
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

dieutan
Posts: 10
Joined: Mon May 12, 2014 8:12 pm

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

Post by dieutan » Wed May 14, 2014 12:26 am

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
Last edited by dieutan on Wed May 21, 2014 10:38 pm, edited 1 time in total.

User avatar
jsalmon
Posts: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

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

Post by jsalmon » Wed May 14, 2014 8:08 am

Ah yes, then you want to get your C# magic on in FormRpStatement.CreateDocument(). That's located in OpenDental > Forms Reports. 8)
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

dieutan
Posts: 10
Joined: Mon May 12, 2014 8:12 pm

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

Post by dieutan » Wed May 14, 2014 10:20 am

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

User avatar
jsalmon
Posts: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

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

Post by jsalmon » Wed May 14, 2014 12:19 pm

MigraDocHelper.DrawBitmap() is probably what you want to use in that particular part of the code.
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

dieutan
Posts: 10
Joined: Mon May 12, 2014 8:12 pm

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

Post by dieutan » Wed May 14, 2014 11:22 pm

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

User avatar
jsalmon
Posts: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

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

Post by jsalmon » Thu May 15, 2014 8:48 am

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
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

dieutan
Posts: 10
Joined: Mon May 12, 2014 8:12 pm

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

Post by dieutan » Wed May 21, 2014 10:36 pm

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,

alanemin
Posts: 1
Joined: Thu Jul 31, 2014 9:30 am

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

Post by alanemin » Thu Jul 31, 2014 9:37 am

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.

Post Reply