while select prodTable where prodTable.RouteId==route.RouteId
{
//get the item and dlv time
//get the itemid of prodtable to
tmptable.ItemId=prodTable.ItemId;
while select prodJournalProd where prodJournalProd.ProdId==prodTable.ProdId
{
if(years==year(prodTable.DlvDate) && month==mthOfYr(prodTable.DlvDate))
{
// tmptable.month=month;
//tmptable.years=years;
//i used above statement was used for testing purpose as the data are not coming please note month and year like 2014 and june is coming from contract class
// tmptable.day1daysum=100;
endDate = Global::dateEndMth(mkdate(01,month,years));
NoOfDays = dayOfMth(endDate);
//for a loop for all the days
for(i=1;i<=NoOfDays;i++)
{
switch(i)
{
case 1:
{
//check the delivery time as day or night 6.am to 6 pm
// if(prodTable.DlvTime = >(186060) && prodTable.DlvTime < =(66060))
if(prodTable.DlvTime >= (186060) && prodTable.DlvTime <= (66060))
{
//night shift sum
day1nightsum =day1nightsum+prodJournalProd.qtyError;
// day1nightsum=20; //for testing purpose alone
}//nght shift ends here
else
{
//dayshift sum
day1daysum= day1daysum+prodJournalProd.qtyError;
//tmptable.dayshift=dayshiftsum;
}//dayshift loop ends here
}//case1 ends here
i am trying to print dayshift sum but it is not coming inside the loop