Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - IReportRecordItemMetrics Question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

IReportRecordItemMetrics Question

 Post Reply Post Reply
Author
Message
McKloony View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 January 2007
Location: Germany
Status: Offline
Points: 340
Post Options Post Options   Thanks (0) Thanks(0)   Quote McKloony Quote  Post ReplyReply Direct Link To This Post Topic: IReportRecordItemMetrics Question
    Posted: 12 May 2011 at 5:42am
Is it anyhow possible, to change only the Metrics of a Cell oder Item and not the Metricis for the hole row?
Product: Xtreme SuitePro (ActiveX) 16.2.5

Platform: XP / Windows 7

Language: Visual Basic 6.0 SP6
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2011 at 7:08am
Hi,

Yes & No... The Metrics is for the row, however using the BeforeDrawRow event you can then change the Alignment, BackColor, Font, ForeColor and more by using the Row variable.


Private Sub ReportControl_BeforeDrawRow(Index As Integer, ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)
    If Trim$(Item.Record(1).Value) = "Totals:" Then
        Row.Record(1).Alignment = xtpAlignmentRight
        Row.Record(1).ForeColor = &HE7FFE5
    End If
End Sub



Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2011 at 12:57pm

Hi,

Why not use Metrics object for Report Items...

Private Sub ReportControl_BeforeDrawRow(Index As Integer, ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)
   
Select Case Item.Index
    Case 1
        Metrics.Backcolor = vbRed
        Metrics.Font.Bold = True
    Case 2
        Metrics.Backcolor = vbGreen
        Set Metrics.Font = Me.Font 'Or some other font
    Case 3
        Metrics.ForeColor = vbBlue
        Metrics.Font.StrikeThrough = true
End Select
 
End Sub
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2011 at 3:05pm
Aaron,

Nice, never thought about doing it that way! It's good that CJ allows you to do it many different ways!
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.