web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

SSRS 2008 DataSet (display only first record returned)

(0) ShareShare
ReportReport
Posted on by 894

Hello ALL,

I only want to display the first record returned to my dataset. I cannot change the stored procedure that is executed by this dataset so I need to do it in my SSRS report.

The stored procedure just returns between 15-20 records to the dataset table and I display those records in my ssrs report. Now, user only wants to see the earliest record in the ssrs report (which is only 1 record).   

I tried playing around with TOP N and BOT N in the Tablix Properties Filter option  for this dataset with no success.

Does someone know how to do ?

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at
    RE: SSRS 2008 DataSet (display only first record returned)

    First of all remove group row from your table.

    In Non-group row, Right click and go to expression, select data set and field that you want to display.

  • Samrando Profile Picture
    270 on at
    RE: SSRS 2008 DataSet (display only first record returned)

    Do you want to return that first record(s) by date and time or by other values?

    If you wan to return by date then do the following under the tablix properties

    1. Filter

    Expression = createdon

    Operator = Top N

    Value = 1/ any number

    2.Sorting

    Sort by : createdon    

    Order  Z-A

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: SSRS 2008 DataSet (display only first record returned)

    What about if you use the TempTable in your query, store the Sproc results and then select Top 1

    CREATE TABLE ##tmpTable (

     <Your Colums> < datatype >

    )

    -- Insert result from the SP to temp table

    INSERT INTO ##tmpTable

    EXEC spSelectStudents

    SELECT TOP 1 * FROM ##tmpTable

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans