Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: printing latest record from the database Post Reply Post New Topic
Author Message
joven
Newbie
Newbie
Avatar

Joined: 27 Mar 2011
Location: United Arab Emirates
Online Status: Offline
Posts: 3
Quote joven Replybullet Topic: printing latest record from the database
    Posted: 28 Mar 2011 at 2:07am
How can i print the latest record from my database (mdb) using the field "ID" (as "autonumber" data type)? Thank you all.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 28 Mar 2011 at 3:04am
i would think that a sql command similar to:
 
select * from table as a join (select max(id) as id from table) as b on a.id=b.id
OR
 
select * from table where id in  (select max(id) as id from table)
 
HTH
IP IP Logged
joven
Newbie
Newbie
Avatar

Joined: 27 Mar 2011
Location: United Arab Emirates
Online Status: Offline
Posts: 3
Quote joven Replybullet Posted: 28 Mar 2011 at 8:45pm
thank you lockwelle.  i dont know if i did it right, i went to formula editor and tried to make a workaround on the statement. sorry, i am just new to this.Unhappy
IP IP Logged
joven
Newbie
Newbie
Avatar

Joined: 27 Mar 2011
Location: United Arab Emirates
Online Status: Offline
Posts: 3
Quote joven Replybullet Posted: 29 Mar 2011 at 1:15am
in crystal report, i want to filter my data that the latest "ID" (which is a field)
will only be displayed.. thanks
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.027 seconds.