Login   Register 
Receive news via our XML/RSS feed
Home | Book | Contents | Preview | Articles | Tools | Newsletters | Premium | Ask | About

Home

Book

Contents

Preview

Articles

Tools

Newsletters

Premium

Ask

About

Most Popular Articles
  • Using Secure Sockets Layer (SSL) for SQL Server 2000 Reporting Services
    Creating an SSL Certificate to ensure your confidential reports remain confidential


  •  
    Beta V Corporation
     
     
    SQL Reporting Services - Answers to your questions
     
    Author Thread: Reporting help
    atul.deora

    Reporting help
    Posted: Friday, April 30, 2010 4:52 AM (GST)
    I have an urgent requirement to create a report. The dataset I will be getting will have the "Product" column & a "Sold Date" column with dates ranging from "1/1/2010" to "12/31/2010". Now say I am creating report on Apr 30th 2010, the requirement is to have Table A show the Product sold between "Apr 1 - Apr 30 2010", Table B should show the products sold between "Mar 1 - Mar 30 2010" (i.e. previous month record comparison) & table C should list the products sold each month from first month of the year to current month. (i.e products sold in January, February, March and April). Kindly help me with your valuable guidance.
     

    Comments:  

    Author Thread:
    William Vaughn
    Reporting help
    Posted: Friday, April 30, 2010 5:22 PM (GST)
    I would approach this problem by creating three DataSets--one for each date range. The queries could be fed from Parameters that start with GetDate() functions that segment the rowsets into the three groups you need. That is the WHERE clause for the first would filter based on the current month, the second on the previous month and the third on the year to date. Look up the "DatePart" TSQL functions. hth

     
     
     
     
     
    Home | Book | Contents | Preview | Articles | Tools | Newsletters | Premium | Ask | About