Joined: 13 Aug 2009
Location: United Kingdom
Online Status: Offline
Posts: 19
Topic: Formula string manipulation Posted: 25 Jun 2015 at 2:03am
I am creating a Crystal Report which selects item A as a parameter in the main report from table X. A subreport then displays sub-items B and C from table Y (there may be 2 or 3 of these sub-items). I then want to display in a second sub-report all activity from table Z for all items and sub-items A, B, and C.
I felt one way of achieving this was having a selection formula in the second subreport of {Table Z} in ["A", "B", "C"]. This works if I hard-code the values. However, when I use a formula in the first subreport to read all the records with the following code:
Firstly it returns ,B,C (note the preceding comma) but also I cannot do any string manipulation with it (e.g. Join with parameter A from the main report) because 'A string array is expected here'. So it seems I have no way of creating my required string of ["A", "B", "C"] because WhileReadingRecords always returns an array. Is there another way of putting the contents of the first subreport into a string?
Joined: 13 Aug 2009
Location: United Kingdom
Online Status: Offline
Posts: 19
Posted: 26 Jun 2015 at 2:25am
Also (as a little background in simple terms the table structures are such that table X has a column A (main item) that I use to select (from a parameter). Table Y has a FK back to column A and column B lists all sub-items (2 or 3 rows per main item). Table Z has many rows for each item and sub-item. If I create a simple CR all that is listed are all rows from table Z for the main item only. If you can help me identify how to display all rows from table Z for the main item and all sub-items then that would be brill!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum