views:

248

answers:

3

Currently I get 3 rows back from a query, although the report only displays one of those rows. I need all three in the datatable, but only one row to be rendered. How can I choose that row specifically in the report. I'd rather not create another datatable in my dataset just to accommodate this.

=FormatCurrency(Fields!tip.Value, "DailySystemFinancialDataSet_tipsCount"))

That's what the field looks like, but I want to make sure the row it prints is where Fields!pay_type = 'comp tip'.

EDIT***

Like I said, I don't need to be manipulating these table rows.. the data is collected and calculated, I just need to get a specific row out of the table in the dataset. Everything is already passed to the report, so I'm using the report editor in design mode (vs2008) and I'd like a solution that works within those constraints. Thanks again.

A: 

You can use linq, first retrieve all your rows and make a select query in linq to return you the row you want to work with.

table.Select(t => t.Id==someId).FirstOrDefault()
Daniel
A: 

A) Change your query to limit to where pay_type = 'comptip'

B)

while (result) {
    if (pay_type == 'comptip') { display(); last; }
}

Adjust pseudo code to C# as needed.

Autocracy
+1  A: 

I found the reporting services documentation, finally. http://msdn.microsoft.com/en-us/library/ms157328.aspx

in particular, the RowNumber() function is exactly what I needed to solve the problem. Thanks ya'll.

kristofer