Page 1 of 1

Summary Report

Posted: August 10th, 2016, 2:24 am
by MrTaco
Good Day

1. I tried to use this logic so i can get a summary report on the household Questionnaire.

2. I would also like to include household Roster into this summary pointing out 1. Person no and Individual number from the roster.

Thanks.

Code: Select all

// Write out and display household summary report
function showHouseholdReport()
	string reportFilename = maketext("%sreport.txt", pathname(Application));
	setfile(tmpFile, reportFilename);
	filewrite(tmpFile, "Household Summary Report");
	filewrite(tmpFile, "------------------------");
	filewrite(tmpFile, "");
	filewrite(tmpFile, "District %d Village %d Household Number %d", 
						visualvalue(HH_DISTRICT), 
						visualvalue(HH_SMALL_AREA_LAYER), 
						visualvalue(HH_QNR_NO));

Re: Summary Report

Posted: August 10th, 2016, 5:53 am
by josh
Look at the example here: http://teleyah.com/cspro/DCJune2015/07- ... urvey7.zip
and the accompanying lecture notes here: http://teleyah.com/cspro/DCJune2015/07- ... diaGPS.pdf

This example prints age, sex and relationship from roster but you can modify it to print person number and whatever other variables you wish.

Re: Summary Report

Posted: August 10th, 2016, 8:09 am
by MrTaco
Hi Josh

I managed thank you for advice and much appreciated.

now am struggle with the linking of household dict to individual, i applied this logic but still

Code: Select all

INDIVIDUAL_PROVINCE = HH_PROVINCE;
INDIVIDUAL_DISTRICT = HH_DISTRICT;
SMALL_AREA_LAYER = HH_SMALL_AREA_LAYER;
INDIVIDUAL_VISITING_POINT = HH_VPN  ;
INDV_QNR_NO = HH_QNR_NO ;

if loadcase(SABSSM_V_HOUSEHOLD_QUEST_DICT,HH_PROVINCE,HH_DISTRICT,HH_SMALL_AREA_LAYER,HH_VPN,HH_QNR_NO)= 0 then 
   errmsg("Case file not entered");
endif;

Re: Summary Report

Posted: August 10th, 2016, 11:32 am
by josh
What is the problem that you are having? Are you getting an error?

Re: Summary Report

Posted: August 11th, 2016, 2:26 am
by MrTaco
it doesn't respond to it at all...

it really frustrates me....

Re: Summary Report

Posted: August 11th, 2016, 7:18 am
by josh
From the code you are posting you are copying the values in the IDs for the HH dictionary into the values for the Individual dictionary and then using the HH IDs to load from the HH dictionary. Seems like you would either want to copy from HH IDs to Individual IDs and then load from Individual or copy from Individual IDs to HH IDs and then load from Household.

Re: Summary Report

Posted: August 11th, 2016, 8:07 am
by MrTaco
may I email you the program and look at it please...

maybe am missing something