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

VFP 9 Report Missing Some, Not All Text Data 1

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
US
Hi,

Back again after spending a couple hours trying to fix this...

I have a report where a lot of text data is missing completely. It uses a single cursor and there is NO missing data there. I've tried using mode 14 (web pages) and standard vfp syntax and they are all consistently dropping field data. All fields in the cursor have data and the report shown below would be completely filled if working properly. I have made the fields wider. The report below was generated before adding the 'zz' prefixes. VFP9sp2...
Code:
	*_Screen.oFoxyPreviewer.lQuietMode = .F.     && .T.
	Select 'curSqlTable'
BROWSE LAST 
	Report Form ('.\reports\Owned') All To PRINTER PROMPT preview
	*Report Form ('.\reports\Owned') All Object Type 14 To File (m.lcReportHtmlFileName)
Missing_Data_p3ivfu.jpg


In the report's fields I have prefixed the field's data with a 'zz' + string (like 'zz' + allt(curSqlTable.PURCHASE_DATE)) to see if it would at least print the zz part, and it will not.

za_qyklpg.jpg


What else can I test?

Thanks, Stanley
 
Check "print when" conditions, in that tab especially look for the "print repeated values" setting.

Chriss
 
Is curSqlTable.PURCHASE_DATE a string?

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 trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
Stanley,

From your screen shot, it looks as if all the data is present in the report, but some of it is being chopped off at the left-hand side, in particular in the Name column. For example, we are seeing "KY.com" instead of whatever it is supposed to be.

Is that simply because your screen shot doesn't cover the entire width of the report? Or is that data actually missing from the Name column?

If the latter, the fault might be because of your "font scaling" setting within Windows. If that setting is more than 100%, you could try reducing it (which you do in the Display Properties dialogue).

If that solves the problem on your computer, place the following code at the start of your main program, so that you don't have to change the setting on every computer:

[tt]DECLARE INTEGER SetProcessDPIAware IN WIN32API
SetProcessDPIAware()
[/tt]

As I said, this is a long shot, so don't raise your hopes.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Your idea to see at least 'zz' is good, actually, but unfortunately fails with both reasons I and Mike think about.

I also see the background of Griffs question why would a date come from a string field, but since you didn't get an error, just no output, I think the problem isn't there. Setting the option "Print repeated value" to "No" literally has that result, and if you have the same date in two consecutive records only one date prints, that also doesn't change when prefixing everything with zz, as all string then still remain repeated values.

Mike also has a point about the overall size of strings and report controls. With VFP9 the report engine had a major change to usage of GDI+ and many reports then printed nothing or just ellipsis (...) when their layout was just exactly as necessary for the legacy print engine, but gdi used just a few pixels or points or foxels more. VFP does suppress values for the use case of avoiding cut off numbers to be printed. Which could be a major issue not only in bills. But this decision influenced all report fields, not only those with numeric data. For character expressions, a trim mode was introduced and you can influence how values too wide for the field size are handled in the Format tab.The default for it is actually simple cut off to the nearest character, so you should see text. Therefore I do think it must be repeated values. I mean the dates do print. The cut Off Mike sees on the left is just, I think, a screenshot cutoff, not report trimming. Your focus was on the gaps on the right side.

My "theory" is also supported by the values printed, though it looks like there are repeats of Porkbun LLC, but looking closely you see the printed values differ from the previous with an added or removed comma. I can also imagine many rows have the same dates, especially when you print sorted by the purchase date. So that makes it pretty obvious, if you know the feature exists.

And I know, you have to deal with data as it comes, but, well, you don't need to use the suppression of repeated values. I guess you expected something else from it.

Chriss
 
Actually I was wondering how you did an alltrim() on a date (and thought that he might have some error handler that enabled the report to continue unabated).


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 trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
Hi,

Chriss said:
The cut Off Mike sees on the left is just, I think, a screenshot cutoff, n

Yes, it was intentional, a screenshot cutoff for security reasons so this can be shared.

Scaling is 100%

All suggestion about strings, dates, report field settings and data is mute as many of the same fields are populated, agreed?

The 1st column is complete and NO data missing. Attached is two screenshot showing the report again and data with the 'zz' actually in play.

q1_dxqsrq.jpg


q2_uiizqu.jpg


I'm at a loss!

Tested with VFP9sp2

Thanks,
Stanley
 
Hi,

I just now tested it with setreportbehavior 80, with same results.

I also added
Code:
DECLARE INTEGER SetProcessDPIAware IN WIN32API
SetProcessDPIAware()

No change, same missing data results...

Also tested with VFP10 Advanced, with same results.

Thanks, Stanley


 
Mike said:
DECLARE INTEGER SetProcessDPIAware IN WIN32API
SetProcessDPIAware()

Mike, does this actually make VFP dpi aware, or just some workaround?

Thanks, Stanley

 
Griff said:
(and thought that he might have some error handler that enabled the report to continue unabated)

And, no error code exclusions... These screenshots shows all this...
q3_z8lgig.jpg


q4_ytylt8.jpg


Thanks, Stanley
 
More...

FoxyPreviewer was completely commented out of the app, and problem still persists...

Thanks, Stanley
 
Chriss said:
Check "print when" conditions, in that tab especially look for the "print repeated values" setting.

Bingo! Damn... Chriss, you're good. That was the issue. Before quitting for the day, I took a re-look at this thread and re-saw your suggestion and tried it and never really expected it to work. For that to work suggests VFP has other (unknown) issues, as it was working when it wanted to and not predictable. Anyway, thanks so much for showing the way...

Thanks, Stanley

 
and never really expected it to work
I was pretty sure that's it, looking at the values. It would have been even easier to be sure, if you had also posted a screenshot of the brwose of the report data.

stanlyn said:
For that to work suggests VFP has other (unknown) issues, as it was working when it wanted to and not predictable
It does exactly what it should, compare with previous row value When equal print blank, when not, print the value.

As the help describes it:
help said:
Print repeated values
Specifies whether the report engine tracks changes between successive values of the report control's output and renders only when the value changes.

Yes
Render output for the control every time the band is processed by the report engine.

No
Render output for the control only if the value is different from the last time the control output was evaluated.



Chriss
 
Maybe you meant something completely different caused the issue, never mind.

Chriss
 
Stanley,

Good to see that Chris has given you the answer.

Please keep in mind that, when a forum post gives you a good solution to a problem, you can flag it as "Great post". Just click the relevant link in the bottom right corner of the post.

This is useful, as it helps people looking for a solution to the same problem, and it also lets other forum members know at a glance that the problem is solved, so they don't need to spend any more time on it.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike,

I was completely unaware of what those buttons do and what they are for. I just did one and now see I own a lot of people stars.

Also thanks to everyone here for their input as I learn a lot chasing and testing ideas from others. Thanks again...

Stanley

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top