[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Thomaslp

1/25/2006 12:26:00 PM

Hello,
I have created a repport with the report wizard. This report fetches data
from one table. Now I would like to add data from a second table. The only
problem is that the 2 tables are not in the same table collection, and also
the data is registered in 2 different companies. I have made a job that
selects and print the needed data. Now I would like to use this code on my
report. How do I do this. I think that I should override the reports fetch()
method. But how do I make the code appear on the printed report?

I have the following code:

LedgerJournalTrans lt;
VendBankAccount vba;


while select * from lt where lt.JournalNum=="XXX"
{

print lt.Voucher," ",lt.AccountNum," ",lt.AmountCurDebit;
select accountnum,registrationnum from vba where
vba.Vend==lt.AccountNum;
print "registration number for bank: ",vba.RegistrationNum;
print "account number for bank: ",vba.AccountNum;
}

In my existing report I print the info from the table LedgerJournalTrans,
but I would now like to include the vendor bank information on the report.
How?

Best regards
Thomas


1 Answer

Samuel L Matzen

1/26/2006 1:14:00 AM

0

Thomaslp,

Use something like:

this.send(lt);

this will send the "lt" record to the body sections using the underlying
"lt" table.

-Sam


"Thomaslp" <Thomaslp@discussions.microsoft.com> wrote in message
news:5D1E8385-4524-440F-8281-0F11F608B6E9@microsoft.com...
> Hello,
> I have created a repport with the report wizard. This report fetches data
> from one table. Now I would like to add data from a second table. The only
> problem is that the 2 tables are not in the same table collection, and
> also
> the data is registered in 2 different companies. I have made a job that
> selects and print the needed data. Now I would like to use this code on my
> report. How do I do this. I think that I should override the reports
> fetch()
> method. But how do I make the code appear on the printed report?
>
> I have the following code:
>
> LedgerJournalTrans lt;
> VendBankAccount vba;
>
>
> while select * from lt where lt.JournalNum=="XXX"
> {
>
> print lt.Voucher," ",lt.AccountNum," ",lt.AmountCurDebit;
> select accountnum,registrationnum from vba where
> vba.Vend==lt.AccountNum;
> print "registration number for bank: ",vba.RegistrationNum;
> print "account number for bank: ",vba.AccountNum;
> }
>
> In my existing report I print the info from the table LedgerJournalTrans,
> but I would now like to include the vendor bank information on the report.
> How?
>
> Best regards
> Thomas
>
>