Board index » off-topic » Newbie question - Printing single record reports
Newbie question - Printing single record reports
2004-04-21 11:17:18 AM
Using delphi 7 with the bde and paradox 4.0 tables.
I'm trying to figure out how to pass the current record to a report
previewer. The table containing the information has a keyed field "Tag#".
When the user views that tag# in a form, edits, browses memo fields, etc,
how can I pass the value of the tag# field to quickreport in order to print
only that tag number, and not all 15,000+ of them ?
I've used the following code in order to allow the user to input a value for
the tag# , but can't figure out how to do it without the user having to
enter a value.
procedure TfmRepairReportOptions.btnPrintRepairFormClick(Sender: TObject);
ShowMessage(Message + ' Try Again.');
with dmRepairsReport.tbRepairs do
if (TagNo < '100') or (TagNo>FieldByName('TAG#').AsString then
raise ERangeError.Create('Tag Number does not exist!')
Obviously I wouldn't have to use the If greater than, less than statement,
because the tag number does exist, because the user is currently viewing it,
but I'm not sure how to change the rest.
Thanks in advance.