Barcodes in SSRS
I am currently running SSRS 2012 and am wanting to implement barcodes in to one of my reports, I have read numerous things on the net about the number of issues people have while trying to do this so though I would post here and try to avoid the pitfalls.
As I said I have SSRS 2012 installed and I also have a number of Barcode TTF files that we needed to use for something else. My questions are can this be used to convert my 0100415332 in to a barcode that is able to be scanned? and where do I need to put these files, I have read that they need to go in to C:WindowsFonts on the client machine but where on the Server side?
After that I believe that you are able to change the font of the relevant text field within the report that contains the barcode and have something that is converted and able to be scanned.
Any assistance is where I might be going wrong or what else I might need to do before embarking on this would be much appreciated.
Thanks P
reporting-services ssrs-2008 ssrs-2008-r2 ssrs-2012
add a comment |
I am currently running SSRS 2012 and am wanting to implement barcodes in to one of my reports, I have read numerous things on the net about the number of issues people have while trying to do this so though I would post here and try to avoid the pitfalls.
As I said I have SSRS 2012 installed and I also have a number of Barcode TTF files that we needed to use for something else. My questions are can this be used to convert my 0100415332 in to a barcode that is able to be scanned? and where do I need to put these files, I have read that they need to go in to C:WindowsFonts on the client machine but where on the Server side?
After that I believe that you are able to change the font of the relevant text field within the report that contains the barcode and have something that is converted and able to be scanned.
Any assistance is where I might be going wrong or what else I might need to do before embarking on this would be much appreciated.
Thanks P
reporting-services ssrs-2008 ssrs-2008-r2 ssrs-2012
Is it an option to use an assembly generating an image instead of using a TTF font?
– Sébastien Sevrin
Apr 30 '15 at 11:06
1
what barcode format are you using? code39? code 128? different barcode formats need different start stop characters.
– pancho018
Sep 8 '15 at 15:44
I used '3of9' font in one of my reports - it seemed to largely depend on the reader and the quality of the printer as to whether the barcode could be read or not. Also i was more successful when exporting to PDF and printing from that, as opposed to printing direct from IE.
– B.M.
Sep 28 '15 at 16:16
@PJD did you ever resolve this. I have same issue
– mark1234
Jan 5 '16 at 15:01
add a comment |
I am currently running SSRS 2012 and am wanting to implement barcodes in to one of my reports, I have read numerous things on the net about the number of issues people have while trying to do this so though I would post here and try to avoid the pitfalls.
As I said I have SSRS 2012 installed and I also have a number of Barcode TTF files that we needed to use for something else. My questions are can this be used to convert my 0100415332 in to a barcode that is able to be scanned? and where do I need to put these files, I have read that they need to go in to C:WindowsFonts on the client machine but where on the Server side?
After that I believe that you are able to change the font of the relevant text field within the report that contains the barcode and have something that is converted and able to be scanned.
Any assistance is where I might be going wrong or what else I might need to do before embarking on this would be much appreciated.
Thanks P
reporting-services ssrs-2008 ssrs-2008-r2 ssrs-2012
I am currently running SSRS 2012 and am wanting to implement barcodes in to one of my reports, I have read numerous things on the net about the number of issues people have while trying to do this so though I would post here and try to avoid the pitfalls.
As I said I have SSRS 2012 installed and I also have a number of Barcode TTF files that we needed to use for something else. My questions are can this be used to convert my 0100415332 in to a barcode that is able to be scanned? and where do I need to put these files, I have read that they need to go in to C:WindowsFonts on the client machine but where on the Server side?
After that I believe that you are able to change the font of the relevant text field within the report that contains the barcode and have something that is converted and able to be scanned.
Any assistance is where I might be going wrong or what else I might need to do before embarking on this would be much appreciated.
Thanks P
reporting-services ssrs-2008 ssrs-2008-r2 ssrs-2012
reporting-services ssrs-2008 ssrs-2008-r2 ssrs-2012
asked Sep 4 '14 at 6:25
PJDPJD
3332623
3332623
Is it an option to use an assembly generating an image instead of using a TTF font?
– Sébastien Sevrin
Apr 30 '15 at 11:06
1
what barcode format are you using? code39? code 128? different barcode formats need different start stop characters.
– pancho018
Sep 8 '15 at 15:44
I used '3of9' font in one of my reports - it seemed to largely depend on the reader and the quality of the printer as to whether the barcode could be read or not. Also i was more successful when exporting to PDF and printing from that, as opposed to printing direct from IE.
– B.M.
Sep 28 '15 at 16:16
@PJD did you ever resolve this. I have same issue
– mark1234
Jan 5 '16 at 15:01
add a comment |
Is it an option to use an assembly generating an image instead of using a TTF font?
– Sébastien Sevrin
Apr 30 '15 at 11:06
1
what barcode format are you using? code39? code 128? different barcode formats need different start stop characters.
– pancho018
Sep 8 '15 at 15:44
I used '3of9' font in one of my reports - it seemed to largely depend on the reader and the quality of the printer as to whether the barcode could be read or not. Also i was more successful when exporting to PDF and printing from that, as opposed to printing direct from IE.
– B.M.
Sep 28 '15 at 16:16
@PJD did you ever resolve this. I have same issue
– mark1234
Jan 5 '16 at 15:01
Is it an option to use an assembly generating an image instead of using a TTF font?
– Sébastien Sevrin
Apr 30 '15 at 11:06
Is it an option to use an assembly generating an image instead of using a TTF font?
– Sébastien Sevrin
Apr 30 '15 at 11:06
1
1
what barcode format are you using? code39? code 128? different barcode formats need different start stop characters.
– pancho018
Sep 8 '15 at 15:44
what barcode format are you using? code39? code 128? different barcode formats need different start stop characters.
– pancho018
Sep 8 '15 at 15:44
I used '3of9' font in one of my reports - it seemed to largely depend on the reader and the quality of the printer as to whether the barcode could be read or not. Also i was more successful when exporting to PDF and printing from that, as opposed to printing direct from IE.
– B.M.
Sep 28 '15 at 16:16
I used '3of9' font in one of my reports - it seemed to largely depend on the reader and the quality of the printer as to whether the barcode could be read or not. Also i was more successful when exporting to PDF and printing from that, as opposed to printing direct from IE.
– B.M.
Sep 28 '15 at 16:16
@PJD did you ever resolve this. I have same issue
– mark1234
Jan 5 '16 at 15:01
@PJD did you ever resolve this. I have same issue
– mark1234
Jan 5 '16 at 15:01
add a comment |
1 Answer
1
active
oldest
votes
You should be able to do a simple install of the barcode font on the server that you're planning on using.
https://docs.microsoft.com/en-us/windows/desktop/gdi/font-installation-and-deletion
Also, while code3of9 is an easy barcode to manage, it is susceptible to errors, since it has no checksum. Your barcode can be damaged and return a value that's different than what it should be. With a barcode font that uses a checksum, such as Code128, if what the barcode reads as doesn't match the checksum, the bar code won't be read. I would strongly recommend using Code128 with the following function to return the barcode with it's checksum.
Public Function GetBarCode(InString as string)
Dim nSum As Decimal, i As Decimal, checkdigit as Decimal
Dim Checksum As Decimal, Checkchar As Decimal
Dim MyString As String, CVal As Decimal, sValues as string
sValues = "ä!" + chr(34) + "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyzÂÃÄÅÆÇÈÉÊËÌÍ"
' Initialize running total with value of Subset B start character
nSum = 104
' Scan the string and add character value times position
For i = 1 To Len(InString) Step 1
MyString = Mid(InString, i, 1)
' Get the numeric value of the character and subtract 32 to shift (the space character, ASCII value 32, has a numeric value of 0 as far as Code 128 is concerned)
CVal = instr(svalues,mystring)-1
' Add the weighted value into the running sum
nSum = nSum + (CVal * i)
Next i
' Calculate the Modulo 103 checksum
Checksum = nSum Mod 103
if checksum = 0 then checksum = 174
' Now format the final output string: start character, data, check character, and stop character
MyString = "{" + InString + right(left(sValues,Checksum),1) + "~"
MyString = Replace (MyString," ", "ä")
GetBarCode = MyString
End Function
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f25658547%2fbarcodes-in-ssrs%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You should be able to do a simple install of the barcode font on the server that you're planning on using.
https://docs.microsoft.com/en-us/windows/desktop/gdi/font-installation-and-deletion
Also, while code3of9 is an easy barcode to manage, it is susceptible to errors, since it has no checksum. Your barcode can be damaged and return a value that's different than what it should be. With a barcode font that uses a checksum, such as Code128, if what the barcode reads as doesn't match the checksum, the bar code won't be read. I would strongly recommend using Code128 with the following function to return the barcode with it's checksum.
Public Function GetBarCode(InString as string)
Dim nSum As Decimal, i As Decimal, checkdigit as Decimal
Dim Checksum As Decimal, Checkchar As Decimal
Dim MyString As String, CVal As Decimal, sValues as string
sValues = "ä!" + chr(34) + "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyzÂÃÄÅÆÇÈÉÊËÌÍ"
' Initialize running total with value of Subset B start character
nSum = 104
' Scan the string and add character value times position
For i = 1 To Len(InString) Step 1
MyString = Mid(InString, i, 1)
' Get the numeric value of the character and subtract 32 to shift (the space character, ASCII value 32, has a numeric value of 0 as far as Code 128 is concerned)
CVal = instr(svalues,mystring)-1
' Add the weighted value into the running sum
nSum = nSum + (CVal * i)
Next i
' Calculate the Modulo 103 checksum
Checksum = nSum Mod 103
if checksum = 0 then checksum = 174
' Now format the final output string: start character, data, check character, and stop character
MyString = "{" + InString + right(left(sValues,Checksum),1) + "~"
MyString = Replace (MyString," ", "ä")
GetBarCode = MyString
End Function
add a comment |
You should be able to do a simple install of the barcode font on the server that you're planning on using.
https://docs.microsoft.com/en-us/windows/desktop/gdi/font-installation-and-deletion
Also, while code3of9 is an easy barcode to manage, it is susceptible to errors, since it has no checksum. Your barcode can be damaged and return a value that's different than what it should be. With a barcode font that uses a checksum, such as Code128, if what the barcode reads as doesn't match the checksum, the bar code won't be read. I would strongly recommend using Code128 with the following function to return the barcode with it's checksum.
Public Function GetBarCode(InString as string)
Dim nSum As Decimal, i As Decimal, checkdigit as Decimal
Dim Checksum As Decimal, Checkchar As Decimal
Dim MyString As String, CVal As Decimal, sValues as string
sValues = "ä!" + chr(34) + "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyzÂÃÄÅÆÇÈÉÊËÌÍ"
' Initialize running total with value of Subset B start character
nSum = 104
' Scan the string and add character value times position
For i = 1 To Len(InString) Step 1
MyString = Mid(InString, i, 1)
' Get the numeric value of the character and subtract 32 to shift (the space character, ASCII value 32, has a numeric value of 0 as far as Code 128 is concerned)
CVal = instr(svalues,mystring)-1
' Add the weighted value into the running sum
nSum = nSum + (CVal * i)
Next i
' Calculate the Modulo 103 checksum
Checksum = nSum Mod 103
if checksum = 0 then checksum = 174
' Now format the final output string: start character, data, check character, and stop character
MyString = "{" + InString + right(left(sValues,Checksum),1) + "~"
MyString = Replace (MyString," ", "ä")
GetBarCode = MyString
End Function
add a comment |
You should be able to do a simple install of the barcode font on the server that you're planning on using.
https://docs.microsoft.com/en-us/windows/desktop/gdi/font-installation-and-deletion
Also, while code3of9 is an easy barcode to manage, it is susceptible to errors, since it has no checksum. Your barcode can be damaged and return a value that's different than what it should be. With a barcode font that uses a checksum, such as Code128, if what the barcode reads as doesn't match the checksum, the bar code won't be read. I would strongly recommend using Code128 with the following function to return the barcode with it's checksum.
Public Function GetBarCode(InString as string)
Dim nSum As Decimal, i As Decimal, checkdigit as Decimal
Dim Checksum As Decimal, Checkchar As Decimal
Dim MyString As String, CVal As Decimal, sValues as string
sValues = "ä!" + chr(34) + "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyzÂÃÄÅÆÇÈÉÊËÌÍ"
' Initialize running total with value of Subset B start character
nSum = 104
' Scan the string and add character value times position
For i = 1 To Len(InString) Step 1
MyString = Mid(InString, i, 1)
' Get the numeric value of the character and subtract 32 to shift (the space character, ASCII value 32, has a numeric value of 0 as far as Code 128 is concerned)
CVal = instr(svalues,mystring)-1
' Add the weighted value into the running sum
nSum = nSum + (CVal * i)
Next i
' Calculate the Modulo 103 checksum
Checksum = nSum Mod 103
if checksum = 0 then checksum = 174
' Now format the final output string: start character, data, check character, and stop character
MyString = "{" + InString + right(left(sValues,Checksum),1) + "~"
MyString = Replace (MyString," ", "ä")
GetBarCode = MyString
End Function
You should be able to do a simple install of the barcode font on the server that you're planning on using.
https://docs.microsoft.com/en-us/windows/desktop/gdi/font-installation-and-deletion
Also, while code3of9 is an easy barcode to manage, it is susceptible to errors, since it has no checksum. Your barcode can be damaged and return a value that's different than what it should be. With a barcode font that uses a checksum, such as Code128, if what the barcode reads as doesn't match the checksum, the bar code won't be read. I would strongly recommend using Code128 with the following function to return the barcode with it's checksum.
Public Function GetBarCode(InString as string)
Dim nSum As Decimal, i As Decimal, checkdigit as Decimal
Dim Checksum As Decimal, Checkchar As Decimal
Dim MyString As String, CVal As Decimal, sValues as string
sValues = "ä!" + chr(34) + "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyzÂÃÄÅÆÇÈÉÊËÌÍ"
' Initialize running total with value of Subset B start character
nSum = 104
' Scan the string and add character value times position
For i = 1 To Len(InString) Step 1
MyString = Mid(InString, i, 1)
' Get the numeric value of the character and subtract 32 to shift (the space character, ASCII value 32, has a numeric value of 0 as far as Code 128 is concerned)
CVal = instr(svalues,mystring)-1
' Add the weighted value into the running sum
nSum = nSum + (CVal * i)
Next i
' Calculate the Modulo 103 checksum
Checksum = nSum Mod 103
if checksum = 0 then checksum = 174
' Now format the final output string: start character, data, check character, and stop character
MyString = "{" + InString + right(left(sValues,Checksum),1) + "~"
MyString = Replace (MyString," ", "ä")
GetBarCode = MyString
End Function
answered Nov 15 '18 at 16:25
Frank BallFrank Ball
616310
616310
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f25658547%2fbarcodes-in-ssrs%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Is it an option to use an assembly generating an image instead of using a TTF font?
– Sébastien Sevrin
Apr 30 '15 at 11:06
1
what barcode format are you using? code39? code 128? different barcode formats need different start stop characters.
– pancho018
Sep 8 '15 at 15:44
I used '3of9' font in one of my reports - it seemed to largely depend on the reader and the quality of the printer as to whether the barcode could be read or not. Also i was more successful when exporting to PDF and printing from that, as opposed to printing direct from IE.
– B.M.
Sep 28 '15 at 16:16
@PJD did you ever resolve this. I have same issue
– mark1234
Jan 5 '16 at 15:01