Showing posts with label alli. Show all posts
Showing posts with label alli. Show all posts

Monday, March 19, 2012

DateTime parameter in report

Hi All:

I wanna have DateTime calendar filter in report, so i create a parameter call EndDate which defualt vavlue today, now i have problem how can i get the value from Date Time calendar after every time user selected new date, then i need to pass this date time value to subreport.

Thanks

Nick

Not sure I understand your request well. Are you asking how to pass a parameter value from a main report to a subreport? You may want to read the following BOL page: http://msdn2.microsoft.com/en-us/library/aa337167.aspx. In particular, you can pass parameter values to subreports by editing the subreport properties in the main report and setting the parameter expression to =Parameters!EndDate.Value

-- Robert

|||

hi Robert.

Thanks for your reply, now i got another error after i set up the date time parameter in subreports.

In the property of sub report , i use =Parameters!WeekEnding.Value, weekEnding is date time type parameter both in main and sub report.

now i run the report. i got error like below:

An error occured during local report processing. The value provided for the report parameter "WeekEnding" is not valid for it's type.

I have no ideas about this error message. it works fine if i change WeekEnding type to string both in main and sub report. is that anything i missing out here?

thanks

Nick

DateTime parameter format issue?

Hi All:

I create a report with a DateTime parameter, i would love to use DD/MM/YYYY this format, but it doesn't work . it works when i change to usa datetime format ,YYYY-MM-DD,

any helps are appreciated.

thanks

Nick

hi Nick

this is an example of what I use

this is put in as an expression - Layout view on a table

=Format(Fields!Date3.Value, "dd/MMM/yyyy")

hope this helps

|||

Hi, I had the same issue, this is a documented fix in SP1 for SQL 2005, using formatdatetime function you can fix this,

Andy

|||

It is really help.

i used "DD/mm/yyyy", it works

Thanks you very much jewelfire.

|||

Hi,

I have a report which has a datetime parameter,

when i choose the datetime from calendar control , then click view report button. if i choose 13/12/2006, it would give a error, because the report think it's 13 is month , how can i fix this issue. also i want keep dd/MM/yyyy format?

Thanks

Nick

DateTime parameter format issue?

Hi All:

I create a report with a DateTime parameter, i would love to use DD/MM/YYYY this format, but it doesn't work . it works when i change to usa datetime format ,YYYY-MM-DD,

any helps are appreciated.

thanks

Nick

hi Nick

this is an example of what I use

this is put in as an expression - Layout view on a table

=Format(Fields!Date3.Value, "dd/MMM/yyyy")

hope this helps

|||

Hi, I had the same issue, this is a documented fix in SP1 for SQL 2005, using formatdatetime function you can fix this,

Andy

|||

It is really help.

i used "DD/mm/yyyy", it works

Thanks you very much jewelfire.

|||

Hi,

I have a report which has a datetime parameter,

when i choose the datetime from calendar control , then click view report button. if i choose 13/12/2006, it would give a error, because the report think it's 13 is month , how can i fix this issue. also i want keep dd/MM/yyyy format?

Thanks

Nick

DATETIME Issue

Hi all

I am having a problem with how the DATE field of a column is being displayed. What I am trying to do is run a DTS that takes the info from a table and places it into a flat file. Of course the format of the flat file does not need the trailing 23:59:59.993. When running a view it gives us the proper format of mm/dd/yyyy but the rest is not being shown in the view. A Cast function in the view into a VARCHAR changes it to something like Oct, 10, 2006. And of course the LEFT function comes up with the same Oct, 10, 2006 format.

How would I tell SQL server to just grab just 10/06/2006 and nothing else or without it trying to change it to a different format?

ThanksLook up the Convert function in BOL. There are a number of formats to display a date in.|||Wonderful, thanks!

Friday, February 24, 2012

daterange problem

Hi all

I am using Crystal reports 8.5 and SQL Server

i am littlebit confused in writing formula giving you the scenario :

in one table i have datefield
need to check that date falls under the given date range

(ex: given date range :09/12/2005 - 02/11/2006

field consists : 13/12/2005

like above i need the count of the fields which falls under that date range

please help meuse formula something like this
if '2-jan-2006' > '1-jan-2006' or '2-jan-2006' < '31-jan-2006' then
1
else
0

then use summary function sum.

hope it helps|||Thanks its helps for me

Another problem is there with date range

when i selects a startdatetime from daterange,it should go back to one year and fixes to date and month (i.e May 31)

startdatetime -- 03/04/2006

date should goes to -- 05/31/2005

i used dateadd('yyyy',-1, startdatetime) it is decreasing one year but i am unable to fix the date to May 31

thank you very much|||if date is fixed to 31-may then u can use this formula

left(cstr('31-may-'& val(right(cstr(cdate('8-jan-2006')),4))-1),11)|||Thank you very much

you showed me away to do this

thanks a lot|||Hi

when i used your formula

getting the value like 2,005

Actually my aim to take this as daterange instead of actual date range

so if it contains "," unable to take it as daterange

pls help me|||I don't see anyproblem in that formula except its returning a string.

can you write how, u r using that formula|||Hi,

I am using what u r send formula.
But i get comma oerator in the year.

i am using like this
'31/1/'+ cstr(val(right(cstr(cdate('8/1//2006')),4))-1)

i am getting
31/1/2,005|||Hi,

I am using what u r send formula.
But i get comma oerator in the year.

i am using like this
'31/1/'+ cstr(val(right(cstr(cdate('8/1//2006')),4))-1)

i am getting
31/1/2,005

i removed one slash from between 1//2006

put as a formula
'31/1/'+ cstr(val(right(cstr(cdate('8/1/2006')),4))-1)
and got my output as

31/1/2005.00|||Hi

Thanks for your reply

In the given date range i am getting some customer ids from database

what i want is need to check whether those customer ids are existing or not in the perticular date range(i.e different date range from given date range)

if i am getting customer ids for this date range (07/01/2005 - 07/31/2005)

need to check the customer ids are existing in tthis date range(06/01/2005 - 06/30/2005)

could you pls help me|||iam developing the crystal report there was small problem iam facing

please help me

How to use parameter of main report into the subreport

example

@.startdatetime is a parameter in main report
ia want to use the same parmeter in subreport