Showing posts with label table. Show all posts
Showing posts with label table. Show all posts

Wednesday, March 28, 2012

Reporting Services 2005 Catalog table

Hi
Can someone please point me in the right direction to find all the possible values and their meaning for the Type column found in the Catalog table.

Thanks
JWWe don't document the tables structure for the RS catalog. If you want to interract with the report server, you should use the SOAP APIs.

Thanks
Tudor

Monday, March 26, 2012

Reporting Services 2005 - export to CSV with no header

I have a very simple table report. I need to be able to export it as a CSV, but I can not have the first line being the header. I need just the data and no header. Is there a way to do this? I tried working with the Output tab on the tables properties, but I only seem to be able to include or exclude columns not the column headers.

I look forward to you response.

FredZilz

Hello,

To do this you need to set the DeviceInfo parameter "NoHeader" to True:

http://msdn2.microsoft.com/en-us/library/ms155365.aspx

-Chris

|||

Excellent, I can now get my results using URL Access.

Can, I set Device information settings as the default for a particular report (not at the server level but at the report)?

Thanks

|||

Hello,

DeviceInfo parameters can be set 1) via URL access, 2) when rendering with the SOAP API, or 3) set in the report server config file for the entire server (all reports).

However, they cannot be set as default for particular reports.

-Chris

Friday, March 23, 2012

Reporting Services : Exporting Report To Excel (SubReport)

Hi All,

Issue : While Exporting Report to Excel (Report contains SubReport)

Advance Thanks

In Reporint Services, I am using Table control to display the data.

In that control footer section i added one subreport that accessing the value from the Footer Section of the table(like Total ..) Report is generating.

While exporing that report, it is giving exception like : "Sub Report in Table Cell could not be shown."

Any idea/ suggestion to resolve this issue.

I believe export to excel does not support this.

Tuesday, March 20, 2012

Reporting services

How to reset the page number for each group in a table on the report?

Thank you in advance.

Please check the following blog article: http://blogs.msdn.com/chrishays/archive/2006/01/05/ResetPageNumberOnGroup.aspx

-- Robert

|||

Thank you. This was very helpful.

Is it possible to know how many pages are in the group to print page number and out of these many pages in a group?


Monday, March 12, 2012

Reporting Services

hi,
I trying to display list of values in the table footer. Here i am using
multivalued datafield and it is displaying only one value. How can I make the
footer to display all of the values of that field? Is there any other
solution?If it is a list of rows shouldn't that be in the details instead of the footer?
"sai" wrote:
> hi,
> I trying to display list of values in the table footer. Here i am using
> multivalued datafield and it is displaying only one value. How can I make the
> footer to display all of the values of that field? Is there any other
> solution?

Reporting Service Table control - question...is this possible?!?

Hi, on my local SSRS (RDLC), I have a table which presents several

items, however these are not sequential data from a table on my DB, are

fields of only one row of a table on my DB. More specificly, I have a

table with the fields issue1, description1, issue2,

description2...until 6! I want to present those fields six times (the

same times as they appear on the DB), however, I only want them to

appear is the issuex (which is an integer) is greater than 0. So to

guarantee that each field only appears one time, I do this:

=First(Fields!issue1.Value)

to each table line

And

what I want to do on each line is IIF(Fields!issue1.Value >

0,True,False) to make that line visible or not, however, if I apply

this to a line it automatically applies it to the complete table, and

if only one of this conditions returns false the complete table becomes

invisible.

Is there anyway to make this work dynamically?!?Thanks a lot!

The first mistake in your hidden expression is that your true and false results are exchanged. As per your first sentence, you want to show the row when issue>0 which means hidden should be false. so your hidden expression for table row should like this: IIf(Fields!issue1.Value>0, false, true)

To achieve the result you want, create 6 table detail rows and control the visibility of these rows based on the corresponding issue number. For example, first row will check for issue1 > 0, second row will check for issue 2 >0 etc until 6th row..

Shyam

Friday, March 9, 2012

reporting service database name

Hi,
Is there a way to find out(via table lookup) which database in an
given instance serves as a reporter database?.
More specifically, i need to report on some reprots and i do not want to
check every database in an instance to find out which one is used by
reporting services.
regards
-sarab> Is there a way to find out(via table lookup) which database in an
> given instance serves as a reporter database?.
> More specifically, i need to report on some reprots and i do not want to
> check every database in an instance to find out which one is used by
> reporting services.
In Query Analyzer, use
EXEC sp_who2
and check the DBName column in the row where the ProgramName coumn has value
'Report Server'. Use the lowest SPID value if there are more rows with
identical info (lower SPID=ServerProcess ID means earlier connection;
services should be faster when connectiong to SQL Server than regular
users).
--
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com|||Additionally, you can use WMI to get all configuration settigs. Sample code
is in RS BOL, here is the MSDN link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_wmi_4aci.asp.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:eRdZ%23l2sEHA.4040@.TK2MSFTNGP09.phx.gbl...
> > Is there a way to find out(via table lookup) which database in an
> > given instance serves as a reporter database?.
> >
> > More specifically, i need to report on some reprots and i do not want to
> > check every database in an instance to find out which one is used by
> > reporting services.
> In Query Analyzer, use
> EXEC sp_who2
> and check the DBName column in the row where the ProgramName coumn has
value
> 'Report Server'. Use the lowest SPID value if there are more rows with
> identical info (lower SPID=ServerProcess ID means earlier connection;
> services should be faster when connectiong to SQL Server than regular
> users).
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> www.SolidQualityLearning.com
>

Wednesday, March 7, 2012

Reporting server is not so smart as Analysis server

Hi,

I have a fact table with 2 columns value A and value B

In Analysis server I add a calculated column C as A / B

Now my data looks like this

A B C

0 10 0

5 10 0.5

If you add totals in Analysis server you get

5 20 and 0.25 which is correct

If you add totals in Reporting server you get

5 20 and 0.5 which is not correct.

How can I fix this ?

Thanks in advance

Constantijn

If you are using a table report, in your group footer you could add an expression for C that equates to

=sum(Fields!A.value)/sum(Fields!B.Value)

|||

Or, assuming that the report uses the SSAS cube, instead of using SUM use Aggregate as explained here.

|||

Teo,

Many thanks for that tip - I had totally missed that little trick.

Will

|||Thanks, I wasn't aware of the that function

Saturday, February 25, 2012

Reporting server is not so smart as Analysis server

Hi,

I have a fact table with 2 columns value A and value B

In Analysis server I add a calculated column C as A / B

Now my data looks like this

A B C

0 10 0

5 10 0.5

If you add totals in Analysis server you get

5 20 and 0.25 which is correct

If you add totals in Reporting server you get

5 20 and 0.5 which is not correct.

How can I fix this ?

Thanks in advance

Constantijn

If you are using a table report, in your group footer you could add an expression for C that equates to

=sum(Fields!A.value)/sum(Fields!B.Value)

|||

Or, assuming that the report uses the SSAS cube, instead of using SUM use Aggregate as explained here.

|||

Teo,

Many thanks for that tip - I had totally missed that little trick.

Will

|||Thanks, I wasn't aware of the that function

Reporting Records in groups of 10

I have a SQL 2000 table with the following fields:
Order_id
cust_pn
Seq_nbr
chassis_nbr
Qty
The cust_pn ends with an "R" if it's a right-hand part otherwise it's a
left-hand part.
For a given order_id, I need to report the part numbers in groups of 10
lefts, 10 rights, 10 lefts and so one.
Does anyone know of a way to do this? Thanks!Data types, sample data, desired results?
http://www.aspfaq.com/5006
"prenfrow" <prenfrow@.discussions.microsoft.com> wrote in message
news:C7E29EAF-2CE2-44F3-A282-78149A5A949D@.microsoft.com...
>I have a SQL 2000 table with the following fields:
> Order_id
> cust_pn
> Seq_nbr
> chassis_nbr
> Qty
> The cust_pn ends with an "R" if it's a right-hand part otherwise it's a
> left-hand part.
> For a given order_id, I need to report the part numbers in groups of 10
> lefts, 10 rights, 10 lefts and so one.
> Does anyone know of a way to do this? Thanks!
>|||I hope this is ok:
CREATE TABLE [dbo].[tblOrders] (
[ORDER_ID] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[LINE_NBR] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ITEM_ID] [char] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DESCRIPTION] [char] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CUST_PN] [char] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[QUANTITY] [decimal](20, 0) NULL ,
[CHASSIS_NBR] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[LINE_SEQ_NBR] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[BUILD_STATION] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[DATE_SCHEDULED] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT
NULL ,
[CUSTOMER_ID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[COMPANY] [char] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DATE_SHIP_REQD] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'002
2','R25-1096-238221R','DR
ASSY RH DL ELE FRES RS
BLCK','R25-1096-238221R',1,'164882','P1410C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'002
2','R25-1096-238221R','DR
ASSY RH DL ELE FRES RS
BLCK','R25-1096-238221R',1,'174984','P1416C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'002
2','R25-1096-238221R','DR
ASSY RH DL ELE FRES RS
BLCK','R25-1096-238221R',1,'175627','P1424C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'002
2','R25-1096-238221R','DR
ASSY RH DL ELE FRES RS
BLCK','R25-1096-238221R',1,'158190','P1435C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'002
2','R25-1096-238221R','DR
ASSY RH DL ELE FRES RS
BLCK','R25-1096-238221R',1,'174601','P1439C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'002
0','R25-1096-228221R','DR
ASSY RH DL ELE PPR RS
BLCK','R25-1096-228221R',1,'172491','P1407C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'002
0','R25-1096-228221R','DR
ASSY RH DL ELE PPR RS
BLCK','R25-1096-228221R',1,'173813','P1408C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'002
0','R25-1096-228221R','DR
ASSY RH DL ELE PPR RS
BLCK','R25-1096-228221R',1,'175620','P1411C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'002
0','R25-1096-228221R','DR
ASSY RH DL ELE PPR RS
BLCK','R25-1096-228221R',1,'169974','P1413C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'002
0','R25-1096-228221R','DR
ASSY RH DL ELE PPR RS
BLCK','R25-1096-228221R',1,'161421','P1415C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'002
0','R25-1096-228221R','DR
ASSY RH DL ELE PPR RS
BLCK','R25-1096-228221R',1,'166073','P1417C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'001
5','R25-1096-217111','DR
ASSY LH DL ELE
STDSTP','R25-1096-217111',1,'163603','P1437C0','82','04/13/2006','46889','KE
NWORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'001
4','R25-1096-216221','DR
ASSY LH DL ELE RSTSTP
BLCK','R25-1096-216221',1,'996384','P1421C0','82','04/13/2006','46889','KENW
ORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'001
3','R25-1096-216121','DR
ASSY LH DL ELE STDSTP
BLCK','R25-1096-216121',1,'992741','P1447C0','82','04/13/2006','46889','KENW
ORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'001
2','R25-1096-216111','DR
ASSY LH DL ELE
STDSTP','R25-1096-216111',1,'169264','P1444C0','82','04/13/2006','46889','KE
NWORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'001
1','R25-1096-113221','DR
ASSY LH DL MAN RSTSTP
BLCK','R25-1096-113221',1,'996487','P1402C0','82','04/13/2006','46889','KENW
ORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'001
1','R25-1096-113221','DR
ASSY LH DL MAN RSTSTP
BLCK','R25-1096-113221',1,'170399','P1406C0','82','04/13/2006','46889','KENW
ORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'001
0','R25-1096-113211','DR
ASSY LH DL MAN
RSTSTP','R25-1096-113211',1,'165294','P1445C0','82','04/13/2006','46889','KE
NWORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'000
9','R25-1096-113121','DR
ASSY LH DL MAN STDSTP
BLOCK','R25-1096-113121',1,'158190','P1435C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'000
8','R25-1096-113111','DR
ASSY LH DL MAN
STDSTP','R25-1096-113111',1,'167500','P1422C0','82','04/13/2006','46889','KE
NWORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'000
3','D5301-1025','DAYLITE
DR ASSY,ELE LH
W/BLOCK','R25-1077-2121211',1,'992577','P1445C1','82','04/13/2006','46889','
KENWORTH-RENTON (DOCK Z)','04/14/2006')
INSERT INTO [tblorders]
([ORDER_ID],[LINE_NBR],[ITEM_ID],[DESCRI
PTION],[CUST_PN],[QUANTITY],[CHASSIS_NBR
],[LINE_SEQ_NBR],[BUILD_STAT
ION],[DATE_SCHEDULED],[CUSTOMER_ID],[COM
PANY],[DATE_SHIP_REQD])VALUES('06RX0413'
,'000
2','D5301-1003','DAYLITE
DR ASSY, MANUAL
W/90','R25-1077-1123211',1,'995181','P1426C0','82','04/13/2006','46889','KEN
WORTH-RENTON (DOCK Z)','04/14/2006')
I need to be able to report line_seq_nbr, cust_pn, chassis_nbr in groups of
10 lefts, 10 rights and so on based on the last character of the cust_pn (se
e
below) for a selected order_id and order then by line_seq_nbr
Thanks for your help!
"Aaron Bertrand [SQL Server MVP]" wrote:

> Data types, sample data, desired results?
> http://www.aspfaq.com/5006
>
> "prenfrow" <prenfrow@.discussions.microsoft.com> wrote in message
> news:C7E29EAF-2CE2-44F3-A282-78149A5A949D@.microsoft.com...
>
>|||What is the key for the table ?
Anith|||There isn't one for this table.
"Anith Sen" wrote:

> What is the key for the table ?
> --
> Anith
>
>|||I'm not entirely clear on your requirements,
however, assuming that ORDER_ID,LINE_SEQ_NBR is unique,
this should give you what you want
SELECT ORDER_ID,
LINE_SEQ_NBR,
CUST_PN,
CHASSIS_NBR
FROM (
SELECT t1.ORDER_ID,
CASE WHEN RIGHT(RTRIM(t1.CUST_PN),1)='R' THEN 1 ELSE 0 END AS
LR,
t1.LINE_SEQ_NBR,
t1.CUST_PN,
t1.CHASSIS_NBR,
(SELECT COUNT(*)/10
FROM tblOrders t2
WHERE t2.ORDER_ID=t1.ORDER_ID
AND ((RIGHT(RTRIM(t2.CUST_PN),1)='R' AND
RIGHT(RTRIM(t1.CUST_PN),1)='R') OR
(RIGHT(RTRIM(t2.CUST_PN),1)<>'R' AND
RIGHT(RTRIM(t1.CUST_PN),1)<>'R'))
AND t2.LINE_SEQ_NBR < t1.LINE_SEQ_NBR) As Num
FROM dbo.tblOrders t1
) X
ORDER BY ORDER_ID,Num,LR,LINE_SEQ_NBR|||WOW! That's exactly what I wanted!! Works perfectly!! Thanks!!!!!!
"markc600@.hotmail.com" wrote:

> I'm not entirely clear on your requirements,
> however, assuming that ORDER_ID,LINE_SEQ_NBR is unique,
> this should give you what you want
>
> SELECT ORDER_ID,
> LINE_SEQ_NBR,
> CUST_PN,
> CHASSIS_NBR
> FROM (
> SELECT t1.ORDER_ID,
> CASE WHEN RIGHT(RTRIM(t1.CUST_PN),1)='R' THEN 1 ELSE 0 END AS
> LR,
> t1.LINE_SEQ_NBR,
> t1.CUST_PN,
> t1.CHASSIS_NBR,
> (SELECT COUNT(*)/10
> FROM tblOrders t2
> WHERE t2.ORDER_ID=t1.ORDER_ID
> AND ((RIGHT(RTRIM(t2.CUST_PN),1)='R' AND
> RIGHT(RTRIM(t1.CUST_PN),1)='R') OR
> (RIGHT(RTRIM(t2.CUST_PN),1)<>'R' AND
> RIGHT(RTRIM(t1.CUST_PN),1)<>'R'))
> AND t2.LINE_SEQ_NBR < t1.LINE_SEQ_NBR) As Num
> FROM dbo.tblOrders t1
> ) X
> ORDER BY ORDER_ID,Num,LR,LINE_SEQ_NBR
>

Reporting Problem

my app uses MSSQL 2k + VB 6.0+Crystal Reports 4.6

ive a table of the form

table PIC
(
studentid smallint,
studentname varchar(50),
studentpic image
)

i want to generate an id card for the students using the info from this table, using Crystal reports

the problem is that the image is not displayed in the crystal report
all other fields are present

is this any problem with the image data type and crystal report?

i do welcome suggestions from ur end to tackle this problem
thanks in advanceIt's not a problem with the image data type. You need to "read" the contents of the field into a file and have an image placeholder on the CR designer to link it to the file at runtime.|||thanks for the information

but how can i generate the id cards of 100 students say, by this method

cud u pl tell how to read all images from DB and pass the filename to Crystal Reports, once i click 'Generate ID Cards' Button

regards

Reporting Oracle Long datatypes

I am including a Oracle Long datatype dataset field in a table report item textbox cell and only getting 100 characters of the field displayed. Is this the maximum length possible or is it possible to display more characters?
I am connecting to the Oracle database with the Oracle provider for OLE DB and having no problems with other datatypes.Which version of the Oracle client is installed? It has to be the Oracle
8.1.7 client or later. Some people on the newsgroup have reported issues
with garbage returned when using the Oracle 8.1.5 client against an Oracle
9i server.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"RW" <RW@.discussions.microsoft.com> wrote in message
news:52AE66B5-576F-4BF3-B215-CC3193C0955E@.microsoft.com...
> I am including a Oracle Long datatype dataset field in a table report item
textbox cell and only getting 100 characters of the field displayed. Is this
the maximum length possible or is it possible to display more characters?
> I am connecting to the Oracle database with the Oracle provider for OLE DB
and having no problems with other datatypes.

Tuesday, February 21, 2012

Reporting off both a Stored Procedure and Table

Hi All,

I am using a Stored Procedure in the report. In the details section,
I have a formula for calculating End_date.This formula works fine and displays the data.But I want to check if this END_Date lies in the list of holidays which is given in another table 'tbHolidays'.
If it does lie in the list of Holidays then I need to add 1 to End Date.

Do I need to write a SQL expression for fetching the data from 'tbHolidays'? Can anybody out there please help me??

Thanks

Rashmias far as i know, if u use stored procedure u can't use SQL Expression.

r u using ref cursor in stored procedure?|||Thanks Raheem...
Yes I am using cursors in the SP. The cursor is used to fetch the records from join of two tables and then calculations are done for the fetched data. Then the data is inserted into a temporary table and a SELECT query is there at the end to fetch the rows.

Is there any other way to fetch the records from the table?Also I am not sure if a simple comparison of End Date with the data from tbHolidays would work...Helppppp!!!

Rashmi

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?

To answer the first part of your question:

It's a simple procedure to create a cross-tab report in Reporting Services. The dataset you'll create is nothing more than SELECT * FROM table. Next, add a List control to the form. Set the grouping to =Year(Fields!Date.Value), =Month(Fields!Date.Value) and add a Textbox control to display the month and year of the date field such as:

=Month(Fields!Date.Value) & "-" & Year(Fields!Date.Value)

Next, add a Matrix control inside the List and under the Textbox. Drag the EMPID field from the Datasets window to the Rows area of the Matrix. Drag the Code field to the Columns area. Drag Amount to the Data cell. Since the Data cell needs an aggregate function, you'll most likely do OK with the SUM function that Reporting Services adds by default. Since you have zeros in your sample above where NULL data exists, replace the equation in the Data cell with the following to display a zero instead of a blank:

=Iif(Sum(Fields!Amount.Value) <> 0, Sum(Fields!Amount.Value), 0)

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?

To answer the first part of your question:

It's a simple procedure to create a cross-tab report in Reporting Services. The dataset you'll create is nothing more than SELECT * FROM table. Next, add a List control to the form. Set the grouping to =Year(Fields!Date.Value), =Month(Fields!Date.Value) and add a Textbox control to display the month and year of the date field such as:

=Month(Fields!Date.Value) & "-" & Year(Fields!Date.Value)

Next, add a Matrix control inside the List and under the Textbox. Drag the EMPID field from the Datasets window to the Rows area of the Matrix. Drag the Code field to the Columns area. Drag Amount to the Data cell. Since the Data cell needs an aggregate function, you'll most likely do OK with the SUM function that Reporting Services adds by default. Since you have zeros in your sample above where NULL data exists, replace the equation in the Data cell with the following to display a zero instead of a blank:

=Iif(Sum(Fields!Amount.Value) <> 0, Sum(Fields!Amount.Value), 0)

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?
>