How do I find the Nth Row in a Dataset to retrieve a respective Value?

Answered How do I find the Nth Row in a Dataset to retrieve a respective Value?

  • Tuesday, February 26, 2013 6:03 PM
     
     

    Currently I am running into a roadblock when using Report Builder 2.0 and trying to retrieve Nth rows from a dataset with the purpose of adding new Striplines to a Range Chart.

    Relative example of the Dataset I am using (IMPORTANT: Please note that the dataset is being dynamically pulled from a db and the number values and number of rows will vary upon user):

    Assignment               Due Date

    Essay                         3/15/2013

    Midterm                      4/15/2013

    Final                           5/15/2013

    Within the ChartStripLine Editor, I have been able to successfully add new Striplines for the first and last Due Dates by using the Last() and First() functions, however, I have found little success trying to add the 2nd row as a Stripline. As I mentioned earlier, the number of rows in the dataset will vary upon a user so there may be multiple values between the first and last that I would like to add as Striplines. Is there anyway to do this?

    I've tried the lookup function with no luck so far because its not inside an aggregate.

    Thanks in advance and please let me know if I can provide anymore details.

    Mike

All Replies

  • Tuesday, February 26, 2013 6:49 PM
     
     
    Are you trying to achieve a Green Bar effect ?

    DWM

  • Tuesday, February 26, 2013 7:02 PM
     
     

    I currently have a range chart where the y-axis consists of a bunch of projects and the x-axis consists of the dates that run the course the projects. Within the chart, I am adding different Striplines (from a different dataset than the chart) to mark different milestones. So far I've had success adding the striplines for the first and last milestones in the second dataset, but haven't been able to add any striplines for the milestones that fall between.

    I'm not entirely sure what a Green Bar effect - do you mind elaborating?

  • Tuesday, February 26, 2013 7:06 PM
     
     
    Never mind - I misread the initial post

    DWM

  • Tuesday, February 26, 2013 7:32 PM
     
     Answered

    Hi,

    Since the number of rows will vary, you might be better of using percentages, 25th, 75th?

    In any case, this link maybe able to help.

    If this is different from your striplines, then i advise you include in your dataset a field that will display the rownumber. Depending on the database you are using, there are functions that will return the rownumber. If you have this, then you can query your dataset accordingly

    WHERE ROWNUMBER()=2

    or store the value to a variable IIF(Fields!Rownumber.Value=2,Fields!YourRangeField.Value,Nothing)


    Please mark as answered or vote helpful if this post help resolved your issue. Thanks!

    k r o o t z