Board index » delphi » Printing current record

Printing current record

How do I do that?
 

Re:Printing current record


Hi

Assuming you are talking about Quick Reports, all you need to do is make
sure you have no dataset properties set on the TReport component. Set all
the dataset properties as usual on each of the items on the report.

Regards

Rick

Quote
"{*word*73}" <nom...@mymail.com> wrote in message news:3a53b318$1_2@dnews...
> How do I do that?

Re:Printing current record


Tank's it did work but only if I set the PRINTIFEMTY property to true.

Quote
"Rick Clark" <rcl...@NOSPAMrequis.com> wrote in message

news:931ssi$9jo8@bornews.inprise.com...
Quote
> Hi

> Assuming you are talking about Quick Reports, all you need to do is make
> sure you have no dataset properties set on the TReport component. Set all
> the dataset properties as usual on each of the items on the report.

> Regards

> Rick

> "{*word*73}" <nom...@mymail.com> wrote in message news:3a53b318$1_2@dnews...
> > How do I do that?

Re:Printing current record


If you really only want to print the CURRENT record you should definitely
create a SQL to retrieve just the current record & then build your Q-Rep with
it's labels pointing to the SQL rather than the base table.

The reasons are multiple:

1. If you have a big table Q Rep will be very slow to open if you are opening
the report connected to the whole table.

2. When you close the table your form will jump to the last record ... a pain
in the arse & not good for the user.

I always base my Q-Rep's on SQL it is hugely faster & also more controlable as
you can generate calculated fields with the SQL rather than struggle with
Q-Reps Expressions.

==

To make a SQL that will do the necessary:
(I include this just incase you can't do it, sorry if I'm underestimating your
ability)

1. Drop a SQL on the form.
2. In its Database property write the database name.

3. In its "MasterSource" property write the name of the DataSource whose
current record you want.

4. In its SQL property write the following lines:

SELECT *
FROM [write the name of the table here
WHERE keyfield = :keyfield;

note that "keyfield" refers to the primary key field of the table & datasource

I hope this is useful.

Other Threads