[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 687
  • Last Modified:

Accidental Double Paramaters

I have a pretty simple report with two parameters for date ranges.  I was using transaction_date (fields) for the parameters and this morning I change the query to be shift_date (fields).

I now have two sets of parameters that show up when I run the report, transaction_date and shift_date.  I changed all of the transaction_date fields to shift_date in the query and in the parameters properties.  I do not know how to refresh the report to get rid of transaction_date.  I found that the words still exist in the code, but when i delete that section, I get an error.  I assume I don't need to go this route, but I cannot remove transaction_date.

The attached file shows the data i do not want on my report.  Here is my query below.  transaction_date does not exist in the query any more.

SELECT     LT.EMPLOYEE_ID, E.LAST_NAME AS EMPLOYEE, CAST(MIN(LT.CLOCK_IN) AS VARCHAR) AS CLOCK_IN, CAST(MAX(LT.CLOCK_OUT) AS VARCHAR) AS CLOCK_OUT,
                      E.UDF_NUMBER, SUM(ISNULL(LT.HOURS_WORKED, 0)) AS HRS, LT.EARNING_CODE_ID, EMPLOYEE.LAST_NAME
FROM         LABOR_TICKET AS LT INNER JOIN
                      PAYROLL.dbo.EMPLOYEE AS E ON LT.EMPLOYEE_ID = E.ID LEFT OUTER JOIN
                      EMPLOYEE ON E.UDF_NUMBER = EMPLOYEE.ID LEFT OUTER JOIN
                      EMPLOYEE AS EM ON CAST(CAST(E.UDF_NUMBER AS INT) AS VARCHAR) = EM.ID
WHERE     (LT.SHIFT_DATE >= @START_SHIFT_DATE) AND (LT.SHIFT_DATE < @END_SHIFT_DATE + 1)
GROUP BY E.UDF_NUMBER, LT.EMPLOYEE_ID, E.LAST_NAME, LT.SHIFT_DATE, LT.EARNING_CODE_ID, EMPLOYEE.LAST_NAME
Capture.JPG
0
DannerCorp
Asked:
DannerCorp
  • 2
1 Solution
 
DcpKingCommented:
This is SSRS. Open the report in design mode and, in the Report Data window, expand the Parameters listing. You'll find all four there. Remove the two you don't need any more. Then go to your dataset and make sure that the parameters it needs are the two you want to give it (or else the other two will come back!)
0
 
DannerCorpAuthor Commented:
Perfect!  Thank you. . . I didn't see Parameters listing.
0
 
DcpKingCommented:
Great! One tip - I name my parameters like Name, StartDate, Quantity, etc., but in my stored procedures I always use RHN, so they look like @strName, @dtStartDate, @intQuantity. Then if the dataset takes over my parameters I know what's happened ('cos the prefixes start showing up in the parameter list!) and I also know which ones to kill!

hth

Mike
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now