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

Very slightly odd report preview behavior...

Status
Not open for further replies.

GriffMG

Programmer
Mar 4, 2002
6,333
FR
I have a report that exits when you click on it (anywhere in the preview panel).

Normally reports zoom in and out when you click on them, I can't quite see what is different about this one.

Any ideas?



Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
This is probably because you have this:

SET REPORTBEHAVIOR 90

Or, it may be that you are executing the report like this:

REPORT FORM MyReport OBJECT TYPE 1

Either way, you will be using the VFP 9.0-specific preview window, which is a bit different from the classic version - including the point about zoom level that you noticed.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
It's neither of those Mike, I haven't got a 'set reportbeh' anywhere and I haven't used an object at all...

Just:
Code:
report form finalaccountagreement preview next 1

I've even tried creating a new report - completely blank with no code, dataenvironment or contents... it does the same thing?



Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Is the default setting the old reportbehaviour? Even if you don't set it, it will have a setting, so check SET("Reportbehavior")

When starting vfp it's 80 for me.

Bye, Olaf.
 
It is set to 80

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Now it's getting interesting, but I don't know why you get that behavior of exiting instead of zooming now. I can only guess it may have to do with a record in foxuser.dbf, there are records influencing reports (eg their toolbar) in general.

Bye, Olaf.
 
It's my bug.

Just before running the report I updated a grid on the form - which moved a record and that made the report look ok, but with
some kind of internal conflict.

Sorted now (removed the grid1.refresh).

B-)

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Griff,

I suggest you have a look at this article, and tell use whether your report preview window behaves like the one described under "VFP 9.0's alternative preview window":


That will eanble us to eliminate the possibility of a listener-based preview.

Mike




__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Thanks Mike

That's pretty thorough

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
That's pretty thorough

I'm glad you think so. But my reason for pointing you to it was so that you can decide if you have an object-based preview window in force, so that we can eliminate that possibility.

Does your preview behaves like the one described under "VFP 9.0's alternative preview window"?

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
No, it has more zooms than vfp6, but is clearly not as sophisticated as the 90 behaviour.

That said, I have resolved the problem - it's one I have seen cause similar odd problems before... if you have a grid with a complex 'settling' phase, sometimes it is not as settled as it might be when one relies on it - I know VFP is not multi-threaded, but in practise I *think* some processes do 'overlap'.

I had something like this with printing an Invoice, where the grid wasn't 'settled' when the user hit the print key and they got the wrong invoice - I never saw it on my development PC, because it settled very quickly, whereas they were using an aged server and it wasn't as quick...



Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
I'm glad you've solved the problem, but I really don't understand it. I understand your invoice example, but I can't see how that can affect the zoom level in a preview window.

On the other hand, I don't have better suggestions.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
The report is exiting (in my little world of thought) because it rereads the underlying record to see if it matches the FOR clause when you click on the report and it zooms... (I'm thinking it 'repaints' after rereading for the zoom) and as now the condition may be different it says 'nothing to report'...

This is all guesswork!

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top