September 27, 2007, 03:10 PM
MrBlurryQuestion about report for field with no data
I'm creating a FOCEXEC that will produce a report using BY fields and SUM fields. I'm summarize data by year. I'm also only processing data for two years. One of my fields for one year has data and in the subsequent year, it has no data. This particular field does not show up on my report. Should'nt it show, whether there is data or not?
My pseudocode is summarize field1 field2 across yearfield by field 3.
What might be causing the field not to show on my report?
September 27, 2007, 03:32 PM
FrankDutchIf there is no data for that year, you will not see it, unless you force the report to do so.
TABLE FILE CAR
SUM SALES
BY MODEL
ACROSS COUNTRY
COLUMNS ENGLAND AND FRANCE AND SPAIN
END
Spain has no data but you will get an empty column now
September 27, 2007, 04:48 PM
MrBlurryFrankDutch,
Thanks for replying. Question... what about if the data record has information for one year but not for the other year? That is the situation in my case... my records show data for one year in the yearfield, but not for the other year in the yearfield.
September 27, 2007, 05:27 PM
FrankDutchthat was in my answer, but if you want it in your code
TABLE FILE yourfile
SUM FIELD1 FIELD2
BY FIELD3
ACROSS YEARFIELD
COLUMNS THISYEAR AND PREVYEAR
END
The prevyear should be displayed as a column but the data would be empty.
BTW take some time to update your signature, so we know your platform and version!
September 28, 2007, 09:12 AM
MrBlurryThanks for replying... I used your hints and got what I needed.