I have a need to produce both standard reports and ad-hoc queries that will contain a calculated field based on groups of records selected by date range and other criterion. The calculation for the field is complicated and will be implemented via a stored procedure (written in Jave in a UDB database). Any ideas as to the best approach to implement this stored procedure in both the standard report and the ad-hoc reporting? We are moving towards reportnet. Any samples or examples of similar implementations would be very helpful.