Wrox Programmer Forums
|
Reporting Services SQL Server Reporting Services. Please specify which version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Reporting Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 10th, 2006, 01:35 PM
Registered User
 
Join Date: Oct 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default table field filter

I have a table that I want to show 3 fields. The first field is grouped by the salesman name. This is no problem. The second is a sum of all open order totals which is not problem. The third is a sum of all open sales that is more than 90 days past the order date. I tried writing something like sum(Iif(datediff(dayofyear,orderdate,today())>90,i tem.price,0)). Of course this doesn't work. Any ideas on how to do it. I cannot filter in the query because I need all entries not just over 90 days. I need to do it in the field of the table.

 
Old July 11th, 2006, 10:24 AM
Registered User
 
Join Date: Oct 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I figured out a way to do it. I created a case in the sql query that checked for a datediff of greater than 90, if so, it returned the price, if not it returned a 0. I then added a sum of the field for each group in the table of the report. Worked like a charm.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter results by value in a gridview field cesemj ASP.NET 2.0 Basics 2 February 20th, 2008 11:39 PM
multiple field filter url help ddnk77872 PHP Databases 1 January 22nd, 2007 12:05 AM
How to filter Date field using DataView.RowFilter jkusmanto VB.NET 2002/2003 Basics 1 April 18th, 2006 12:48 AM
objRS.Filter (Multiple Field Filters) egerdj Classic ASP Basics 1 March 10th, 2004 04:48 PM
Filter Report by a formulate field Tere Crystal Reports 0 December 1st, 2003 07:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.