on 04-08-2009 1:43 AM
Hi,
I am trying to filter a report based on a parameter that is sometimes blank. I can get it to filter with a single line of code but I can't get it to work with this code. Can someone point me in the right direction. What am I doing wrong?
-
StringVar Salesperson;
Salesperson = Trim({BAQReportParameter.Option09});
If Length({BAQReportParameter.Option09}) < 1 Then
{@SalesRep} Like "*"
Else {@SalesRep} = Salesperson
-
Option 9 is a Salesperson # that is sometimes blank. If there is no option number I would like it to display all records. Only one salesperson value is in the parameter at a time.
I have tried the If to be equal to "" as well but that behaves similarily.
This code returns only blank values for the {@SalesRep} even though 'Salesperson' is 8091.
Also, this formula is in the Record Selection.
TIA,
Ross
Edited by: rosshughes on Apr 8, 2009 2:48 AM
Figured it out. I had to add a formula like this:
If Length(Trim({BAQReportParameter.Option09})) < 1 Then 1
Else If Length(Trim({BAQReportParameter.Option09})) > 1 AND {@SalesRep} = {BAQReportParameter.Option09} Then 1;
And then add a record select looking for this field to be 1.
Edited by: rosshughes on Apr 8, 2009 3:27 AM
Hi,
Are you Looking for this...
Report>Selection Forulas>Record
Enter the record selection as follows .
if {?Parameter1} = "" THEN TRUE
ELSE
= {?Parameter1}
Regards,
Sathish
Edited by: Sathish Chandran on Apr 8, 2009 10:49 AM
Edited by: Sathish Chandran on Apr 8, 2009 10:50 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.