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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report: Detail section record gets printed multiple times!

Status
Not open for further replies.

Rajesh Karunakaran

Programmer
Sep 29, 2016
535
0
16
MU
Dear all,

Hope you keep all fine.
I am here after a long time (cause of both specific and random reasons)...

I have a weird problem at a client's place. I have a report form printing invoice. The invoice data is in a header file and corresponding Lines file. There is only 1 record in line file. I am using a select statement to compile data to be printed. When this data is sent to printer using a report form, the line record gets printed multiple times, sometimes 2, sometime more than 2 etc. When I checked the data, it's perfect, not duplication on item data or invoice id in header file. Too, this doesn't happen with all invoices. I had a thorough check (as far as the efforts concerned, I believe so) of my code, data etc., tried to reproduce this, but failed.

Just want to ask you, has anyone come across such a weird issue, i.e. you expect only 1 line in report Details section but you get multiple lines of the same record.

Anyone has any idea?

Rajesh

EDIT 20thJan2021: I believe this must be a problem in the report form code (the select statement). I print the invoice immediately after saving the invoice and issuing respective TABLEUPDATE() commands on all participating tables. Then the report form uses it's own select statement to compile the data of the invoice. I have already added NOFILTER and WITH (BUFFERING = .f.) in the SQL. Waiting for feedback from client side.
Let me check thoroughly once again.

If I find something, I will certainly post my observations here.
 
Hi all,

I have been observing status of this problem at client side. It seems, it's solved.

What I have done, as I wrote in my initial post (Edited version), was to add NOFILTER and BUFFERING = .F. in the report form SQL which we know will eliminate any chance of VFP optimizing the environment and forcing to read from the disc always.

However, what I am sad about is that I couldn't reproduce the problem, yet.
Anyway, I am relaxed now that the problem is solved.

Rajesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top