Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General / September 2005



Tip: Looking for answers? Try searching our database.

help with crystal report formula

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
L Black - 30 Sep 2005 16:16 GMT
I have a report where I want to print all records for labels. For those
records that have a balance, I want to print 'Balance: 5.00' where 5.00
is whatever balance they have.

This is what I tried, and it prints
Balance: + (Orders.Balance)

If (Orders.Balance) > 0
Then 'Balance: + (Orders.Balance)'

I know that it's just printing what I'm telling it to, but how do I add
the actual field value to the string that I want to print? Please help
with syntax. Thanks!
Martin Walke - 30 Sep 2005 16:51 GMT
>I have a report where I want to print all records for labels. For those
> records that have a balance, I want to print 'Balance: 5.00' where 5.00
[quoted text clipped - 9 lines]
> the actual field value to the string that I want to print? Please help
> with syntax. Thanks!

Your field names should be surrounded by curly brackets {}, thus

"Balance: " + {Orders.Balance}

If you use the "edit formula" wizard you can pick the field names from the
list and it will automatically insert them for you.

HTH
Martin
Jim Edgar - 30 Sep 2005 16:56 GMT
> I have a report where I want to print all records for labels. For those
> records that have a balance, I want to print 'Balance: 5.00' where 5.00
[quoted text clipped - 9 lines]
> the actual field value to the string that I want to print? Please help
> with syntax. Thanks!

Try removing the single quote from around orders.balance:

'Balance: ' + (Orders.Balance)

Jim Edgar
L Black - 30 Sep 2005 17:06 GMT
Yeah, that didn't work - i think because it won't add a number to a
string. This did the trick:

If {Orders.BALANCE} <> 0
THEN "Balance Due: $" + ToText({Orders.BALANCE},2)
Else ""

Thanks though!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.