Barcodes and parameters

edited 7:38AM in FastReport .NET
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

Comments

  • edited 7:38AM
    Hello,

    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;
  • edited 7:38AM

    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
  • edited July 2009
    Yes, you will need to download it and reinstall. The new version will be available in 4 hours.
  • edited July 2009
    Hi Alex:
    Everything is working fine!

    Note for whoever is reading: the name of the symbology is case-sensitive "Code39" works .. "code39" doesn't

    Thanks
    Juakus
  • edited 7:38AM
    Hello,

    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.
  • edited 7:38AM
    Hello Alex:
    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
  • edited 7:38AM
    Nevermind!
    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
  • edited 7:38AM
    Sorry, there is no way to do this. You can turn off the human-readable text and use additional Text object to display the text (this will not work with some codes like EAN, though).
  • edited 7:38AM
    AlexTZ wrote: »
    Sorry, there is no way to do this. You can turn off the human-readable text and use additional Text object to display the text (this will not work with some codes like EAN, though).
    Hello,

    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
  • edited 7:38AM
    Hello,

    2D barcodes will be available in FR VCL 5.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.