Solved

how to use string functions to compare two string in crystal report to print conditional data ?

Posted on 2008-10-25
1
8,974 Views
Last Modified: 2012-08-14
Hi,

I have following three fields in my table and there sample data
1) Address     = 123 Street, mycity
2) Bank           = TD Bank , branch 103 , Mississauga
3) Remarks     = Money deposit in Bank
I am using sql stored procedure to populate my data for cystal report.
I want to print only one field in my report: Address or Bank depending on my Remarks field data. If I have word "Bank" in my Remarks my Bank field will be print otherwise Address only.
How can I do that in crystal report? It easy to do in VB. I have found some crystal report function like InStr and StrComp but don't know how to use them. No example found.
Thanks


0
Comment
Question by:khalidsuhail
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 22806414
Create a formula field. and plsce it where you want the data to appear in your report.

If instr({Table.Remarks},"Bank")>0 then
{table.Bank}
else
{Table.Address}
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

632 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