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
. . . 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:
. . . 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;