|
-
Dec 5th, 2006, 03:49 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Formula.Text PRoblem
Hi,
I have a CrystalReport that is using a Formula in the SelectExpert to filter the information for the report. It is a report that displays output per Shift. I want to be able to run the report for a selected shift or for all shifts.
My formula is being changed by:
VB Code:
rptSub.DataDefinition.FormulaFields("ShiftLetter").Text = Me.ShiftLetter
and the SelectExpert is using the @ShiftLetter formula to filter the information like this: {rpt.....Shift} LIKE @ShiftLetter
This is all working fine for any particular shift but when I want to run the report for all shifts, I can't get it to work. I have been trying to set ShiftLetter to % or '%' etc but none of the combinations seem to work.
ANy ideas how to fix this?
-
Dec 8th, 2006, 03:08 PM
#2
Thread Starter
Addicted Member
-
Dec 12th, 2006, 06:23 AM
#3
Addicted Member
Re: Formula.Text PRoblem
dont do this thing.
just try to use selection formula
means
rpt.selectionformula='shiftletter=' & me.shiftletter
see also the help of crystal report for using selection formula.
Thanks and Regards,
Muhammad Abbas
-
Dec 13th, 2006, 03:51 PM
#4
Thread Starter
Addicted Member
Re: Formula.Text PRoblem
Hi,
I've figured this out. I didn't think that the IN operator was available in CR formulas but it is.
VB Code:
RptToView.DataDefinition.FormulaFields("Shift").Text = "' [A, B, C, D, E]'"
or
VB Code:
RptToView.DataDefinition.FormulaFields("Shift").Text = "' [A]'"
Then, in the SelectExpert use
Dec.
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
|