Hi all,
I'm trying to modify the Product Summary report so I can access the prompts for each product, yet I only want one line for each product.
Does anyone know the simplest way to achieve this or have any tips?
I think the best solution would be to generate a new table either using a built-in Report Designer function or by a custom SQL query.
I can create an SQL query that I've verified is functional, but I can't find how I can actually use this in the report. And I haven't been able to figure out how to join tables with the build-in methods.
Using the built-in ProductPrompts table makes all prompts available, but outputs a new line for every prompt for each product, which I don't want. I thought I could filter this data band to only output a line for each unique product, but I got nowhere with that.
This is the SQL query I created, which just adds two prompt values for the corresponding product to the existing Product table. If I could access this in a data band in the report designer, I think I'd be good to go. -
SELECT
p1.Value AS Left_Finished_Value,
p2.Value AS Right_Finished_Value,
Products.*
FROM Products
LEFT JOIN Prompts AS p1 ON Products.LinkID = p1.LinkIDProduct AND p1.Name = 'Left_Finished_End'
LEFT JOIN Prompts AS p2 ON Products.LinkID = p2.LinkIDProduct AND p2.Name = 'Right_Finished_End';