title in print template from site.xml
I am trying to get the Title for my print template from my site.xml file but I get an error when I try to run the report:
Control Script failed for
control MapTitle ,
Source=MapTitle
Does anyone have any ideas? Thanks!!
In my print template I have:
a control:
<Control Type="AR.Field" Name="MapTitle" DataField="MapTitle" Left="12330" Top="1890" Width="2520" Height="360" Style="text-align: center; font-weight: bold; font-size: 10pt; vertical-align: middle; " />
a calculated field:
<Field Name="MapTitle" Formula="_MapTitle" FieldType="None" />
In my site.xml I added a TextField to my print template:
<TextFields>
<TextField DataFieldName="_MapTitle" DisplayName="_MapTitle" Editable="false" MultiLine="false" Value="Map Title" />
</TextFields>
-
Is it because you dont have the undescore in the Control dataField?
You have MapTitle, when the other sections reference _MapTitle.
Cathy
0 -
Hi Cathy,
I tried what you suggested, the title turned out empty instead of the error.
What I think should happen is, in PrintTemplate.rpx, the control has a DataField="MapTitle" so it get's the data from the CalculatedField Name="MapTitle". That CalculatedField has a Formula="_MapTitle" which refers to the Site.xml which has a TextField with DataFieldName="MapTitle".
Any other ideas?
Thanks!
0 -
Ok, this seems kind of quirky.
What DOES work is this:
In Site.xml:
<TextField DataFieldName="_MapTitle" DisplayName="_MapTitle" MultiLine="false" Value="Map Title" />
And in template.rpx:
<Control Type="AR.Field" Name="_MapTitle" DataField="_MapTitle" Left="12330" Top="1890" Width="2520" Height="360" Style="text-align: center; font-weight: bold; font-size: 10pt; vertical-align: middle; " />
(and no CalculatedField).
The problem is, and perhaps all along, is that when I add Editable="false" to the TextField entry in site.xml then nothing gets displayed. I do not want the user to be able to change the map title.
Any ideas? Is Editable="false" incorrect?
Thanks!
0 -
Unfortunately this seems to be a bug. You cannot currently have a configurable text field which is not user editable -- it just shows up blank, as you have experienced. I've filed this in our bug tracker so that it can be addressed in an upcoming release of Essentials.
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer