How do I loop thru the rows that a returned from stored Procedure?
I have a stored procedure that returns a bunch of rows in one column like the following example:
ID
A
B
C
D
E
Now, in the report, i have the following layout
_A _B _C _D _E
i want to loop thru the stored procedure results and determine if a letter exists in the results. If the letter exists, i would like to mark the correct character. For example, if A and C exists, the report would look like this:
XA _B XC _D _E
I'm using formula fields but its only reading the first row. How do check each row in the results?
Code:
if {USP...} = "A" then
"X"
Re: How do I loop thru the rows that a returned from stored Procedure?
Can i suggest the following depending on the Database you are using?
If you are using Access then use a Crosstab query
If you are using SQL Server then use a Cursor to go thru your results.
Hope this helps