Loading reports from Stimulsoft Reports.Server
Re: Loading reports from Stimulsoft Reports.Server
OK! I will have that into account. Thanks for being so kind!
Re: Loading reports from Stimulsoft Reports.Server
Hello,
We are glad to help you.
Thank you.
We are glad to help you.
Thank you.
Re: Loading reports from Stimulsoft Reports.Server
Hello again! I'm trying to retrieve a report from the server. I have successfully connected to it and logged in using my credential, but I cannot get anything from it.
My report is named "MyReport".
I'm using stiServerConnection.Items.GetByKey("MyReport"), but I this is Exception message I'm getting:
"IsNotCorrect, Arguments: ItemKey"
I tried to get the key of the report using the Share conext menu. It says that the key is "521b1", but using it fails, too.
Could you please tell me how to retrieve a report? The code in the samples seems to be outdated.
My goal is to get a report and save it to PDF.
Big thanks!
My report is named "MyReport".
I'm using stiServerConnection.Items.GetByKey("MyReport"), but I this is Exception message I'm getting:
"IsNotCorrect, Arguments: ItemKey"
I tried to get the key of the report using the Share conext menu. It says that the key is "521b1", but using it fails, too.
Could you please tell me how to retrieve a report? The code in the samples seems to be outdated.
My goal is to get a report and save it to PDF.
Big thanks!
Re: Loading reports from Stimulsoft Reports.Server
Hello,
You can use the developer key from the Tools Tab.
Also, you can use the GetByName method.
Thank you.
You can use the developer key from the Tools Tab.
Also, you can use the GetByName method.
Thank you.
- Attachments
-
- IMG_31032016_142738.png (25.62 KiB) Viewed 2095 times
Re: Loading reports from Stimulsoft Reports.Server
It works nicely! Thank you, but now I would like to know how to generate a LOCAL PDF file with the contents of the report. Please, notice that my report uses a parameter (named "P_CDPERSONA").
How do I continue once I get the item? My code is this:
var connection = new StiServerConnection("http://*****:40010/");
connection.Users.Login("***", "***");
var dataItem = connection.Items.GetByKey("3d8fe494ee2d4adf84b57ba06e8e9a34");
How do I continue once I get the item? My code is this:
var connection = new StiServerConnection("http://*****:40010/");
connection.Users.Login("***", "***");
var dataItem = connection.Items.GetByKey("3d8fe494ee2d4adf84b57ba06e8e9a34");
Re: Loading reports from Stimulsoft Reports.Server
Hello,
Please try to use the following code:
Also, please us the following method
instead
Thank you.
Please try to use the following code:
Code: Select all
var reportSnapshotItem = connection.Items.Root.NewReportSnapshot("report-snapshot").Save();
var param = new StiReportParameter("ParamName", 99);
var paramList = new List<StiReportParameter>();
paramList.Add(param);
reportTemplateItem.Run(reportSnapshotItem, paramList);
Code: Select all
connection.Accounts.Users.Login("***", "***");
Code: Select all
connection.Users.Login("***", "***");