Method Community

 

Report Designer OnBeforePrint change field colors

Last post 04-08-2015 3:45 PM by Method_Audisho. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-08-2015 2:57 PM

    Report Designer OnBeforePrint change field colors

    In report Designer, I need the VB syntax for altering the colors of the font (foreground) and background.  I need to change colors of report fields which are not tied directly to a table column.  Thanks.

  • 04-08-2015 3:45 PM In reply to

    Re: Report Designer OnBeforePrint change field colors

    Answer

    Hi Robert,

    Report designer scripting generally falls beyond what we can help with on the forums. That being said, I was able to figure this out with some help from our professional services team and some Google searching.

    The foreground color and background color can be altered using the .ForeColor & .BackColor properties. Here is an example of some simple code that will set the background color of xrLabel5 to Aqua.

     Dim xrColor
     xrColor = xrLabel5
     xrColor.BackColor = Color.Aqua

    You can find a list of colors / color properties here.

    You can find complete documentation for XtraReports here, but I was able to locate how to do this by simply searching Google for “xtrareports script colors”. I also believe that this answers the question you posted here.

    -Audisho

    Audisho Sada
    Product Manager
    Method:CRM
    a.sada@method.me
    Toll Free: 1.888.925.6238
    Local & Overseas: 416.847.0400
    Fax: 416.640.6027
Page 1 of 1 (2 items)