Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
395
Fill label with field from other row than First or Last
posted

All headers in my reports need to be language specific. Data for this is already in the database and used on the forms. So I feed the report with a SQL that returns the following data.

ReportID           HeaderID          HeaderText

1                           1                           Unit

1                           2                           Material

1                           3                           Cost

1                           4                           Available

 

I then need to map each Label in my Page Header to the Header text of a certain row. That is, I have four Labels in my Page header. The first needs to be filled with the text ‘Unit’, the second with ‘Material’ and so on.

 

Using the Aggregate functions I can get the First (Unit) and the Last (Available) but I cannot figure out how to get any specific text using the HeaderID. I would like to have something in the Expression Assistance looking something like this:

=Get(Fields.HeaderID = 3, Fields.HeaderText, DataSource)

 

I have experimented with Any, All, Max, First, etc. but I can’t get them to work the way I want.

 

There are no samples in the documentation and no explanation on the syntax of boolExpression and scope Expression so it’s hard to figure out what to do. Anyone knows how I can do this?

  • 34510
    Verified Answer
    Offline posted

    Hello Hans50,

    I've investigated your issue and currently, it doesn't seem possible to access individual items in the way that you require.  The expression system only lets you access the first object or the last object but nothing in between.  I recommend that you submit this as a new product idea at our Product Idea website: http://ideas.infragistics.com/

    There is another way to do this though.  You stated that you are using SQL so it should be possible for you to create a new SQL data source that connects to the table and executes a query to return records with a certain HeaderID.  Assuming that your table has unique HeaderIDs then this would give you a table with 1 record.  At this point you can use the First method to grab that record and display the header text as needed.

    This approach would require a new data source per HeaderID that you wanted to show in the page header.  Let me know if you have any questions on this.