Export & Windows Service

Hi

I've got an issue when I'm trying to export from a TfrxReport when running as a service.

v4.6.5

Basically I have this piece of code

frxReport1.LoadFromFile('Report.fr3');
//set some variables
frxReport1.PrepareReport;
frxPDFExport1.Stream := AReportStream;
frxReport1.Export(frxPDFExport1);


The stream is then passed to an email server.

When I run this as an application, it works fine, in that the pdf is generated correctly.

When I run it as windows service, the pdf is "corrupted" in that adobe cannot open it - although I suspect it is empty!

The service itself is running under the local system account and is set to "Interact with Desktop"

I've also tried the JPeg Export but have the same issue.

Any help would be fantastic, I've got the settings on the components below

Thanks

Andy Baptie

object frxPDFExport1: TfrxPDFExport
ShowDialog = False
UseFileCache = False
ShowProgress = False
OverwritePrompt = False
PrintOptimized = False
Outline = False
Background = False
HTMLTags = True
Author = 'FastReport'
Subject = 'FastReport PDF export'
Creator = 'FastReport (http://www.fast-report.com)'
ProtectionFlags = [ePrint, eModify, eCopy, eAnnot]
HideToolbar = False
HideMenubar = False
HideWindowUI = False
FitWindow = False
CenterWindow = False
PrintScaling = False
Left = 124
Top = 128
end

object frxReport1: TfrxReport
Version = '4.6.5'
DotMatrixReport = False
IniFile = '\Software\Fast Reports'
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator]
PreviewOptions.Zoom = 1.000000000000000000
PrintOptions.Printer = 'Default'
PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 39092.527567534700000000
ReportOptions.LastChange = 39603.523682766200000000
ScriptLanguage = 'PascalScript'
end

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.