Cross Tab with Months a column headings

Stimulsoft Reports.WEB discussion
Post Reply
cbrydon
Posts: 176
Joined: Fri May 30, 2014 4:37 pm

Cross Tab with Months a column headings

Post by cbrydon »

Hi,

I am attempting to create a cross-tab report for activities within a city. Example activities might be...
fixing a water main, fixing a street light, removing debris, etc. I would like to have a total of each activity
per month and I can get close.

The problem I have is that the date field I am using for columns is a datetime field (I can't change that).
The result is that there is one column in the cross-tab for each unique day and time. I can change the format
of the column headings to only show the month, but all of columns are still present. I've attached a sample of
the problem report. Is there a way that the columns can be summarized on month? I've also attached a sample
report of the result I would like to have.

Hope someone can help,
Carl
Attachments
ActivitySummary_OK.pdf
(98.09 KiB) Downloaded 685 times
ActivitySummary.pdf
(65.29 KiB) Downloaded 562 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cross Tab with Months a column headings

Post by HighAley »

Hello.

Could you send us your report template with sample data for analysis?

Thank you.
cbrydon
Posts: 176
Joined: Fri May 30, 2014 4:37 pm

Re: Cross Tab with Months a column headings

Post by cbrydon »

Sure,

Attached is a zip with a sample databse from SQLEXpress 2008R2 and the report template file. There was also a dll with the report name, so I included that too.
Let me know if you need anything else.

Thank You,
Carl
Attachments
sample.zip
(429.15 KiB) Downloaded 523 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cross Tab with Months a column headings

Post by HighAley »

Hello, Carl.

Could you specify which our product do you use?
The Value of the Cross-tab column is full date and grouping in cross-tab is done by this value.
Date.png
Date.png (65.32 KiB) Viewed 5084 times
The month that is shown in the report is just set with Text Format property but should be set in the Value.
Please, try to change the value to {Month(testWorkOrders.LoggedDate)}

Thank you.
cbrydon
Posts: 176
Joined: Fri May 30, 2014 4:37 pm

Re: Cross Tab with Months a column headings

Post by cbrydon »

Thank You Aleksey - changing the value property to {Month(testWorkOrders.LoggedDate)} worked just fine!!
The product is Stimulsoft Reports.Web.

Best Regards,
Carl
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cross Tab with Months a column headings

Post by HighAley »

Hello, Carl.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
cbrydon
Posts: 176
Joined: Fri May 30, 2014 4:37 pm

Re: Cross Tab with Months a column headings

Post by cbrydon »

Hi Aleksey,

I'd like to ask a follow-up question on this topic.

In the report you helped me with above, I was able to produce the report showing a count of activities for each
month that had activities recorded. Is it possible within a cross-tab to include months that did not have activities
recorded? For example, If the month of March did not have any activities recorded in it, is it possible to have the
month of March included in the cross-tab with 0 (or blank) for row values (as well as totals)? The ActivitySummary_OK.pdf
I attached in the original post for this topic shows what I'm trying to achieve - if possible.

If it could be done with a report option other than cross-tab, that would be OK too.

Thanks,
Carl
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cross Tab with Months a column headings

Post by HighAley »

Hello, Carl.

Unfortunately, it's impossible to do with Cross-Tab. The Cross-Tab is created with bound data.
There should be zero record for each month to show it in Cross-Tab.
Other way is to create report with Groups. Because there is a fixed amount of columns.
Please, look at the attached report template.

Thank you.
Attachments
CrossTabToGroups.mrt
(39.28 KiB) Downloaded 527 times
cbrydon
Posts: 176
Joined: Fri May 30, 2014 4:37 pm

Re: Cross Tab with Months a column headings

Post by cbrydon »

Thank You Aleksey - your sample helped a great deal and got me going in the right direction!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Cross Tab with Months a column headings

Post by Alex K. »

Hello,

We are always glad to help you!

Thank you.
Post Reply