I have a report which passes a selected value from a table to a subreport.
Based on the value passed (wonlinkkey),
I would like to change the select statment in the subreport.
I have 'successfully' used the following formula in the select expert, but it runs really slowly:
if
{?Pm-HISTORY.WOLINKKEY}=1
then
ltrim({HISTORY.WONO}) = {?Pm-@InputToAllCaps}
else
{?Pm-HISTORY.WOLINKKEY} = {HISTORY.WOLINKKEY}
If I just have the second line ({?Pm-HISTORY.WOLINKKEY} = {HISTORY.WOLINKKEY}) in the select statement, it runs really fast, but doesn't pull back the right records for wonlinkkeys = 1.
I have attempted to edit the sql directly, too, but I don't know much about the variable declaration syntax and I'm getting various errors - is this a viable route to spend some time on?
Or, more generally, is there a GOOD way to do this?
Thanks in advance.
Based on the value passed (wonlinkkey),
I would like to change the select statment in the subreport.
I have 'successfully' used the following formula in the select expert, but it runs really slowly:
if
{?Pm-HISTORY.WOLINKKEY}=1
then
ltrim({HISTORY.WONO}) = {?Pm-@InputToAllCaps}
else
{?Pm-HISTORY.WOLINKKEY} = {HISTORY.WOLINKKEY}
If I just have the second line ({?Pm-HISTORY.WOLINKKEY} = {HISTORY.WOLINKKEY}) in the select statement, it runs really fast, but doesn't pull back the right records for wonlinkkeys = 1.
I have attempted to edit the sql directly, too, but I don't know much about the variable declaration syntax and I'm getting various errors - is this a viable route to spend some time on?
Or, more generally, is there a GOOD way to do this?
Thanks in advance.