In XI, has anyone successfuly passed a array stringvar to a subreport?
The main report has a parameter that pulls users from a table (oracle). I want to pass that value to the subreport without having to set up a link. Is this possible? I've read articles about passing to a stored procedure but I dont' need that, I just want to pass the value and use it in the record selection criteria.
The reason I am trying to stay away from more subreport links is because java thinks that I have multiple parameters and asks for the information twice.
What I tried was
In mainreport:
?employee where it lists employees in the oracle table
@empVariable
//get the values that were selected on the prompt and pass to subreport
Local NumberVar i;
//Local StringVar temp; original code
shared StringVar temp;
Local NumberVar ArrayLength;
ArrayLength := UBound ({?Employee});
For i := 1 To ArrayLength Do
(
temp := temp + {?Employee}
);
temp
In subreport:
record selection criteria
{Command.PROCESSDATE} >= {?Start Date} and //Data must be between these dates
{Command.PROCESSDATE} <= {?End Date}
and
Not IsNull({@EmpName}) //no blank employees
and
{Command.LASTNAME} in temp
It doesn't recognize temp even though I have it as a shared value.
Also, what I was trying to allow for on the {Command.LASTNAME} in temp line was to capture all the names selected if the user selected more than 1 person.
The error that I get is that a number, boolean, or string is expected on {Command.LASTNAME} in temp
Basically the subreport is generating totals for the entire time period for each person selected and everyone if all is selected on the ?employee prompt. The main report breaks it down by month.
Any guidance would be appreciated.
thanks much
lhuffst
The main report has a parameter that pulls users from a table (oracle). I want to pass that value to the subreport without having to set up a link. Is this possible? I've read articles about passing to a stored procedure but I dont' need that, I just want to pass the value and use it in the record selection criteria.
The reason I am trying to stay away from more subreport links is because java thinks that I have multiple parameters and asks for the information twice.
What I tried was
In mainreport:
?employee where it lists employees in the oracle table
@empVariable
//get the values that were selected on the prompt and pass to subreport
Local NumberVar i;
//Local StringVar temp; original code
shared StringVar temp;
Local NumberVar ArrayLength;
ArrayLength := UBound ({?Employee});
For i := 1 To ArrayLength Do
(
temp := temp + {?Employee}
);
temp
In subreport:
record selection criteria
{Command.PROCESSDATE} >= {?Start Date} and //Data must be between these dates
{Command.PROCESSDATE} <= {?End Date}
and
Not IsNull({@EmpName}) //no blank employees
and
{Command.LASTNAME} in temp
It doesn't recognize temp even though I have it as a shared value.
Also, what I was trying to allow for on the {Command.LASTNAME} in temp line was to capture all the names selected if the user selected more than 1 person.
The error that I get is that a number, boolean, or string is expected on {Command.LASTNAME} in temp
Basically the subreport is generating totals for the entire time period for each person selected and everyone if all is selected on the ?employee prompt. The main report breaks it down by month.
Any guidance would be appreciated.
thanks much
lhuffst