Skip to main content

Does reporting understand query-layers?

Comments

10 comments

  • Stefan Schweigert

    Hi Erik,

     

    We've tested reporting with query layers and were able to generate reports. Are you able to provide some information or a link to your layer?

     

    When creating the query layer, did you use the ObjectID as the Oid field?

     

    Thanks, Stefan

    0
  • Erik Kuipers

    Stefan,

     

    It appears to be an data error(duplicate objectids). When assuring a unique objectid it is working correctly

    0
  • Erik Kuipers

    Stefan,

     

    Just to be sure. Does the querylayer needs an OID or OBJECTID to function properly or is it enough that the column used for an objectid is unique(even if it is an text field?)?

    We are adding objectid now to the querylayers.

    0
  • Erik Kuipers

    After adding an objectid type int. I get this error:

    The schema does not contain the following column: "vwgw_ontstaanuit"."@Feature".

     

    View/querylayer is not registered with the geodatabase.When I use the data in a main report it works fine. Even when I use the value that should be used is entered in preview example it shows a blank report so the query is correct.

    0
  • Erik Kuipers

    Stefan,

    I think I found the reason. As soon as I add a featureMap the Report with SubReports break. I tested it on the my on premise envirnment because the url's are no longer public. After removing the featuremap the report is working fine.

     

    That is probably the reason why reporting is asking for featureid. But a table does not have an feature......

     

    How do we fix this?

    0
  • Malcolm Walker
    • Community-Manager

    Hey Erik,

     

    Query Layers are supported at this time, however there is a requirement that the layer must contain a field of type esriFieldTypeOID, which provides unique identifiers for each record. The name of the field does not have to be OBJECTID.

     

    This requirement may be removed in upcoming releases of Reporting.

     

    If you're creating your report using the New Layer Report wizard, and your target layer does not contain an ObjectId type field, you will need to manually remove the added label control, and modify the query condition to remove references to a default ObjectID field which does not exist on your layer.

     

    If you wish to use the XRFeaturePicture box control to add feature maps to your report, the target layer must also contain Feature data. If the query layer contains only tabular data, you will not be able to use the XRFeaturePictureBox control.

     

     

    -Paul

     

    0
  • Erik Kuipers

    Paul,

    The problem I have is that I have an main report with FeatureData. When I add a subreport withoud featuredata the report gives the error. As soon as I remove the XRFeaturesPicture the report is working. This is quite a familiar situation. Is this also build to work like this? So if you want subreports and featuremap all data used should have Feature data?

    This becaus relationships are used a lot.

    Erik

    0
  • Malcolm Walker
    • Community-Manager

    Hey Erik,

     

    Thank you for the clarification.

     

    You are correct that this use case is very common, and it should be supported at this time.

     

    Just to confirm, your XRFeaturePictureBox control is located in the master report, which contains the Feature Data, and the subreport, which contains only tabular data, does not contain a XRFeaturePictureBox control.

     

    Are you able to successfully run a Preview on the Subreport itself from within the designer?

     

    -Paul

     

     

    0
  • Erik Kuipers

    Paul,

    Yes as soon as I remove the XRFeatureBox the report is working. And running the subreport with a preview is also working. I worked quite some time on this and found after so much trial and error this behaviour. It nags about featureid. But that variable is not even used:

    Query Nummeraanduiding failed to execute. ---> System.AggregateException: One or more queries have failed to validate. ---> DevExpress.DataAccess.Sql.QueryExecutionException: Query Nummeraanduiding failed to execute. ---> DevExpress.DataAccess.Sql.ColumnNotInSchemaValidationException: The schema does not contain the following column: "Nummeraanduiding"."@Feature"

     

    I use the following service

    http://basisregistraties.arcgisonline.nl/arcgis/rest/services/BAG/BAG/MapServer

     

    I user Verblijfsobject as featurelayer and nummeraanduiding(table) as subreport.

    Relation is verblijfsobject.hoofdadres = nummeraanduiding.identificatie(binding)

     

    Without FeatureMap the report is working. As soon as I add an FeatureMap the report says Nummeraanduiding does not have @Feature.

    0
  • Malcolm Walker
    • Community-Manager

    Hey Erik,

     

    Sorry the delay on getting back to you on this one.

     

    You have uncovered another bug. I have filed it, and it will get addressed before the release.

     

    Thank you for your thorough investigation, it made tracking this one down super easy.

     

    Many thanks,

     

    -Paul

     

    0

Please sign in to leave a comment.