Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clear
Message
 
To
28/07/2008 07:09:57
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Re: Clear
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01334444
Message ID:
01334476
Views:
17
This is from the foxpro helpfile. Anything here helpful to you?

Example 1
The following example shows how to run a batch report print job with two reports. Visual FoxPro runs through the set of reports twice to obtain a total page count, which is stored in the _PAGETOTAL system variable for enabling Page X of Y expressions in the report layouts.


NORESET specifies that page numbers continue printing with the next report. NOPAGEEJECT specifies that the first page of the second report continue printing on the reverse side of the last page of the first report.


REPORT FORM myReport1.frx TO PRINTER NOPAGEEJECT

REPORT FORM myReport2.frx TO PRINTER NORESET


The following example shows how you can view a preview before sending the report to a printer.

REPORT FORM myReport1.frx TO PRINTER PROMPT NODIALOG PREVIEW


To make the preview window modeless, the following code includes the NOWAIT keyword:

REPORT FORM myReport1.frx PREVIEW NOWAIT




>thank you ,
>i see it with the report show, but how i can print it via printar par not as
>report form bbb to print
>
>
>>Generally when that happens it's because the recordsource is no longer there. If you are recreating "mycur" anywhere, you need to be sure and set the thisform.grid2.reccrodsource property again.
>>
>>This might help:
>>
>>thisform.grid2.SetFocus()
>>Select xxxxx from yyy where zzzz into cursor curReport && CurReport will drive the report
>>REPORT FORM rept1
>>thisform.grid2.RecordSource="mycur"
>>thisform.grid2.SetFocus()
>>tisform.grid2.Refresh()
>>
>>
>>>After i run the report, the grid disappearing ? i want to keep it include information after i run the report
>>>
>>>thanks
>>>
>>>>>i need to print what i have at the gride when i run the code, and keep it
>>>>
>>>>I'm confused about the question.
>>>>
>>>>After you run the report, is the grid still appearing empty? Is that what you want to keep?
>>>>Or is it the data from the SELECT statement that you want to keep?
>>>>Or is everything working, but in the grid you are on wrong record after report?
>>>>
>>>>
>>>>
>>>>>thank you,
>>>>>this code works fine,no errors
>>>>>
>>>>>i want to show you what i need ,
>>>>>
>>>>>i need to print what i have at the gride when i run the code, and keep it
>>>>>
>>>>>thanks
>>>>>
>>>>>
>>>>>
>>>>>>Are you trying to tell me something? Please understand that I am not interested in finding errors in your code by trying to analyze it. But I am interested in making you a better programmer by giving you hints on how to do things the best way.
>>>>>>
>>>>>>First try my way, and if you don't get it to work, you can ask specific questions. Your code to start he report should be something like this
>>>>>>thisform.grid2.SetFocus()
>>>>>>Select xxxxx from yyy where zzzz into cursor curReport && CurReport will drive the report
>>>>>>REPORT FORM rept1 preview
>>>>>>
>>>>>>
>>>>>>>thank you for reply,
>>>>>>>
>>>>>>>
>>>>>>>If Seek(ALLTRIM(thisform.text8.value), "X2", "f1")
>>>>>>>      local lcFind
>>>>>>>      thisform.text5.Value=f1
>>>>>>>  Store F4 to lcFind, thisform.text9.value
>>>>>>>     SELECT F5,f3,f2,f1 FROM x2 WHERE f4=m.lcFind;
>>>>>>>     order BY f5;
>>>>>>>     into CURSOR mycur NOFILTER
>>>>>>>
>>>>>>>thisform.grid2.Visible=.t.
>>>>>>>  thisform.text7.value = Reccount()
>>>>>>>  thisform.grid2.RecordSource="mycur"
>>>>>>>
>>>>>>>
>>>>>>>i run the report as via command button
>>>>>>>
>>>>>>> thisform.grid2.SetFocus()
>>>>>>>  REPORT FORM rept1 preview
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>hi all,
>>>>>>>>>
>>>>>>>>>any help to keep all grids have information after i run the
>>>>>>>>>
>>>>>>>>>REPORT FORM rept1 preview
>>>>>>>>>
>>>>>>>>>thanks
>>>>>>>>
>>>>>>>>Don't run the report from the same cursors. Instead you run a separate SQL select statement to create a cursor which drives the cursor.
ICQ 10556 (ya), 254117
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform