• I need you help creating date parameters!

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » I need you help creating date parameters!

    Author
    Topic
    #1774315

    Hello,

    I’m new to SQL, I’m currently using sql report builber. I’m trying to modify a report already build. in this report, there is already a parameter called Date. I’m trying to change from one date input using the calendar to two parameters: StartDate & Enddate. In this report there are two data sets. I created the two parameters StartDate & EndDate, but how to go from here? I’m a beginner and i have no idea how this works so far. Please help me out. Thanks a lot.

    Edit1: I changed DATEADD(HOUR, 7, @Date) and DATEADD(MINUTE, 1139, @Date) to DATEADD(HOUR, 7, @StartDate) and DATEADD(MINUTE, 1139, @EndDate)
    now report work but shows start date report/1 page only. How to i make it so i can go to next pages/next day?

    Data Set1

    Code:
    .
    .
    .
    WHERE rp.Date between DATEADD(HOUR, 7, @Date) and DATEADD(MINUTE, 1139, @Date)
    and Station_Id = ‘3’
    ) d
    pivot
    (
    max(Tag_value)
      for Tag_Name in (A_Data1, A_Data2, A_Data4, A_Data5, A_Data6, A_Data7, A_Data8, A_Data9, A_Data10, A_Data11, A_Data12, A_Data13, A_Data20, A_Data21, A_Data22, A_Data23,
    A_Data24, A_Data25, A_Data26, A_Data27, A_Data30, A_Data31, A_Data32, A_Data33, A_Data34)
    ) piv;
    
    
    

    Dataset2:

    Code:
    .
    .
    .
    WHERE rp.Date between DATEADD(HOUR, 19, @Date) and DATEADD(MINUTE, 1859, @Date)
    and Station_Id = ‘3’
    ) d
    pivot
    (
      max(Tag_value)
      for Tag_Name in (A_Data1, A_Data2, A_Data4, A_Data5, A_Data6, A_Data7, A_Data8, A_Data9, A_Data10, A_Data11, A_Data12, A_Data13, A_Data20, A_Data21, A_Data22, A_Data23,
    A_Data24, A_Data25, A_Data26, A_Data27, A_Data30, A_Data31, A_Data32, A_Data33, A_Data34)
    ) piv;
    
    Reply To: I need you help creating date parameters!

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: