Report Duplicate records
I am running a report in workflow that outputs duplicate records to the report. I am using the FeatureSetToDataTable and AddToDataSet activities to output my queried features to a Template Report. I am using a sub report as well. The problem is that if there are 3 features in the dataset, in the report the records will be repeated 3 times.
Example:
Report Output
1
2
3
Report Output
1
2
3
Report Output
1
2
3
Anyone have any suggestions as to why this is happening and how to resolve it?
Thanks in advance,
Aron
-
To further clarify, my report is duplicating the report multiple times based on the number of records that are. Any ideas how to fix this?
0 -
If you select one feature does the report work as expected? Is it the subreport that shows all records when you have multiple seleted features?.
If the subreport is showing all records, it could be the link between the parent datatable and the subreport datatable is missing from the dataset. In .NET terms a DataRelation is added to a DataSet for a parent/child link between DataTables. A DataRelation can be added with code in the report, not sure if it can be added in workflow.
0 -
Thanks for the input Mark. I have tried with one record and I get one result. If I output the DataSet to xls instead of a report template I get the expected number of records. I'll have to look closer to your suggestion. In the meantime though, I'm having difficulties with using the Areas and Lengths Task and using that output to create a datatable for my report but I will start a new thread for that.
Aron
0 -
So I was having this very same EXACT issue and could not find any posts that had answers. Maybe they're out there somewhere, but I couldn't find them. After much detective work, here's what I finally figured out:
I had used as a starting point a workflow that added query results from MULTIPLE layers to one report -- the MultiLayerReport workflow you can download (FeatureToDataTable--> Assign-->AddToDataSet-->TemplateReport-->CreateTempFile standard report sequence). For results from multiple layers you need sub-reports. However, after mulling it over for a loooooong time and then examing the workflow for mailing labels, it finally occurred to me that you do not need a sub-report if you are dealing with the query results of just one layer! Seems so simple, right? So I removed the sub-report from my report template and just added text boxes for my data fields directly to the report template and BOOOM! no more duplicate records!
So there ya go. One query layer, no sub-report needed. That's one drawback to gerryrigging existing workflows without totally understanding what you're doing. I won't confess how many hours this took me, but maybe it will save one other person out there the same amount of time and frustration....0 -
You helped me again Lisa! Twice in one afternoon! : ) My report was duplicating itself based on how many records, but after removing the now unnecessary subreport and changing the detail section's NewPage to None, everything's working fine now. Indeed, hacking away at a previously made report for a new workflow requires lots of cleaning up and refiguring out. 0
Please sign in to leave a comment.
Comments
5 comments