This is a migrated thread and some comments may be shown as answers.

change Date format from the web from parameter

5 Answers 504 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Suriya
Top achievements
Rank 1
Suriya asked on 07 Mar 2009, 05:10 AM
Hi..

Sir i have completed the subreports sucessfully with your co-operation..

Our project has to come to an end.,

Now i have doubt in change the format of date parameter which is passed thru the web form.,

if i want to convert the date format inside the stored function is easy one,. but here we want to convert the date formet of the parameter winch is passed from the web form..

Example

              Input :      01/01/2008  (thru web form)

              output :  01/01/2008 12:00:00 AM (in the report)

But i want to print as what is given i.e., 01/01/2008


By
S.Suriya

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 10 Mar 2009, 05:33 PM
Hi Suriya,

You can use the Format property of the textbox item bound to your datetime field and set it to {0:d} for the case you describe.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
anusha
Top achievements
Rank 1
answered on 30 Mar 2011, 09:12 AM
Hi,
Can you please help me on this? i have created report called (userReport.vb) using Telerik Reporting Q2 2010. currently i am passing 2 parameters fromdate and todate in userReport.vb. i want to takeout these 2 parameters from  userReport.vb and want to pass the two parameters (fromdate and todate using RADDatePicker) via webforms to userReport.vb to filter the records in userReport.vb. I am new to programming. so can u pls help me in this in detail.

Thanks
Regards
Anusha
0
Peter
Telerik team
answered on 04 Apr 2011, 01:24 PM
Hi anusha,

Generally we provide Report Parameters that can handle this scenario without any coding. They can be easily used in Filter Expressions and if the ReportParameter.Visible property is set to True the ReportViewer will add automatically UI editors for them. However, if you still insist on using separate controls then you will still need a report parameter but the Visible property should be set to false and then you can pass the values to those report parameter as shown in the following code snippet:

Protected Sub Page_Load(sender As Object, e As EventArgs)
    Dim report1 = New Report1()
    report1.ReportParameters("MultiValueParameter1").Value = New Object() {1, 2}
    report1.ReportParameters("Parameter2").Value = myDateValue
    ReportViewer1.Report = report1
End Sub

All the best,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Devanand Chahal
Top achievements
Rank 2
answered on 15 May 2012, 02:26 PM
Is there any way that only the date part get inserted in the database(Oracle) instaed of DateTime , Is there any settings from Telerik which need to be modified to insert the Date part only, Any config settings or what...????
0
Peter
Telerik team
answered on 15 May 2012, 04:39 PM
Hello Devanand,

To directly access the DateTime type Date property as shown in the following expression:
= Parameters.Parameter1.Value.Date

If the suggestion don't cover your requirements our suggestion is to convert the DataTime parameter value to a custom format/type with an user function

All the best,
Peter
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Suriya
Top achievements
Rank 1
Answers by
Steve
Telerik team
anusha
Top achievements
Rank 1
Peter
Telerik team
Devanand Chahal
Top achievements
Rank 2
Share this question
or