Using ReportBuilder Enterprise 7.02 I get an AV when text-searching on a report which is empty. The first message is ...TppProducer is nil, subsequent messages state that there is an ESearchEngineError.
I am unable to recreate this error on my machine and this was not a known issue for RB 7.02. It is always recommended that you update to the latest version of ReportBuilder, 7.03. If, when you update, the problem still exists, please provide exact steps I can take to recreate the issue on my machine or perhaps send a small example.
Using RB 7.03 Enterprise and the CustomAutosearchDialog.dpr
- Set the TextSearchSettings of ppReport1 to Enabled=True Visible=True - Run the program - In the upcoming dialog enter 'XXXXXXXXXX' as company name - close the dialog --> You have now displayed a white page, the status bar says "page 0" - enter "xxx" in the text serach field - click the search button --> an error occurs saying that TppProducer is nil
function TppTextSearchCustomEngine.SearchRequestedPages: Integer; ... begin liIndex := StartingPageNo; <<------------- Set to 1 lbFoundTextOnPage := False; lbLastPage := False; Result := -1;
{support searching when previewing for QA architecture} if FSearchToLastPage then StopInternalReportPrinting(Viewer.Report);
while not(lbLastPage) and (not(lbFoundTextOnPage) or FSearchToLastPage) and not(Cancelled) do begin
if (liIndex <> Viewer.CurrentPage.AbsolutePageNo) or (Viewer.DesignViewer) then begin RequestPage(liIndex);
{current page is assigned in EventNotify of ancestor when page is received and is from the offscreendevice} lPage := CurrentPage; <<------------------ returns NIL because there is no pade displayed! end else lPage := Viewer.CurrentPage;
if (lPage = nil) then <<-------------- Here we go!! raise ESearchEngineError.Create('TppTextSearchCustomEngine.SearchRequestedPages: Requested page is nil.');
I am wondering why you are unable to reproduce the problem.
Ok, I was finally able to recreate the issue. Sorry about that. I went ahead and wrote a small patch that fixes the problem. Please send a request to support@digital-metaphors.com for this patch and I'll get it right out to you.
Comments
I am unable to recreate this error on my machine and this was not a known
issue for RB 7.02. It is always recommended that you update to the latest
version of ReportBuilder, 7.03. If, when you update, the problem still
exists, please provide exact steps I can take to recreate the issue on my
machine or perhaps send a small example.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
- Set the TextSearchSettings of ppReport1 to
Enabled=True
Visible=True
- Run the program
- In the upcoming dialog enter 'XXXXXXXXXX' as company name
- close the dialog
--> You have now displayed a white page, the status bar says "page 0"
- enter "xxx" in the text serach field
- click the search button
--> an error occurs saying that TppProducer is nil
Thanks for any info.
Bernd
After following your exact steps, I am still unable to recreate this issue
using RB 7.03. Try updating to the latest version and test with that.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Tracing thru the code:
function TppTextSearchCustomEngine.SearchRequestedPages: Integer;
...
begin
liIndex := StartingPageNo; <<------------- Set to 1
lbFoundTextOnPage := False;
lbLastPage := False;
Result := -1;
{support searching when previewing for QA architecture}
if FSearchToLastPage then
StopInternalReportPrinting(Viewer.Report);
while not(lbLastPage) and (not(lbFoundTextOnPage) or FSearchToLastPage)
and not(Cancelled) do
begin
if (liIndex <> Viewer.CurrentPage.AbsolutePageNo) or
(Viewer.DesignViewer) then
begin
RequestPage(liIndex);
{current page is assigned in EventNotify of ancestor when page is
received and is from the offscreendevice}
lPage := CurrentPage; <<------------------ returns NIL because
there is no pade displayed!
end
else
lPage := Viewer.CurrentPage;
if (lPage = nil) then <<-------------- Here we go!!
raise
ESearchEngineError.Create('TppTextSearchCustomEngine.SearchRequestedPages:
Requested page is nil.');
I am wondering why you are unable to reproduce the problem.
Bernd
Bernd
Ok, I was finally able to recreate the issue. Sorry about that. I went
ahead and wrote a small patch that fixes the problem. Please send a request
to support@digital-metaphors.com for this patch and I'll get it right out to
you.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Bernd