Zum Hauptinhalt gehen

Edit 'Run a Report' {{context}} in MapTipActions

Kommentare

20 Kommentare

  • John Nerge
    My guess is that just updating the {{context}} parameter in the viewer config won't work, plus that would change its settings for all layers.

     

    I think the best workaround would be to remove the run reports link and replace it with a workflow link that you can run with the input field you want to use as its argument.
    0
  • Permanently deleted user
    My man John! Always coming through! Thanks so much for the suggestion, I think that is what we are going to  need to do.

     

    So I found the below thread where you provided a hyperlink to run a report from a workflow. Do you have an example of a workflow that runs a report that I could use as a starting point? Thanks so much again! I always learn so much from you!

     

    https://support.geocortex.com/essentialsGSCForum?sub-nav=forum&main-nav=essentials&#!/feedtype=SINGLE_QUESTION_DETAIL&criteria=ALLQUESTIONS&id=9066000000009lpAAA
    0
  • John Nerge
    Here are a couple of examples. In both cases, the link to put in your feature description or long description is:

     

    <a href="command:RunWorkflowWithArguments?workflowId=ReportWorkflowId&amp;id={yourField}">Run a report</a>

     

    Here's a basic workflow to run a single report:

     

    https://drive.google.com/open?id=0B_hHHiqcTKMfN25kZm1kbWtTYkk

     

    Things to set:

     

    1) your map service ID (variable)

     

    2) your layer name (variable)

     

    3) your report ID (variable)

     

    4) your Report activity Where clause

     

    5) your Report activity Output Format (if not pdf)

     

    Here's an example of a workflow that lets you run multiple reports:

     

    https://drive.google.com/open?id=0B_hHHiqcTKMfai1ic2lRZkFXcWM

     

    Things to set:

     

    1) your map service ID (variable)

     

    2) your layer name (variable)

     

    3) your report names and IDs in the display form combo box

     

    4) your Report activity Where clause

     

    5) your Report activity Output Format (if not pdf)
    0
  • Permanently deleted user
    THANK YOU JOHN! I used the first workflow to run a single report and it's working PERFECTLY!
    0
  • Permanently deleted user
    John, I was trying to follow your instructions to run report by setting a link in the feature description section. But I am getting  the following error: "There was a workflow error running activity: Cannot find report '0' ". I am not sure what I am missing, probably something simple in the workflow. Appreciate any help. Thank you. Nataliya

     

     
    0
  • John Nerge
    That error is coming up because the workflow can't find your report. Check your map layer and make sure you 1) added the report, and 2) what the report ID is.

     

    If your report ID isn't 0, then you need to change the default value in your workflow.

     

    User-added image
    0
  • Permanently deleted user
    I do have report added, and the id is '0'

     

    report setting
    0
  • John Nerge
    The ID in the workflow should just be "0" with no single quotes, just the double quotes to define it as a string.

     

    User-added image
    0
  • Permanently deleted user
    Yes, that is what I have. Thank you for your help. User-added image
    0
  • John Nerge
    Hmm, then I'm not sure what the issue is. Can you post your workflow here?
    0
  • John Nerge
    Nothing looks unusual about it. There are only a few other things I can think of to confirm:

     

    - Turn debugging on for your Get Map Service Info activity to make sure you're getting the right output values for mapServiceUrl and layerId.

     

    - Make sure the output format options on your report include pdf, like in the workflow.

     

    - Add a Query Task activity and run your Where clause to make sure it's selecting a record successfully. You can add an alert activity with the text resultFeatureSet.Features.Count().ToString() to see how many records are getting returned.
    0
  • Permanently deleted user
    Is this a bug?  Same thing happens here - run a report on a parcel and it intermittently creates a report for a COMPLETELY RANDOM other parcel!!  This is really not okay.
    0
  • John Nerge
    Hi Bobbi, yeah that's not good. Did you use one of the workflow templates posted here, and if so which one?

     

    Very weird that it's intermittently not working, if it's selecting a wrong parcel then the most likely culprit is the argument since it's what tells the workflow which feature to create a report for. Can you post your workflow here? That'll be the easiest way to troubleshoot.
    0
  • Permanently deleted user
    Sorry for the delayed response.  It wasn't even my workflow - just the built-in functionality that accesses the reports attached to the layer.  I removed the option to run a report from the map tip and have a button on my toolbar that runs a parcel report from there instead.  The one from the workflow/button works just fine.  I guess the difference is that the argument is not supplied on click, but rather is input by the user.  

     

    It still makes no sense and there was no rhyme or reason to the parcel that was selected - not the lowest or highest objectid or parcelid, wildly different geographical area, etc.

     

    Here's an old, undeveloped scratch site I have that does it:

     

    https://gisdev.kpb.us/map/index.html?viewer=OEM

     

    The first report will be okay, but then everything goes bananas.
    0
  • John Nerge
    I ran a few simple and detailed reports from your map tip, and it looks like it used the right parcel each time (based on the map and the address on the report matching the map tip). Maybe I'm not testing it right to cause the error?
    0
  • Permanently deleted user
    Wow.  Really? That's even more confusing.  I can't see that you're doing it wrong... click on a parcel -> from Map Tip Run a Report -> simple or detailed -> download.  

     

    It's definitely not consistent.  I can get three in a row that are good and then suddenly one is bananas.    You can see by the shapes of the parcel selected here and the one on the report that they aren't the same.   

     

    Thank you very much for looking at it.  It may be time to contact support directly.  I'll post the solution here if we/they figure it out.wrong parcel chosen.
    0
  • Permanently deleted user
    I am having the same problem, I am getting a cannt find report "0" error.  We recently upgraded to the latest version of essentials and the HTML 5 viewer and it seemed to coincide with that.  I used the workflow John created for the single report. I have a report 0 and it's set up correctly. (as it was working fine a couple days ago)
    0
  • Permanently deleted user
    Hi Chris,

     

    You may or may not be seeing this issue - 

     

    https://support.geocortex.com/essentialsGSCkba?sub-nav=kba&main-nav=essentials&#!/feedtype=SINGLE_ARTICLE_DETAIL&criteria=BESTANSWERS&id=kA3f2000000k9cGCAQ

     

    Scroll to the bottom for the Report activity example.

     

    Feel free to submit a support case if you cannot resolve it.

     

    Regards,

     

    Wayne
    0
  • Permanently deleted user
    In my case it was defitnitely on the arcgis server side. There was an issue with our spatial view that was auto-generating a second OID field within which the values were not constant.   
    0
  • Permanently deleted user
    Hi Bobbi,

     

    I was wondering if you had found a solution to your issues. I am having the exact same problems with some of our spatial views when selecting a feature in the map, running the report from the maptip, selecting the report and downloading the results. It also works for us the first couple of times the report is run and then out of nowhere it starts running reports on features that were not selected.
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.