Martin Praxmarer - DevExpress MVP
07.30.2009
Show all comments
-
Hi Martin,
Please clarify which of these approaches are appropriate for you?
1. You add a field, like {BarCode ContactId}, and the RichEditControl will generate the barcode image itself.
Or
2. You generate the barcode image in your program (or select it from the database, etc) and than the RichEditControl will insert this image at the appropriate position.Or maybe you need something different? Please explain this.
Thanks,
Elliot -
Hi Elliot,
i just had another idea. I insert the ContactId like * ContactId * and print it with an Code39 Font - then everything works - this solves my task currently. But i am wondering if there are other ways to do it since the devex printing library supports many barcodes.
1. You add a field, like {BarCode ContactId}, and the RichEditControl will generate the barcode image itself. -> would be a cool way - i dont know if that makes sense to you? {BarCode<Type> ContactId} ... ?
-
Hi Elliot,
i just had another phone call - Code39 is not an option because of its quality. the preferred barcode would be Code128 or something...
I would prefer your first way {BarCode ContactId} if there is some way to do it?
-
Hi Martin,
Thank you for the explanation.
>>>>
1. You add a field, like {BarCode ContactId}, and the RichEditControl will generate the barcode image itself. -> would be a cool way - i dont know if that makes sense to you? {BarCode<Type> ContactId} ... ?
<<<<
Unfortunately, XtraRichedit doesn't support this functionality. However, we agree with you that it would be great to implement this feature. I've registered a corresponding suggestion in our database, and we'll consider implementing it in the future: MailMerge --- Add support for BARCODE field type (ID:S33003). Please track it to be informed on our progress over this item.Thanks,
Elliot -
Hi Elliot,
thx for the suggestion - but it doenst help me in the current situation... Do you have any Idea how i can integrate an Code128 in an Document?
thx
-
Hi Martin,
Thank you for the reply.
I understand your issue, but, unfortunately, I can't immediately tell you how to resolve it. We'll examine this issue and contact you as soon as we find a solution. Please bear with us.
Thanks,
Elliot
You must
log in
or
register
to leave comments
Hi Martin,
Unfortunately, XtraRichedit doesn't support this functionality. I've registered a suggestion in our database, and we'll consider implementing it in the future: Add BarCode field types (ID:S33007). Please track it to be informed on our progress over this item. At present, our developers created a workaround for you. Please review it and let us know whether it helps.
P.S. This workaround uses internal classes of the XtraRichEdit control. So, we can't guarantee that it will work in the next product version, as these classes can be changed or removed in next releases.
Thanks,
Elliot
-
Hi Elliot,
thx you very much - you Guys are really awesome!! Great Example!!
BTW: S33007 is private?
greets
Martin -
Hi ,
Thank you for the reply.
>>>>
BTW: S33007 is private?
<<<<
It appears that the cause of the problem is that I've created a private suggestion. Please accept my sincere apologies for this mistake. At present, I've corrected this situation. So, you can track it to be informed on our progress over this item.Thanks,
Elliot -
Thank you!!
-
Hi Elliot - your great workaround stopped with 12.1 - BarCodeBrick does not have any Pattern anymore - can you suggest some workaround?
Hi Martin,
Thank you for your update.
You can create your own class based on the Code128Generator class to avoid this problem. Here is some sample code:
[C#]... int CalcBarCodeWidth() { if (!brick.AutoModule) //return (int)(brick.Module * (float)calcBarCodeWidthMethod.Invoke(generator, new object[] { ((IBarCodeData)brick).Pattern })) + 1; return (int)(brick.Module * (float)calcBarCodeWidthMethod.Invoke(generator, new object[] { new MyCode128Generator(brick.Text).list })) + 1; else return widthInDocument; } ... public class MyCode128Generator : Code128Generator { public System.Collections.ArrayList list; public MyCode128Generator(string text) : base() { this.list = this.MakeBarCodePattern(text); } } ...
Thanks,
Elliot
-
Hi,
I am trying to do nearly the exact same thing. I am using v2011 vol 2. Could you please supply an example project in VB.net
Thanks,
James. -
I have attached VB.Net project. Please review it.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.