I have had comments from our Purchasing dept about multi-page PO’s having Line 1 taking up all of Page one and Suppliers not noticing Line2,3,etc on subsequent pages.
Is it possible to code TxtPOLine to show 1/3 or 2/3 etc instead of just Line1, Line2
The expression at the moment is “=format(Fields!POLine.Value,”#,###“)”
I imagine it would be possible, apologies for not having tried this specifically, but I think you will need to create a parameter to grab the max (or count) line number so that you can reference that in the line level, because of the grouping the line will not likely have access to how many lines are on the order.
Another possible option would be to add a subquery in the select statement in SSRS to “Count” the records. That way you would have a field for every record that will show the total record count.
Then it is fairly straight forward to create a text field to show the 1/3, 2/3, 3/3 etc.
Something like: (SELECT Count(Company) FROM PODetail_" + Parameters!TableGuid.Value + ") AS POLineCount
Then your string would be: Fields!POLine.Value & “/” & Fields!POLineCount
Do a lookup for row number() over, or window functions on sql. You may also be able to use some of the in but in functions for SSRS. Sorry for being so vauge…
To add, I asked a friend of mine (LOL) and they gave recited a small poem to me.
use =RowNumber("YourDataSetName") & "/" & CountRows("YourDataSetName")
in an expression
or
use something similar to this in the query
ROW_NUMBER() OVER (PARTITION BY po.PONumber ORDER BY pol.LineNumber) AS LineNum,
COUNT(*) OVER (PARTITION BY po.PONumber) AS TotalLines,
-- ... rest of your columns
FROM PurchaseOrderLines pol
JOIN PurchaseOrders po ON po.PONumber = pol.PONumber
WHERE po.PONumber = @PONumber
Then use =Fields!LineNum.Value & "/" & Fields!TotalLines.Value
In a text box