Solved

Most Current Date Max date

Posted on 2008-10-31
5
2,015 Views
Last Modified: 2013-11-15
need to retreive prices current date
0
Comment
Question by:082156r
  • 2
5 Comments
 
LVL 17

Expert Comment

by:MIKE
ID: 22855264
You can do in a variety of ways. How are you wanting to do it? Within Crystal itself? Using SQL?

If within Crystal,...use the GROUP SELECT EXPERT and put your MAX logic there...or you can use RECORD SELECT EXPERT...and pull based on actual DATES....

What exactly are you trying to accomplish?
0
 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 500 total points
ID: 22855734
This is a pretty common requirement (show me the most recent/current records), but it's not handled very elegantly in Crystal Reports.  CRXIuser2005 asked a very good question and your answer will help determine the most efficient solution.   Another important question is "are you using a SQL-based database, like SQL Server?"

If you're trying to do this in Crystal Reports AND are reporting against a SQL-based database, the most efficient method is to create a SQL Expression field that identifies the most recent records.  You can then filter the report based on the expression field.  The benefit to doing this is that you pull only the records you need from the database rather than pulling all records and then suppressing them after the fact with conditional suppression or group select formulas.

I've attached a presentation with an example, starting on Slide 29.
The-Power-and-Possibilities-of-S.pdf
0
 
LVL 17

Expert Comment

by:MIKE
ID: 22864682
I would just add that for "efficiency sake" I would recommend using SQL Expression as these are the fastest. If you don't know how to create SQL Logic in SQL Server you may need the help of your SQL Programmer.

I've used  Expressions on many occasions to extract a single data base object and the amount of LOGIC that can be placed within these Expressions is limitless....

M
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question