Dynamic created number of columns in Reporting Services 2008 - ssrs-2008

Hello all,
I have a table with dynamically created columns (for example M1,M2,M3,...MXX). Number of columns depends on number of months in selected years. Every month has table with more or less columns.
How can I create table in Reporting 2008 when number of columns in table is changing?
Currently I solve it with setting visible/hidden and I made XX columns, but now the number of columns is too big and I need some better solution.
Thank you for all your solution and opinions.
Adriana

Add column grouping (grouping by month). Then it will change dynamically number of columns based on report month parameter.

Related

Tableau - YTD, MTD as columns in text table

I'm trying to find a way to create a table like the one above, but instead of having columns of months I would like to have columns of MTD, QTD, YTD for all selected measure values. I created calculated fields on the [Date] field but when I try to use that it still splits the data in to separate columns of months and quarters... I'm using two data sources and they are linked on the [Date] field. If I try to put two of my calculated fields in the columns bar it just combines them like 'MTD/YTD'. How can I get them to display as separate columns?
I know this is strange because there will be overlapping data (everything in the MTD will also be in the QTD and the YTD).
I found a way to do this. I created a calculated field on the date field and assigned 'MTD' to all records from the last month. Then I assigned 'QTD' to all records from the start of the quarter to the day before the start date of the 'MTD' records. Then I assigned 'YTD' to all records from the start of the year to the day before the start of the 'QTD' records. (this way there are no overlapping records).
After that I just did a quick table calc to make each of them a 'running total' table (across).
I created parameters for the dates so the can easily be updated.

Jasper iReport Designer, weekly average

I am working with iReport Designer and want to ask how can I calculate an average sum of a column based on a date?
I am working on a report which has a database containing a table two columns: 1st is "sample_time" which has DATE values and the second is a "watt" which has an int value.
What I want to do is take the "watt" column and show it as average on the report (which I can do), and then show the same column "watt", but from averages based on the dates from the other "sample_time" column.
Lets say I have the dates from 2008-01-01 to 2008-01-20 and I want to do a weekly average, lets say from 01-01 to 01-07, how can I do that?
Well, i think this can get easily achieved using JasperReports Groups. You can create a group based on you sample_time column, and calculate the average for each group (which means, for each date, its just like doing a group by on a SQL query). Here there are two quick tutorials:
JasperReports Groups || The Groups

Multiple Sums at Column Level

I need to create following report, i tried crosstab but it looks (or i dont know) it only support one level for columns. By level i mean Count, Amount, XYZ under DAYS columns (30,60,90).
How can i add multiple levels at Column side using Crystal Reports 9.2?
I am getting data from following table
XXXXXX, DEBIT_CREDIT, CCY, AMOUNT, COUNT, OUR_THEIR, SETTLED_OUTSTANDING, DAYS, RATE, YYYYYYYY
You can create multiple levels of columns by dragging the next column to the top of the current one.

Want to create 2 columns with different period parameters from the same data in SSRS

I want to create a monthly report, calculating the % from the previous 2 month average from the previous 12 months average. Basically I want to see which shops have dropped in sales in the previous 2 months, and hopefully only show the shops that have decreased 20% in sales.
So i believe the columns need to be like this
Shop|Products|Avg of 12 months|Avg of 2 months| %
Since i have many entries for the sales, i also need to sum the previous 12 months and then average it... as well as sum the previous 2 months and average it
I have thought of some ways to do it, but it didnt seem to work and seems all too complicated and complex.
Im hoping if there is a simpler solution to this? Do i need to use pivot table?
I'm using PostGres 9.1 on Visual Studio 10
Thanks a bunch
When something seems too complicated to resolve with a single query, I create and populate a DataTable runtime and pass it to ReportViewer.
In this case you can:
create a DataTable with Shop and Product as a PK (if you want print the report for a period of months you can also add Month as PK). The other 2 columns will be Avg12Months and Avg2Months
insert a record for each combination of Shop/Product (and eventually Month)
for each record Shop/Product calculate and save the results for Avg12Months and Avg2Months
pass your DataTable to ReportViewer
use a single Tablix to display the results (sort, grouping and other operations can be done in the Tablix)
Some passages can be combined in order to speed up the process.

iReport - organizing column output?

I am working on a profit and loss report that should look like this:
And my data table looks like this:
For this P&L I have query #1 that populates the data for the current month and the 3 months prior. Then I have query #2 to calculate a 6-month rolling average, and then query #3 to calculate a year-to-date total. They're all joined with union statements.
I can't figure out the best way to get this to render in iReport. Right now I am using a crosstab, and I was able to finagle the "measures" labels into the customer column using Bekwam's "Expanding a Crosstab" technique.
So my questions are - is there any easier way to do this? Every time I add a measure to the crosstab I have to rearrange the measures labels and fields. If I made a pivot table in Excel, I could click a drop-down box and choose to show or hide certain months - is there any way to do that in iReport? I feel like I must be missing something. If anyone else out there is displaying data in columns like this, how are you doing it? If you set up your detail band in columns, any tips for organizing output so it looks professional?
Thanks,
Lisa
I decided to create columns in the detail band. I put my measure labels in the first column and set them to print in that column only. Then I have my measures values print in each column. I wish I could tell iReport to print the measures values in columns 2-n, but I don't think that's possible.
Some customers will not have a value for each month in Query #1, so I've decided to join Query #1 on a calendar table (calendar table left join query #1) to add blanks as placeholders to preserve my formatting.