Root > How to... > report instead of sending it? > ...always create .elp file?

...always create .elp file?

Previous pageReturn to chapter overviewNext page   
1. If you are looking for saving local reports - we recommend that you use "Save bug report to file" option. See also: How to get file name for bug report? How to add/save exception to a log?
2. If you are looking for recovery from errors during sending - we recommend that you use "Save bug report copy to My Documents folder" and/or "Copy bug report to clipboard" options. See also: Dealing with send failures.
3. If you are looking for saving .elp reports with user's consent - see this example.


Full bug report (e.g. with screenshots, attached files, previous reports; it is usually stored packed inside a single .elp file) is generated only for sending. If you want to capture this file into local folder or network share, insert it into database, etc. even if sending was not performed (for example, user has selected "Do not send" button in a dialog) - then you can use this code:


  EDialog,                // for RegisterDialogClassFirst
  EDialogWinAPIMSClassic, // for TMSClassicDialog 
  ETypes;                 // for constants
  // Subclass standard dialog class to alter EurekaLog behaviour.
  // Of course, you should replace TMSClassicDialog with another 
  // appropriate class if you don't use MS classic dialog style
  TMSClassicDialog = class(EDialogWinAPIMSClassic.TMSClassicDialog)
    function ShowModalInternal: TResponse; override;
{ TMSClassicDialog }
function TMSClassicDialog.ShowModalInternal: TResponse;
  X: Integer;
  Result := inherited;
  // This happens when user clicks on "Details" link - 
  // one dialog has to be replaced with another
  if Result.SendResult = srRestart then
  // Create files to be send even if no send is used
  if (Failed(Ord(Result.SendResult))) or
     (not CanSend) then
    // Copy all files attachments to some folder.
    // Of course, folder must exist and be writable.
    // Usually there is only one file (.elp), but it can be few files - 
    // depends on your project options
    for X := 0 to FilesToSend.Count - 1 do
        PChar('N:\BugReports\' + 
        ExtractFileName(FilesToSend[X])), False);
  // Register our class to be used by EurekaLog



See also:

Send feedback... Build date: 2022-03-28
Last edited: 2022-03-07
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.

Permanent link to this article: