Tips and Tricks
 Crystal Reports Forum : Crystal Reports .NET 2003 : Tips and Tricks
Message Icon Topic: Sorting and limiting data Post Reply Post New Topic
Author Message
9south
Newbie
Newbie
Avatar

Joined: 02 Dec 2011
Location: United States
Online Status: Offline
Posts: 2
Quote 9south Replybullet Topic: Sorting and limiting data
    Posted: 02 Dec 2011 at 2:14am

I need to report on a work log, a string on information that is mostly broken by date time stamps.

My report requires the most current work entree to display, unfortunately I also display all of the data, this make the report unusable as each work log can be very large.

I have a sub report configured with the proper data field but cannot figure out how to sort the data to display last first and to truncate the display to only show 20 lines of the data

IP IP Logged
albazel2004
Newbie
Newbie
Avatar

Joined: 11 Jan 2012
Location: Yemen
Online Status: Offline
Posts: 7
Quote albazel2004 Replybullet Posted: 13 Jan 2012 at 1:17am
You can select top 20 in your select query, some thing like this

select Top 20 *
from
(
select field1, field2
From Logfile_table
order by logtime desc
)

I hope it will help you.
Live with Peace
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.141 seconds.