Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report
Message
From
26/05/2009 05:29:27
Muthu Vel
Sty Company
India
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Report
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01401936
Message ID:
01401936
Views:
101
I have create a "centac.dbf" with 10 fields and I havecreate a "print.scx" and I have create a "List.frx" and I have create a "Address.lbx". In the print.scx I put one optiongroup having three option button namely 1. dd 2. List 3. Address and one combobox having Bankname list and two text boxes namely 1. txtfrom 2. txtto and two command button namely 1. cmprint 2.cmdexit.

1.Now i am select first option "dd" and choose any one of the bank in combobox list and click print command button the result is correct what i am expectecd.
2.Again i choose second option "List" and entered the starting number and end number in txtfrom and txtto text boxes and click command button the result is correct what i am expected.

3.After i am choose third option "Address" and entered the starting number and end number in txtfrom and txtto text boxes and click command button the result is not correct what i am expected i.e all the records has been printed but I want to print only the records will print what i have entered the numbers between txtfrom and txtto.

How to correct the problems?


The code is below
use "D:\cen2009-10\centac.dbf"


LOCAL lcfrom, lcto
 lcfrom = thisform.txtfrom.value
 lcto = thisform.txtto.value

if thisform.optiongroup1.option1.value = 1
 select * from centac where bank = thisform.combo1.value;
 order by bank;
 into cursor temp1
 report form "D:\cen2009-10\dd.frx" PREVIEW 
 endif
 clear
 
 if thisform.optiongroup1.option2.value = 1
LOCAL lcfrom, lcto
 lcfrom = thisform.txtfrom.value
lcto = thisform.txtto.value
select * from centac where Appno between lcfrom and lcto;
 ORDER by appno;
 into cursor temp
 report form "D:\cen2009-10\List.frx" preview
 endif
 clear

 if thisform.optiongroup1.option3.value = 1
 select * from centac where Appno between lcfrom and lcto;
 ORDER by appno;
 into cursor temp3
 Label form "D:\cen2009-10\address.lbx" TO printer
 endif
 clear
Next
Reply
Map
View

Click here to load this message in the networking platform