Skip to main content

Add data to print template via Print Template Transform workflow?

Comments

2 comments

  • Hi Mark.

     

    I have this workflow, that add the current  logged  inn user, to a field  i en repport.

     

    The field in the repport is  set to "param:Sagsbehandler".

     

    hope you can use it

     

      <Activity mc:Ignorable="sap sap2010 sads" x:Class="ActivityBuilder" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:gwa="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow.Activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib" xmlns:sd="clr-namespace:System.Data;assembly=System.Data" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <x:Members> <x:Property Name="reportData" Type="InArgument(sd:DataSet)" /> </x:Members> <mva:VisualBasic.Settings> <x:Null /> </mva:VisualBasic.Settings> <sap2010:WorkflowViewState.IdRef>ActivityBuilder_1</sap2010:WorkflowViewState.IdRef> <TextExpression.NamespacesForImplementation> <sco:Collection x:TypeArguments="x:String"> <x:String>System.Activities</x:String> <x:String>System.Activities.XamlIntegration</x:String> <x:String>System.Activities.Statements</x:String> <x:String>System.Activities.Expressions</x:String> <x:String>System.Activities.Validation</x:String> <x:String>ESRI.ArcGIS.Client</x:String> <x:String>ESRI.ArcGIS.Client.Geometry</x:String> <x:String>ESRI.ArcGIS.Client.Tasks</x:String> <x:String>Geocortex.Core.Extensions</x:String> <x:String>Geocortex.Reporting</x:String> <x:String>Geocortex.Workflow.Activities</x:String> <x:String>Microsoft.VisualBasic.Activities</x:String> <x:String>System</x:String> <x:String>System.Activities.Debugger.Symbol</x:String> <x:String>System.Collections.Generic</x:String> <x:String>System.Linq</x:String> <x:String>System.Data</x:String> <x:String>System.Windows.Markup</x:String> <x:String>System.Xml.Serialization</x:String> </sco:Collection> </TextExpression.NamespacesForImplementation> <TextExpression.ReferencesForImplementation> <sco:Collection x:TypeArguments="AssemblyReference"> <AssemblyReference>System.Activities</AssemblyReference> <AssemblyReference>ESRI.ArcGIS.Client</AssemblyReference> <AssemblyReference>Geocortex.Core</AssemblyReference> <AssemblyReference>Geocortex.Reporting</AssemblyReference> <AssemblyReference>Geocortex.Workflow</AssemblyReference> <AssemblyReference>Geocortex.Workflow.Activities</AssemblyReference> <AssemblyReference>System.Core</AssemblyReference> <AssemblyReference>System</AssemblyReference> <AssemblyReference>mscorlib</AssemblyReference> <AssemblyReference>System.ServiceModel</AssemblyReference> <AssemblyReference>System.Data</AssemblyReference> <AssemblyReference>PresentationFramework</AssemblyReference> <AssemblyReference>WindowsBase</AssemblyReference> <AssemblyReference>PresentationCore</AssemblyReference> <AssemblyReference>System.Xaml</AssemblyReference> <AssemblyReference>System.ComponentModel.Composition</AssemblyReference> <AssemblyReference>System.Reactive.Core</AssemblyReference> <AssemblyReference>System.Xml</AssemblyReference> </sco:Collection> </TextExpression.ReferencesForImplementation> <gwa:ServerScope sap2010:Annotation.AnnotationText="The &quot;reportData&quot; input argument contains the DataSet that will be used in the report." sap2010:WorkflowViewState.IdRef="ServerScope_1"> <gwa:ServerScope.Body> <ActivityAction> <Sequence sap2010:WorkflowViewState.IdRef="Sequence_1"> <Sequence.Variables> <Variable x:TypeArguments="s:Byte[]" Name="byteArray1" /> </Sequence.Variables> <gwa:GetCurrentUser sap2010:WorkflowViewState.IdRef="GetCurrentUser_1" UserName="[name]" /> <If Condition="[name.IndexOf(&quot;(&quot;c)&gt;-1]" sap2010:WorkflowViewState.IdRef="If_1"> <If.Then> <Assign sap2010:WorkflowViewState.IdRef="Assign_2"> <Assign.To> <OutArgument x:TypeArguments="x:String">[name]</OutArgument> </Assign.To> <Assign.Value> <InArgument x:TypeArguments="x:String">[name.Substring(0,name.IndexOf("("c)-1)]</InArgument> </Assign.Value> </Assign> </If.Then> </If> <gwa:AddDataTableColumn x:TypeArguments="x:String" ColumnName="param:Sagsbehandler" DataTable="[reportData.Tables(0)]" sap2010:WorkflowViewState.IdRef="AddDataTableColumn`1_1" /> <Assign sap2010:WorkflowViewState.IdRef="Assign_1"> <Assign.To> <OutArgument x:TypeArguments="x:Object">[reportData.Tables(0).Rows(0)("param:Sagsbehandler")]</OutArgument> </Assign.To> <Assign.Value> <InArgument x:TypeArguments="x:Object">[name]</InArgument> </Assign.Value> </Assign> </Sequence> </ActivityAction> </gwa:ServerScope.Body> <gwa:ServerScope.Variables> <Variable x:TypeArguments="x:String" Name="name" /> </gwa:ServerScope.Variables> <sads:DebugSymbol.Symbol>dx1DOlxUZW1wXHByaW50X21hbmlwdWxhdGUueGFtbA9CA2YVAgEBRQlfFAIBAkkLSWYCARRKC1UQAgELVgtWvQECAQdXC14UAgEDSVtJYwIBFUoZSj8CAQxMD1MYAgEOVklWXgIBClZpVoEBAgEIXDZcPAIBBVk3WWwCAQRROlFiAgERTjtOQQIBDw==</sads:DebugSymbol.Symbol> </gwa:ServerScope> <sap2010:WorkflowViewState.ViewStateManager> <sap2010:ViewStateManager> <sap2010:ViewStateData Id="GetCurrentUser_1" sap:VirtualizedContainerService.HintSize="464,88" /> <sap2010:ViewStateData Id="Assign_2" sap:VirtualizedContainerService.HintSize="243.2,60.8" /> <sap2010:ViewStateData Id="If_1" sap:VirtualizedContainerService.HintSize="464,211.2" /> <sap2010:ViewStateData Id="AddDataTableColumn`1_1" sap:VirtualizedContainerService.HintSize="464,88" /> <sap2010:ViewStateData Id="Assign_1" sap:VirtualizedContainerService.HintSize="464,60.8" /> <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="486.4,692.8"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsExpanded">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </sap2010:ViewStateData> <sap2010:ViewStateData Id="ServerScope_1" sap:VirtualizedContainerService.HintSize="500.8,833.6"> <sap:WorkflowViewStateService.ViewState> <scg:Dictionary x:TypeArguments="x:String, x:Object"> <x:Boolean x:Key="IsAnnotationDocked">True</x:Boolean> </scg:Dictionary> </sap:WorkflowViewStateService.ViewState> </sap2010:ViewStateData> <sap2010:ViewStateData Id="ActivityBuilder_1" sap:VirtualizedContainerService.HintSize="540.8,953.6" /> </sap2010:ViewStateManager> </sap2010:WorkflowViewState.ViewStateManager> </Activity>

     

     
    0
  • Permanently deleted user
    Hi Sebastian,

     

    Thanks for your example, it provides a great base for what I'm wanting to do. However, instead of adding an extra column to the existing reportData DataSet I'm wanting to add a new DataTable (as an input agrument to the Print Transform Workflow) to the reportData. This is so the DataTable can used in a subreport. I have a normal workflow which I call and in that it creates the DataTable as an Out Argument. It then calls the Print Map command, which uses the Print Template ID, with the Print Template Transform attached to it. All this to get a map, legend etc. with a few bits of extra data on it!
    0

Please sign in to leave a comment.