Field from Dataset not Displaying in Expression

Posted by: on 29 October 2021, 2:54 am EST

  • Posted 29 October 2021, 2:54 am EST

    I have a report created in SSRS that I have added to ActiveReports Report Designer. In SSRS, some of the field names were separated with a single underscore or double underscores (ie. Lending_Services and Information_Technology___Business_Continuity). I had to re-create the Datasource and the datasets and I did so with the underscores. The Report Designer stripped the single underscores and replaced them with spaces and the double underscores and replaced them "&". I'm going through all the expressions in the report and correcting the fields. I also noticed that GrapeCity references the fields differently than SSRS: =Fields!Eligible_Capital_Abbr.Value vs =Fields.Item("Eligible Captial Abbr").Value. Easy enough to resolve.

    The fields I'm struggling with is ones pulling from other datasets. For example, in SSRS the field is set up like =First(Fields!FieldName.Value, "OtherDS"). I tried using =First(Fields.Item("FieldName").Value, "OtherDS") and it did not work. I also tried deleting the expression and going into Fields > DataSets > OtherDS, selecting First(FieldName) and inserting it. It inserted it as =First(Fields!FieldName.Value, "OtherDS") and it still did not work.

    I checked the query for OtherDS and "FieldName" has a value in it and confirmed FieldName is correct.

    Any ideas?
  • Replied 31 October 2021, 5:50 pm EST

    Hello Shelly,

    Can you please tell are you using this in the DataRegion control(Like Table, Tablix) or in the TextBox?

    Which version of AR are you using right now?

  • Marked as Answer

    Replied 1 November 2021, 8:53 am EST

    Hi @mohitg,
    It's a cell in a tablix. I'm using ActiveReports Report Designer 15.

    There are four tablix used on the report and five datasets have been set up. The one I've reported having issues with, let's call tablix3. The majority of the cells in this tablix are using dataset4, but the cell in question uses dataset5.

    Tablix1 is using Dataset5, and displays data without issue.

    I tried adding fields from the other datasets in tablix3 with the following results:

    did not display, but displays in a different tablix

    a value displayed
    =First(Fields!FieldName.Value, "Dataset2")

    a value displayed
    =First(Fields.Item("FieldName").Value, "Dataset3")

    value displayed
    = First(Fields!FieldName.Value, "Dataset4")

    I added a field to tablix2 from dataset5 and no value displayed. If I add a field from dataset4, a value for that field displays.

    - The query for dataset5 returns data
    - The fields set up for tablix1 uses dataset5 displays in that tablix
    - The fields from dataset1 and dataset5 will not display in tablix3
  • Replied 1 November 2021, 4:00 pm EST

    Hello Shelly,

    Is there any difference between datasets like different data type or different provider?

    Also, is it possible to provide us a dummy report with dummy db so that we can look the issue at our end.

  • Replied 4 November 2021, 9:42 am EST

    The tablix3 is using dataset4. I ended up flipping it to use dataset5 and then ended up referencing dataset4 for the required cells i.e. First(Fields.Item("field name").Value, "dataset4") and it worked not sure why it didn't the other way, but here we are! :)
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels