In the crosstab expert, use {table.date} as your colum field and while it is highlighted, go to group options->customize group name->use a formula as group name->x+2 and enter:
Hi - Thanks a lot for your help. It works but I have a little problem. Suppose I dont have any 'updates' for wednesday, then the cross-tab does not display wednesday. Is there a way I can display wednsday with the count for 'update' as 0? thanks a lot.
You can either add a table that contains all dates (linked with a left join to your current table) and use a date field from the new table as your column, or you could create a manual crosstab, where you would group on {table.status} and then create formulas like:
//{@Monday}:
if dayofweek({table.date}) = 2 then 1//for a count or {table.amt}
//for a quantity
//{@Tuesday}:
if dayofweek({table.date}) = 3 then 1
Then you would right click on each of these and insert SUMs, not counts. Then suppress the details section.
Thanks a lot for your help. I checked with the requirement and they do not want the other days to be displayed if they are no records. I have another question. I have a date parameter in my report. Is there a way to make the current date as a default for the parameter. thanks a lot.
I believe that if you check you will find that currentdate IS the default for a date parameter--as long as you have not entered specific dates as parameter options.
hi lbass - When i modify the date in the paramter to anything other than the current date, the next time i execute, it has the previously entered date as default. also, i have a formula which calculated some date. is there a way to make the result of this formula as a default for my date parameter? thanks a lot.
I am not familiar with this behavior. I think you'd better state your CR version so someone else can jump in.
I'm assuming you don't have "Save data with report" checked?
There is a way to set up a selection formula that would to default to another value but it's dependent upon referencing the currentdate as the apparent default,e.g.,
if {?date} = currentdate then
{table.date} >= {@yourdateformula} else
if {?date} <> currentdate then
{table.date} >= {?date}
However, this method could be confusing to the user if they actually noted or wanted to use the currentdate...
I am using CR11. I dont have the 'save data with report' checked. I already had this question about crystal remembering the last value entered and someone from the forum said its intended to be that way. also, let me explain my problem in detail. I want the date parameter to be the start date(monday) of this current week. so I have this formula that gets the date for monday of this week.
is there a way i can insert this is the default value for the parameter. you had mentioned earlier that the default IS current date if i dont enter anything. but my parameter does not let me click 'ok' without entering a date!
thanks a lot lbass. i really appreciate your time and help.
As I mentioned earlier, someone else will need to jump in. You clearly have a different CR version than I, and I can't really experiment to see what might work, if anything. Sorry.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.