Loading reports from Stimulsoft Reports.Server
Loading reports from Stimulsoft Reports.Server
Hello.
We're evaluating your products. We have configured a Stimulsoft Reports.Server in one machine so our customers can edit reports online. At the same time, we would like to load those reports (hosted in the server) using an application in .NET (WPF) as PDF.
We've looked along all your website, but the only code that we found was the one below. The problem is the classes it uses aren't found in any of the assemblies that come in your .NET / WPF trials.
Please, tell me how to connect and retrieve reports as PDF from your Reports.Server instance.
Thank you.
// Connect to Stimulsoft Report Server on port 40010
var connection = new StiServerConnection("http://localhost:40010/");
// User Name and Password from actions
connection.Users.Login("username", "password");
// Load Data in ByteArray
var bytes = File.ReadAllBytes("Data.xml");
// Get Item from Access Key
var dataItem = connection.Items.Get("94ebe81e880843fb899eee393397f092") as StiFileItem;
// Create Item if it does not exist
if (dataItem == null) dataItem = connection.Items.Root.NewFile("data.xml", StiFileType.Xml);
// Upload Data to Item
fileItem.UploadFromArray(bytes);
// Get PDF Item from Access Key
var pdfItem = connection.Items.Get("b17ce23f44ee411793440bceb61d4ba6") as StiFileItem;
// Create Item if it does not exist
if (pdfItem == null) pdfItem = connection.Items.Root.NewFile("report.pdf", StiFileType.Pdf);
fileItemPdf.Save();
// Get Report from Access key
var reportItem = connection.Items.Get("4cf1d78e5773470880b0145f895c7f00") as StiReportTemplateItem;
// Create Item if it does not exist
if (reportItem == null) reportItem = connection.Items.Root.NewFile("report", StiFileType.ReportSnapshot);
// Compile Report to PDF Item
reportItem.Run(pdfItem);
// Download PDF to ByteArray
var result = fileItemPdf.DownloadToArray();
// Logout User
connection.Users.Logout();
We're evaluating your products. We have configured a Stimulsoft Reports.Server in one machine so our customers can edit reports online. At the same time, we would like to load those reports (hosted in the server) using an application in .NET (WPF) as PDF.
We've looked along all your website, but the only code that we found was the one below. The problem is the classes it uses aren't found in any of the assemblies that come in your .NET / WPF trials.
Please, tell me how to connect and retrieve reports as PDF from your Reports.Server instance.
Thank you.
// Connect to Stimulsoft Report Server on port 40010
var connection = new StiServerConnection("http://localhost:40010/");
// User Name and Password from actions
connection.Users.Login("username", "password");
// Load Data in ByteArray
var bytes = File.ReadAllBytes("Data.xml");
// Get Item from Access Key
var dataItem = connection.Items.Get("94ebe81e880843fb899eee393397f092") as StiFileItem;
// Create Item if it does not exist
if (dataItem == null) dataItem = connection.Items.Root.NewFile("data.xml", StiFileType.Xml);
// Upload Data to Item
fileItem.UploadFromArray(bytes);
// Get PDF Item from Access Key
var pdfItem = connection.Items.Get("b17ce23f44ee411793440bceb61d4ba6") as StiFileItem;
// Create Item if it does not exist
if (pdfItem == null) pdfItem = connection.Items.Root.NewFile("report.pdf", StiFileType.Pdf);
fileItemPdf.Save();
// Get Report from Access key
var reportItem = connection.Items.Get("4cf1d78e5773470880b0145f895c7f00") as StiReportTemplateItem;
// Create Item if it does not exist
if (reportItem == null) reportItem = connection.Items.Root.NewFile("report", StiFileType.ReportSnapshot);
// Compile Report to PDF Item
reportItem.Run(pdfItem);
// Download PDF to ByteArray
var result = fileItemPdf.DownloadToArray();
// Logout User
connection.Users.Logout();
Last edited by JNieto on Wed Mar 23, 2016 5:59 pm, edited 1 time in total.
Re: Loading reports from Stimulsoft Reports.Server
Hello,
You can found the necessary assemblies on the server at the following path:
c:\ProgramData\Stimulsoft-Server\Software-Releases\[Version]\
Thank you.
You can found the necessary assemblies on the server at the following path:
c:\ProgramData\Stimulsoft-Server\Software-Releases\[Version]\
Thank you.
Re: Loading reports from Stimulsoft Reports.Server
Thanks! Is there any link to download those files without having to access the server's filesystem? For convenience, I think it should be a separate download, since all clients would need the assemblies to communicate with the server.
Re: Loading reports from Stimulsoft Reports.Server
Hello,
Thank you for your suggestion.
We will add them to the download page on our site.
Thank you for your suggestion.
We will add them to the download page on our site.
Re: Loading reports from Stimulsoft Reports.Server
Thank you! It will be very handy. Are you posting it today or is a planned task to prioritize? Is to know whether to wait for it or ask out manager to provide access to the server folder with the files.
Last edited by JNieto on Wed Mar 23, 2016 6:03 pm, edited 1 time in total.
Re: Loading reports from Stimulsoft Reports.Server
Hello,
Sorry for misunderstanding!
You can find required files here: Let me know if you need anything also.
Thank you.
Sorry for misunderstanding!
You can find required files here: Let me know if you need anything also.
Thank you.
Re: Loading reports from Stimulsoft Reports.Server
Thank you! I hope you also publish it as a NuGet package for convenience of the developers.
Re: Loading reports from Stimulsoft Reports.Server
Hello,
We have published package on the NuGet:
https://www.nuget.org/packages/Stimulso ... nnect_API/
Thank you.
We have published package on the NuGet:
https://www.nuget.org/packages/Stimulso ... nnect_API/
Thank you.
Re: Loading reports from Stimulsoft Reports.Server
Thank you!! It's great news! By the way, is it available for .NET 3.5?
Re: Loading reports from Stimulsoft Reports.Server
Hello.
Sorry, but all our product support .Net Framework 4.0 and above.
The .Net Framework 3.5 is not supported.
Thank you.
Sorry, but all our product support .Net Framework 4.0 and above.
The .Net Framework 3.5 is not supported.
Thank you.