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 Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP Report : Dynamics

Status
Not open for further replies.

infinetecode

Programmer
May 6, 2013
2
BR
Hi !

I'm trying to use Dynamics in a report, but it's not working. I use SET REPORTBEHAVIOR 90, but the columns are not updated for the configured conditions. What else do I have to do? Any ideas?
 
How can we determine what is needed? Can you provide screen shots of the report and what conditions that you configured? Also, what is your data?
 
Code :

Set Reportbehavior 90

Report Form Lista_Precos_Grupos To Printer Prompt Preview
 
You say "columns are not updated for the configured conditions". But you neglect to tell us what those configured conditions are. That makes it a little tricky for us to suggest a solution.

Mike
 
Nothing else but SET REPORTBEHAVIOR 90 is necesssary. So your conditions don't result in .T. for any record you print or you isunderstand how Dynamics work for any field you set them.

For sake of showing that SET REPORTBEHAVIOR 90 is sufficent, create a new empty report. Add a field to it with the expression "Dynamics Off", literally, including the quotes.
Right click, go into the field properties, Dynamics tab, Click ADD to add a condition, name it as you like, for example name it true. Set it this way:

1731576120552.png
So set the condition to .T., simply always .T. (true) and "Replace expression result with" "Dyanmis On", so the expected Dynamics behavior is that the "Dynamics Off" text is replaced with "Dynamics On".

The only further ingredient is any data to print, that's a requirement for any report, not specific to Dynamics, so open any DBF and then preview or create a single record cursor with this:

Code:
Create Cursor reportdriving (id int)
Append Blank

SET REPORTBEHAVIOR 90 and preview the report: For every record the preview will show Dynamics On
SET REPORTBEHAVIOR 80 and preview the report: For every record the preview will show Dynamics Off

It's not that hard to come up with a test report that verifies your doubts or confirms (like this does) that it's really only about SET REPORTBEHAVIOR.
 
Last edited:
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top