Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Progress bar while running a report
Message
 
 
To
11/02/2002 13:26:49
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00618464
Message ID:
00618497
Views:
12
>>Hi everybody,
>>
>>I run report to a PDF. I do it twice, because I need to do some special processing on the file. I hide Printing window. How can I show my own progress bar to give user some info, what's going on... Or may be it's better to show some animation?
>>
>>Do you have some ideas about it?
>>
>>Thanks in advance.
>
>Nadya,
> If it were me, I would do animation. Just an opinion...

It doesn't seem to work: The avi is displayed, but it took 15min., it didn't finish, so I interrupted...
********************************************************************
*  Description.......: SpecialMTD() - initializes MTD Report
*  Calling Samples...:
*  Parameter List....: tcTable, tlPDF, tlChooseVersion
*  Created by........: Nadya Nosonovsky 01/08/2001 11:02:27 AM
*  Modified by.......: Nadya Nosonovsky 02/11/2002 01:36:41 PM
********************************************************************
lparameter tcTable, tlPDF, tlChooseVersion
if empty(m.tcTable)
	if vartype(oJC)="O"
		tcTable=oJC.outTable
	else
		tcTable="\redp\output\Products\mtd\MTDCT0011Toll" && For tests only
	endif
endif
local lnSelect, loMessage, lcMessageCaption, ccAviFile
#define icMessageBoxCaption "Preparing MTD Report..."
*#define ccAviFile "Printing.avi"
lnSelect=select()
if !OpenTble(m.tcTable,"WorkTable",,"Situs")
	return .f.
endif
select WorkTable
private llHidePrinting
llHidePrinting=.t.
*wait window "Wait while preparing MTD Report..." nowait

local lcFileName, llReturn
llReturn=.t.
if vartype(m.gcTempPath)='C'
   lcFileName=addbs(m.gcTempPath)+'dummy.pdf'
else
   lcFileName=addbs(sys(2023))+'dummy.pdf'
endif   
if m.tlPDF or (m.tlChooseVersion and ;
              messagebox("Do you want to produce PDF (Yes) or directly print (No)?",36, ;
                         "What report version?")=6)
	if CreatePDF(m.lcFileName)
	    lcMessageCaption = 'Printing to PDF'
	    ccAviFile = "DocToPdf2.avi"
	    loMessage = newobject("Animation", "Animation.vcx", "", ; && Now use Daniel's vcx class instead
		lcMessageCaption, ;
		icMessageBoxCaption, ;
		ccAviFile)
		doevents()		
		report form XPMTDReport to printer noconsole
		delete file (m.lcFileName)
		release loMessage
		if !CreatePDF(m.tcTable)
			llReturn=.f.
			use in select("WorkTable")
		endif
	else
		llReturn =.f.
		use in select("WorkTable")
	endif
else && Printed version
    lcMessageCaption = 'Printing to temp file'
    ccAviFile = "Printing.avi"
    loMessage = newobject("Animation", "Animation.vcx", "", ; && Now use Daniel's vcx class instead
		lcMessageCaption, ;
		icMessageBoxCaption, ;
		ccAviFile)
	doevents()	
	report form XPMTDReport to file (m.lcFileName) noconsole
	delete file (m.lcFileName)
	release loMessage
endif
*set printer to default
if vartype(oJC)="O" and vartype(oJC.StepRecCount)="N"
	oJC.StepRecCount=reccount("WorkTable")
endif
wait clear
select (m.lnSelect)
return m.llReturn
Do you have other ideas?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform