Ssrs

In my report I built, i have everything grouped in rows by Vendor. However, I have been asked to make it an either or with Part Number. And the selection will be on the menu that pops up during test. Is that even possible?

I’m not sure I follow what you are asking, can you expand a bit?

They want to use this screen to select how the data is sorted in the report. But they want the heading to say the Vendor ID if the Vendor id is selected in the fields int he picture or the part number, if selected.

po issues

1 Like

@josecgomez and they want the Vendor ID or part number to be in the report as the group by. Hope that makes better sense.

1 Like

This can be done using the BAQReportParameter.SortBy field. Define a group in the SSRS report based on the value chosen.
image

2 Likes

You can also do it in SSRS if that’s what you’re asking about, like this:

Create a Parameter for the Group By Options,

Add code to the Select statement of the report query, to calculate the correct group by field.

	CASE @GroupBy WHEN 'Customer' THEN c.Name
		WHEN 'Quote' THEN CAST(qh.QuoteNum AS NVARCHAR)
		WHEN 'Part' THEN qd.PartNum
		WHEN 'Product Group' THEN qd.ProdCode
		END as Groupby

Change the Group Properties to group by the new field.

1 Like

@nhutchins what do you mean by the Select Statement of the Report Query? Is that in the BAQ before the SSRS? Or is that the DataSet Properties–>Query?

Sorry, my example was for a straight SSRS report, not a BAQ report. Basically, you are creating a calculated field to group by on. I would think you might be able to do the same thing by creating a Calculated field in the BAQ.

All good,I figured it out! Thanks!