Zum Hauptinhalt gehen

Suche

Suche

Combining Field With Data Source

Kommentare

6 Kommentare

  • Avatar
    Ian Cummings
    Moderator

    I guess you want to create two data sources in the one text object.  Then in the fonts properties of the object you can set a font per data source should you want the text label to be in bold, with the database field in regular.  The below training videos should be helpful:

     

    https://youtu.be/TLR9qJ7iB44

     

    https://youtu.be/FRcASc2CnD4

    0
  • Avatar
    Legacy Poster

    Thanks!  The 2nd video was very helpful.  Solved my tasks.

    0
  • Avatar
    Legacy Poster
    Hi 
    I have verry similar problem but with a twist. I have text object with multiply data sources something like
    size: A B C
    One of the data source's text need to be bigger. I can't configure from font per data source dialogue because it's different data source every time.
    The data source that need to be bigger is determine in the VB script that I wrote, but I can't find any way to make the font bigger.
    is there a way to change data source font from VB script? or any other solution?
    0
  • Avatar
    Ian Cummings
    Moderator

    tempt: Yes you can do this in VB script.  Take a look at the following white paper: http://www.seagullscientific.com/media/101557/dynamically-changing-objects-at-print-time-using-vb-script.pdf

     

    The property you'd want to adjust is the FontSize property I guess: http://help.seagullscientific.com/2016/en/#../Subsystems/BTVBScript/Content/so_tmplt_FontSize_Property.htm

    0
  • Avatar
    Legacy Poster
    Thanks for the fast replay.
    The second link explain how to change fontsize but it limited to objects, only the text field is an object, all the data source aren't objects hence can't be modified.
     
    "Sizes" is the text field, s1,s2,s3 are the data sources.
     
    Format.Objects("Sizes").FontSize = 16
     
    Format.NamedSubStrings("s1").Value = a
    Format.NamedSubStrings("s2").Value = b
    Format.NamedSubStrings("s3").Value = c
     
    As you can see I can change the fontsize of the object "Sizes" among other properties, but the only thing I can change about data sources is the value.
     
    The only way I found to change data source's font is in the "font per data source" dialogue, I need to change the font from the VB script.
    0
  • Avatar
    Ian Cummings
    Moderator

    temp: Sorry then, I think you're out of luck as we cannot affect this on a per data source basis programmatically.  Have you considered using a mark up language container object instead that uses RTF or HTML as part of the data source.  In this way you can adjust the style of the text in addition to the value data sources.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.