Seal Report Forum
»
Report Edition
»
Reports
»
View restriction value of shortdate can't have right display
Rank: Newbie
Groups: Registered
Joined: 7/19/2018(UTC) Posts: 6 Location: shannxi
|
my restiction values: restriction value:today restriction data-type:Date & Time format:Short Date (or custom format >yyyy'-'MM'-'dd) I want to where clause like: Convert(char(10),callrecord.SegStart_UTC,121) in (' 2018-07-21') but model's sql statement is "Convert(char(10),callrecord.SegStart_UTC,121) in (' 2018-07-21 00:00:00')" I don't understand what's going on here.can you help me? Edited by user Sunday, July 22, 2018 4:10:18 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
The date time format used for building the SQL is defined in your Connection Data Source. Select your Data Source, then Connection.
The other format is for the display format only.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 7/19/2018(UTC) Posts: 6 Location: shannxi
|
I know what you mean.It's my fault that I didn't express it clearly.
I mean if my datatype is text, but I want to my restriction value is datetime.
Simply say:I just want to use the datepicker control in the textbox and the value is yyyy-MM-dd.
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
yes, you are right, to have the DateTime Picker, you need to have a restriction of type DateTime the html is built in 'Report.iRestrictions.partial.cshtml' then the format is either Date or DateTime, it is set in common.js: //Date Picker $(".datepicker_datetime").datetimepicker({ showClose: true, showClear: true, format: shortDateTimeFormat, }); $(".datepicker_date").datetimepicker({ showClose: true, showClear: true, format: shortDateFormat }); So the format of the picker is not taken from your restriction...it could be an enhancement but might be complicated to handle all format. you can change the DatePicker format in your Root View: Additional JavaScript Code:shortDateFormat= 'MM.YYYY';
But after, the validation of the date will not work... So I added this point in the wish list (perhaps in 4.1) Edited by user Wednesday, July 25, 2018 11:47:05 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 7/19/2018(UTC) Posts: 6 Location: shannxi
|
Thank you for your reply. I seem to understand.
I have a little question at last.You say I can change the DatePicker format in my Root View.Whether or not it means in the root Views->define->Init script.
Thank you very very very much~!!!!
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Actually, select your root View in the tree view. Then edit the property 'Additional JavaScript'. This allow to insert JS in the result.
You can do that, it will work for the picker but it will not pass the validation on the server....so it won't work.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 7/19/2018(UTC) Posts: 6 Location: shannxi
|
That's the truth. The data type of the restricted value cann't be fully customized, and it depends on the data type of the database field that is really understand...
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 3/16/2018(UTC) Posts: 7 Location: Islamabad Thanks: 2 times
|
Hi,
I am trying a similar thing but not getting the results. I have put date in restriction and I want it to automatically set current date in restriction value. I need to get results of date when someone executes the report. Lets say if execute today the result should be for Aug 07, if execute tomorrow then result should be of date Aug 08. How it can be done?
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Did you try date keywords in your restriction ? Like 'Today+1'
|
|
|
|
Seal Report Forum
»
Report Edition
»
Reports
»
View restriction value of shortdate can't have right display
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.