Microsoft KB Archive/218453

= FIX: Custom expression builder value is not accepted in Report Designer =

Article ID: 218453

Article Last Modified on 2/11/2005

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q218453



SYMPTOMS
If you define a custom expression builder with the system variable _getexpr, the Report Expression dialog box in the Report Designer will not accept the value you enter in the custom expression builder.



RESOLUTION
Use GETEXPR in the Command window to obtain the expression. Run the following code in the Command window, and then press CTRL-V to paste the text into the Report Expression text box of the Report Designer:

GETEXPR to x _cliptext = x



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3.

For more information about Visual Studio 6.0 Service Packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed



Steps to Reproduce Behavior
 Create a new form. Add a text box and a command button to the form.  Enter the following code in the command button's Click event:

gcExpr = Thisform.Text1.Text Thisform.Release

 Set the following form properties:

AlwaysOnTop True (.T.)

Desktop True (.T.)

WindowType 1 – Modal

 Save the form with the file name "MyGetExpr".  Create a new program file and enter the following code:

PARAMETERS cExpressionType, cErrorMessageText, cDefaultExpression, cCaptionText PUBLIC gcExpr gcExpr = "" Do Form MyGetExpr Return gcExpr  Save the program file with the file name "MyGetExpr.Prg"</li>  In the Command window, enter the following code:

_getexpr = "MyGetExpr" CREATE REPORT </li> Add a text field to the report. In the Report Expression dialog box, click the ellipsis button next to the Expression field.</li> When the custom expression builder is displays, enter text into the text box and click the command button in the dialog box.

</li></ol>

NOTE: The Expression field in the Report Expression dialog box remains blank.

<div class="references_section">