Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do?! 1

Status
Not open for further replies.

Vavan

Programmer
Oct 23, 2002
6
CA
ASP.NET, VS.NET, VB.NET & CR.NET.
I have report made up on "SELECT * FROM USERS" but I need to get report pronted based on "SELECT * FROM USERS WHERE UserNAme LIKE 'A%'". Parameter field doesn't accept LIKE. What the solution?
 
write your LIKE 'A%' clause in Selection Expert. Use '*' in your code and Crystal will replace it with a '%'.

Example:

TABLE_FIELD LIKE {?PARM} + '*'
 
You told "write your LIKE 'A%' clause in Selection Expert." but what should I select in expert - formula? but it doesnt allow to put LIKE. What to do? Help!!!!!!!!!!!!!!!!!!!
 
You can set the report record selection formula programmaticaly:
reportObject.RecordSelectionFormula = "{table.table_field} like '" + myString + "*'"

This should do it.
 
Yes. I is working for TEXT fields, now I am trying to do for NUMBER field. I think it should be like ToText (...). am I right?
 
Âîâà,
Íó êàê, ïîëó÷àåòñÿ?
 
Ïðîáóþ. Òîëêî-÷òî çà êîìï ñåë.
 
Äàé çíàòü åñëè ÷òî íàäî, ÿ ñ Crystal ðàáîòàþ ïîñòîÿííî. Ñïàñèáî çà çâåçäó :) lev.vigdorov@tgworldwide.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top