I have a lithology table with a components child, and a sample table with a lab results child. When I try to combine the components and lab results in one log column, I get repeated component descriptions every time that the lab test's depth doesn't match sample_depth. I can imagine that I could fix this problem by using a sophisticated sql query (or recreating the database without parent-child relationships), but is there an easy way to solve this?
Does your expression use the <<CompDescChild()>> function?
Also, if you can write an SQL statement to accomplish what you want, you can encapsulate that SQL into your expression in the report. The gINT Help file has some good pointers with examples about using SQL within an expression.
Apparently, the problem with the SQL was that <<PointID>> needs single quotes and <<Depth>> needs none. Since I can now get simple queries like
<<Sql(SELECT [LAB_DATA].[AASHTO] FROM [LAB_DATA] WHERE [LAB_DATA].[Depth] = <<Depth>> AND [LAB_DATA].[PointID] = '<<PointID>>')>>
to work, maybe I'll be able to build up to something more complicated.
I haven't tried to use <<CompDescChild()>> because its stated function is to bring in children of the components table. Since lab data is a child of sample, it doesn't seem applicable. Do you think there's a way to use it here?
I asked to find out if the <<CompDescChild()>> function was used instead of <<CompDesc()>>.
Without having seen the expression and report, the data being reported, or the component description format table(s), it is hard to make a recommendation. But it sounds like you're on the right track with your SQL.