Showing posts with label sales. Show all posts
Showing posts with label sales. Show all posts

Wednesday, March 28, 2012

Reporting Services 2005 Subreport issue...

I'm new to Reporting Services 2005. I have a sales report that displays monthly sales figures for a sales rep. I have a subreport that displays a single cell with a value that I then need to subtract from my monthly sales figure for an adjusted total. Is there no way to return a value from a subreport? I've done this using Crystal Reports before and I've looked for hours on end on the web for a RS solution. I can't believe I'm the only one that ever needed this.

No, you're not the only one who needs this functionality.

I have a report with 11 single cell subreports with which I would like to do some pretty basic arithmetic, however, there seems to be no way to reference the values of subreport output in Reporting Services. Why is it any more difficult to reference a subreport value than a textbox value, considering that you can embed a subreport in place of a textbox?!

This really is disappointing as it's a pretty basic requirement, sort it out Microsoft! It's about time you listen to what your customers want from a product rather than dictating to them what they can have.

|||I think that is indeed a limitation. However, I have a suggested work-around, as I had to do something similar with a report. Pass in the monthly sales figure as a parameter to the subreport. You can then display the adjustment you need to subtract as well as the adjusted total right in the subreport.|||Maybe I'm not fully understanding the problem, but why can't you use navigation from the subreport back to the parent report and simply pass the value that you need back as a parameter?|||Sorry, I'm new at RS. I didn't know I could return a parameter from a subreport back to the main report. If so, that would handle my needs very well. I'll dig in that direction for awhile and see where it leads me.|||

I think you all are thinking of this problem in a programmatic sort of way in that you pass parameters from a parent report to a subreport and then return values from the subreport to the parent report.

A subreport is merely a report. You can pass parameters from a subreport to other reports (ie. the parent report).

See if you can pass the value of the field in your subreport back to the parent report and simply output the value.

|||

Assuming you are running against a database, and since you appear to only have one value in this subreport, couldn't you use a subquery in the parent reports query to get the value? That would avoid the overhead of a subreport.

|||

steveareno wrote:

Assuming you are running against a database, and since you appear to only have one value in this subreport, couldn't you use a subquery in the parent reports query to get the value? That would avoid the overhead of a subreport.

Well yea. I assumed that there was more in the subreport than one value. If that's all that is the subreport then brush up the SQL in the parent report a bit.

|||

Paul Over wrote:

No, you're not the only one who needs this functionality.

I have a report with 11 single cell subreports with which I would like to do some pretty basic arithmetic, however, there seems to be no way to reference the values of subreport output in Reporting Services. Why is it any more difficult to reference a subreport value than a textbox value, considering that you can embed a subreport in place of a textbox?!

This really is disappointing as it's a pretty basic requirement, sort it out Microsoft! It's about time you listen to what your customers want from a product rather than dictating to them what they can have.

I did reporting services beta-testing for MS and they were very receptive to new features. Multi-select parameters, a browser print control, and a version (at the time) for SQL Server 2000 are three examples. All of those came from beta participants.

Eleven subreports is a lot of overhead. I don't know the details of your report, but maybe you could also get the values in some kind of union query or sub query as I stated previously? You're querying the data 11 times in your subreport anyway. For example:

select field1, field2 from table1

union all

select field1, field2 from table2

union all

select field1, field2 from table3

union all

select field1, field2 from table4

union all

etc...

|||

I don't pretend to know everything there is to know about Reporting Services and I wish I knew of a better way of compiling this overall report, but I've tried a lot and cannot find one.

Maybe my comments about MS are critically negative but something like this shouldn't be so complicated, and I'm sorry to say this, but MS do seem to do this a lot with their software. They do make some very powerful applications but sometimes it does seem like you need a degree in machine code to make it work to it's full potential.

I appreciate your suggestions but to use union or subqueries would be extremely complicated, if it would work at all.

If you're interested here are some details of what I'm attempting:

The main report is generated by a query with one table on a self join. This table holds period end valuation information on an individual part by part basis. The table has a datetime stamp so by using the self join I can create a report which shows an opening stock valuation, a closing stock valuation and a variance between based on a user selected parameter.

All the subreports are single cell but are passed three parameters by the main report. The opening datetime, the closing datetime as selected by the user and then the part number of the stock item. There's about 600 odd part numbers so the subreports, even though they are single cell in themselves, end up populating columns on the right side of the report detailing stock transaction analysis between the user selected dates for all the part numbers on the main report.

In theory all the transaction analysis information when totalled horizontally should match the variance between start and end of the main report for each part number, but as performing simple mathematics between subreport values seems to be overly comlex (and judging by the amount of other references on the MSDN forum of others having the same problem I don't seem to unique in my opinion) there's no quick way to validate this except by exporting the whole thing to Excel (don't even start me on that one, LOL, I did find a way around Excel ignoring subreports, but this too is complicated IMHO) and performing the calculations there.

Some of the subreports contain queries on WIP, some on stock transactions, some on inspection, some on dispatch, some on subcontract etc etc, so they all pretty much have unique queries based on different combinations of tables.

And to top it all off, the mainframe which hold all of this data is not using a SQL database, it uses a multivalue pic database from which we have to extract the data daily, so some of the tables in some of the queries are multi value, some single value, so to combine all these separate queries into even just a few would be a multivalue nightmare with duplicated values coming out of my ears. By keeping the queries separate controlling duplicate information is much easier.

Still, if you can offer some suggestions on how to make it easier I'm very interested.

All the best,

Paul

|||

ugh. nightmare is an understatement! Good luck with that report. I have a (very) remotely similar inventory report that takes snapshots of data (using DTS) before and after our costing runs, and then does a comparision. But that is in sql server and in a relatively normalized database.

I guess when I get into reports as complex as that I have used UDF's, and sometimes even code to get the data to a certain point so that it can be used by RS more easily. I have even set up automated tasks to open Microsoft Access and run a macro to process data into tables, then hook my reports into access. Having said that, I don't envy you!

I also have to admit that subreports in reporting services have MUCH to be desired.

We once used a database called titanium that had such bad a ODBC drivers we ended up doing CSV extracts every night. the extracts were linked into access and the queries written there, or as mentioned above, the data processed and put into tables. Probably not much of an option for you though.

|||"You can pass parameters from a subreport to other reports (ie. the parent report)"
How is this done?
|||

In my experience, a subreport is no different than the parent report.

How did you pass the parameter from the parent report to the subreport?

Usually it's done with navigation... Do it the same way but from the subreport to the parent report.

|||"How did you pass the parameter from the parent report to the subreport?"

I do it by right-clicking on the subreport and selecting properties. Then in the parameters tab I assign the subreport parameters with values from the parent report. Is this what you mean by navigation? If so, I can't see a way to assign a value from the subreport as the value for a parameter in the parent report using this method.

Reporting Services 2005 Subreport issue...

I'm new to Reporting Services 2005. I have a sales report that displays monthly sales figures for a sales rep. I have a subreport that displays a single cell with a value that I then need to subtract from my monthly sales figure for an adjusted total. Is there no way to return a value from a subreport? I've done this using Crystal Reports before and I've looked for hours on end on the web for a RS solution. I can't believe I'm the only one that ever needed this.

No, you're not the only one who needs this functionality.

I have a report with 11 single cell subreports with which I would like to do some pretty basic arithmetic, however, there seems to be no way to reference the values of subreport output in Reporting Services. Why is it any more difficult to reference a subreport value than a textbox value, considering that you can embed a subreport in place of a textbox?!

This really is disappointing as it's a pretty basic requirement, sort it out Microsoft! It's about time you listen to what your customers want from a product rather than dictating to them what they can have.

|||I think that is indeed a limitation. However, I have a suggested work-around, as I had to do something similar with a report. Pass in the monthly sales figure as a parameter to the subreport. You can then display the adjustment you need to subtract as well as the adjusted total right in the subreport.

|||Maybe I'm not fully understanding the problem, but why can't you use navigation from the subreport back to the parent report and simply pass the value that you need back as a parameter?

|||Sorry, I'm new at RS. I didn't know I could return a parameter from a subreport back to the main report. If so, that would handle my needs very well. I'll dig in that direction for awhile and see where it leads me.

|||

I think you all are thinking of this problem in a programmatic sort of way in that you pass parameters from a parent report to a subreport and then return values from the subreport to the parent report.

A subreport is merely a report. You can pass parameters from a subreport to other reports (ie. the parent report).

See if you can pass the value of the field in your subreport back to the parent report and simply output the value.

|||

Assuming you are running against a database, and since you appear to only have one value in this subreport, couldn't you use a subquery in the parent reports query to get the value? That would avoid the overhead of a subreport.

|||

steveareno wrote:

Assuming you are running against a database, and since you appear to only have one value in this subreport, couldn't you use a subquery in the parent reports query to get the value? That would avoid the overhead of a subreport.

Well yea. I assumed that there was more in the subreport than one value. If that's all that is the subreport then brush up the SQL in the parent report a bit.

|||

Paul Over wrote:

No, you're not the only one who needs this functionality.

I have a report with 11 single cell subreports with which I would like to do some pretty basic arithmetic, however, there seems to be no way to reference the values of subreport output in Reporting Services. Why is it any more difficult to reference a subreport value than a textbox value, considering that you can embed a subreport in place of a textbox?!

This really is disappointing as it's a pretty basic requirement, sort it out Microsoft! It's about time you listen to what your customers want from a product rather than dictating to them what they can have.

I did reporting services beta-testing for MS and they were very receptive to new features. Multi-select parameters, a browser print control, and a version (at the time) for SQL Server 2000 are three examples. All of those came from beta participants.

Eleven subreports is a lot of overhead. I don't know the details of your report, but maybe you could also get the values in some kind of union query or sub query as I stated previously? You're querying the data 11 times in your subreport anyway. For example:

select field1, field2 from table1

union all

select field1, field2 from table2

union all

select field1, field2 from table3

union all

select field1, field2 from table4

union all

etc...

|||

I don't pretend to know everything there is to know about Reporting Services and I wish I knew of a better way of compiling this overall report, but I've tried a lot and cannot find one.

Maybe my comments about MS are critically negative but something like this shouldn't be so complicated, and I'm sorry to say this, but MS do seem to do this a lot with their software. They do make some very powerful applications but sometimes it does seem like you need a degree in machine code to make it work to it's full potential.

I appreciate your suggestions but to use union or subqueries would be extremely complicated, if it would work at all.

If you're interested here are some details of what I'm attempting:

The main report is generated by a query with one table on a self join. This table holds period end valuation information on an individual part by part basis. The table has a datetime stamp so by using the self join I can create a report which shows an opening stock valuation, a closing stock valuation and a variance between based on a user selected parameter.

All the subreports are single cell but are passed three parameters by the main report. The opening datetime, the closing datetime as selected by the user and then the part number of the stock item. There's about 600 odd part numbers so the subreports, even though they are single cell in themselves, end up populating columns on the right side of the report detailing stock transaction analysis between the user selected dates for all the part numbers on the main report.

In theory all the transaction analysis information when totalled horizontally should match the variance between start and end of the main report for each part number, but as performing simple mathematics between subreport values seems to be overly comlex (and judging by the amount of other references on the MSDN forum of others having the same problem I don't seem to unique in my opinion) there's no quick way to validate this except by exporting the whole thing to Excel (don't even start me on that one, LOL, I did find a way around Excel ignoring subreports, but this too is complicated IMHO) and performing the calculations there.

Some of the subreports contain queries on WIP, some on stock transactions, some on inspection, some on dispatch, some on subcontract etc etc, so they all pretty much have unique queries based on different combinations of tables.

And to top it all off, the mainframe which hold all of this data is not using a SQL database, it uses a multivalue pic database from which we have to extract the data daily, so some of the tables in some of the queries are multi value, some single value, so to combine all these separate queries into even just a few would be a multivalue nightmare with duplicated values coming out of my ears. By keeping the queries separate controlling duplicate information is much easier.

Still, if you can offer some suggestions on how to make it easier I'm very interested.

All the best,

Paul

|||

ugh. nightmare is an understatement! Good luck with that report. I have a (very) remotely similar inventory report that takes snapshots of data (using DTS) before and after our costing runs, and then does a comparision. But that is in sql server and in a relatively normalized database.

I guess when I get into reports as complex as that I have used UDF's, and sometimes even code to get the data to a certain point so that it can be used by RS more easily. I have even set up automated tasks to open Microsoft Access and run a macro to process data into tables, then hook my reports into access. Having said that, I don't envy you!

I also have to admit that subreports in reporting services have MUCH to be desired.

We once used a database called titanium that had such bad a ODBC drivers we ended up doing CSV extracts every night. the extracts were linked into access and the queries written there, or as mentioned above, the data processed and put into tables. Probably not much of an option for you though.

|||"You can pass parameters from a subreport to other reports (ie. the parent report)"
How is this done?
|||

In my experience, a subreport is no different than the parent report.

How did you pass the parameter from the parent report to the subreport?

Usually it's done with navigation... Do it the same way but from the subreport to the parent report.

|||"How did you pass the parameter from the parent report to the subreport?"

I do it by right-clicking on the subreport and selecting properties. Then in the parameters tab I assign the subreport parameters with values from the parent report. Is this what you mean by navigation? If so, I can't see a way to assign a value from the subreport as the value for a parameter in the parent report using this method.

Reporting Services 2005 Subreport issue...

I'm new to Reporting Services 2005. I have a sales report that displays monthly sales figures for a sales rep. I have a subreport that displays a single cell with a value that I then need to subtract from my monthly sales figure for an adjusted total. Is there no way to return a value from a subreport? I've done this using Crystal Reports before and I've looked for hours on end on the web for a RS solution. I can't believe I'm the only one that ever needed this.

No, you're not the only one who needs this functionality.

I have a report with 11 single cell subreports with which I would like to do some pretty basic arithmetic, however, there seems to be no way to reference the values of subreport output in Reporting Services. Why is it any more difficult to reference a subreport value than a textbox value, considering that you can embed a subreport in place of a textbox?!

This really is disappointing as it's a pretty basic requirement, sort it out Microsoft! It's about time you listen to what your customers want from a product rather than dictating to them what they can have.

|||I think that is indeed a limitation. However, I have a suggested work-around, as I had to do something similar with a report. Pass in the monthly sales figure as a parameter to the subreport. You can then display the adjustment you need to subtract as well as the adjusted total right in the subreport.

|||Maybe I'm not fully understanding the problem, but why can't you use navigation from the subreport back to the parent report and simply pass the value that you need back as a parameter?

|||Sorry, I'm new at RS. I didn't know I could return a parameter from a subreport back to the main report. If so, that would handle my needs very well. I'll dig in that direction for awhile and see where it leads me.

|||

I think you all are thinking of this problem in a programmatic sort of way in that you pass parameters from a parent report to a subreport and then return values from the subreport to the parent report.

A subreport is merely a report. You can pass parameters from a subreport to other reports (ie. the parent report).

See if you can pass the value of the field in your subreport back to the parent report and simply output the value.

|||

Assuming you are running against a database, and since you appear to only have one value in this subreport, couldn't you use a subquery in the parent reports query to get the value? That would avoid the overhead of a subreport.

|||

steveareno wrote:

Assuming you are running against a database, and since you appear to only have one value in this subreport, couldn't you use a subquery in the parent reports query to get the value? That would avoid the overhead of a subreport.

Well yea. I assumed that there was more in the subreport than one value. If that's all that is the subreport then brush up the SQL in the parent report a bit.

|||

Paul Over wrote:

No, you're not the only one who needs this functionality.

I have a report with 11 single cell subreports with which I would like to do some pretty basic arithmetic, however, there seems to be no way to reference the values of subreport output in Reporting Services. Why is it any more difficult to reference a subreport value than a textbox value, considering that you can embed a subreport in place of a textbox?!

This really is disappointing as it's a pretty basic requirement, sort it out Microsoft! It's about time you listen to what your customers want from a product rather than dictating to them what they can have.

I did reporting services beta-testing for MS and they were very receptive to new features. Multi-select parameters, a browser print control, and a version (at the time) for SQL Server 2000 are three examples. All of those came from beta participants.

Eleven subreports is a lot of overhead. I don't know the details of your report, but maybe you could also get the values in some kind of union query or sub query as I stated previously? You're querying the data 11 times in your subreport anyway. For example:

select field1, field2 from table1

union all

select field1, field2 from table2

union all

select field1, field2 from table3

union all

select field1, field2 from table4

union all

etc...

|||

I don't pretend to know everything there is to know about Reporting Services and I wish I knew of a better way of compiling this overall report, but I've tried a lot and cannot find one.

Maybe my comments about MS are critically negative but something like this shouldn't be so complicated, and I'm sorry to say this, but MS do seem to do this a lot with their software. They do make some very powerful applications but sometimes it does seem like you need a degree in machine code to make it work to it's full potential.

I appreciate your suggestions but to use union or subqueries would be extremely complicated, if it would work at all.

If you're interested here are some details of what I'm attempting:

The main report is generated by a query with one table on a self join. This table holds period end valuation information on an individual part by part basis. The table has a datetime stamp so by using the self join I can create a report which shows an opening stock valuation, a closing stock valuation and a variance between based on a user selected parameter.

All the subreports are single cell but are passed three parameters by the main report. The opening datetime, the closing datetime as selected by the user and then the part number of the stock item. There's about 600 odd part numbers so the subreports, even though they are single cell in themselves, end up populating columns on the right side of the report detailing stock transaction analysis between the user selected dates for all the part numbers on the main report.

In theory all the transaction analysis information when totalled horizontally should match the variance between start and end of the main report for each part number, but as performing simple mathematics between subreport values seems to be overly comlex (and judging by the amount of other references on the MSDN forum of others having the same problem I don't seem to unique in my opinion) there's no quick way to validate this except by exporting the whole thing to Excel (don't even start me on that one, LOL, I did find a way around Excel ignoring subreports, but this too is complicated IMHO) and performing the calculations there.

Some of the subreports contain queries on WIP, some on stock transactions, some on inspection, some on dispatch, some on subcontract etc etc, so they all pretty much have unique queries based on different combinations of tables.

And to top it all off, the mainframe which hold all of this data is not using a SQL database, it uses a multivalue pic database from which we have to extract the data daily, so some of the tables in some of the queries are multi value, some single value, so to combine all these separate queries into even just a few would be a multivalue nightmare with duplicated values coming out of my ears. By keeping the queries separate controlling duplicate information is much easier.

Still, if you can offer some suggestions on how to make it easier I'm very interested.

All the best,

Paul

|||

ugh. nightmare is an understatement! Good luck with that report. I have a (very) remotely similar inventory report that takes snapshots of data (using DTS) before and after our costing runs, and then does a comparision. But that is in sql server and in a relatively normalized database.

I guess when I get into reports as complex as that I have used UDF's, and sometimes even code to get the data to a certain point so that it can be used by RS more easily. I have even set up automated tasks to open Microsoft Access and run a macro to process data into tables, then hook my reports into access. Having said that, I don't envy you!

I also have to admit that subreports in reporting services have MUCH to be desired.

We once used a database called titanium that had such bad a ODBC drivers we ended up doing CSV extracts every night. the extracts were linked into access and the queries written there, or as mentioned above, the data processed and put into tables. Probably not much of an option for you though.

|||"You can pass parameters from a subreport to other reports (ie. the parent report)"
How is this done?
|||

In my experience, a subreport is no different than the parent report.

How did you pass the parameter from the parent report to the subreport?

Usually it's done with navigation... Do it the same way but from the subreport to the parent report.

|||"How did you pass the parameter from the parent report to the subreport?"

I do it by right-clicking on the subreport and selecting properties. Then in the parameters tab I assign the subreport parameters with values from the parent report. Is this what you mean by navigation? If so, I can't see a way to assign a value from the subreport as the value for a parameter in the parent report using this method.

Saturday, February 25, 2012

Reporting on summarised date range data

Hi all

Suppliers send my client sales figures in different formats. Some send data for each sale, some summarise by week, month or quarter.

I need to report on this data, showing estimates as to how many sales per day, week, month or quarter. To give you an example of the data I receive, see a simplified script below.

CREATE TABLE dbo.sales_summary (
summary_id int IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL ,
start_date datetime NOT NULL ,
end_date datetime NOT NULL ,
number_of_sales int not null
)
GO

insert into sales_summary VALUES ( '20030101', '20030131', 100)
insert into sales_summary VALUES ( '20030101', '20030120', 150)
insert into sales_summary VALUES ( '20030111', '20030131', 200)
insert into sales_summary VALUES ( '20030201', '20030228', 120)
insert into sales_summary VALUES ( '20030201', '20030207', 50)
go

As you can see, I essentially receive a date range and a number of sales in each row. The data in the real system is received from more than 100 suppliers and the sales_summary table has more than a million rows in it.

Can anyone suggest an efficient way of being able to create a report that lists sales
- for each day
- for each week
- for each month
etc.

An example of the daily report might look something like

Date Number of Sales
01-Jan-03 20
02-Jan-03 0
03-Jan -03 15
etc.

An example of the weekly report might look something like

Week Starting Number of Sales
01-Jan-03 100
08-Jan-03 135
15-Jan-03 54
etc.

This has been driving me nuts for a while so any help is appreceiated.
MattAnyone got any bright ideas regarding how to do this? I'm still stuck.|||First, you will not be able to list actual daily sales for clients that return weekly summarys, or actual weekly sales for clients that return monthly summarys. You just don't have the detail data.

You might be able to solve some of your problems by including a calculated field in your table:

Daily_Sales = Number_Of_Sales/datediff(day, Start_Date, End_Date)

Tuesday, February 21, 2012

Reporting NIGHTMARE

Hello all,
I have a report that has a list of citys on the left: eg.
Vancouver
Melbourne
Auckland
New York
And the body of the report lists sales in Year to Date and Period to Date
which is set by a parameter.
e.g
City PTD YTD
Vancouver 10000 30000
Melbourne 5000 12000
Auckland 2000 3000
New York 23000 50000
Total 40000 95000
The Period to date data comes from one dataset that is configured to use the
parameter... the Year to date data comes from another dataset that doesn't
use the parameter.
However the cities come from another dataset... What ends up happening is I
get the total of PTD in every city...
eg.
City PTD YTD
Vancouver 40000 30000
Melbourne 40000 12000
Auckland 40000 3000
New York 40000 50000
Total 40000
Rather than the correct amounts. What can I do to fix this?
ThanksHave you considered basing the dataset on a view which joins the City, PTD
and YTD columns together?
Alan
"AshVsAOD" <.> wrote in message news:#1LMFS$VEHA.808@.tk2msftngp13.phx.gbl...
> Hello all,
> I have a report that has a list of citys on the left: eg.
> Vancouver
> Melbourne
> Auckland
> New York
> And the body of the report lists sales in Year to Date and Period to Date
> which is set by a parameter.
> e.g
> City PTD YTD
> Vancouver 10000 30000
> Melbourne 5000 12000
> Auckland 2000 3000
> New York 23000 50000
> Total 40000 95000
> The Period to date data comes from one dataset that is configured to use
the
> parameter... the Year to date data comes from another dataset that doesn't
> use the parameter.
> However the cities come from another dataset... What ends up happening is
I
> get the total of PTD in every city...
> eg.
> City PTD YTD
> Vancouver 40000 30000
> Melbourne 40000 12000
> Auckland 40000 3000
> New York 40000 50000
> Total 40000
> Rather than the correct amounts. What can I do to fix this?
> Thanks
>|||Yes I have considered that, However Period to Date relies on a Parameter
from RS so I can't see how this would work...
Anyone else got any ideas?
"Alan Z. Scharf" <ascharf@.grapevines.com> wrote in message
news:OLs24ZAWEHA.1164@.tk2msftngp13.phx.gbl...
> Have you considered basing the dataset on a view which joins the City, PTD
> and YTD columns together?
> Alan
> "AshVsAOD" <.> wrote in message
news:#1LMFS$VEHA.808@.tk2msftngp13.phx.gbl...
> > Hello all,
> >
> > I have a report that has a list of citys on the left: eg.
> >
> > Vancouver
> > Melbourne
> > Auckland
> > New York
> >
> > And the body of the report lists sales in Year to Date and Period to
Date
> > which is set by a parameter.
> > e.g
> >
> > City PTD YTD
> > Vancouver 10000 30000
> > Melbourne 5000 12000
> > Auckland 2000 3000
> > New York 23000 50000
> > Total 40000 95000
> >
> > The Period to date data comes from one dataset that is configured to use
> the
> > parameter... the Year to date data comes from another dataset that
doesn't
> > use the parameter.
> >
> > However the cities come from another dataset... What ends up happening
is
> I
> > get the total of PTD in every city...
> > eg.
> > City PTD YTD
> > Vancouver 40000 30000
> > Melbourne 40000 12000
> > Auckland 40000 3000
> > New York 40000 50000
> > Total 40000
> >
> > Rather than the correct amounts. What can I do to fix this?
> >
> > Thanks
> >
> >
>|||Reporting Services does not join datasets together. For the second data set,
you are most likely getting First(), the default aggregate expression. You
need to merge these together before they get to reporting services. You can
take a report parameter and bind it into a data set.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"AshVsAOD" <.> wrote in message
news:%23oIOXVBWEHA.808@.tk2msftngp13.phx.gbl...
> Yes I have considered that, However Period to Date relies on a Parameter
> from RS so I can't see how this would work...
> Anyone else got any ideas?
> "Alan Z. Scharf" <ascharf@.grapevines.com> wrote in message
> news:OLs24ZAWEHA.1164@.tk2msftngp13.phx.gbl...
> > Have you considered basing the dataset on a view which joins the City,
PTD
> > and YTD columns together?
> >
> > Alan
> >
> > "AshVsAOD" <.> wrote in message
> news:#1LMFS$VEHA.808@.tk2msftngp13.phx.gbl...
> > > Hello all,
> > >
> > > I have a report that has a list of citys on the left: eg.
> > >
> > > Vancouver
> > > Melbourne
> > > Auckland
> > > New York
> > >
> > > And the body of the report lists sales in Year to Date and Period to
> Date
> > > which is set by a parameter.
> > > e.g
> > >
> > > City PTD YTD
> > > Vancouver 10000 30000
> > > Melbourne 5000 12000
> > > Auckland 2000 3000
> > > New York 23000 50000
> > > Total 40000 95000
> > >
> > > The Period to date data comes from one dataset that is configured to
use
> > the
> > > parameter... the Year to date data comes from another dataset that
> doesn't
> > > use the parameter.
> > >
> > > However the cities come from another dataset... What ends up
happening
> is
> > I
> > > get the total of PTD in every city...
> > > eg.
> > > City PTD YTD
> > > Vancouver 40000 30000
> > > Melbourne 40000 12000
> > > Auckland 40000 3000
> > > New York 40000 50000
> > > Total 40000
> > >
> > > Rather than the correct amounts. What can I do to fix this?
> > >
> > > Thanks
> > >
> > >
> >
> >
>|||Brian,
Thanks for the advice, I was worried that would be the answer.
Ash
"Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
news:%23gddTHCWEHA.1380@.TK2MSFTNGP09.phx.gbl...
> Reporting Services does not join datasets together. For the second data
set,
> you are most likely getting First(), the default aggregate expression. You
> need to merge these together before they get to reporting services. You
can
> take a report parameter and bind it into a data set.
> --
> Brian Welcker
> Group Program Manager
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "AshVsAOD" <.> wrote in message
> news:%23oIOXVBWEHA.808@.tk2msftngp13.phx.gbl...
> > Yes I have considered that, However Period to Date relies on a Parameter
> > from RS so I can't see how this would work...
> >
> > Anyone else got any ideas?
> > "Alan Z. Scharf" <ascharf@.grapevines.com> wrote in message
> > news:OLs24ZAWEHA.1164@.tk2msftngp13.phx.gbl...
> > > Have you considered basing the dataset on a view which joins the City,
> PTD
> > > and YTD columns together?
> > >
> > > Alan
> > >
> > > "AshVsAOD" <.> wrote in message
> > news:#1LMFS$VEHA.808@.tk2msftngp13.phx.gbl...
> > > > Hello all,
> > > >
> > > > I have a report that has a list of citys on the left: eg.
> > > >
> > > > Vancouver
> > > > Melbourne
> > > > Auckland
> > > > New York
> > > >
> > > > And the body of the report lists sales in Year to Date and Period to
> > Date
> > > > which is set by a parameter.
> > > > e.g
> > > >
> > > > City PTD YTD
> > > > Vancouver 10000 30000
> > > > Melbourne 5000 12000
> > > > Auckland 2000 3000
> > > > New York 23000 50000
> > > > Total 40000 95000
> > > >
> > > > The Period to date data comes from one dataset that is configured to
> use
> > > the
> > > > parameter... the Year to date data comes from another dataset that
> > doesn't
> > > > use the parameter.
> > > >
> > > > However the cities come from another dataset... What ends up
> happening
> > is
> > > I
> > > > get the total of PTD in every city...
> > > > eg.
> > > > City PTD YTD
> > > > Vancouver 40000 30000
> > > > Melbourne 40000 12000
> > > > Auckland 40000 3000
> > > > New York 40000 50000
> > > > Total 40000
> > > >
> > > > Rather than the correct amounts. What can I do to fix this?
> > > >
> > > > Thanks
> > > >
> > > >
> > >
> > >
> >
> >
>|||Maybe I'm missing something.
I developed a report several years ago that shows performance for a list of
stocks with columns for Date, Stock,Weekt TD, MonthTD, QuarterTD, Yeat TD,
all side by side coumns.
The columns are each calculated in separate tables and then joined together
in a view as one table on Date and Stock..
It sounds like that's the type of table you want to report on.
Alan
"AshVsAOD" <.> wrote in message news:#oIOXVBWEHA.808@.tk2msftngp13.phx.gbl...
> Yes I have considered that, However Period to Date relies on a Parameter
> from RS so I can't see how this would work...
> Anyone else got any ideas?
> "Alan Z. Scharf" <ascharf@.grapevines.com> wrote in message
> news:OLs24ZAWEHA.1164@.tk2msftngp13.phx.gbl...
> > Have you considered basing the dataset on a view which joins the City,
PTD
> > and YTD columns together?
> >
> > Alan
> >
> > "AshVsAOD" <.> wrote in message
> news:#1LMFS$VEHA.808@.tk2msftngp13.phx.gbl...
> > > Hello all,
> > >
> > > I have a report that has a list of citys on the left: eg.
> > >
> > > Vancouver
> > > Melbourne
> > > Auckland
> > > New York
> > >
> > > And the body of the report lists sales in Year to Date and Period to
> Date
> > > which is set by a parameter.
> > > e.g
> > >
> > > City PTD YTD
> > > Vancouver 10000 30000
> > > Melbourne 5000 12000
> > > Auckland 2000 3000
> > > New York 23000 50000
> > > Total 40000 95000
> > >
> > > The Period to date data comes from one dataset that is configured to
use
> > the
> > > parameter... the Year to date data comes from another dataset that
> doesn't
> > > use the parameter.
> > >
> > > However the cities come from another dataset... What ends up
happening
> is
> > I
> > > get the total of PTD in every city...
> > > eg.
> > > City PTD YTD
> > > Vancouver 40000 30000
> > > Melbourne 40000 12000
> > > Auckland 40000 3000
> > > New York 40000 50000
> > > Total 40000
> > >
> > > Rather than the correct amounts. What can I do to fix this?
> > >
> > > Thanks
> > >
> > >
> >
> >
>|||Alan,
That does sound like what I want... But...
I need the user's to be able to enter a Parameter that Specifies the Period
to Date and Year to Date.
Example:
To Date: 16/06/04 From Date 01/06/04
So Period to date would be the data between 01/06 and 16/06
Year to date has to be the entire year.
Does this make sense?
"Alan Z. Scharf" <ascharf@.grapevines.com> wrote in message
news:OFZD5vDWEHA.3016@.tk2msftngp13.phx.gbl...
> Maybe I'm missing something.
> I developed a report several years ago that shows performance for a list
of
> stocks with columns for Date, Stock,Weekt TD, MonthTD, QuarterTD, Yeat TD,
> all side by side coumns.
> The columns are each calculated in separate tables and then joined
together
> in a view as one table on Date and Stock..
> It sounds like that's the type of table you want to report on.
> Alan
>
>
>
> "AshVsAOD" <.> wrote in message
news:#oIOXVBWEHA.808@.tk2msftngp13.phx.gbl...
> > Yes I have considered that, However Period to Date relies on a Parameter
> > from RS so I can't see how this would work...
> >
> > Anyone else got any ideas?
> > "Alan Z. Scharf" <ascharf@.grapevines.com> wrote in message
> > news:OLs24ZAWEHA.1164@.tk2msftngp13.phx.gbl...
> > > Have you considered basing the dataset on a view which joins the City,
> PTD
> > > and YTD columns together?
> > >
> > > Alan
> > >
> > > "AshVsAOD" <.> wrote in message
> > news:#1LMFS$VEHA.808@.tk2msftngp13.phx.gbl...
> > > > Hello all,
> > > >
> > > > I have a report that has a list of citys on the left: eg.
> > > >
> > > > Vancouver
> > > > Melbourne
> > > > Auckland
> > > > New York
> > > >
> > > > And the body of the report lists sales in Year to Date and Period to
> > Date
> > > > which is set by a parameter.
> > > > e.g
> > > >
> > > > City PTD YTD
> > > > Vancouver 10000 30000
> > > > Melbourne 5000 12000
> > > > Auckland 2000 3000
> > > > New York 23000 50000
> > > > Total 40000 95000
> > > >
> > > > The Period to date data comes from one dataset that is configured to
> use
> > > the
> > > > parameter... the Year to date data comes from another dataset that
> > doesn't
> > > > use the parameter.
> > > >
> > > > However the cities come from another dataset... What ends up
> happening
> > is
> > > I
> > > > get the total of PTD in every city...
> > > > eg.
> > > > City PTD YTD
> > > > Vancouver 40000 30000
> > > > Melbourne 40000 12000
> > > > Auckland 40000 3000
> > > > New York 40000 50000
> > > > Total 40000
> > > >
> > > > Rather than the correct amounts. What can I do to fix this?
> > > >
> > > > Thanks
> > > >
> > > >
> > >
> > >
> >
> >
>|||"AshVsAOD" <.> wrote in message
news:udJBVqKWEHA.2340@.TK2MSFTNGP09.phx.gbl...
> Alan,
> That does sound like what I want... But...
> I need the user's to be able to enter a Parameter that Specifies the
Period
> to Date and Year to Date.
> Example:
> To Date: 16/06/04 From Date 01/06/04
> So Period to date would be the data between 01/06 and 16/06
> Year to date has to be the entire year.
>
Have a parameter each for beginning day/month, ending day/month, and year,
used to set a BETWEEN date range in a SQL statement. Is it as simple as
that or are you trying to do something more complex?
Or just two parameterts for beeginning and ending date.
Alan|||I am positive you are on to something... but I don't quite understand what
you mean...
How can I use parameters in T-SQL... I understand them in RS but in SQL I am
quite new.
Thanks!
"Alan Z. Scharf" <ascharf@.grapevines.com> wrote in message
news:e9bns1LWEHA.1048@.tk2msftngp13.phx.gbl...
> "AshVsAOD" <.> wrote in message
> news:udJBVqKWEHA.2340@.TK2MSFTNGP09.phx.gbl...
> > Alan,
> >
> > That does sound like what I want... But...
> >
> > I need the user's to be able to enter a Parameter that Specifies the
> Period
> > to Date and Year to Date.
> >
> > Example:
> >
> > To Date: 16/06/04 From Date 01/06/04
> >
> > So Period to date would be the data between 01/06 and 16/06
> > Year to date has to be the entire year.
> >
> Have a parameter each for beginning day/month, ending day/month, and year,
> used to set a BETWEEN date range in a SQL statement. Is it as simple as
> that or are you trying to do something more complex?
> Or just two parameterts for beeginning and ending date.
> Alan
>|||> How can I use parameters in T-SQL... I understand them in RS but in SQL I
am
> quite new.
Now, after all the messages, the real issue is discovered. You have put the
cart before the horse.
1. Reports are only a window on data.
2. Hence, you should put Rpt Svcs aside and concentrate on the data.
3. First you have to get a table with your required PTD and YTD columns
side-by-side with cols for Date and City.
4. As for parameters in T-SQL, it's up to you to learn this very elementary
subject. There are so many books as well as the excellent online
documentation that comes with SQLServer.
5. Parameters aren't even relevant until you get the table together.
Alan|||This will work.
Make an outer table
Here's your header row:
----
| City | PDT | YDT
|
----
In your detail row:
Column 1 (CITY) = User the table dataset like you are now to get the
city
Column 2 (PDT) = Make this a sub report. Pass in your date range
values and your city id as your sub report parameters.
Column 3 (YDT) = Make this a sub report. Pass in your date range
values and your city id as your sub report parameters.
To make your subreport just make another report and be sure to make it
the same page width as your table column.
The other city dataset will loop through each subreport and give you
the values you want.
"AshVsAOD" <.> wrote in message news:<#1LMFS$VEHA.808@.tk2msftngp13.phx.gbl>...
> Hello all,
> I have a report that has a list of citys on the left: eg.
> Vancouver
> Melbourne
> Auckland
> New York
> And the body of the report lists sales in Year to Date and Period to Date
> which is set by a parameter.
> e.g
> City PTD YTD
> Vancouver 10000 30000
> Melbourne 5000 12000
> Auckland 2000 3000
> New York 23000 50000
> Total 40000 95000
> The Period to date data comes from one dataset that is configured to use the
> parameter... the Year to date data comes from another dataset that doesn't
> use the parameter.
> However the cities come from another dataset... What ends up happening is I
> get the total of PTD in every city...
> eg.
> City PTD YTD
> Vancouver 40000 30000
> Melbourne 40000 12000
> Auckland 40000 3000
> New York 40000 50000
> Total 40000
> Rather than the correct amounts. What can I do to fix this?
> Thanks