- You are here:
- Home
- Q&A
- Q&A
- SnapDevelop
- Retrieve Datawidnow With Object Report and compute field with datawindows parameters.
- Ramón San Félix Ramón
- SnapDevelop
- Monday, 3 August 2020 11:58 AM UTC
- Thursday, 24 February 2022 17:08 PM UTC
- SnapDevelop
- # Permalink
In Appeon they tell me that there is no way to retrieve a nested report with .Net Datastore.
In my example saved in the Reports_API_composite folder I have created a solution:
1 - Dynamically generate a Datawindow Composite and add the header and the main report.
2- Bring the data with a JsonPackage and import them taking reference to each report as DatawindowChild.
3- The arguments used in computed fields must be regenerated or they don't work.
Here is the result in case you want to check it:
https://drive.google.com/file/d/1zpZeXnyQqaAm6MX1f7dm-2LDv8TicF2g/view?usp=sharing
In the compressed file there are three projects and a demo database. Reports_API --- > Which shows the problem. Reports_PowerServer --> Which shows that in PowerServer everything is automatic... Report_API_compisite --> My solution to the problem. It remains to be seen what happens with the arguments of the datawindows that are arrays....
- Tuesday, 15 February 2022 15:58 PM UTC
- SnapDevelop
- # 1
Hi Logan,
I have tried the same thing with PowerServer and it works perfectly, I would like to know if it is possible to do it easily with .Net Datastore to make my own API.
- Logan Liu @Appeon
- Friday, 18 February 2022 09:49 AM UTC
We don't have an easier way to do this in the latest version. If you only want to use .NET DataStore, I think changing your datawindow to a composite datawindow is the best workaround.
Regards, Logan
-
Helpful Loading... Helpful 1
- Ramón San Félix Ramón
- Friday, 18 February 2022 15:49 PM UTC
-
Helpful Loading... Helpful 0
- mike S
- Friday, 18 February 2022 15:51 PM UTC
https://topwizprogramming.com/topwizweb.html
-
Helpful Loading... Helpful 0
- Saturday, 8 August 2020 10:32 AM UTC
- SnapDevelop
- # 2
By dynamically creating a composite datawindow I have been able to solve problem Nº 1, so you can get a reference with GetChild to each of the reports and import the Json from the backend.
On the other hand, I have solve problem Nº2 by scanning all the objects in the DatawindowChild and changing those expressions of the computed fields where the arguments that have not been loaded appear, I have succeeded in replacing the argument with its value.
It's incomprehensible why the GetChild function cannot be used in nested reports, it would save me a lot of laps.
Regards.
I attach an example.
- Miguel Leeuwe
- Saturday, 19 February 2022 06:37 AM UTC
regards.
-
Helpful Loading... Helpful 0
- Ramón San Félix Ramón
- Monday, 21 February 2022 07:39 AM UTC
-
Helpful Loading... Helpful 0
- Miguel Leeuwe
- Thursday, 24 February 2022 17:20 PM UTC
regards
-
Helpful Loading... Helpful 0
- Friday, 7 August 2020 17:03 PM UTC
- SnapDevelop
- # 3
Hi Ramón,
Sorry, although I can duplicate your issue with your case, I cannot make its header work.
DataWindow control doesn't support setting data to retrieve arguments without calling the Retrieve method. You can add some dummy columns to work around it.
BTW: you can modify your DataWindow to a composite style to work around the report issue.
Regards,
Logan
- Wednesday, 5 August 2020 09:05 AM UTC
- SnapDevelop
- # 5
- Logan Liu @Appeon
- Wednesday, 5 August 2020 15:09 PM UTC
I failed to restore your database. Please provide the correct .bak file.
Regards,
Logan
-
Helpful Loading... Helpful 0
- Tuesday, 4 August 2020 17:08 PM UTC
- SnapDevelop
- # 6
Hi Ramón,
1) "My reports usually are datawindow that has a header with a report (Company Name and Logo)."
This feature hasn't been supported in .NET DataStore for performance consideration. You can call the IDataStore.GetReport method to work around it. If you really need it in your server-side, please submit an enhancement requirement in the Appeon Standard Support at https://www.appeon.com/standardsupport/.
2) "It also doesn't work well if I use a datawindow parameter in a compute field."
It seems that this issue happened on your PB client. Could you provide more details about your codes?
Regards,
Logan
- Page :
- 1
However, you are not allowed to reply to this question.