pradeep985 (10/1/2012)
Hi,I need to create a procedure which takes 2 input parameters and using this stored procedure in crystal reports for creating reports.
Input Params:
p_name1 & p_name2.
p_name1 should take the values from a column in a table so that in crystal report it will show as dropdown where the user can select one value.
anyhelp in this is much appreciated.
Thanks
To populate the p_name1 drop list, you will create a data set (e.g. SELECT Code, Description FROM MyTable) and link this as available values for the p_name1 parameter.
The stored procedure could look like:
CREATE PROCEDURE MySchema.MyProcedure
@p_name1 DataType[/], @p_name2 DataType[/]
AS
SELECT ColumnList FROM Table WHERE ColumnA = @p_name1 AND ColumnB = @p_name2
GO
and will be used in the main data set of the report.
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”