A UDF is best called in the query - in fact, I'd be surprised if you can even
call a UDF from a report.
Rule of thumb, do your data processing at the database and keep your report
processing (and inner workings) as simple as possible. (An added advantage
of this is if you change reporting tools - at least you don't have to migrate
a complex report).
Typically, in RS, there is a move away from sub reports - I've yet to find
an occaision when I've needed them. You can link embedded tables or group
data just about anyway you can think of it, or you can implement drilldown or
drill through.
Interpreting this, your query just returns the parameters you need to pass
to the nested data/sub report or you write the original query and provide
logical groupings in the report.
Hope that helps
[quoted text, click to view] "mn_ms_user" wrote:
> I am trying to create a sub-report that is using a UDF(user defined function
> on the SQL Server) requiring parameters from the parent report for a
> datasource for that sub-report. (I hope that made sense). Basically, the UDF
> needs to be run for every record that is in the parent report. The UDF takes
> input from two fields in the parent datasource, one to link it back to the
> parent source and the other is a delimited field that contains records that
> need to be split up. The UDF returns a table with the data that is split up.
> How can I use this return table as a source for my sub-report, or if I can do
> it without a sub-report how can I do that?
>