BAQ Report with "Lines"


I have a BAQ that shows Customer PO, Sales Order #, LineDescription… I am looking to see if there is a way to show the actual Line # as well.

Thank you!

Sure! If your BAQ already includes that information, then just add the extra field you want to the display fields. Let’s see your BAQ, then we can show you how to add that field.

1 Like

Sorry, I was not clear. This is what I have.
CustPOandSalesNum.baq (22.4 KB)

In your BAQ designer, go to the Query Builder tab > Display Fields. On the left you can see each of the three tables that you have included in your BAQ. OrderDtl holds the order line level information. You already have OrderDtl_LineDesc in there, so all you have to do is add in OrderDtl.OrderLine to see the line number. Easy-peasy!

The Walking Dead Easy Peasy GIF


Great, thank you so much!

Is there a way to link it via product by the product supplier?

My user basically wants to see Customer PO, Sales Order #, Product, and Product Supplier.

I am sure there is. I don’t use “product”, but if I wanted to solve this, I would start by identifying the field I want to include on my BAQ. To do this, I would go to a form where I can see the field. Then on that form, turn on Help > Field Help. Look at the technical details to see which table the field resides in. Then include that table in your BAQ. Depending on what table, and how the data is linked, you may need to add some other supporting tables, or subqueries to your BAQ.

Good luck!


Thank you! I was able to pull in the vendor name.

My next question is how to format the criteria to sort by vendor name. LIKE %____% only shows that specific vendor. I would like a way for the user to input the vendor and the search be based off that.

In that case you want to use “parameters” in your BAQ, go to Actions > Parameters. Create a new parameter and give it a name like MyVendorNum or something. Then in your BAQ, select the table that contains your Vendor Num, and create a table criteria filter for that table/field. Select “specified parameter” as the filter value, and change the specified part to MyVendorNum.

Now, when you run the BAQ you will first be prompted to enter the vendor num. Then your BAQ will return only the results for that vendor.

You could also skip the parameter thing, and just return all the rows in the BAQ, then use the grouping/filtering options in the BAQ to group/filter the results. This would probably be easier, as you don’t have to know the exact vendor number, and you should be able to choose from a list of vendors to filter the results by. Right click on the header of the results returned in the Analyze tab of the BAQ. Then turn on grouping, summaries, and filters (or whichever of the three you need).

Good luck! :slight_smile: