Access violation with TfrxDBDataset.UserName

Hi everybody,

This code works well with FR3.19 ;)
All FR variables are created dynamically.
FormShow :
...
  if not Assigned(frxDBDataset1) then
    frxDBDataset1 := TfrxDBDataset.Create (Self);

  frxDBDataset1.UserName        := 'frxDBDataset1';
  frxDBDataset1.CloseDataSource := False;

  if not Assigned(frxReport1) then
    frxReport1 := TfrxReport.Create (Self);

  frxReport1.DotMatrixReport         := False;
  frxReport1.PreviewOptions.Buttons  := [pbZoom, pbTools, pbNavigator];
  frxReport1.PreviewOptions.Zoom     := 1;
  frxReport1.PrintOptions.Printer    := 'Default';
  frxReport1.ScriptLanguage          := 'PascalScript';
  frxReport1.OnAfterPrint            := frxReport1AfterPrint;
  frxReport1.OnBeforePrint           := frxReport1BeforePrint;
  frxReport1.OnAfterPrintReport      := frxReport1AfterPrintReport;
  frxReport1.Datasets.Add(frxDBDataset1);
...

With FR3.21 the event BeforePrint is never called. ;)
With FR3.23 there's an access violation on
frxDBDataset1.UserName        := 'frxDBDataset1';
;)

Who can explain me ?
Anybody has got the same phenomenon ?

Thank's a lot,
Xavier.

Comments

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.