|
POST
|
Hi, we have reports that will be included in our Addin. The datasource of those report will need to change base on the GDB the user is working with. So here is what we did: Include the reports in a project template so the reports will be part of any new project We created a button in our addin, that create a copy of that report, sets the report datasource to the current GDB used by the user and export it to PDF. This does not work. Expected behavior according to this: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Reports#subreport-datasource So when setting the datasource on the main report, the exported report shows no related reports at all. On another report, the related reports are showing but linked to the datasource hard coded in the related report. It's not changing the subreport datasource. So I export that report to .rptx (which is json). I edited that json and replace the datasources of the subreports to the right database (the same has the main report) Then I reimport that rptx in my project and when I generate the PDF, all the data is showing fine. So setting the datasource of the report does not seem to be always propagating the datasource to the related reports. Now I wanted to maybe include the rptx files in our addin and when the user want to generate the report I would set all datasources in the json file, import the report (rptx) in the project, then generate the PDF. There is a CIMReport object that can load the json file to do that. But what I can't find is how to import a rptx in my project programmatically. Can someone help me answer one of those 2 quastions please? How to set related report datasource of a Report object? How to import a rptx file programmatically? Thank you
... View more
03-21-2022
05:54 AM
|
0
|
2
|
2104
|
|
POST
|
Found it by myself... ReportProjectItem reportProjItem = Project.Current.GetItems<ReportProjectItem>().FirstOrDefault(item => item.Name.Equals(reportNameToImport)); report = reportProjItem?.GetReport(); Report newReport = ReportFactory.Instance.CopyReport(report);
... View more
01-24-2022
05:27 AM
|
0
|
0
|
1386
|
|
POST
|
Hi, We are developing an add-in and we will need to have a lot of reports. Our reports are huge and will have to be in french or English. We don't want to be maintaining 2 versions of a report (one with French labels, the other with English labels). So we have created the report using our special tags in the labels and when we are generating the report (programatically) we inject the appropriate string in all the labels using resource files. That works well. But then, the report is change forever. So we want to make a copy of the base report under another name, then inject the strings in the labels, then generate that copy of the report. I did not found a way to copy a project item. Can it be done? The other approach I tried was to import a rptx file. I included my rptx file in my addin, I copy the file under another name and try to create a project item from that and it fails. I saw the CIMReportDocument class that has a fromJson method. But I don't know how I can go from CIMReportDocument to a ArcGIS.Desktop.Reports.Report. Can you help please? How can we create a copy of a project Item? How can we import a rptx file programmatically and add it to the project catalog?
... View more
01-21-2022
02:05 PM
|
0
|
1
|
1424
|
|
POST
|
Nevermind... System.Threading.Thread.CurrentThread.CurrentUICulture
... View more
09-24-2021
06:24 AM
|
0
|
1
|
1660
|
|
POST
|
We're building an English/French addin for ArcGis Pro. Localization works well but I need to be able to know under wihch language ArcGis is currently running. I spent a long time searching the SDK and did not found anything. Please help.
... View more
09-23-2021
01:52 PM
|
0
|
2
|
1701
|
|
POST
|
ArcGis Pro SDK is base on MVVM. That means you can test your business presentation. So view models will have QueueTasks in it. Anybody has been able to have unit tests running coorectly on continuous integration??
... View more
10-23-2020
07:20 AM
|
0
|
0
|
2229
|
|
POST
|
Unit Testing code that runs QueuedTasks seems to leave things open that makes testhost.exe process waiting on something. How can I clean all threads/task at the end of my tests?
... View more
10-19-2020
05:20 AM
|
0
|
1
|
2229
|
|
POST
|
Hi, I have a bunch of unit tests (MSTest) using ArcGis Pro SDK. All my tests run well except that when the test run is done, the testhost.exe process stay alive. That prevents the unit test task in TFS (Azure) to complete. It's stay there for 45 minutes before TFS stopping it. If I go on the server and kill the testhost.exe process, the MSTest task terminate correctly. I think it's related to QueuedTasks used to run the test. I have other tests that don't use queuedTask and the testhost.exe process shuts down after test completion. I've tried everything and I can reproduce the behavior easily with this simple sample. Can you help please? What is the correct way to do it? [TestClass] public class Test_entity { [ClassInitialize] public static void ClassInitialize(TestContext context) { Host.Initialize(); } PipeService _entityService; public override IEntityService<Pipe> entityService { get { if(_entityService == null) { _entityService = new PipeService(); } return _entityService; } } public TestContext TestContext { get; set; } public IEntityService<Pipe> entityService { get; } [TestMethod] [DeploymentItem("mockData\\GDB")] [DeploymentItem("unitsData", "unitsData")] [TestCategory("Entities")] [STAThread] public void TestGetByObjectId() { Pipe entity = null; Task t = QueuedTask.Run(() => { entity = entityService.getByObjectId(1); }); t.Wait(); t.Dispose(); Assert.IsTrue(entity != null)); } }
... View more
10-16-2020
09:30 AM
|
0
|
2
|
2328
|
|
POST
|
I have read and review all of this but still the only way to use Esri styles and brushes is through DynamicResources. I can't find nothing in SDK where I would be able to do this but with Esri Brushes TextBlock descrip = new TextBlock() { Visibility = Windows.Visibility.Visible, TextWrapping = TextWrapping.Wrap, TextTrimming = TextTrimming.CharacterEllipsis, Background = Media.Brushes.Black };
... View more
09-10-2020
08:00 AM
|
0
|
1
|
2073
|
|
POST
|
How can I access Esri styles and brushes programatically. I searched everywhere to find something like SystemColors.ActiveBorderBrush. I want to create controls dynamically by code but can't find a way to add the style.
... View more
09-10-2020
05:15 AM
|
0
|
3
|
2126
|
|
POST
|
Yes you have: arcgis-pro-sdk-community-samples/Framework/ProgressDialog at master · Esri/arcgis-pro-sdk-community-samples · GitHub
... View more
07-15-2020
09:25 AM
|
0
|
1
|
2108
|
|
POST
|
Hi, In our project I want to use a progressDialog to show progress of a data import process. The process has 6 big steps like that. I want to use the same progressDialog to show the progress.. - Converting points... (there are 1817 point in my test file) - Saving points... (1817) - Converting lines... (1956) - Saving lines... (1956) - etc... Every single steps raise an event that is catch and updates the progress bar. After fundling with it for half a day, it's now working ok except for one thing.The progressDialog message and the status (wich is the percentage that I compute) updates correctly. But the progress is just going left and right without representing the percentage showed by the status text. I found out that you must specify the steps parameter at the cration of the ProcessDialog in order to have a progress bar showing real progress. But then you can't change this after the progressDialog is created. Setting ProgressorSource.Max won't affect the progress bar. So for now I'm showing the progressDialog with percentage but the progress bar is unrelevant. Is there a way to do this that I don't see? Or I suggest to fix this in the next SDK release.
... View more
07-15-2020
08:14 AM
|
0
|
5
|
2193
|
| Title | Kudos | Posted |
|---|---|---|
| 4 | 11-19-2024 11:13 AM | |
| 1 | 03-05-2024 11:13 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-18-2025
08:24 PM
|