ClientReport Reset
Running with a RB server accessing it via Delphi EXE using rsClientReport
and DADE - I can't get the report to reset after it's been viewed once.
This seems like a common issue throughout the newsgroups and the suggested
solutions don't seem to work. Report.Reset and Viewer.Reset have no effect.
Thanks in advance! Jon Gray
RB 7 Server via DOA into Oracle / RB 7 Enterprise / Delphi 6 SP2
and DADE - I can't get the report to reset after it's been viewed once.
This seems like a common issue throughout the newsgroups and the suggested
solutions don't seem to work. Report.Reset and Viewer.Reset have no effect.
Thanks in advance! Jon Gray
RB 7 Server via DOA into Oracle / RB 7 Enterprise / Delphi 6 SP2
This discussion has been closed.
Comments
report.CloseDataPipelines
That seems to work for me.
associated with a report?
I see CloseDataSource but it too isn't valid for the rsClientReport.
Am I in the wrong spot altogether?
There are differences between Report and ClientReport though they do
share a common ancestory and have many similarities as well. Therefore
answers you see in other newsgroup may not apply.
Try the following:
ClientReport.RefreshRequest := True;
ClientReport.Print;
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
This didn't work for me. The Autosearch is not displayed again. Everything
still kinda works, but the report is not respecting new autosearch values I
stuff in for example.
Sorry I did not understand what you are trying to do. Perhaps my reply
to the thread above this one is applicable. If not then I will need more
details....
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I'm looking for a way to completely "reset" a TrsClientReport so it behaves
exactly like it does the first time it's loaded and executed. So the
AutoSearch Dialog fires normally and the query data is refreshed.
I researched this and put together a simple example that I think
satisifies your requirements. I modified the
RBServer\Demos\Client\ClientReport example as shown below. It probably
should be a little simpler than this, but the ClientReport is optimized
to cache pages and to cache autosearch information and the Server does
the same. There are situations in which you want to flush one cache but
not the other.
procedure TfrmClientReport.btnPrintClick(Sender: TObject);
begin
{specify the report to execute}
rsClientReport1.VolumeName := 'Report Forms';
rsClientReport1.ReportName := 'AutoSearch\Biolife Table';
{if re-running the same report, this tells the server to destroy the
existing
report instance and create a new one.}
rsClientReport1.RefreshRequest := True;
{if re-running the same report, this tells the client report to flush
its
local cache and request the report pages from the server.}
rsClientReport1.Reset;
{if re-running the same report, this tells the client report to clear
existing
autosearch information}
rsClientReport1.AutoSearchGroups.Clear;
rsClientReport1.Print;
end;
procedure
TfrmClientReport.rsClientReport1ReceiveAutoSearchFields(Sender:
TObject);
begin
{set the search values that have been received from the server}
SetAutoSearchValues;
{suppress the autosearch dialog and send the search values to the
server}
rsClientReport1.ShowAutoSearchDialog := False;
rsClientReport1.PrintToDevices;
end;
procedure TfrmClientReport.SetAutoSearchValues;
begin
if (rsClientReport1.AutoSearchFieldCount > 0) then
begin
FCount := FCount + 1;
{this code simply toggles the search value from S to C}
if (FCount Mod 2 = 0) then
rsClientReport1.AutoSearchFields[0].SearchExpression := 'S'
else
rsClientReport1.AutoSearchFields[0].SearchExpression := 'C';
rsClientReport1.AutoSearchFields[0].ShowAllValues := False;
end;
end;
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com