Datalink info is not showing in layer-dependent subreport
Hi all,
I have a datalink and a main report attached to the same layer. The report contains a subreport which has textboxes (for datalink info) and labels. However, when I run the main report from the layer, subreport textboxes are empty.
I can see datalinked info from ‘view additional details’ and labels in the subreport, so I think datalink is working and the links between main and sub report (tag and report name) is set up correctly.
Just can’t figure out why textbox in subreport is empty. Please see below as an example. Any help is appreciated.
Thanks,
Chen-Ting
Datalink ID: R
Sub report name: Sub.rpx
Datalink Query: Select Level, Comments from Test
The first one is M.rpx and the second one is Sub.rpx
<?xml version="1.0" encoding="UTF-8"?>
<ActiveReportsLayout Version="3.1" PrintWidth="10800" DocumentName="ARNet Document" ScriptLang="C#" MasterReport="0">
<StyleSheet>
<Style Name="Normal" Value="font-family: Arial; font-style: normal; text-decoration: none; font-weight: normal; font-size: 10pt; color: Black; ddo-char-set: 186; " />
<Style Name="Heading1" Value="font-size: 16pt; font-weight: bold; " />
<Style Name="Heading2" Value="font-family: Times New Roman; font-size: 14pt; font-weight: bold; font-style: italic; " />
<Style Name="Heading3" Value="font-size: 13pt; font-weight: bold; " />
</StyleSheet>
<Sections>
<Section Type="ReportHeader" Name="ReportHeader1" Height="2925" BackColor="16777215">
<Control Type="AR.Image" Name="Picture1" DataField="Buffer" Left="90" Top="90" Width="10620" Height="2700" LineWeight="0" HyperLink="" />
<Control Type="AR.Line" Name="Line1" X1="90" Y1="2880" X2="10710" Y2="2880" LineWeight="2" />
</Section>
<Section Type="PageHeader" Name="PageHeader1" Height="0" BackColor="16777215" />
<Section Type="Detail" Name="Detail1" Height="960" BackColor="16777215">
<Control Type="AR.Subreport" Name="SubReport1" Tag="Sub.rpx" Left="90" Top="450" Width="10620" Height="450" ReportName="R" />
<Control Type="AR.Label" Name="Label1" Left="90" Top="90" Width="1620" Height="270" Caption="R" Style="font-size: 9.75pt; font-family: Calibri; " />
</Section>
<Section Type="PageFooter" Name="PageFooter1" Height="360" BackColor="16777215">
<Control Type="AR.ReportInfo" Name="ReportInfo1" Left="90" Top="0" Width="3060" Height="270" FormatString="Report Date: {RunDateTime:MMM d, yyyy}" CanGrow="0" Style="ddo-char-set: 0; font-size: 8.25pt; font-family: Calibri; white-space: nowrap; " />
<Control Type="AR.ReportInfo" Name="infPageNum" Left="9450" Top="0" Width="1260" Height="270" FormatString="Page {PageNumber}" CanGrow="0" Style="ddo-char-set: 0; text-align: right; font-size: 8.25pt; font-family: Calibri; white-space: nowrap; " />
</Section>
<Section Type="ReportFooter" Name="ReportFooter1" Height="0" BackColor="16777215" />
</Sections>
<ReportComponentTray />
<PageSettings LeftMargin="720" RightMargin="720" TopMargin="720" BottomMargin="720" Orientation="1" />
<Parameters />
</ActiveReportsLayout>
<?xml version="1.0" encoding="UTF-8"?>
<ActiveReportsLayout Version="3.1" PrintWidth="10800" DocumentName="ARNet Document" ScriptLang="C#" MasterReport="0">
<StyleSheet>
<Style Name="Normal" Value="font-family: Arial; font-style: normal; text-decoration: none; font-weight: normal; font-size: 10pt; color: Black; " />
<Style Name="Heading1" Value="font-size: 16pt; font-weight: bold; " />
<Style Name="Heading2" Value="font-family: Times New Roman; font-size: 14pt; font-weight: bold; font-style: italic; " />
<Style Name="Heading3" Value="font-size: 13pt; font-weight: bold; " />
</StyleSheet>
<Sections>
<Section Type="GroupHeader" Name="GroupHeader1" Height="374" BackColor="16777215">
<Control Type="AR.Label" Name="Label1" Left="1890" Top="0" Width="1440" Height="360" Caption="Level" Style="ddo-char-set: 0; text-align: center; font-weight: bold; font-size: 9.75pt; font-family: Calibri; vertical-align: middle; " />
<Control Type="AR.Label" Name="Label2" Left="6840" Top="0" Width="1440" Height="360" Caption="Comments" Style="ddo-char-set: 0; text-align: center; font-weight: bold; font-size: 9.75pt; font-family: Calibri; vertical-align: middle; " />
</Section>
<Section Type="Detail" Name="Detail1" Height="519" BackColor="16777215">
<Control Type="AR.Field" Name="TextBox1" DataField="LEVEL" Left="180" Top="90" Width="4950" Height="360" Text="Level" Style="ddo-char-set: 0; font-size: 9.75pt; font-family: Calibri; vertical-align: middle; " />
<Control Type="AR.Field" Name="TextBox2" DataField="COMMENTS" Left="5220" Top="90" Width="5400" Height="360" Text="Comments" Style="ddo-char-set: 0; font-size: 9.75pt; font-family: Calibri; vertical-align: middle; " />
</Section>
<Section Type="GroupFooter" Name="GroupFooter1" Height="0" BackColor="16777215" />
</Sections>
<ReportComponentTray />
<PageSettings LeftMargin="720" RightMargin="720" TopMargin="720" BottomMargin="720" />
<Parameters />
</ActiveReportsLayout>
0
-
Hi Chen-Ting,
Have you checked "Enable Data Linking" in your report on the layer? That's an easy one to forget :)
Thanks!
Danny0 -
Hi Danny,
yes. data linking is checked for the report. We have another site which has a main report with multiple subreports (datalinks using regular select statement and stored procedures) without problems. I was wondering if there's something I should check in site.xml?
Also tried passing parameters to subreport directly (without using workflow or datalink) but can't figure out how to set it up properly. In the subreport, I added a parameter - gloid with default value GlobalID - and set the report data source using gloid to get fields needed. GlobalID is the key I would like to pass from main report to the subreport. Is there a way to link two reports without datalink or workflow?
Thanks,
Chen-Ting0 -
Hi,
Was there ever a solution to this problem? I am having exactly the same issue with a Report and Subreport. Data links are working okay and linked data is showing in the Feature Description but the subreport is not showing any linked data at all.
Thanks,
Peter0 -
Hi Peter,
Due to time constraint on the project, we ended up using a SQL report instead. I haven't gone back and revisited the issue since....
Hopefully there's an alternative report you could use?
Chen-Ting0 -
Has anyone else figured out how to include linked data in the feature reports?
Thanks!0 -
I am having the same issue. If I add a "Report Header" to the sub report I can get basic labels to display, but no dynamic data, and all information in the "Page Header" and "Detail" section do not appear. I'm really stumped with this one! 0 -
I always know as soon as I post to a forum I find the solution immediately. Here is what I found:
When the Data Link ID matches the name of the table that you are joining the subreport works, if the Data Link ID does not have the same name nothing appears.
My example is I have a table in an sde database named "ENV_ComplianceReportNotes" that I want to add as a data link. When I set the data link ID to "Report_Notes" the subreport would not appear. I created a new data link ID set to "ENV_ComplianceReportNotes" and now everything is working as it is suppose to.
Let me know if you see a similar result. Hope this helps!0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
7 kommentarer