Solved

crystal reports text input from user

Posted on 2014-02-27
3
276 Views
Last Modified: 2014-02-28
Can I setup a way for the user to type in text and it looks at a field, if their text is found then it outputs any instance of that text.

For instance:  They type in tops and it looks at porOrder.stockcode and returns

Stops
55 tops
tops 34
0
Comment
Question by:TomBalla
  • 2
3 Comments
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 250 total points
ID: 39893041
Yes.  You can setup a report filter based on a parameter.

Create a parameter
  Name - StockCode
   Data type - string
   Static

In the record selection
  Click REPORT --> SELECTION FORMULAS --> RECORDS
"*" & {?StockCode} & "*" LIKE {porOrder.stockcode}

mlmcc
0
 
LVL 34

Accepted Solution

by:
James0628 earned 250 total points
ID: 39894468
I think you got the test backwards.

{porOrder.stockcode} LIKE "*" & {?StockCode} & "*"


 James
0
 
LVL 34

Expert Comment

by:James0628
ID: 39895099
FWIW, if your db is case sensitive and you need the test to ignore the case, like you want "tops" to match things like "STOPS" and "55 Tops", you could change the test to something like:

UpperCase ({porOrder.stockcode}) LIKE "*" & UpperCase ({?StockCode}) & "*"


 James
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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