Home
Extended ECM
API, SDK, REST and Web Services
Live report/Webreport
Frewini_Atakiti
I have two input parameters named, from date and to date.1. Is there a way to write code to check if to date is (greater than) > from date. Can we achive the above either in Web reports or Live reports.Looking forward for an answerThank You
Find more posts tagged with
Comments
Steven_Osborn_(sosborn@opentext.com_(Delete)_43869
Message from Steven Osborn via eLinkHi,A typical way to do this is to write a "launcher" WebReport which getsthe inputs and then runs the actual report you need to run.The launcher report is a simple WebReport with no data source. Itmerely presents a form to gather the input parms from the user. You canthen write a bit of javascript to check that to date > from date. Ifit all checks out you then invoke the actual report by constructing URLin javascript with the necessary input parms, if not you display anerror or something to the user.Cheers,Steve.-----Original Message-----From: eLink Discussion: Livelink LiveReports Discussion[mailto:livereportsdiscussion@elinkkc.opentext.com] Sent: 15 April 2008 00:55To: eLink RecipientSubject: Live report/WebreportLive report/WebreportPosted by Atakilti, Frewini on 04/14/2008 07:54 PM I have two input parameters named, from date and to date.1. Is there a way to write code to check if to date is (greater than) >from date. Can we achive the above either in Web reports or Live reports.Looking forward for an answerThank You[To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: Livelink LiveReports Discussion
https://knowledge.opentext.com/knowledge/llisapi.dll/open/Livelink_LiveReports_DiscussionLivelink
Server:
https://knowledge.opentext.com/knowledge/llisapi.dllTo
Unsubscribe from this Discussion, send an e-mail tounsubscribe.livereportsdiscussion@elinkkc.opentext.com.
Tim_Hunter
in webreports you can use something like:[LL_WEBREPORT_IF "[LL_REPTAG_&todate /]" > "[LL_REPTAG_&fromdate /]" /]...[LL_WEBREPORT_ENDIF /]in livereports it would depend on how you were using the check and what you would want it to do
Frewini_Atakiti
Hi Steve,I used an if condition to achieve this and I can display a message to the user in the html page as below[LL_WEBREPORT_IF "[LL_REPTAG_&inputLabel2 /]" < "[LL_REPTAG_&inputLabel1 /]" /]
To Date cannot be lesser than from date
[LL_WEBREPORT_ENDIF /]instead of displaying the message in the html page my user wants the message to appear in a pop up box like a message box or alert box .Do you think, I can achive this.Thank You,sunu
Frewini_Atakiti
Hi Tim, Hope u had seen my previous post.I would like to know if I can give the message " To Date cannot be lesser than from date" in the below piece of code in a popup box.[LL_WEBREPORT_IF "[LL_REPTAG_&inputLabel2 /]" < "[LL_REPTAG_&inputLabel1 /]" /]
To Date cannot be lesser than from date
[LL_WEBREPORT_ENDIF /]thank You
Steven_Osborn_(sosborn@opentext.com_(Delete)_43869
Message from Steven Osborn via eLinkHi,As per my first post: Yes you can do this. I would use JavaScriptinside a "launcher WebReport" to do it. You'll need to write or"borrow" some JS code to do the date compare in JS. There will be tonsof examples on the internet I would think.Cheers,Steve.-----Original Message-----From: eLink Discussion: Livelink LiveReports Discussion[mailto:livereportsdiscussion@elinkkc.opentext.com] Sent: 16 April 2008 21:01To: eLink RecipientSubject: Hi Steve,Hi Steve,Posted by Atakilti, Frewini on 04/16/2008 04:00 PMHi Steve,I used an if condition to achieve this and I can display a message tothe user in the html page as below[LL_WEBREPORT_IF "[LL_REPTAG_&inputLabel2 /]" < "[LL_REPTAG_&inputLabel1/]" /]
To Date cannot be lesserthan from date
[LL_WEBREPORT_ENDIF /]instead of displaying the message in the html page my user wants themessage to appear in a pop up box like a message box or alert box .Do you think, I can achive this.Thank You,sunu[To reply to this thread, use your normal E-mail reply function.]============================================================Topic: Live report/Webreport
https://knowledge.opentext.com/knowledge/llisapi.dll/open/14433194Discussion
: Livelink LiveReports Discussion
https://knowledge.opentext.com/knowledge/llisapi.dll/open/Livelink_LiveReports_DiscussionLivelink
Server:
https://knowledge.opentext.com/knowledge/llisapi.dllTo
Unsubscribe from this Discussion, send an e-mail tounsubscribe.livereportsdiscussion@elinkkc.opentext.com.
Phillip_Jones_(pjones@alitek.com_-_(deleted))
Displaying alerts is accomplished using Javascript. WebReports are simply HTML reports and are processed by the browser.For example, if inputLabel1 and inputLabel2 are numeric values: if ([LL_REPTAG_&inputLabel2 /] < [LL_REPTAG_&inputLabel1 /]){ alert('Value 2 is less than Value 1'); }This will display a message that the value of the second inputLabel is less than the first inputLabel.I hope this helps.
Tim_Hunter
If you want to leverage the logic you have already written you have most of the work done already, instead of the text on the screen just call the javascript function alert.[LL_WEBREPORT_IF "[LL_REPTAG_&inputLabel2 /]" < "[LL_REPTAG_&inputLabel1 /]" /]alert("To Date cannot be lesser than from date");[LL_WEBREPORT_ENDIF /]Personally I think popup messages cause the user to just click absentmindedly while your last approach would stay on the screen.
Frewini_Atakiti
Thank You Philip.I have inputLabel1 and inputLabel2 as date fields,With your code snippet in the above post.I got the below piece of code with my dates input fields working.var fromDate = new Date();var toDate = new Date();fromDate = Date.parse( "[LL_REPTAG_&inputLabel1 /]" );toDate = Date.parse( "[LL_REPTAG_&inputLabel2 /]" );if (toDate < fromDate){ alert("To Date cannot be less than From Date. Please click to select other valid dates");}I thank everybody who helped me out in this query.
Frewini_Atakiti
Thank You Tim.May be you are right.If I was the user, as you said I am least bothered in reading what is on the pop up box and would blindly click ok.Now that I have both working, I can give the user what they feel comfirtable with.Thanks Again.