Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Form to Printer 1

Status
Not open for further replies.

ArevProgrammer

Programmer
Apr 7, 2001
38
US
Hi All,

I have a Date Range window built w/ the screen generator
with a From Date and a To Date. I have variables defined to hold the date data. I have a function in the Cleanup snippet
that does an SQL-Select from a table in table.dbf.
Further down in code I have a REPORT FORM <FormName> to PRINTER which is fine. And after that statement I have placed a USE command to close the table that the report info
was placed in, just in case 2 users are priting the same report.
However, If 2 users are printing the same report of 1200
or more records, the REPORT FORM command takes too long to finish and doesn't get to the next line that issues USE to
close the table so that the next user can print.
This scenario generates a Sharing Violation, File is in use and Alias &quot;&quot; not found.

Any Ideas? Should I select the table created by SQL in
another work area?

Thanks in Advance.


ArevProgrammer
Skapaona@charter.net
 
If I understand you, you are using
Code:
Select ... into table table.dbf
...
Select table.dbf
Report form 
Use &&ie close table.dbf
If this is so, then the simplest way to avoid user clashing is
Code:
Select into [bold]cursor[/bold] table
Select table
Report form
by using a cursor instead of a table you ensure that everyone can have their own private copy of table, so they can all run the report at the same time


 
Can you create your temporary file on a local drive?
 
I think putting it into a cursor will do it. Will memory
constraints be a problem with this?

Thanks for your help!

ArevProgrammer
skapaona@charter.net The sky will always be BLUE!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top