Prblem with current record
I have the following on a ppDBPipeline:
Master data pipeline : ppDBPipeline_Customer_Table
RangeBegin := rbCurrentRecord
RangeEnd := reCurrentRecord
Datasource := DataModule2.DataSource_Ticket_Reports
RangeBegin := rbCurrentRecord
RangeEnd := reCurrentRecord
Masterfield is link by Cust_Num.
The report is called ppReport_Second_Letter.Print
The on clickevent of a button is as follows:
procedure TForm1.Button21Click(Sender: TObject);
var
today : string;
begin
today := DateToStr(Now); // get todays date
DataModule2.Table_Tickets.FieldByName('Second_Letter_Date').AsString
:= today; // post todays date;
DataModule2.Table_Tickets.FieldByName('Ticket_Status').AsString :=
'2nd Letter Sent ?85'; // post the status change;
DataModule2.Table_Tickets.FieldByName('Fine_amount').AsString :=
'85'; // post the amount change;
Datamodule4.ppDBPipeline_Customer_Table.RangeBegin :=
rbCurrentRecord;
Datamodule4.ppDBPipeline_Site_Table.RangeBegin := rbCurrentRecord;
Datamodule4.ppDBPipeline_Customer_Table.RangeEnd :=
reCurrentRecord;
Datamodule4.ppDBPipeline_Site_Table.RangeEnd := reCurrentRecord;
datamodule4.ppReport_Second_Letter.Print;
end;
The report has worked fine beacause we have only had 1 ticket per customer
in the Site_Table.
When I run the report and select the 2nd or 3rd Ticket record the report
shows only the 1st ticket record details.
The DBgrid does not show the first record it stays at the current record.
Am I missing something here.
Cheers SteveW.
Master data pipeline : ppDBPipeline_Customer_Table
RangeBegin := rbCurrentRecord
RangeEnd := reCurrentRecord
Datasource := DataModule2.DataSource_Ticket_Reports
RangeBegin := rbCurrentRecord
RangeEnd := reCurrentRecord
Masterfield is link by Cust_Num.
The report is called ppReport_Second_Letter.Print
The on clickevent of a button is as follows:
procedure TForm1.Button21Click(Sender: TObject);
var
today : string;
begin
today := DateToStr(Now); // get todays date
DataModule2.Table_Tickets.FieldByName('Second_Letter_Date').AsString
:= today; // post todays date;
DataModule2.Table_Tickets.FieldByName('Ticket_Status').AsString :=
'2nd Letter Sent ?85'; // post the status change;
DataModule2.Table_Tickets.FieldByName('Fine_amount').AsString :=
'85'; // post the amount change;
Datamodule4.ppDBPipeline_Customer_Table.RangeBegin :=
rbCurrentRecord;
Datamodule4.ppDBPipeline_Site_Table.RangeBegin := rbCurrentRecord;
Datamodule4.ppDBPipeline_Customer_Table.RangeEnd :=
reCurrentRecord;
Datamodule4.ppDBPipeline_Site_Table.RangeEnd := reCurrentRecord;
datamodule4.ppReport_Second_Letter.Print;
end;
The report has worked fine beacause we have only had 1 ticket per customer
in the Site_Table.
When I run the report and select the 2nd or 3rd Ticket record the report
shows only the 1st ticket record details.
The DBgrid does not show the first record it stays at the current record.
Am I missing something here.
Cheers SteveW.
This discussion has been closed.
Comments
Where are you changing the current record? I did a quick test of the
RangeBegin and RangeEnd properties and everything seemed to work correctly.
I posted my test application below. Perhaps you can alter it and send it
back to me (via email) so I can see what is happening here.
http://www.digital-metaphors.com/tips/CRTest.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com