Barcodes and parameters
Hi there!
I'm using FastReport.Net and I'm trying to pass a parameter value to change a barcode symbology in my report.
Please, don't send me to user/programer manual, I already spend a lot of time reading through.
I got to the event onbeforeprint
...Barcode1. ???? = CType(Report.GetParameterValue("Parameter1"), String)
Any idea?
Thanks
Juakus
I'm using FastReport.Net and I'm trying to pass a parameter value to change a barcode symbology in my report.
Please, don't send me to user/programer manual, I already spend a lot of time reading through.
I got to the event onbeforeprint
...Barcode1. ???? = CType(Report.GetParameterValue("Parameter1"), String)
Any idea?
Thanks
Juakus
Comments
I will add the SymbologyName property in the next daily build. You will be able to do the following:
barcode.SymbologyName = "PDF417";
(barcode.Barcode as BarcodePDF417).CompactionMode = CompactionMode.Text;
Hi:
Do I have to download FastReport.Net and reinstall it again to get the next daily build?
I'm asking couse I'm new here and don't know how it works.
Thanks a lot
Juakus
Everything is working fine!
Note for whoever is reading: the name of the symbology is case-sensitive "Code39" works .. "code39" doesn't
Thanks
Juakus
Your code is correct, but you use wrong symbology name (must be Code128 - first letter is capital).
See full list of supported names in the class reference (BarcodeObject.SymbologyName property).
"2/5 Interleaved"
"2/5 Industrial"
"2/5 Matrix"
"Codabar"
"Code128"
"Code39"
"Code39 Extended"
"Code93"
"Code93 Extended"
"EAN8"
"EAN13"
"MSI"
"PostNet"
"UPC-A"
"UPC-E0"
"UPC-E1"
"Supplement 2"
"Supplement 5"
"PDF417"
"Datamatrix"
This list is also available if you right-click the barcode object and select the "Barcode Type" item.
I'm back...
I want to be able to keep the barcode centered in the databand and to resize it using parameters.
To get there I used the "Private Sub _StartReport" event and wrote:
Barcode1.Width=(CType(Report.GetParameterValue("PWidth"), Double)/CType(Report.GetParameterValue("LWidth"), Int16))-0.5
where "pwidth" is the page width and "lwidth" is the label width ..
so if the lwidth=2 and pwidth=8.5 then the barcode1.width should be (8.5/2)-0.5=3.75" (I already changed the units to "inches" in the report)
It works .. but I'm not getting the right image of the barcode. It's like it changed the units to milimeters or so. To get something close I had to multiply by 20 the result.
Thanks
Juakus
Just used "anchor" property and it's working the way I wanted it ... anyway ..there's something else. When I change the width of any barcode the bars-height get reduced and the fonts in the human readable get increased. It's there any way to just zoom the bars but not the fonts?
Thanks
Juakus
Question: will PDF417 be available for FastReports VCL at any point? I'm very reluctant to buy the PSoft package because I think quality and support is not good enough. I know you guys are working on FR VCL 5, but as an existing customer I would love to have native PDF417 support.
Regards,
Leonardo Herrera
2D barcodes will be available in FR VCL 5.