Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Formula to show records starting with specific nr. Post Reply Post New Topic
Author Message
Olli
Newbie
Newbie
Avatar

Joined: 28 Jan 2010
Location: Germany
Online Status: Offline
Posts: 1
Quote Olli Replybullet Topic: Formula to show records starting with specific nr.
    Posted: 28 Jan 2010 at 3:22am
Hi all.

Googled this for hours and hours now, but found nothing.

I want to filter a Crystal Report with a formula in RecordSelectionFormula so that I only see records which are starting with a number, typed in from the user.

In SQL it would be something like this: "SELECT * FROM Data WHERE Id LIKE '102*'

So I would get records like 102345 or 1024560 or 10299

Because the Id-Field is from type number (or integer) I can't use something like like or startswith in the RecordSelectionFormula.

How can I do this?

My final and last solution would be to change the Id-Field in the database from type number to type string...

Edited by Olli - 28 Jan 2010 at 5:37am
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 01 Feb 2010 at 1:40pm
Which is what I would try.  I believe I have done something like this before and it works.  The only other way is to have a view, stored procedure or command return the data for you. 
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.078 seconds.