|
-
Jun 11th, 2007, 02:14 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Developer Express XtraReports - Crystal Reports
If anyone uses developer express reports, and knows how to have formulas for text fields in their reports ( like crystal reports formulas ) this would be a great help.
ex crystal:
Code:
IF {rpt_Code.Category} = "AG" THEN
"AG - Agriculture"
ELSE
IF {rpt_Code.Category} = "IR" THEN
"IR - Interest Rate"
ELSE
-
Jun 11th, 2007, 05:26 PM
#2
Member
Re: Developer Express XtraReports - Crystal Reports
U have to use the beforeprint event in the report code. For ex. i have this to put the right suffix behind a ranking:
Code:
Private Sub replRank_BeforePrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles replRank.BeforePrint
If CInt(GetCurrentColumnValue("Rank")) = 1 Then
CType(sender, XRTableCell).Text = "1st"
CType(sender, XRTableCell).ForeColor = Color.Green
ElseIf CInt(GetCurrentColumnValue("Rank")) = 2 Then
CType(sender, XRTableCell).Text = "2nd"
CType(sender, XRTableCell).ForeColor = Color.DarkGreen
ElseIf CInt(GetCurrentColumnValue("Rank")) = 3 Then
CType(sender, XRTableCell).Text = "3rd"
CType(sender, XRTableCell).ForeColor = Color.DarkGreen
Else
CType(sender, XRTableCell).Text = CType(sender, XRTableCell).Text & "th"
CType(sender, XRTableCell).ForeColor = Color.Black
End If
End Sub
-
Jun 12th, 2007, 07:04 AM
#3
Thread Starter
Hyperactive Member
Re: Developer Express XtraReports - Crystal Reports
Thats what I thought, didn't know which script to put it in. Thanks for the help.
-
Jun 12th, 2007, 07:05 AM
#4
Thread Starter
Hyperactive Member
Re: [RESOLVED] Developer Express XtraReports - Crystal Reports
Its funny I got a response here before I did on the DevExp. forums.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|