Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Reports, Parameters & Filtering View modes: 
User avatar
Member
Member
Jerreck - 11/14/2013 9:18:30 AM
   
Reports, Parameters & Filtering
I've created a new report that has a single table which pulls its fields and records from a custom table. The fields and records show up just fine in the table, but I'm having trouble getting the parameter for the report to work.

Here are some screenshots of the settings I have specified for the parameter:

User image

User image

What do I need to do to tell this parameter to update the table in the report?

User avatar
Member
Member
Accepted solutionAccepted solution
Jerreck - 11/14/2013 1:16:20 PM
   
RE:Reports, Parameters & Filtering
Nevermind! Figured it out :)

All I needed to do was to add the parameter to my table's query.

Before, the table's query was like this:
SELECT TaskLabel, TagLabel, Time
FROM customtable_time_tracking

This pulled in my information just fine, but I wanted to be able to filter the data based on what project you wanted to view. To do this, I created the parameter in my first post:
SELECT DISTINCT Project, ProjectLabel
FROM customtable_time_tracking
WHERE DepartmentLabel='Web Development'

I thought this would magically do the job for me (the docs were kind of vague on hwo the process worked). After I read through the documentation for the 100th time, I finally realized what was being described in this link.

You not only have to create a parameter, but you must also apply it to the query of your table. Parameters don't execute queries, they just create a variable for you to use in your SQL for the table/graph/html graph/value bits of a report.

So, now my table's query looks like this:
SELECT TaskLabel, TagLabel, Time
FROM customtable_time_tracking
WHERE Project = @Project

And it works!