=Globals.PageNumber
Wednesday, 14 August 2013
Tuesday, 13 August 2013
Repeat Table Header For Each page of Report
The setting of the “RepeatColumnHeaders” property on the tablix seems to have no effect on this behavior. Instead, we have to set it on a static member of the row groups.
To see the static members of the row groups, click on the small drop down arrow on the far right of the row groups/columns groups header. Then select Advanced Mode.
With the static members of the row group shown, select the first one in the list. The top left cell of the tablix should be selected in the designer.
Now open the property pane and find the property “RepeatOnNewPage” and set it to True.
Then find the property “KeepWithGroup” and make sure its set to After. If its not, set it to After.
Now your table header will repeat on every page.
==========================================================
You selected "Repeat header rows on each page" or "Keep header rows visible while scrolling" in the tablix properties dialog, but it doesn't seem to work as expected? You might want to try the following four steps if you are using a "table"-style layout:
- in the grouping pane, click on the small triangle and select "Advanced Mode" to show static members:
- verify that you have the properties grid turned on (in BI Development Studio use F4, in Report Builder go to the "View" tab and select "Properties")
- select the corresponding (static) item in the row group hierarchy
- in the properties grid:
- set KeepWithGroup to After
- set RepeatOnNewPage to true for repeating headers
- set FixedData to true for keeping headers visible
Please read on if you are interested in more details and ever wondered about the meaning of double-dashed lines on the design surface. In short, double-dashed lines show the row group, column group, corner, and tablix body areas of a data region. In the "matrix"-style example shown below, the yellow area represents the corner of the tablix, the light blue areas are row group headers, dark blue areas denote column group headers. The settings under "Row Headers" and "Column Headers" in the tablix properties dialog onlyapply to the row and column group areas (i.e. the blue areas on the left / above the double dashed lines).
If you have a "table"-style layout however, then the row/column group areas are often empty as you are using "headerless" table-style groupings. In that case, you have to set the properties as explained above to make entire static members (rows / columns) repeat / visible.
My Sql Similar Functions in MS SQL
1. Round( )
2. Date_Foramt( )
3. SubString_Index( )
My SQL Month Wise Query
SELECT
K.MTH AS 'MTH',
SUM(K.DOMESTIC_NO_OF_TICKETS) AS 'DOMESTIC_NO_OF_TICKETS',
SUM(K.DOM_AVERAGE_TICKET_VALUE) AS 'DOM_AVERAGE_TICKET_VALUE',
SUM(K.INTERNATIONAL_NO_OF_TICKETS)
AS
'INTERNATIONAL_NO_OF_TICKETS',
SUM(K.INTL_AVERAGE_TICKET_VALUE) AS 'INTL_AVERAGE_TICKET_VALUE',
SUM(K.TOTAL_TICKETS) AS 'TOTAL_TICKETS',
SUM(K.TOT_AVERAGE_TICKET_VALUE) AS 'TOT_AVERAGE_TICKET_VALUE',
K.SORT AS 'SORT'
FROM
(
(
SELECT
DATE_FORMAT(RAP.DATE_OF_ISSUE,'%M-%Y') AS 'MTH',
IF(RAS.SEGMENT = 0,IF(RAP.DOCTYPE
IN(0,1),1,-1),0) AS 'DOMESTIC_NO_OF_TICKETS',
IF(RAS.SEGMENT = 0,ROUND(SUM(RAS.BASE_FARE
+
RAS.Air_TAX)),0)
AS
'DOM_AVERAGE_TICKET_VALUE',
IF(RAS.SEGMENT = 1,IF(RAP.DOCTYPE
IN(0,1),1,-1),0) AS 'INTERNATIONAL_NO_OF_TICKETS',
IF(RAS.SEGMENT = 1,ROUND(SUM(RAS.BASE_FARE
+
RAS.Air_TAX)),0)
AS
'INTL_AVERAGE_TICKET_VALUE',
"" AS 'TOTAL_TICKETS',
"" AS 'TOT_AVERAGE_TICKET_VALUE',
DATE_FORMAT(RAP.DATE_OF_ISSUE,'%Y%m') AS 'SORT'
FROM
REPT_AIR_PRY_HY1 RAP
INNER JOIN
REPT_AIR_SEC_HY1 RAS
ON(RAP.DOC_SEQ_NO = RAS.DOC_SEQ_NO)
WHERE
RAP.DATE_OF_ISSUE BETWEEN ? AND DATE_ADD(?,INTERVAL
1 DAY)
AND
IF( ? = "" , true , RAP.COMPANY = ? )
AND
IF( ? = "" , true ,
RAP.SERVICE_LOC = ? )
AND
IF( ? = "" , true , RAP.GROUP_CODE
=
?
)
AND
IF( ? = "" , true , RAP.COMP_CODE = ? )
AND
IF( ? = "" , true ,
RAP.SUB_COMP_CODE = ? )
AND
IF(RAS.TICKET_BOOKING_STATUS is null or "" , true ,RAS.TICKET_BOOKING_STATUS
NOT
IN(0,1,2,11,12))
GROUP BY RAP.DOC_ID,RAS.TICKET_NO
)
)AS K
GROUP BY K.MTH
ORDER BY K.SORT
SELECT
K.MTH
AS 'MTH',
SUM(K.DOMESTIC_NO_OF_TICKETS)
AS 'DOMESTIC_NO_OF_TICKETS',
SUM(K.DOM_AVERAGE_TICKET_VALUE)
AS 'DOM_AVERAGE_TICKET_VALUE',
SUM(K.INTERNATIONAL_NO_OF_TICKETS)
AS 'INTERNATIONAL_NO_OF_TICKETS',
SUM(K.INTL_AVERAGE_TICKET_VALUE)
AS 'INTL_AVERAGE_TICKET_VALUE',
SUM(convert(int ,K.TOTAL_TICKETS)) AS 'TOTAL_TICKETS',
SUM(convert(int ,K.TOT_AVERAGE_TICKET_VALUE))
AS 'TOT_AVERAGE_TICKET_VALUE',
K.SORT
AS 'SORT'
FROM
((
SELECT
datename(month,RAP.DATE_OF_ISSUE) +'-'+convert(varchar,datepart(year,RAP.DATE_OF_ISSUE)) AS 'MTH',
(case when ras.segment=0 then (case when rap.doctype in(0,1) then 1 else -1 end) else 0 end) as 'DOMESTIC_NO_OF_TICKETS',
--
IF(RAS.SEGMENT = 0,IF(RAP.DOCTYPE IN(0,1),1,-1),0) AS 'DOMESTIC_NO_OF_TICKETS',
case when RAS.SEGMENT = 0 then ROUND(SUM(RAS.BASE_FARE + RAS.Air_TAX),0) else 0 end as 'DOM_AVERAGE_TICKET_VALUE',
--IF(RAS.SEGMENT
= 0,ROUND(SUM(RAS.BASE_FARE + RAS.Air_TAX)),0) AS 'DOM_AVERAGE_TICKET_VALUE',
case when RAS.SEGMENT = 1 then (case when rap.doctype in(0,1) then 1 else -1 end) else 0 end as 'INTERNATIONAL_NO_OF_TICKETS',
--IF(RAS.SEGMENT
= 1,IF(RAP.DOCTYPE IN(0,1),1,-1),0) AS 'INTERNATIONAL_NO_OF_TICKETS',
case when RAS.SEGMENT = 1 then ROUND(SUM(RAS.BASE_FARE + RAS.Air_TAX),0) else 0 end as 'INTL_AVERAGE_TICKET_VALUE',
--IF(RAS.SEGMENT
= 1,ROUND(SUM(RAS.BASE_FARE + RAS.Air_TAX)),0) AS 'INTL_AVERAGE_TICKET_VALUE',
' ' AS
'TOTAL_TICKETS',
' ' AS
'TOT_AVERAGE_TICKET_VALUE',
convert(varchar,datepart(year,RAP.DATE_OF_ISSUE))+''+datename(month,RAP.DATE_OF_ISSUE) AS 'SORT'
FROM
REPT_AIR_PRY_HY1 RAP
INNER JOIN
REPT_AIR_SEC_HY1 RAS
ON(RAP.DOC_SEQ_NO = RAS.DOC_SEQ_NO)
where RAP.DATE_OF_ISSUE BETWEEN
'2012-02-01' AND
DATEADD(DD, 1, '2012-04-01')
--AND
RAS.TICKET_BOOKING_STATUS NOT IN(0,1,2,11,12)
--AND CASE WHEN
RAS.TICKET_BOOKING_STATUS IS NULL OR '' THEN RAS.TICKET_BOOKING_STATUS =(SELECT
DISTINCT(RAS.TICKET_BOOKING
--AND
IF(RAS.TICKET_BOOKING_STATUS is null or "" , true
,RAS.TICKET_BOOKING_STATUS NOT IN(0,1,2,11,12))
GROUP BY RAP.DOC_ID,RAS.TICKET_NO,RAP.DATE_OF_ISSUE,RAS.SEGMENT,rap.doctype))
as K
group by K.MTH,K.SORT
ORDER BY K.SORT
Monday, 12 August 2013
Subscribe to:
Posts (Atom)