Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extra null column at beginning of crosstab

Status
Not open for further replies.

AnnetteB1305

Technical User
Aug 17, 2011
166
GB
Hello,

I have a crosstab that requires a column for dates in a particular range i.e. last 8 days even if there are no calls in those dates. I have sorted this however am getting a column at the beginning of my crosstab for all dates that are before the date specified and I need to hide this column. I can not suppress empty columns due to my requirement of showing info if there are no calls in my required range. My date formula is as follows:-
@logdate :- If date({opencall1.logdate}) >=dateadd("d",-8,CurrentDate)then date({opencall1.logdate})

Any ideas anyone please?
 
Annette,

Can you clarify your posting? You want to suppress this column if there are other calls, but show it when there are none?

Regardless of that:
The "reason" for the blank column is all dates before 8 days prior to currentdate are being assigned "" by your formula above (specifically the undefined "else").

Do you have any record selection on this report? You can eliminate this column via record selection (if able to do so on this report based on other reporting requirements) by adding the following to your record selection:
Code:
[green]~Any potential record selection you currently have~[/green] [blue]AND[/blue]
[blue]Date[/blue]({opencall1.logdate})>=[Blue]DateAdd[/blue]("d",-8,[blue]CurrentDate[/blue])

Not 100% sure if this will resolve your issue, but should be a very quick test to see.

Hope this helps in finding a solution!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
No sorry I don't want to show this column at all, I know it's there because of the dates before however I can not eliminate this in the report selection as I also have to evaluate the average of the last month in another area in the report. The reason for the confusion is there are columns in the dates that I require that may be blank and have no calls and I need to show these.

Hope this clarifies it a bit better.

Thanks for trying to help.

Annette
 
Annette,

Though I can't say for certain, but I do not think you will be able to have these dates in the report, but I am not sure you can have the dates in the report but remove them from the crosstab (while using them for a calculation on the crosstab).

*lightbulb*
One quick idea... is there any way to differentiate between a blank date you would like to see and one you wouldn't? For example, "if a date is before a certain point in time, remove from report, otherwise it is a non-reporting day within the range you seek" or anything like that? If such a date exists, you may be able to assign a "Trigger" value to then use for suppression. Perhaps Jan 1, 1900 or something of the sort?

Hope this helps!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
You should consider adding the crosstab in a subreport where you can use the selection formula. It shouldn't cause much impact on processing time.

-LB
 
Problem is this is already a subreport in a report which already has 4 subreports.

The column I wish to hide would be any date less than (dateadd('d',-8,,currdate)).

I think like you say it's going to have to be another sub report but thanks for trying to help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top