Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print via myform
Message
From
07/11/2004 20:17:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
07/11/2004 16:02:29
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 5
Miscellaneous
Thread ID:
00959007
Message ID:
00959036
Views:
9
I think that the most universal solution for printing, which will likely work on most printers, is to create a VFP report. You can call a report from your form.

Since the report expects an underlying cursor or table, you can create a cursor with a single record. Use report expressions that are based either on fields in your cursor, or on variables.

HTH,

Hilmar.

>hi all,
>
>i want to print or view what i get at myform.mygrid via my code under.
>
>via command (press to view or print)
>
>
>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
>
>thanks.
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