logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Ali  
#1 Posted : Thursday, December 8, 2016 9:35:36 AM(UTC)
Ali

Rank: Newbie

Groups: Registered
Joined: 5/27/2016(UTC)
Posts: 1
Saudi Arabia
Location: Dubai

Thanks: 1 times
Hi All,

I already use GenerateHTMLResult() call to successfuly generate html of a report, but I cannot direct it to a custom folder, it always goes to my user appdata folder.

Thanks in Advance
Ali
epf  
#2 Posted : Thursday, December 8, 2016 4:44:15 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
You might move the result file returned in your target folder using:
public static void MoveSealFile(string source, string destination, bool copy)
this will move also the attached files and modify the references...
so the code look like
Code:
string result = execution.GenerateHTMLResult();
Seal.Helpers.FileHelper.MoveSealFile(result, "yourtargetpath", false);


OR

in the report you can create an output device of type folder having the target file,
then assign the report.OutputToExecute before running the execution,
here is the code:
Code:
            var output = report.AddOutput(new OutputFolderDevice());
            output.FileName = "yourtargetfilename";
            output.FolderPath = "yourtargetfolder";
            report.OutputToExecute = output;
            var execution = new ReportExecution() { Report = report };
            execution.Execute();

Edited by user Thursday, December 8, 2016 4:45:49 PM(UTC)  | Reason: Not specified

Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.