User Variable

Hello guys,

I have 2 dataproviders DP1 and DP2

DP1

Act Num 01 $15
Act Num 02 $0
Act Num 03 $20

DP2

Act Num 01 Tina
Act Num 02 Win
Act Num 03 Henry

These 2 DP are linked!

I want to create a variable that just show act num when report balance <> 0

example:

Act num 01 Tina $15
Act num 03 Henry $20

Please advise !


kyanforum (BOB member since 2009-05-22)

is there any reason you couldn’t just use a filter on the report itself?


jresendez :mexico: (BOB member since 2004-05-03)

Hi,

Please let us know what you tried and did not work.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Hi,

I am do this report for an executive and she wouldnt want to do anything else except open the report.

  1. I created a variable:

= If Act Num(DP1) = Act Num(DP2) and <>0 then <Act Num(DP1)>

The result is still showed all accounts because they are linked. Can you advise of how to resolve this?


kyanforum (BOB member since 2009-05-22)

Does Jorge’s suggestion work :?:

Step 1; create a variable named Account Flag
[list]=If <> 0 Then 1 Else 0[/list]
Step 2;
Add Account Flag to your report and apply a filter to your report block to display values of 1 for your Account Flag Variable.

:idea: You may also consider adding this as a query condition also (Acct Bal > 0) if it’s appropriate.


Joe Szabo :us: (BOB member since 2002-08-19)

Hi,

You need to apply a filter on a table to filter out lines that you don’t need in the table. Creating a variable will not remove unwanted lines.

Do you know how to apply a filter?


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Unless I misunderstood your explanation of the problem, you should be able to create a complex filter on and add the definition that states = <> 0 this should select the report balances that are not equal to zero. (i’m assuming that > 0 would work too if you don’t care about negative numbers).


jresendez :mexico: (BOB member since 2004-05-03)

Thanks all for your help, I also tried to create a flag for name also

=If isNull() then 1 else 0

But some how it won’t let me add that variable in so I can filter it.


kyanforum (BOB member since 2009-05-22)

I got everything to work now. Thanks all!!!


kyanforum (BOB member since 2009-05-22)