Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print via myform
Message
From
08/11/2004 16:21:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
08/11/2004 16:05:18
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 5
Miscellaneous
Thread ID:
00959007
Message ID:
00959365
Views:
8
>hi,
>it works,
>but still get all data from mytable mstr, ...

I suspect that your report works directly with the table, "mstr". If you delete all tables from the report's DataEnvironment, the report will use the table or cursor in the active workarea, instead. In this case, the records just selected with the SELECT - SQL command.

>i must see at my repoert just 2 records only via my example,
>
>the same code works via mygrid.
>
>thisform.pageframe1.page2.grid1.Visible=.t.
>
>with thisform.pageframe1.page2.Grid1
>    .RecordsourceType = 4 && SQL
>    .Columncount = -1
>      .Recordsource = 'select innoumber,price,total,w1,w2,t1,t2,t3,datein,billno from mstr'+;
>     '   where UPPER(inname) = UPPER(TRIM(thisform.pageframe1.page1.text1.Value)) and nam1 = thisform.pageframe1.page1.text4.Value and datein>=thisform.pageframe1.page1.text3.value .and. datein<=thisform.pageframe1.page1.text5.value '+;
>     '   into cursor crsMyCursor'
>     IF _TALLY > 0
>Thisform.Pageframe1.ActivePage = 2
>ELSE
>MESSAGEBOX( [No Records match your crtieria] )
>ENDIF
>
>ENDWITH
>thisform.pageframe1.page2.text1.value=thisform.pageframe1.page1.text1.Value
>thisform.pageframe1.page2.text2.value=thisform.pageframe1.page1.text4.Value
>sum innoumber to thisform.pageframe1.page2.text3.value
>sum total to thisform.pageframe1.page2.text4.value
>sum t1 to thisform.pageframe1.page2.text5.value
>sum t2 to thisform.pageframe1.page2.text6.value
>sum t3 to thisform.pageframe1.page2.text7.value
>
> count  to thisform.pageframe1.page2.text8.value
> thisform.pageframe1.page1.grid2.Visible=.f.
> thisform.pageframe1.page2.grid1.setfocus()
>
>
>best regards.
>m.qasem
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform