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

how to deactivate and reshow the same report with another condition

Status
Not open for further replies.

Stefan5627

Programmer
Jul 23, 2002
71
NL
- i want to show the user a report,
- then (while the report is still showing) i want to ask the user a question
- depending on the answer i want to adjust the report

i use the underlying code
the problem is that the second time i show the report (with the condition)
it shows the same as the first time (without the condition)

i use vfp7 sp1
the underlying code is just an example, the condition used for the
report can be anything

can anyone solve this problem for me?

tia


LOCAL oform, odefForm as Form

oform = createobject("form")
oform.WindowState = 2
oform.Show()

select some_table
go top

report form testreport window (oform.Name) noconsole preview nowait

answer = messagebox( "question?", 4+32, "")


oform.release()

select some_table
go top

odefForm = createobject("form")
odefForm.WindowState = 2
odefForm.Show()

IF answer == 6
report form testreport window (odefForm.Name) ;
noconsole preview for recno() < 2
ELSE
report form testreport window (odefForm.Name) ;
noconsole preview for recno() > 2
ENDIF
 
Hi Tia

I would put a SET STEP ON just before the line:

IF answer == 6

and check the value of this variable. You should be able to see what is happening in your program via the debugger and step throught every line of your program.

Good luck

Jean

ps. Dont forget to remove the SET STEP ON line after you finished debugging.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top