"Pat Bundon" <pbun...@vigil-inc.com> wrote in message news:395cedbf@dnews...
> Thanks John,
> I thought about it a little more clearly this morning and was able to find
> an example which also reminded me to use Connect.Retrieve. Using that
before
> Crpe1.Connect.Password is set seems to solve the problem.
> I also removed the paramfield[i].retrieve lines. Seems to work well now.
> Thanks for all the pointers. You've been a terrific help!
> Pat Bundon
> for reference, when was crashing the system it always happened on
execution
> of Crpe1.Execute;
> "John Pierce" <jpie...@healthplanning.com> wrote in message
> news:395CE02B.A6BA5B2@healthplanning.com...
> > Pat Bundon wrote:
> > > Hello,
> > > I am getting an abrupt system crash and reboot when I try to access a
> > > Crystal Report (say Report A) through the Seagate Crystal VCL.
> > > "Report A" contains parameter fields which are passed values through
the
> > > vcl. Other reports with parameters work fine, and this report worked
> fine
> > > a few days ago.
> > > I am running CrystalReports 7.0.15, Delphi 4 update3 with Crystal
VCL
> > > 7.52.
> > > The code I wrote for "Report A"
> > > Form1.Crpe1.ReportName:= 'c:\Reports\Report A.rpt';
> > > Form1.Crpe1.ParamFields.Retrieve;
> > > Form1.Crpe1.ParamFields[0].RetrieveValues;
> > > Form1.Crpe1.ParamFields[1].RetrieveValues;
> > > Form1.Crpe1.ParamFields[0].AsDateTime:= startDate;
> > > Form1.Crpe1.ParamFields[1].AsDateTime:= endDate;
> > > Form1.Crpe1.Printer.Retrieve;
> > > Form1.Crpe1.Printer.PreserveRptSettings :=
> > > [prOrientation,prPaperSize,prPaperSource];
> > > Form1.Crpe1.ConnectMethod := useConnect;
> > > Form1.Crpe1.Connect.Password := '_password_';
> > > Form1.Crpe1.Output := toWindow;
> > > Form1.Crpe1.Execute;
> > Upon further thought, I have had problems with CR where paths contain
> spaces.
> > They seem particularly severe with W98.
> > ParamFields.Retrieve clears the values, so, at best,
> > ParamFields[0].RetrieveValues does nothing, and, at worst might cause
your
> > crash.
> > Printer.Retrieve should not be necessary, since you don't change any
> settings,
> > but I
> > don't think it does any harm.
> > After .ConnectMethod I think you have to use .ConnectRetrieve, though
this
> is
> > not tested since I use the LogON.
> > John Pierce