I am re-writing our existing Crystal Reports in RS, all of the SP's already
exist for the reports, so I am trying to use what we already have and create
clones in reporting services - I have a datetime field that is being returned
from the sp, and I need to have a high level of grouping in the report based
on the date, and a lower level grouping in the report based on the time (by
user)...my question is am I able to keep the SP as is, or do I have to add
two new values to the SP (return the date and the time as separate fields in
order to do what I need? Am I not able to use functions (expressions) to use
this one datetime field in two different effects?Got it ~
"Myles" wrote:
> I am re-writing our existing Crystal Reports in RS, all of the SP's already
> exist for the reports, so I am trying to use what we already have and create
> clones in reporting services - I have a datetime field that is being returned
> from the sp, and I need to have a high level of grouping in the report based
> on the date, and a lower level grouping in the report based on the time (by
> user)...my question is am I able to keep the SP as is, or do I have to add
> two new values to the SP (return the date and the time as separate fields in
> order to do what I need? Am I not able to use functions (expressions) to use
> this one datetime field in two different effects?
Showing posts with label crystal. Show all posts
Showing posts with label crystal. Show all posts
Sunday, March 11, 2012
DateTime expressions
Friday, February 24, 2012
Dates
trying to create a stored proc with this query:
select * from table1 where datefield BETWEEN @.startdate
AND @.enddate.
When using Crystal reports against this,it works fine
except when you are just using one day- for example your
start date and end date would both be 9/2/2004. Anyone run
into this? Should I do something different? THANKS!probably you are not considering time component. See following example.
create table t(dt datetime)
insert into t values ('20040903 12:24:15')
insert into t values ('20040903 1:24:15')
insert into t values ('20040903 16:24:15')
insert into t values ('20040903')
insert into t values ('20040904')
select * from t
where dt between '20040903' and '20040903 23:59:59'
Vishal Parkar
vgparkar@.yahoo.co.in | vgparkar@.hotmail.com
"Ann" <anonymous@.discussions.microsoft.com> wrote in message
news:51bb01c49134$9db6b420$a501280a@.phx.gbl...
> trying to create a stored proc with this query:
> select * from table1 where datefield BETWEEN @.startdate
> AND @.enddate.
> When using Crystal reports against this,it works fine
> except when you are just using one day- for example your
> start date and end date would both be 9/2/2004. Anyone run
> into this? Should I do something different? THANKS!
select * from table1 where datefield BETWEEN @.startdate
AND @.enddate.
When using Crystal reports against this,it works fine
except when you are just using one day- for example your
start date and end date would both be 9/2/2004. Anyone run
into this? Should I do something different? THANKS!probably you are not considering time component. See following example.
create table t(dt datetime)
insert into t values ('20040903 12:24:15')
insert into t values ('20040903 1:24:15')
insert into t values ('20040903 16:24:15')
insert into t values ('20040903')
insert into t values ('20040904')
select * from t
where dt between '20040903' and '20040903 23:59:59'
Vishal Parkar
vgparkar@.yahoo.co.in | vgparkar@.hotmail.com
"Ann" <anonymous@.discussions.microsoft.com> wrote in message
news:51bb01c49134$9db6b420$a501280a@.phx.gbl...
> trying to create a stored proc with this query:
> select * from table1 where datefield BETWEEN @.startdate
> AND @.enddate.
> When using Crystal reports against this,it works fine
> except when you are just using one day- for example your
> start date and end date would both be 9/2/2004. Anyone run
> into this? Should I do something different? THANKS!
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
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
Subscribe to:
Posts (Atom)