Search code examples
c#visual-studiowinformsrdlc

Visual Studio Incorrectly Displays Barcode Font In RDLC Reports


I have the following issue: I have a windows form app where I print reports and they are supposed to have barcodes on them. When I am in the .rdlc file designer the barcode shows like this: enter image description here

(The weird crossed out circles I assume is from the square brackets and the @ symbol because data is coming from a parameter). So when I print this out, everything prints out fine, but the thing is, the barcode font I am using is supposed to also have text underneath like this: enter image description here

Now when I go into Word and type in the same barcode font (I triple checked it is the same) it behaves as expected I looked all over the place but there are literally no posts anywhere that I could find that would help me besides this one by Microsoft It just tells me I need that .dll file but I already have it and still same results.

UPDATE: so the other report that also has barcodes works just fine, the barcodes that work are: *1868210325S0000100004* , *S00001+000001+00004+FIEG0P01* , *EDG20210325000374570*

barcode that does NOT work: *JLI-0253932* it takes the value from a parameter "liNumber" which is populated like so:

parameters[6] = new ReportParameter("liNumber", "J" + fidelity.liNumber, true);

where fidelity.liNumber returns LI-0253932

But what I don't understand is that all working barcodes are populated in a similar fashion


Solution

  • Recreating the parameter in both .cs file like so

    string jliNumber = "J" + fidelity.liNumber;
    parameters[6] = new ReportParameter("liNumber", jliNumber, true);
    

    and then in the report .rdlc file just deleting and creating the same parameter again worked for some reason