Duplicate data

Hi,

public boolean fetch()
{
boolean ret;
QueryRun qr;
Query q;
;
qr = new QueryRun(element.query());
element.execute(3);
element.execute(2);
closingBalDebit = 0;
closingBalCredit = 0;

while (qr.next())
{
EmployeeCost = qr.get(tablenum(iDMS_EmployeeCost));
if (EmployeeCost.AccountNum like “75.1*”)
{
accountNum = EmployeeCost.AccountNum;
accountName = EmployeeCost.AccountName;
//Opening Balance Debit
select sum(AmountCur) from ledgerTrans
where ledgerTrans.AccountNum == EmployeeCost.AccountNum
&& (ledgerTrans.TransDate == fromDate || ledgerTrans.TransDate == toDate)
&& ledgerTrans.AmountCur > 0
|| ledgerTrans.dataAreaId == divisionId;
openingBalDebit = ledgerTrans.AmountCur;

//Opening Balance Credit
select sum(AmountCur) from ledgerTrans
where ledgerTrans.AccountNum == EmployeeCost.AccountNum
&& (ledgerTrans.TransDate == fromDate || ledgerTrans.TransDate == toDate)
&& ledgerTrans.AmountCur < 0
|| ledgerTrans.dataAreaId == divisionId;
openingBalCredit = ledgerTrans.AmountCur;

//During the month debit
select sum(AmountCur) from ledgerTrans
where ledgerTrans.AccountNum == EmployeeCost.AccountNum
&& (ledgerTrans.TransDate >= fromDate || ledgerTrans.TransDate <= toDate)
&& ledgerTrans.AmountCur > 0
|| ledgerTrans.dataAreaId == divisionId;
duringTheMonthDebit = ledgerTrans.AmountCur;

//During the month credit
select sum(AmountCur) from ledgerTrans
where ledgerTrans.AccountNum == EmployeeCost.AccountNum
&& (ledgerTrans.TransDate >= fromDate || ledgerTrans.TransDate <= toDate)
&& ledgerTrans.AmountCur < 0
|| ledgerTrans.dataAreaId == divisionId;
duringTheMonthCredit = ledgerTrans.AmountCur;

//Closing Balance Debit and Credit
closingBalDebit = openingBalDebit + duringTheMonthDebit;
closingBalCredit = openingBalCredit + duringTheMonthCredit;

}
element.execute(1);

}

return ret;
}

Hi while executing this report all accounts starting 75.1 is coming but the last record is printing continuosly can you just tell how to avoid that duplicate data

Place element.exeucte(1); with in the if loop.

Hi,

I have tried by putting element.execute(1) in the if loop but it is executing only some records within the single page.Rest of 75.1 series are not displaying

As kranthi told put element.execute(1) inside the loop.

finaly

return true;

hope this will work.

Thanks,

Saju.K

Hi,

Thank you i got.

what exactly your query contains?

Hi,

I got the report correctly.But one slight doubt,instead of getting the total in a page footer for all real fields.It should display in the last record of footer.Can you tell how to do.

Hi,

Footer Only available for generated designs. Appears at

the end of a group of records. Use it to display

items such as sub totals.

PageFooter Appears at the bottom of every page in a report.

Use it to display items such as page numbers.

Thanks,

Saju.K

ya i know that.but i am asking can we display in auto design

Epilog Appears at the end of the report. Use it to display
items such as a logo. The epilog is printed just after
the page footer on the last page in a report.

Just check it.I never used Epilog.

Thanks,
Saju.K

Hi,

This epilog will display just above the footer in the last page.But i want as for example,if the record is as 75.1,75.101,etc all 75.1 series like taht i fetched,in that after completing 75.1 series records it should display the total in the last record(i.e.sum of 75.1 series).I added those values but i want to display the total in the last record

Hi,

Can anybody tell me how to introduce a total inbetween the records in the report

Hi,

I think it may works if you write the display method.

Saju.K.

I have found the solution and solved .

Hi,

I kept the counter for number of records.If the number of records is equal to 73 then total will display in that execution.But For other records it is not displaying.If i gave the number of records equal to 113 it should display the total but not displaying.Can anybody tell me.

Myself got the total and completed