Board index » delphi » Printing just the current record

Printing just the current record

Help,

How do I print the current record using TQuickRep?

I can pass all the records but how can I filter at runtime just the current
record. My Deplhi in 14 days don't seem to cover this subject. I think I
need to pass the current record into TQuickReports filter option, but I am
sure there must be a really easy way.

I don't have alot of knowlage with delphi, but I have a database that works
and now want to run filtered @ runtime reports.

Any comments or help would be most welcome.

Nick Lake

 

Re:Printing just the current record


Hi Nick,
(Please for my mistake in english, I'm french)

I've done the thing.
In fact, you must filtered you table before launch the QuickReport.

Example :

Definition of the Table (in Paradox, it's the same thing in dB or an other)
:

NUM...A(5) -> the first index (num is a unique number in this table)
FIRSTNAME...A(50)
LASTNAME...A(50)

Then, what you are doing :

Table1.Filter:='NUM ='+#39+Table1.FieldByName('NUM').AsString+#39;
Table1.Filtered:=true;

Then launch your QuickReport (for example : Report.PreviewModal)

After that, don't forget : Table1.Filtered:=false;

That's all.
See you soon. Philippe.

Re:Printing just the current record


If you had Reportbuilder, they have an option to print
the current record.  With the versions of quickreport I used
to use, you had to set a range or do a filter.  If you are
going to get big into database stuff and have a few hundred
dollars in your budget you should look into Reportbuilder.  I had
the pro version of Quickreport and am in the process of porting
all reports to Reportbuilder and dumping Quickreport forever.

Quote
<PanelsP...@compuserve.com> wrote in message

news:7pr5id$fjk8@forums.borland.com...
Quote
> Help,

> How do I print the current record using TQuickRep?

> I can pass all the records but how can I filter at runtime just the
current
> record. My Deplhi in 14 days don't seem to cover this subject. I think I
> need to pass the current record into TQuickReports filter option, but I am
> sure there must be a really easy way.

> I don't have alot of knowlage with delphi, but I have a database that
works
> and now want to run filtered @ runtime reports.

> Any comments or help would be most welcome.

> Nick Lake

Re:Printing just the current record


Quote
>I can pass all the records but how can I filter at runtime just the current
>record. My Deplhi in 14 days don't seem to cover this subject. I think I
>need to pass the current record into TQuickReports filter option, but I am
>sure there must be a really easy way.

The Tquickrep component has a dataset property.
this is the dataset it iterates through.
If this value is NIL only the current record of table fields are attached to
prints.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads