Current filter:
                                You should refresh the page.
                                  • I want to create a custom DataSource which gets the data from a GraphQL Endpoint.
                                    I've looked at JsonDataSource but the problem is that it only has a string property for the json. Data used in reports can get quite large and therefore i need a method of geting the data paged from the backend.
                                    How can i achieve this with the report designer, i haven't found anything on this specific scenario in the docs.


                                1 Solution

                                Creation Date Importance Sort by

                                Hi Jochen,
                                Our Reporting components do not support server-mode data sources. So, it is not possible to load data to reports by using data pages. The main reason why such data sources are not supported, because whole data is required to build the reprot's document.
                                However, the JSON Data Source is not the only option for your case. As I see from the GraphQL | Code | C# / .NET page the GraphQL support .NET data connectors that will help you to load data from GraphQL to an IList collection. So, you can also use the approach described in the Bind a Report to an Object Data Source help topic to bind your reports to data from GraphQL. This way, you can load data by smaller portions based on your own logic before passing it to the report.
                                Finally, would you please elaborate more on you scenario. Are you using a Web Report Designer in your application? If so, do you wish to provide your End-Users a capability to connect GraphQL themselves, or do you wish to just provide them with a set of pre-defined data sources?

                                Show all comments
                                • Jochen Möller 08.29.2019

                                  Hi Vasily,
                                  thanks for elaborating, its clear to me that the report needs the whole dataset so get rendered, but i have a dynamically generated graphQL backend and do not know how the object looks, this is determined at runtime. so i would need a data structure similar to DataSet. i tried to bind the Newtonsoft JArray and JObject classes directly to the object data souce but this did not work. further i want to load the smallest possible dataset that might be determined by parameters of the report, thinks of start date and end date that would be translated to GraphQL Input Arguments before fetching the data. same is for custom filter defined in the DX criteria syntax of the report i want to be able to translate DX criteria to the corresponding input arguments in the graphqQL query.
                                  hope that clarifies my intention a little :)

                                • Vasily (DevExpress Support) 08.29.2019

                                  Hi Jochen,

                                  Thank you for your update. In this case, I recommend you get data from your GraphQL data source in JSON format and use the JSON Data Source component to bind your report to it. The JSON Data Source component generates the object's schema dynamically, so you do not need to create any static classes.

                                  As for the Object Data Source component, it can be also bound to dynamic data collections, but the ITypedList interface is required for these collections. This interface is used by our Object Data Source to load the collection item's schema. Note that the DataSet/DataTable objects implement this interface internally, so you can also bind your report to these objects directly.

                                • Jochen Möller 09.02.2019

                                  Thanks for your information.
                                  i now have the following implementation:

                                  a custom DataSource that derives from DataComponentBase and implements ITypedList. That works quite well regarding my schema problems, the next issue for me is how to get the fields required by the report (bound fields) to only query them from graphQL. like i said i try to fetch only the minimum possible amount of data. is there a way to get the bound fields to forward them to graphQL and not "dynamically" create a result set with all fields contained in the graphQL schema?
                                  that would be nice :)


                                • Vasily (DevExpress Support) 09.03.2019

                                  Hi Jochen,

                                  Currently our Reporting components do not provide this functionality. However, you can iterate through all the controls in your report by using the AllControlsmethod and collect the data fields to which these controls are bound manually. The ExpressionBindings collection will allow you to access the control's data bindings and the DataBindings collection in case the legacy data bindings are used in your reports. However, complex controls like XRChart and XRPivotGrid utilize other approaches to specify data bindings, so you need to handle these controls separately. It can be also necessary to validate what fields are used in the report's CalculatedFields collection.

                                • Jochen Möller 09.03.2019

                                  Hey Vasily,
                                  bummer... that would have made my life easier ;) i'll give it a try. problem with "load all from graphs" is where do you stop the recursion, some of them are endless like "Contact has Organization" "Organization has Contacts" and so on.
                                  i'll see what i can get from the bindings, but it definitely is a problem which such structures for the schema generation and for the data loading, would be great if the wizard dialog in the angular report designer where you can check fields on and off would build some kind of a field list thats stored with the report and the user has to choose the fields he wants to use, that would give us a chance to load schema only when the next area is expanded in the field chooser and only load the data the user has selected.
                                  can you please suggest this to the report designer team :) would definitely be a nice feature to add more complex support for GraphQL to your report designer :)

                                • Vasily (DevExpress Support) 09.03.2019

                                  Hi Jochen,
                                  Thank you for your clarification. I agree that this kind of functionality may improve the report generation performance. I will pass this idea to our development team.
                                  As for the Web Report Designer, it already loads Field List's schema on demand. The schema is loaded from the web server only when the Field List node is expanded. So, there should not be any issues with recursive data structures while designing a report.