Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Edit Masks questions.... Post Reply Post New Topic
Author Message
Seabass
Newbie
Newbie
Avatar

Joined: 06 Jun 2009
Location: United States
Online Status: Offline
Posts: 32
Quote Seabass Replybullet Topic: Edit Masks questions....
     Posted: 10 Jun 2009 at 8:12am

This sound like an easy one but just could not figure it out on my own...

 
#1
I created a parameters and i want to add an Edit MAsks that will automatically add nine zeros in front of the user input... so user will input nine digits that look like this = 100066261   my database data that i am querying look like this: 000000000100066261  This will make it easier for the users....
 
#2
I have an other prompt that the user input is text and operator in the query will be "is like". what is the most efficient way to make sure all entry on the prompts are UPPERCASE  and that every space the user put the edit mask automatically put the wildcard in...
so instead of typing: *valve*gate*3*in*
the users will enter: valve gate 3 in
the query sould look like: *VALVE*GATE*3*IN
 
Any help will be greatly appreciated !!!   Smile
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Jun 2009 at 12:32pm

for #1 you can handle it a few ways...In your select statement just add in the lead zeros as {table.Field}="000000000" + {?param1}  although you may want to also trim this to a total # from right in case a user decides to insert the lead 00000 on their own.

Or change them both to numeric so avoid using the lead zeros at all as well as prevent a user from sometimes using the lead 0...tonumber({table.Field})={?param1-numeric type}

or change it to a dynamic field so they just pick from the existing list.
 
For #2 I am not exactly sure what your ultimate goal is but you can use a replace function to get your result.
{Table.field} LIKE "*"+ replace({?Param2}," ","*",1,-1,1) + "*"
IP IP Logged
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