Need help to create report with jpeg/gif image
Hello,
I need help with creating a form with a special jpeg/gif seal. I never done this Java. Until now, I created all forms with ansi C++ with HP escape characters to draw lines, boxs, and text. This form will contain boxes which is populated with database information read from a text file.
Since this form contains a special seal on the upper right, I don't think it can be done with old fashion ansi C++. How can I create a form with Java and create it as a simple exe to just print the form to a specified printer.
Thanks,
John
Hi,
I am creating a form with boxes (lines and text). What is special about this form is that it has an image jpeg or gif at the top right corner. Is is a state department seal. Up to this form, I had used ansi C++ and print out escape HP character to print out the lines, boxes, and text. I have no idea how to print out the image. I am new to JAVA and only 1 class in it. Is there sample code out there to create this type of form with the image? I need a starting point.
Thanks,
John
Similar Messages
-
Need help to develop report with column chart
Hi
I am new to SAP BO world.Could anyone please help me to design report with column chart.Please guide me how to develop report for the following requirement.I am not aware of variance columns and variance labels.Please provide some guidance or some tutorials(for column Chart) so that I can complete the task. Please reply me as soon as possible.Waiting for reply.Thanks in advance.
Type: Column Chart
u2022 Rows: Banking Asset Margin (%)
u2022 Start / End Columns: PY YTD Act(Prior year year to date); CY YTD Act(Current year Year to date)
u2022 Variance Columns: # Var (CY-PY Act) for GOLM; Volume; Rate; Non Banking NII; Banking Volatility in NII; Banking Volatility in OOI; Fees/One Offs/Other; Volatile Items; Sophie
u2022 Sub-total columns: PY YTD Underlying; CY YTD Underlying.
u2022 Variance Labels: % Var (CY-PY Act) for Total Income and Underlying Income
u2022 Sub-Total Labels: # Var (CY-PY Act) for Net Insurance Income; Banking Volatility; Other Operating Income
Additional information
u2022 Variance columns (bar) colours: Red = Adverse to Prior Year; Green = Favourable to Prior Year
u2022 Columns to show values. Adverse values to be shown in red text in brackets. Favourable results in black text.
u2022 All values in Black, but adverse to be shown below the bar.Hi,
This type of question is almost impossible to answer over a forum .
You need to work with your business to understand what these requirements mean in terms of data modelling and relationships between object entities.
- Some of these metrics should be delegated to source, and calculated in the update routines to your datatargets (aka Cubes/Tables)
- Others could be resolved in the semantic layer (Universe)
- Other will be calculated in the presentation layer as local formulae or variables.
whilst BusinessObjects is a fairly intuitive tool, it may be unreasonble to expect a new learner to deliver an advanced report with conditional formatting.
Regards,
H -
Need help to create file with name and current time stamp.
I need to create .xlsx file exporting data from sql database and file name would be 'FileName' and current yyyymmdd.
I'm trying to use following code but it's keep saying incorrect syntax near "+".
EXEC p_CreateExcel 'sql64', 'NewFile', '\\hrfile1\Shared\Buying Report\NewFile'
+ CAST(YEAR(CURRENT_TIMESTAMP) AS VARCHAR)
+ RIGHT('00'+CAST(MONTH(CURRENT_TIMESTAMP) AS VARCHAR),2)
+ RIGHT('00'+CAST(DAY(CURRENT_TIMESTAMP) AS VARCHAR),2)+'.xlsx'This is what I have on EXEC p_CreateExcel
USE [XePro01]
GO
/****** Object: StoredProcedure [dbo].[p_CreateExcel] Script Date: 02/26/2015 11:27:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[p_CreateExcel]
@db_name varchar(100),
@table_name varchar(100),
@file_name varchar(100)
as
--Generate column names as a recordset
declare @columns varchar(8000), @sql varchar(8000), @data_file varchar(100)
select
@columns=coalesce(@columns+',','')+column_name+' as '+column_name
from
information_schema.columns
where
table_name=@table_name
select @columns=''''''+replace(replace(@columns,' as ',''''' as '),',',',''''')
--Create a dummy file to have actual data
select @data_file=substring(@file_name,1,len(@file_name)-charindex('\',reverse(@file_name)))+'\data_file.xls'
--Generate column names in the passed EXCEL file
set @sql='exec master..xp_cmdshell ''bcp "set fmtonly off select * from (select '+@columns+') as t" queryout "'+@file_name+'" -c -t, -T -S'''
exec(@sql)
--Generate data in the dummy file
set @sql='exec master..xp_cmdshell ''bcp "set fmtonly off select * from XeProgst01.dbo.'+@table_name+'" queryout "'+@data_file+'" -c -t, -T -S'''
exec(@sql)
--Copy dummy file to passed EXCEL file
set @sql= 'exec master..xp_cmdshell ''type '+@data_file+' >> '+@file_name+''''
exec(@sql)
--Delete dummy file
set @sql= 'exec master..xp_cmdshell ''del '+@data_file+''''
exec(@sql)
GO -
Newbie needs help on creating banner with vanishing text.
I have never used Flash before. I may even be barking up the wrong tree. I am trying to create a banner that has text that "appears" and then "disappears". This is the mockup I made for the banner. I would like for the sentences to seem like they are coming out of the couds, and then vanishing. Any help you can offer would be greatly appreciated!
Thanks in advance,
MargaretThanks Ned! I did what you said and now have the words animated like I need to. But I am still having one problem. I'm not sure how to get my background to be visible through the entire animation. I can see it in the first frame and then it disappears.
Thanks again,
m -
Hi Frds
Consider 1 PO and 1 Line Item and for that i have Multiple GRs and IR GRs.
I wants to write code for these ,can anyone help me which are tables and fields ,give me some tips .
its urgent
Thanks
PariHi,
Tables Fields
EKKO(Purchasing Doc EBELN,EBELP
Header) (EKPO-EBELN =EKKO-EBELN)
EKPO(Purchasing Doc EBELN
Item)
GR:
Tables Fields
MKPF(Header: Material Document) MBLNR,MJAHR
MSEG(Document Segment: Material) MBLNR,MJAHR,ZEILE
Please Reward points if useful.
Regards
rose -
Need help Connecting Crystal Reports 8.5 with GBS Agency Expert 6.7.6c
Need help Connecting Crystal Reports 8.5 with GBS Agency Expert 6.7.6c. I need assistance on connecting these together so I can run a report. I am not an IT person so if someone could dumb it down it would be great.
Thanks,
NBGHealthHello,
I assume GBS Agency Expert 6.7.6c is some sort of database or data source? If you have an ODBC driver then create or use a System DSN to the database. Then you can create a report using that DSN.
Otherwise I suggest you contact the makers of GBS Agency Expert 6.7.6c and ask them how to connect to the database.
Let them know CR is ANSII 92 ODBC 3 compliant.
Thank you
Don -
hi friends i need help on classical reports,
sold-party,
material
sales and distrubitutation channel ,division,
incoming orders,order number,invoice ,credit,
i need sub totals and final total of invoice and each customer should display in new page .Hi
Use the Tables KNA1,VBAk,VBAP,VBRK and VBRP and design the report
see the sample report using KNA1,VBAK and VBAP.
REPORT ZTEJ_INTAB1 LINE-SIZE 103 LINE-COUNT 35(5) NO STANDARD PAGE
HEADING.
*TABLES DECLARATION
TABLES : KNA1, VBAK, VBAP.
*SELECT OPTIONS
SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
*INITIALIZATION
INITIALIZATION.
CUST_NO-LOW = '01'.
CUST_NO-HIGH = '5000'.
CUST_NO-SIGN = 'I'.
CUST_NO-OPTION = 'BT'.
APPEND CUST_NO.
*SELECTION SCREEN VALIDATION
AT SELECTION-SCREEN ON CUST_NO.
LOOP AT SCREEN.
IF CUST_NO-LOW < 1 OR CUST_NO-HIGH > 5000.
MESSAGE E001(ZTJ1).
ENDIF.
ENDLOOP.
*BASIC LIST SELECTION
START-OF-SELECTION.
SELECT KUNNR NAME1 ORT01 LAND1 INTO
(KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)
FROM KNA1
WHERE KUNNR IN CUST_NO.
WRITE:/1 SY-VLINE,
KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
16 SY-VLINE,
KNA1-NAME1 UNDER 'NAME',
61 SY-VLINE,
KNA1-ORT01 UNDER 'CITY',
86 SY-VLINE,
KNA1-LAND1 UNDER 'COUNTRY',
103 SY-VLINE.
HIDE: KNA1-KUNNR.
ENDSELECT.
ULINE.
*SECONDARY LIST ACCESS
AT user-command.
IF SY-UCOMM = 'IONE'.
PERFORM SALES_ORD.
ENDIF.
IF SY-UCOMM = 'ITWO'.
PERFORM ITEM_DET.
ENDIF.
*TOP OF PAGE
TOP-OF-PAGE.
FORMAT COLOR 1.
WRITE : 'CUSTOMER DETAILS'.
FORMAT COLOR 1 OFF.
ULINE.
FORMAT COLOR 3.
WRITE : 1 SY-VLINE,
3 'CUSTOMER NO.',
16 SY-VLINE,
18 'NAME',
61 SY-VLINE,
63 'CITY',
86 SY-VLINE,
88 'COUNTRY',
103 SY-VLINE.
ULINE.
FORMAT COLOR 3 OFF.
*TOP OF PAGE FOR SECONDARY LISTS
TOP-OF-PAGE DURING LINE-SELECTION.
*TOP OF PAGE FOR 1ST SECONDARY LIST
IF SY-UCOMM = 'IONE'.
ULINE.
FORMAT COLOR 1.
WRITE : 'SALES ORDER DETAILS'.
ULINE.
FORMAT COLOR 1 OFF.
FORMAT COLOR 3.
WRITE : 1 SY-VLINE,
3 'CUSTOMER NO.',
16 SY-VLINE,
18 'SALES ORDER NO.',
40 SY-VLINE,
42 'DATE',
60 SY-VLINE,
62 'CREATOR',
85 SY-VLINE,
87 'DOC DATE',
103 SY-VLINE.
ULINE.
ENDIF.
FORMAT COLOR 3 OFF.
*TOP OF PAGE FOR 2ND SECONDARY LIST
IF SY-UCOMM = 'ITWO'.
ULINE.
FORMAT COLOR 1.
WRITE : 'ITEM DETAILS'.
ULINE.
FORMAT COLOR 1 OFF.
FORMAT COLOR 3.
WRITE : 1 SY-VLINE,
3 'SALES ORDER NO.',
40 SY-VLINE,
42 'SALES ITEM NO.',
60 SY-VLINE,
62 'ORDER QUANTITY',
103 SY-VLINE.
ULINE.
ENDIF.
FORMAT COLOR 3 OFF.
*END OF PAGE
END-OF-PAGE.
ULINE.
WRITE :'USER :',SY-UNAME,/,'DATE :', SY-DATUM, 85 'END OF PAGE:',
SY-PAGNO.
SKIP.
*& Form SALES_ORD
*& FIRST SECONDARY LIST FORM
FORM SALES_ORD .
SELECT KUNNR VBELN ERDAT ERNAM AUDAT INTO
(VBAK-KUNNR, VBAK-VBELN, VBAK-ERDAT, VBAK-ERNAM, VBAK-AUDAT)
FROM VBAK
WHERE KUNNR = KNA1-KUNNR.
WRITE:/1 SY-VLINE,
VBAK-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
16 SY-VLINE,
VBAK-VBELN UNDER 'SALES ORDER NO.' HOTSPOT ON,
40 SY-VLINE,
VBAK-ERDAT UNDER 'DATE',
60 SY-VLINE,
VBAK-ERNAM UNDER 'CREATOR',
85 SY-VLINE,
VBAK-AUDAT UNDER 'DOC DATE',
103 SY-VLINE.
HIDE : VBAK-VBELN.
ENDSELECT.
ULINE.
ENDFORM. " SALES_ORD
*& Form ITEM_DET
*& SECOND SECONDARY LIST FORM
FORM ITEM_DET .
SELECT VBELN POSNR KWMENG INTO
(VBAP-VBELN, VBAP-POSNR, VBAP-KWMENG)
FROM VBAP
WHERE VBELN = VBAK-VBELN.
WRITE : /1 SY-VLINE,
VBAP-VBELN UNDER 'SALES ORDER NO.',
40 SY-VLINE,
VBAP-POSNR UNDER 'SALES ITEM NO.',
60 SY-VLINE,
VBAP-KWMENG UNDER 'ORDER QUANTITY',
103 SY-VLINE.
ENDSELECT.
ULINE.
ENDFORM. " ITEM_DET
REPORT demo_list_at_pf.
START-OF-SELECTION.
WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
AT pf5.
PERFORM out.
AT pf6.
PERFORM out.
AT pf7.
PERFORM out.
AT pf8.
PERFORM out.
FORM out.
WRITE: 'Secondary List by PF-Key Selection',
/ 'SY-LSIND =', sy-lsind,
/ 'SY-UCOMM =', sy-ucomm.
ENDFORM.
After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed secondary list looks as follows:
Secondary List by PF-Key Selection
SY-LSIND = 14
SY-UCOMM = PF06
Example for AT USER-COMMAND.
REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
START-OF-SELECTION.
WRITE: 'Basic List',
/ 'SY-LSIND:', sy-lsind.
TOP-OF-PAGE.
WRITE 'Top-of-Page'.
ULINE.
TOP-OF-PAGE DURING LINE-SELECTION.
CASE sy-pfkey.
WHEN 'TEST'.
WRITE 'Self-defined GUI for Function Codes'.
ULINE.
ENDCASE.
AT LINE-SELECTION.
SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
PERFORM out.
sy-lsind = sy-lsind - 1.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'FC1'.
PERFORM out.
WRITE / 'Button FUN 1 was pressed'.
WHEN 'FC2'.
PERFORM out.
WRITE / 'Button FUN 2 was pressed'.
WHEN 'FC3'.
PERFORM out.
WRITE / 'Button FUN 3 was pressed'.
WHEN 'FC4'.
PERFORM out.
WRITE / 'Button FUN 4 was pressed'.
WHEN 'FC5'.
PERFORM out.
WRITE / 'Button FUN 5 was pressed'.
ENDCASE.
sy-lsind = sy-lsind - 1.
FORM out.
WRITE: 'Secondary List',
/ 'SY-LSIND:', sy-lsind,
/ 'SY-PFKEY:', sy-pfkey.
ENDFORM.
When you run the program, the system displays the following basic list with a the page header defined in the program:
You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1.
Reward points for useful Answers
Regards
Anji -
Need help in creating value set
hi frs,
i have created report with parameter status and registerd in apps.
i need create valuet set like having values like below
approve,
cacel,
pending,
close,
all
all should contain values like approve,cacel,pending,close
how to create value set of this type.
help pls.
regards
rajeshHi,
For my Report i need to pass 2 parameters 1.From Period 2.To Period
I created value set what ever u telling like and parameter window i given low high.
This is because data is in varchar.
I tryed in some other way using $flex$ am getting error while attaching.
can you pls help me i need urgent.
If u need any more information i will send u...
Thanks in Advance.
Regards,
Leelakrishna.G -
Need help in dynamic report for a range of year and period
Dear all,
I need help in creating an ALV report with dynamic columns based on the Year and period entered on the selection screen. for example if in the year we enter 2002 and period range from 10 to 12 then we should get the 3 columns display for cost(example) for period 10/2002, 11/2002 and 12/2002.
Can anyone help me in achieving this dynamically since the user can enter the year also in intervals along with the period and data also needs to be populated in the corresponding columns.
An example code would be of great help.
Thanks,
AmitHi,
Use field symbols as follows.
TYPE-POOLS : SLIS.
TABLES : MARC,T001W.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR LIKE MARC-MATNR,
END OF ITAB.
DATA : FIELDSTAB TYPE LVC_T_FCAT,
STAB TYPE LVC_S_FCAT,
T_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
S_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
NEW_LINE TYPE REF TO DATA,
NEW_TABLE TYPE REF TO DATA,
INDEX(3) TYPE C,
STR(70),
TEXT(6),
CNT(1),
TEXT1(16),
REPID LIKE SY-REPID.
FIELD-SYMBOLS : <FS> TYPE STANDARD TABLE,
<WA> TYPE ANY.
SELECT-OPTIONS : S_WERKS FOR MARC-WERKS NO INTERVALS,
S_MATNR FOR MARC-MATNR NO INTERVALS.
INITIALIZATION.
REPID = SY-REPID.
START-OF-SELECTION.
SELECT * FROM MARC
INTO CORRESPONDING FIELDS OF TABLE ITAB
WHERE MATNR IN S_MATNR
AND WERKS IN S_WERKS.
SORT ITAB BY MATNR.
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING MATNR.
STAB-FIELDNAME = 'MATNR'.
STAB-DATATYPE = 'CHAR'.
STAB-INTLEN = '18'.
APPEND STAB TO FIELDSTAB.
CLEAR CNT.
LOOP AT S_WERKS.
CLEAR TEXT.
CNT = CNT + 1.
CONCATENATE 'EISLO' CNT INTO TEXT.
STAB-FIELDNAME = TEXT.
STAB-DATATYPE = 'CHAR'.
STAB-INTLEN = '16'.
APPEND STAB TO FIELDSTAB.
CLEAR S_WERKS.
ENDLOOP.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = FIELDSTAB
IMPORTING
EP_TABLE = NEW_TABLE.
ASSIGN NEW_TABLE->* TO <FS>.
CREATE DATA NEW_LINE LIKE LINE OF <FS>.
ASSIGN NEW_LINE->* TO <WA>.
PERFORM MOVE_DATA.
CLEAR S_FIELDCAT.
S_FIELDCAT-FIELDNAME = 'MATNR'.
S_FIELDCAT-TABNAME = ITAB.
S_FIELDCAT-SELTEXT_M = 'Part Number'.
S_FIELDCAT-NO_ZERO = 'X'.
S_FIELDCAT-DDICTXT = 'M'.
APPEND S_FIELDCAT TO T_FIELDCAT.
CLEAR CNT.
LOOP AT S_WERKS.
CLEAR T001W.
CNT = CNT + 1.
SELECT SINGLE * FROM T001W WHERE WERKS = S_WERKS-LOW AND SPRAS = SY-LANGU.
CLEAR TEXT.
CONCATENATE 'EISLO' CNT INTO TEXT.
S_FIELDCAT-FIELDNAME = TEXT.
S_FIELDCAT-SELTEXT_M = T001W-NAME2.
S_FIELDCAT-NO_ZERO = 'X'.
S_FIELDCAT-DDICTXT = 'M'.
APPEND S_FIELDCAT TO T_FIELDCAT.
CLEAR S_WERKS.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IT_FIELDCAT = T_FIELDCAT[]
TABLES
T_OUTTAB = <FS>.
*& Form MOVE_DATA
text
FORM MOVE_DATA.
LOOP AT ITAB.
CLEAR STR.
CONCATENATE ITAB-MATNR ' ' INTO STR SEPARATED BY SPACE.
LOOP AT S_WERKS.
CLEAR MARC.
SELECT SINGLE * FROM MARC WHERE MATNR = ITAB-MATNR AND WERKS = S_WERKS-LOW.
IF SY-SUBRC EQ 0.
CLEAR TEXT1.
TEXT1 = MARC-EISLO.
CONCATENATE STR TEXT1 INTO STR SEPARATED BY SPACE.
ELSE.
CONCATENATE STR '0' INTO STR SEPARATED BY SPACE.
ENDIF.
ENDLOOP.
<WA> = STR.
APPEND <WA> TO <FS>.
CLEAR ITAB.
ENDLOOP.
ENDFORM. "MOVE_DATA
Reward points if helpful.
Regards,
Sankar.. -
Need Help to create new screen for RF Sapconsole
Hi Guru's
I'm new on RF (but some years in ABAP) since last week.
I need help to create new screens for RF (SAPLLMOB).
Can someone explain me the procedure to create screen (with ABAP code after) or perhaps someone have an exemple (simple or not) ?
I have to develop 2 new screens with really few time.
And, another subsidiary question :
how SAP can transfert information between the flash gun and the screen i have developped.
Is there some code to add to enable this functionality or it is include in SAPLLMOB on standard fields ????
It's a new strange world for me today...
Many thanks to everyone who can explain me
Alainhi,
I am facing this problem as well. Is there any reference to create the new screen?
Hope someone can help! Thanks!
Regards,
Darren -
Need help in creating a chart from 3 datasets
Need help in creating a chart in SSRS from 3 datasets
Can someone help me in creating a chart from 3 datasets, however datasource is same.Thank you Olaf...
could anyone help me in using union all with the below
WITH a AS (
SELECT
clientid,
DATEPART(year, row_date) AS 'Year',
DATEPART(month, row_date) AS 'Month',
value ,
CASE metricid WHEN 16 THEN 'FCR' ELSE 'Cases' END AS metric
FROM XXXXXX AS V
WHERE metricid IN (16, 11)
AND row_date BETWEEN '2012-01-01' AND '2014-10-01'
AND value IS NOT NULL)
, b AS (
SELECT clientid ,
Year ,
Month ,
value AS 'Cases',
metric
FROM a
WHERE metric = 'cases')
, c AS (
SELECT clientid ,
Year ,
Month ,
value AS 'FCR',
metric
FROM a
WHERE metric = 'FCR')
, d AS (
SELECT b.YEAR, b.MONTH, c.FCR, b.Cases
FROM b INNER JOIN c
ON c.clientid = b.clientid
AND c.[YEAR] = b.[year]
AND c.[month] = b.[month]
WHERE c.fcr <> 0 AND b.cases <> 0
,E AS (
SELECT [Year], [Month], SUM(FCR) AS FCR, SUM(Cases) AS Cases
FROM d
GROUP BY [Year], [Month])
select YEAR, MONTH,
CASE MONTH
WHEN 1 THEN 'Jan'
WHEN 2 THEN 'Feb'
WHEN 3 THEN 'Mar'
WHEN 4 THEN 'Apr'
WHEN 5 THEN 'May'
WHEN 6 THEN 'Jun'
WHEN 7 THEN 'Jul'
WHEN 8 THEN 'Aug'
WHEN 9 THEN 'Sep'
WHEN 10 THEN 'Oct'
WHEN 11 THEN 'Nov'
WHEN 12 THEN 'Dec'
END AS MonthName
,e.FCR AS FCRCases
,e.Cases AS TotalCases
,CASE
WHEN [month] IN (11, 12, 1) THEN 1
WHEN [month] IN (2, 3, 4) THEN 2
WHEN [month] IN (5, 6, 7) THEN 3
WHEN [month] IN (8, 9, 10) THEN 4
END AS 'Quarter'
--,CONVERT(DECIMAL(18, 2),(e.FCR/e.Cases)*100) AS FCRRaw
from e
order by YEAR, MONTH
**************2nd query*************
WITH a AS (
SELECT
clientid,
DATEPART(year, row_date) AS 'Year',
DATEPART(month, row_date) AS 'Month',
value,
CASE metricid WHEN 56 THEN 'numerator' ELSE 'denominator' END AS metric
FROM XXXXXXX.[Values] AS V
WHERE metricid IN (56, 10)
--WHERE metricid IN (11,16)
AND row_date BETWEEN '2013-10-01' AND '2014-02-01'
AND value IS NOT NULL)
, b AS (
SELECT clientid ,
Year ,
Month ,
value AS 'numerator',
metric
FROM a
WHERE metric = 'numerator')
, c AS (
SELECT clientid ,
Year ,
Month ,
value AS 'denominator',
metric
FROM a
WHERE metric = 'denominator')
, d AS (
SELECT b.YEAR, b.MONTH, c.denominator, b.numerator
FROM b INNER JOIN c
ON c.clientid = b.clientid
AND c.[YEAR] = b.[year]
AND c.[month] = b.[month]
WHERE c.denominator <> 0 AND b.numerator <> 0
, e AS (
SELECT [Year], [Month], SUM(numerator) AS numerator, SUM(denominator) AS denominator
FROM d
GROUP BY [Year], [Month]
SELECT *,
CASE
WHEN [month] IN (11, 12, 1) THEN 1
WHEN [month] IN (2, 3, 4) THEN 2
WHEN [month] IN (5, 6, 7) THEN 3
WHEN [month] IN (8, 9, 10) THEN 4
END AS 'Quarter'
FROM e
ORDER BY 1,2
******************3rd query**************
WITH a AS (
SELECT --L.[LocationGroupId],
-- T.locationid,
-- T.AccountId,
TR.datestamp,
/*Convert(NVARCHAR, DatePArt(year, TR.datestamp)) + '-' + Convert(NVARCHAR, DatePArt(month, TR.datestamp)) + '-01'*/
TR.Period AS ValueDate,
CASE WHEN TR.TargetResultState = 0 THEN 0 WHEN TR.TargetResultState = 1 THEN 1 WHEN TR.TargetResultState = 2 THEN 1 ELSE 0 END AS Met,
CASE WHEN CONVERT(DATE, Convert(NVARCHAR, DatePArt(year, TR.datestamp)) + '-' + Convert(NVARCHAR, DatePArt(month, TR.datestamp)) + '-01') > T.Startdate AND CONVERT(DATE, Convert(NVARCHAR, DatePArt(year, TR.datestamp))
+ '-' + Convert(NVARCHAR, DatePArt(month, TR.datestamp)) + '-01') < T.Enddate THEN 1 ELSE 0 END AS ActiveTarget
FROM XXXXXX AS TR
INNER JOIN dbo.Target T ON TR.TargetID = T.ID
--INNER JOIN dbo.Location L ON T.Locationid = L.Id
WHERE --locationid <> - 1 AND
TR.Period IN ('201306', '201307', '201308', '201309', '201310', '201311', '201312', '201401'))
select ValueDate, SUM(Met) AS Met, Count(ActiveTarget) AS ActiveTargets,
right(ValueDate,2) as Month
,left(ValueDate,4) as Year
,CASE
WHEN right(ValueDate,2) IN (11, 12, 1) THEN 1
WHEN right(ValueDate,2) IN (2, 3, 4) THEN 2
WHEN right(ValueDate,2) IN (5, 6, 7) THEN 3
WHEN right(ValueDate,2) IN (8, 9, 10) THEN 4
END AS 'Quarter'
from a
group by ValueDate
order by ValueDate -
Hi everyone,
i'm fairly new to RAID scene and i need help for creating RAID 5 with 8 disk's.
I have HP ProLiant DL380 G6 with 8 disk's, each 500 GB.
i'm trying to create RAID 5 and to have one spare disk. I have made array from 7 disk and then create logical drive.
the last disk (8-th) i used as spare.
up to now i think i'm ok???
what confuse me is:
7 HDD X 500GB= 3500GB
after creating array i get 3200 GB, where i lose 300 GB??
after creating logical drive i get 2700 GB, where i lose 500 GB???
from 2700GB i give 150GB for system partition and for data storage i have only 2550 GB.
Why i lose 800GB??
Can someone explain me how RAID 5 works, do i create it correctly and why i lose so much space???
Is there other way to create RAID 5 without losing so much space?
Thanks you in advnce.The first 'loss' you encounter (300MB) is due to megabyte counting/rounding. A 500GB disk contains about 500.000.000 bytes. This quite a bit less than if counted properly using binary. you loose about 24288000 bytes per disk this way!
http://en.wikipedia.org/wiki/Mibibyte |
http://en.wikipedia.org/wiki/Megabyte
the second loss is due to how raid works.in raid 5 data is written to multiple disks to improve reliability. the simplies t form uses 3 disks: a write will cause half of the data to be written to disk 1, half to disk 2 and the XOR of both datahalfs to disk
3. In this scenario you will loose 33% of storage space and you can loose up to one of 3 disks.
By adding more disks, data can be spread more and the ratio available/raw will increase, or you can write aditionnal crc data and increase resliency for failures.
http://en.wikipedia.org/wiki/RAID
To check the exact algoritmes using on you RAID adapter, I would recommend contacting the vendor (or checking their support site) From your numbres, I do not think you will be able to configure RAID 5 on the same disks and having more available
space for your data.
MCP/MCSA/MCTS/MCITP -
Need help in creating multiple signature forms?
need help in creating multiple signature forms that can be digitally signed in adobe reader
Automator gets a bit unweildy when trying to vary things outside of what the actions provide. Since you are already using an AppeScript in your workflow, might as well do the whole thing:
set baseFolder to (path to desktop) -- the location to create the folder
display dialog "Please provide a new folder name:" default answer "test"
set folderName to text returned of the result
repeat -- keep repeating until a number is returned
display dialog "How many subfolders?" default answer "5"
set theNumber to text returned of the result
try -- test the result
set theNumber to theNumber as integer
exit repeat -- success
end try
end repeat
tell application "Finder"
try -- make new folder
set newFolder to (make new folder at baseFolder with properties {name:folderName})
on error number -48 -- skip errors if the folder is already there
set newFolder to ((baseFolder as text) & folderName) as alias
end try
repeat with X from 1 to theNumber
try -- make new subfolder
make new folder at newFolder with properties {name:folderName & X}
on error number -48 -- skip errors if the folder is already there
end try
end repeat
end tell -
Create Report with CR4E and XML Data Source
Hi all,
I have a problem when create a report with CR4E that should use a XML data source. It is not possible to choose fields from the field explorer, because ther are no fields from the XML-file. Is there a general problem when using an ODA data source in CR4E? At the moment I can only create reports with a database as data source.
Please help me with a tip.
Thanks
ArnoldHi,
After Installing CR4E Version 2 the code snippet for creating a XML-report not works as JSP. Has anywhere a hint to resolve the problem or a complete JSP-file?
reportClientDocument = new ReportClientDocument();
java.lang.NoClassDefFoundError: com/crystaldecisions/reports/common/data/CrystalResultSet
com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.<init>(Unknown Source)
org.apache.jsp.XMLDataSource_jsp._jspService(XMLDataSource_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Thanks
Arnold Meier -
Need help on Oracle Report format
Hi,
I need help on Oracle Reports. I am generating a report in excel sheet. I have a column which is 13 digit number (In database it is CHAR datatype). In excel sheet it showing some thing like 9.78381E+12. I want to show complete number like 9783805591331.
Also sometimes leading zero's are not showing when my column values is something like 0098794859583. I need to show the leading zero's as well in excel without losing them.
Below are the parameters i am using for the report
DESFORMAT=SPREADSHEET AND DESTYPE=FILE
My Oracle 9i developer version.
Any help on this would be much appreciated.
Thanks
KishoreAn additional quote string ' character with the number field will solve this problem but if u want to display this field in report then it will look ugly
'''||yourfield from table; check ur regional settings also
plz mark it helpful correct if it is
Maybe you are looking for
-
Project does not play correctly.
This is kind of related to another post http://discussions.apple.com/thread.jspa?threadID=1697615&tstart=0 of mine. I moved my iMovie Events folder from my local HD to an external hard disk but left the iMovie Projects folder alone. I placed an alias
-
Long run time with ORDER by clause
Hi, I am having a query which is executing fine(in 2 mins) but when i am using order by clause in it, its taking around 13 mins. Can anyone suggest what could be th reason and how to execute the same query are get the ordered record? thanks.
-
Change the Filename of an Interactive Form
We have a SmartForms PDF displayed in an INTERACTIVE_FORM. Is there any way to change the filename? When our users save the PDF it is always called "F.PDF" which is a bit silly.
-
I am working with WLS 6.1 SP1 & SP2. I defined two Domain and they are working fine. In both Domains are different managed servers depending the different security realms. I can already manage the two domain from one Admin server. My Problem is how t
-
Application hangs in STOPPING status - NW04s
Occassionally, when manually stopping an application from the deploy service inside of Visual Administrator, the application stays in a STOPPING status. The only way that we have been able to get it out of this STOPPING status is to restart the enti