0

May you please assist me with this issue

I have created a report that receives 5 parameters

  1. @Site - Location Name
  2. @StartDate
  3. @EndDate
  4. @StartTime
  5. @EndTime

All seems to be working fine, the report filters according to what is required. The problem is now the same rdl file I need to publish it on another system and emmediately after publishing when I run it gives me this error "Reportviewer - specific report error: The 'StartTime' parameter is missing a value ;0;Void Error(System.String, System.Object[])"

Am not sure where to look into at this moment as I don't experience the error when running report on my local. Below is the code I used:

Parameters
@StartDate default = dateadd(dateinterval.Day, -1, Today)
@EndDate  default = =dateadd(dateinterval.Day, -1, Today)
@SiteID  SQL Dataset = SELECT 0 AS ID, 'All' as Name
                       FROM sites 
                       UNION
                       SELECT ID, Name
                       FROM sites 
@StartTime  default = 12:00:00 AM 
        Available values (12:00:00 AM  - 11:00:00 PM
@EndTime default = 11:00:00 M 
     Available values (12:00:00 AM  - 11:00:00 PM


SQL Dataset
Declare @Start datetime = cast (@StartDate + ' '+ @StartTime as datetime)
Declare @End datetime = cast(@EndDate + ' ' + @EndTime as datetime )

SELECT Distinct ast.Name as HomeSite, ISNULL(c.FirstName + ' ', '') + c.LastName as Name, md.MemRefNo,att2.Name as VisitedSite,isnull(att2.TotalVisits,0) as TotalVisits, isnull(atc.totalaccepted,0) TotalAcceptedVisits, ISNULL(att.TotalOverrideVisits, 0) AS TotalOverrideVisits,  isnull(att1.TotalOverrideDenieds,0) as TotalOverrideDenieds 
FROM Contacts c 
INNER JOIN  MemberDetail md on md.ContactGUID = c.GUID
INNER JOIN  Sites ast on c.HomeSiteID = ast.ID

OUTER APPLY 
       (
        SELECT ast.Name,a1.contactguid,COUNT(*) totalaccepted
        FROM    Attendance a1
        INNER JOIN  Sites ast on a1.SiteID = ast.ID
        WHERE   a1.contactguid =  c.GUID
        AND     (a1.IsSwipeSuccessful = 1)      
        AND     a1.accessoverridereasonid IS  NULL 
        AND     a1.AttendDate BETWEEN @Start AND @End
        AND     (a1.SiteID = @SiteID OR @SiteID = 0)
        group by  a1.contactguid,ast.Name
        )atc


OUTER APPLY 
       (
        SELECT  ast.Name,a2.contactguid,COUNT(*) TotalOverrideVisits
        FROM    Attendance a2
        INNER JOIN  Sites ast on a2.SiteID = ast.ID
        WHERE   a2.contactguid = c.GUID
        AND     a2.accessoverridereasonid IS NOT NULL 
        AND     a2.AttendDate BETWEEN @Start AND @End
        AND     (a2.SiteID = @SiteID OR @SiteID = 0)
        group by  a2.contactguid,ast.Name

       ) att


    Outer APPLY 
       (
        SELECT  ast.Name,a3.contactguid,COUNT(*) TotalOverrideDenieds
        FROM    Attendance a3
        INNER JOIN  Sites ast on a3.SiteID = ast.ID
        WHERE   a3.contactguid =  c.GUID
        AND     a3.IsSwipeSuccessful = 0
        AND     a3.AttendDate BETWEEN @Start AND @End
        AND     (a3.SiteID = @SiteID OR @SiteID = 0)
        group by  a3.contactguid,ast.Name

       ) att1

   Cross APPLY 
       (
        SELECT  ast.Name,a3.contactguid,COUNT(*) TotalVisits
        FROM    Attendance a3
        INNER JOIN  Sites ast on a3.SiteID = ast.ID
        WHERE   a3.contactguid =  c.GUID
        AND     a3.AttendDate BETWEEN @Start AND @End
        AND     (a3.SiteID = @SiteID OR @SiteID = 0)
        group by  a3.contactguid,ast.Name

       ) att2 

    Order by name

1 Answers1

0
  1. Try refreshing all the datasets (shared and non-shared)
  2. Check their properties (especially the parameters page) and make sure they are right.
  3. Redeploy (make sure you are overwrite existing datasets)

Hope this helps,

Henro

Henrov
  • 1,610
  • 1
  • 24
  • 52
  • Hi there am not sure if I follow, by refreshing dataset do you mean recreating the datasets or run the query or refresh fields?? – user1538257 Oct 09 '14 at 05:56
  • Refresh fields. Just double-click the datasets, hit ' Refresh Fields', then check the tabs for the parameters. – Henrov Oct 09 '14 at 14:37