Reputation: 3397
Made a report that displays a bunch of invoices based on date range and InvoiceNumber. User can get all invoices in the range or select individual invoices. Each invoice is displayed on a new page (grouped on invoicenumber with page break).
Problem I am having is I want the invoice number displayed on each invoice. Because one of the parameters for the report is the invoice number, I had to supply available values. I tried to get them from the main dataset, but I get an invalid report parameter dependancy errorsaying InvoiceNumber has a default value that depends on the report parameter 'invoiceNumber'.
So I created a second data set with just the invoicenumbers and that got rid of the error, but then I got an ambiguous field reference error on my InvoiceNumber field due to the 2 datasets with invoicenumber. I added first(fields!InvoiceNumber.Value, 'dataset1') but now it displays the same invoice number on each page (obviouxly because of the First().
So How do i get the invoice number for each invoice to display on each page?
Upvotes: 0
Views: 183
Reputation: 6024
A good way to handle this type of scenario is to take advantage of the scope that groups provide.
=First(Fields!InvoiceNumber.Value, "dataset1")
will give the correct invoice number on each page.Upvotes: 1