Data Access Worldwide Knowledge Base
Article ID 2180 Article Title PROBLEM: Error when using AssignFormula from cCrystal (RDC) Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=2180 KBase Category CRYSTAL REPORTS Date Created 10/18/2005 Last Edit Date 10/18/2005
Article Text
PROBLEM:
In previous versions of Visual DataFlex and Crystal Reports I used
set formula formula_name to "'"+value+"'"
to set a formula in a Crystal. As of Visual DataFlex 11.1 this does not work if we use RDC, but I am not sure how I should replace it.
I tried the assignformula procedure but I get an error saying "the remaining text does not appear to be part of a formula". The way I used it was:
send assignformula "currentreport" "Value"
and the currentreport function is available... What is wrong then?
SOLUTION:
You should use:
Send AssignFormula of hoReport "SomeFormulaName" sSomeValue
Now, if it is possible that sSomeValue contains " or ' then you should use CrystalString first as in:
Get CrystalString sSomeValue to sSomeValue
Send AssignFormula of hoReport "SomeFormulaName" sSomeValue
CrystalString formats your string properly when quotes are used within the string.
Contributed By:
David Martinko
Company: Redeemed Software & Hosting
email: DavidM@RedeemedSoftware.com
Web Site: http://www.RedeemedSoftware.com
Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.
The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.