Link to home
Start Free TrialLog in
Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)Flag for United States of America

asked on

SQL Reporting: how to declare and assign a variable?

i'm new to writing sql reports in visual studio.  i'm coming from crystal reports....

i'm working in the Layout view of report design... i have a table and i right click on a square within the grid and select Expression....
is there a way to assign a value to a variable so that i can reference it in another expression?

in particular, i am trying to handle the following formula from Crystal:
dr:=dateserial(currentYr,currentMth-1,currentDay) to dateserial(currentYr,currentMth,currentDay);

if {IM5_ARN_ALL.TransactionDate} in dr then luse:={IM5_ARN_ALL.TransactionQty} else luse:=0;
ASKER CERTIFIED SOLUTION
Avatar of Chris McGuigan
Chris McGuigan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zephyr_hex (Megan)

ASKER

terrific.  thanks.