Zum Hauptinhalt gehen

How to Use Workflow Variables in Report Titles

Kommentare

8 Kommentare

  • Permanently deleted user

    Hi Mark,

    Create a title for your report is possible, I have recently done it and used it on a Map Title.

    First off you'll have to make sure that your date ranges and TruckID coming from the form are exposed as output arguments (my argument was reportYear ). You'll then have to create a variable and use an Assign Task to hold your formatted title, something like TITLE = "Truck & Location Information for Truck: " + TruckID  + "From + "StartDate.ToString  +" - " +EndDate.ToString .

    Once you have created this variable, in the Report Activity (under the Common Client Activities) you can specify a Text Field argument which accepts a dictionnary of text values that can be submitted to the report. You can supply your title string variable using the format below (I know this works for both the PrintMap and Report Activities, not sure about Template Report).

    New System.Collections.Generic.Dictionary(Of String, String) From { { "_Title", TITLE }}

    Note: you should be able to find the _Title variable in the report designer.

    Hope this helps,

    -Warren

    0
  • Permanently deleted user

    Warren,

    I am using a Template Report and would like to keep using it vs. builidng a completely new Report. Does anyone know how to pass these values to a Template Report?

    -Mark

    0
  • Permanently deleted user

    Hi Mark,

    I did a search and your question should be answered in this post that Latitude replied to, there should even be a workflow example from the code gallery that you can download to reference.

    https://support.geocortex.com/SupportForums/Thread.aspx?pageid=0&mid=2&ItemID=20&thread=57163

    From my quick skim it is pretty much exactly as I described on the workflow side but you'll just have to add a container for your Report Title in the Report itself.

    -Warren

    0
  • Permanently deleted user

    Warren,

    I used this code example to build my workflow and report and got it to work. However, I am having issues adding a second dictionary and handling how that data gets passed to the report.

    Here is my sequence to generate the new Dictionary:

    /customer/servlet/servlet.FileDownload?file=00P6000000em1TYEAY

    My query for the 'AddToDictionary' Value is: "Truck & Location Information for Truck: " + strSelectTruck + "From: " + strStartDate + " - " + strEndDate

    In the report I've tried the following for 'DateField':

    1. _Title
    2. dictionaryTitle("_Title")
    3. reportTitle

    I'm sure I'm missing something simple.

    0
  • Permanently deleted user

    Hi Mark

    just as a real dictionary has more than one entry, ie word and definition, the dictionary that you have already made just needs another entry ising the 'Add To Dictionary' activity.

    Regards

    Ralph

    0
  • Permanently deleted user

    Ralph,

    Thanks! That did it. I assumed since I was trying to pass a string,string dictionary itme (vs. a string,object) that I needed a second dictionary.

    -Mark

    0
  • Permanently deleted user

    Hi Mark

    you are indeed passing a Dictionary that is holding a collection of Key Value Pairs. In this case both the Key and theValue are strings.

    Check out http://www.vcskicks.com/dictionary.php

    Regards

    Ralph

     

    0
  • Permanently deleted user

    Whoops,

    Sorry, I posted too late.

    Warren

    0

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