Hey,
I have a little format issue with Excel 2003:
I am working in reporting services - creating a report. The SQL store
procedure returns a date with the following format:
MM/DD/YYYY HH:MM PM/AM
In my report on that perticular text field I have the following format:
dd/mm/yyyy HH:MM:SS
Because I want it in military time.
It displays fine in the report but when I open it in Excel it brings up
the following ERROR:
"File Error. Some number formats may have been lost"
And it shows the date columns the following way:
"38692.46597"
The document is NOT huge and does't contain more than 2000 rows.
Any ideas on how to solve this?
Sorry for posting twice(first post on here).
I have put this same post in the reporting services group.. Sorry
Showing posts with label date. Show all posts
Showing posts with label date. Show all posts
Wednesday, March 21, 2012
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)
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 like this
I am using SQL Server 2005 Express Edition.
I have a table whose structure is follows:
Date
EmpID
Code
Amount
Sample data looks like this:
---
Date EMPID Code Amount
---
1-Jul-07 1 A1 100
1-Jul-07 1 B1 100
1-Jul-07 2 A1 150
1-Jul-07 3 B1 50
1-Jul-07 4 C1 120
1-Jul-07 4 D1 80
----
The Codes are not fixed, they can be of any number and varies from
employee to employee.
I want to show a report like this:
Month: Jul-07 -- CODES --
---
EmpID A1 B1 C1 D1
---
1 100 100 0 0
2 150 0 0 0
3 0 50 0 0
4 0 0 120 80
----
Since Codes are not fixed, so an SQL query is difficult. What is the
alternative approach?
I am thinking to create another table at run-time that reads column
values (Code names) from the original table and create a field of that
name in the next table.
I also want to know in which edition of SQL Server is reporting
included. How SQL Server Reporting compares with Crystal Reports?
Secondly, while generating reports from Windows OS on a Dot-Matrix
Printer, printing is slow. How can I print at a speed same as in DOS?Hi
create table #t (id int not null primary key,
date datetime,empid int,code char(2),
amount int)
insert into #t values (1,'20070701',1,'A1',100)
insert into #t values (2,'20070701',1,'B1',100)
insert into #t values (3,'20070701',2,'A1',150)
insert into #t values (4,'20070701',3,'B1',50)
insert into #t values (5,'20070701',4,'C1',120)
insert into #t values (6,'20070701',4,'D1',80)
select empid, max([A1])A1, max([B1])B1, max([C1])C1, max([D1])D1 from #t as
t1
pivot
(
max(amount)
for code IN([A1], [B1], [C1], [D1])
) AS pvt
group by empid
"RP" <rpk.general@.gmail.com> wrote in message
news:1188283745.388192.128690@.i13g2000prf.googlegroups.com...
>I am using SQL Server 2005 Express Edition.
> I have a table whose structure is follows:
> Date
> EmpID
> Code
> Amount
> Sample data looks like this:
> ---
> Date EMPID Code Amount
> ---
> 1-Jul-07 1 A1 100
> 1-Jul-07 1 B1 100
> 1-Jul-07 2 A1 150
> 1-Jul-07 3 B1 50
> 1-Jul-07 4 C1 120
> 1-Jul-07 4 D1 80
> ----
> The Codes are not fixed, they can be of any number and varies from
> employee to employee.
> I want to show a report like this:
>
> Month: Jul-07 -- CODES --
> ---
> EmpID A1 B1 C1 D1
> ---
> 1 100 100 0 0
> 2 150 0 0 0
> 3 0 50 0 0
> 4 0 0 120 80
> ----
> Since Codes are not fixed, so an SQL query is difficult. What is the
> alternative approach?
> I am thinking to create another table at run-time that reads column
> values (Code names) from the original table and create a field of that
> name in the next table.
> I also want to know in which edition of SQL Server is reporting
> included. How SQL Server Reporting compares with Crystal Reports?
> Secondly, while generating reports from Windows OS on a Dot-Matrix
> Printer, printing is slow. How can I print at a speed same as in DOS?
>
I have a table whose structure is follows:
Date
EmpID
Code
Amount
Sample data looks like this:
---
Date EMPID Code Amount
---
1-Jul-07 1 A1 100
1-Jul-07 1 B1 100
1-Jul-07 2 A1 150
1-Jul-07 3 B1 50
1-Jul-07 4 C1 120
1-Jul-07 4 D1 80
----
The Codes are not fixed, they can be of any number and varies from
employee to employee.
I want to show a report like this:
Month: Jul-07 -- CODES --
---
EmpID A1 B1 C1 D1
---
1 100 100 0 0
2 150 0 0 0
3 0 50 0 0
4 0 0 120 80
----
Since Codes are not fixed, so an SQL query is difficult. What is the
alternative approach?
I am thinking to create another table at run-time that reads column
values (Code names) from the original table and create a field of that
name in the next table.
I also want to know in which edition of SQL Server is reporting
included. How SQL Server Reporting compares with Crystal Reports?
Secondly, while generating reports from Windows OS on a Dot-Matrix
Printer, printing is slow. How can I print at a speed same as in DOS?Hi
create table #t (id int not null primary key,
date datetime,empid int,code char(2),
amount int)
insert into #t values (1,'20070701',1,'A1',100)
insert into #t values (2,'20070701',1,'B1',100)
insert into #t values (3,'20070701',2,'A1',150)
insert into #t values (4,'20070701',3,'B1',50)
insert into #t values (5,'20070701',4,'C1',120)
insert into #t values (6,'20070701',4,'D1',80)
select empid, max([A1])A1, max([B1])B1, max([C1])C1, max([D1])D1 from #t as
t1
pivot
(
max(amount)
for code IN([A1], [B1], [C1], [D1])
) AS pvt
group by empid
"RP" <rpk.general@.gmail.com> wrote in message
news:1188283745.388192.128690@.i13g2000prf.googlegroups.com...
>I am using SQL Server 2005 Express Edition.
> I have a table whose structure is follows:
> Date
> EmpID
> Code
> Amount
> Sample data looks like this:
> ---
> Date EMPID Code Amount
> ---
> 1-Jul-07 1 A1 100
> 1-Jul-07 1 B1 100
> 1-Jul-07 2 A1 150
> 1-Jul-07 3 B1 50
> 1-Jul-07 4 C1 120
> 1-Jul-07 4 D1 80
> ----
> The Codes are not fixed, they can be of any number and varies from
> employee to employee.
> I want to show a report like this:
>
> Month: Jul-07 -- CODES --
> ---
> EmpID A1 B1 C1 D1
> ---
> 1 100 100 0 0
> 2 150 0 0 0
> 3 0 50 0 0
> 4 0 0 120 80
> ----
> Since Codes are not fixed, so an SQL query is difficult. What is the
> alternative approach?
> I am thinking to create another table at run-time that reads column
> values (Code names) from the original table and create a field of that
> name in the next table.
> I also want to know in which edition of SQL Server is reporting
> included. How SQL Server Reporting compares with Crystal Reports?
> Secondly, while generating reports from Windows OS on a Dot-Matrix
> Printer, printing is slow. How can I print at a speed same as in DOS?
>
Subscribe to:
Posts (Atom)