Integrating Reporting

Last post 01-31-2012, 12:57 AM by babar.raza. 1 replies.
Sort Posts: Previous Next
  •  01-30-2012, 11:58 AM 357965

    Integrating Reporting .NET

       I want to use the 2D barcode in a .NET reporting tool called Telerik.  The only way I can do this is to set the vaule property of an image box to the image of a barcode.

     

    The barcode needs to be created in code, not from a file or from a DB field.

    this is what I originally tried (it does not work)

     

    dim bb as new BarcodeBuilder
    bb.CodeText= "12345"
    picturebox.value= bb.generateBarcodeImage

     

     
  •  01-31-2012, 12:57 AM 358094 in reply to 357965

    Re: Integrating Reporting .NET

    Hi Craig,

    Thank you for considering Aspose.

    I have checked the PictureBox control that you have mentioned in your original post and I have learned that PictureBox control can accept an Image from MemoryStream to render it. BarCodeBuilder class on the other hand enables you to save the generated barcode image to MemoryStream that in turn can be used as the value of PictureBox. Please review the sample code as below and try at your end,

    VB.NET
    Dim builder As New BarCodeBuilder() builder.CodeText = "12345" Dim stream As New MemoryStream() builder.Save(stream, ImageFormat.Png) stream.Position = 0 Dim image As Image = Image.FromStream(stream) pictureBox.Value = image

    Babar Raza
    Support Developer,
    Aspose Sialkot Team
    http://www.aspose.com/
    Aspose - Your File Format Experts
     
View as RSS news feed in XML