Summary Report

Discussions about CSEntry
Post Reply
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

Summary Report

Post 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));
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Summary Report

Post 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.
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

Re: Summary Report

Post 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;
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Summary Report

Post by josh »

What is the problem that you are having? Are you getting an error?
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

Re: Summary Report

Post by MrTaco »

it doesn't respond to it at all...

it really frustrates me....
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Summary Report

Post 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.
MrTaco
Posts: 128
Joined: November 18th, 2014, 1:55 am

Re: Summary Report

Post by MrTaco »

may I email you the program and look at it please...

maybe am missing something
Post Reply