Retroactive values for remunaration statement
Hi,
We are developing a new form to print remuneration statement in the HR module, but we could not find the table were retroactive values are store. We can print all the other information, but retroactive amounts are not founded. We have 4.7 version
Could anyone help us?
Thanks
You need to just call all the wage types into the form and the rectoactive related payments and deductions will be automatically populated.Thanks.
Similar Messages
-
How to get accurate values for select statement using single column
Hi All,
Below is my query which runs fine
Select Distinct Top 4
FiscalYearId,
FiscalMonthOfYearId
From ODS.Common.tODS_Date
Inner Join
UTL.Utility.tUTL_ProcessDate
On tODS_Date.DateShort < tUTL_ProcessDate.ProcessDate
And tUTL_ProcessDate.DatabaseName = 'ODS'
Order By
FiscalYearId Desc,
FiscalMonthOfYearId Desc
Below is the generate output
FiscalYearId FiscalMonthOfYearId
2014 2
2014 1
2013 12
2013 11
But i want to use this query in one of my where clause condition as its being used in the where clause it can only return 1 row.So, i tried something like this
Select Distinct Top 4
FiscalMonthOfYearId
From ODS.Common.tODS_Date
Inner Join
UTL.Utility.tUTL_ProcessDate
On tODS_Date.DateShort < tUTL_ProcessDate.ProcessDate
And tUTL_ProcessDate.DatabaseName = 'ODS'
Order By
FiscalMonthOfYearId Desc
And the result set of this one gives me the output like
FiscalMonthOfYearId
12
11
10
9
Which is not correct,( if you see the result set above).
Can someone please help me with any ides on this.If you want to use this query in the WHERE clause, then use it with EXISTS option which allows to return more than 1 column.
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles -
[svn:fx-trunk] 10831: Fix for databound state-specific values.
Revision: 10831
Author: [email protected]
Date: 2009-10-02 12:01:39 -0700 (Fri, 02 Oct 2009)
Log Message:
Fix for databound state-specific values.
QE notes: None
Doc notes: None
Bugs: SDK-23525
Reviewer: Paul
Tests run: Checkin, States (Mustella)
Is noteworthy for integration: No
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-23525
Modified Paths:
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/StatesModel.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.ja va -
Legal values for state of UIButton
The documentation defines (for objective-c) the state of an UIButton to be of type UIControlState - which is a simple enumeration. However, in my event-routine I observe that it may assume logical ors of the values defined for UIControlState. This then creates confusion for the correct use of the method setTitle:forState
For simplicity I have written the following test-event-routine:
- (IBAction)siteEdit:(id)sender {
_editButton.selected = !_editButton.selected;
NSLog(@"state:%d",_editButton.state);
if (_editButton.state & UIControlStateSelected) {
[_editButton setTitle:@"Done" forState: UIControlStateSelected];
else {
[_editButton setTitle:@"edit" forState: UIControlStateSelected];
and I use a second button to show the value of _editButton.state. What I observe:
Inside the event routine siteEdit, state toggles between (UIContolStateHighlighted) and (UIContolStateHighlighted | UIControlStateSelected) or 1 and 5 respectively, if using numbers.
Outside the event routine, state toggles between 0 and 4 or UIControlStateSelected=4 and UIControlStateNormal=0
The title corresponding to state UIControlStateSelected is never displayed. No "Done" and no "edit". Instead, the title toggles between the value set in the IB and 3 dots - the latter when state is Selected.
Is this a bug or do I misunderstand something?You are close, but you have x and y backwards (x or Longitude in this case is always first):
l_sdo_geometry_point :=SDO_GEOMETRY (2001,8265,sdo_point_type (-98,38,NULL),NULL,NULL);
Or to quickly check:
SQL> SELECT SDO_CS.TRANSFORM (SDO_GEOMETRY (2001,
2 8265,
3 SDO_POINT_TYPE (-98, 38, NULL),
4 NULL,
5 NULL), 26978)
6 FROM DUAL;
SDO_CS.TRANSFORM(SDO_GEOMETRY((SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES
SDO_GEOMETRY(2001, 26978, SDO_POINT_TYPE(443913.251008515, 548097.758430608, *), *, *) -
Why Optimizer Skipping PK index for more values of IN statement?
Hi
Oracle10g R2
I got a simple table of 2 columns. total Rows 440
1st column 'c1' of datatype number is primary key.
when i execute query with IN statement contain 6 values to compare with c1
where c1 IN (1270030,4474731,5530840,1295700,343266,44423434)
it use index and when i use 7 and more then 7 values in IN statement it bypass index.
Experts please advise is it Oracle default behaviour due to my less rows 440 only , or I need to do something more to ensure index base scan?
Thank1) Oracle does I/O by blocks and not by rows. A decision on FTS or not depends (not only) on the number of blocks and not rows. If it's not a IOT table please verify index clustering factor.
2) If table blocks are less (under HWM) than DB_FILE_MULTIBLOCK_READ_COUNT (a single I/O call), a FTS may be cheaper.
3) You can always look under the hood with 10053 event and try to understand CBO behavior.
Regards,
Luis Marques -
How to pass values in select statement as a parameter?
Hi,
Very simple query, how do I pass the values that i get in the cursor to a select statement. If table1 values are 1,2,3,4 etc , each time the cursor goes through , I will get one value in the variable - Offer
So I want to pass that value to the select statement.. how do i do it?
the one below does not work.
drop table L1;
create table L1
(col1 varchar(300) null) ;
insert into L1 (col1)
select filter_name from table1 ;
SET SERVEROUTPUT ON;
DECLARE
offer table1.col1%TYPE;
factor INTEGER := 0;
CURSOR c1 IS
SELECT col1 FROM table1;
BEGIN
OPEN c1; -- PL/SQL evaluates factor
LOOP
FETCH c1 INTO offer;
EXIT WHEN c1%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(offer);
select * from table1 f where f.filter_name =:offer ;
factor := factor + 1;
DBMS_OUTPUT.PUT_LINE(factor);
END LOOP;
CLOSE c1;
END;Hi User,
You are looking somethuing like this, as passing the values to the Cursor as a Paramter.
DECLARE
CURSOR CURR (V_DEPT IN NUMBER) --- Cursor Declaration which accepts the deptno as parameter.
IS
SELECT *
FROM EMP
WHERE DEPTNO = V_DEPT; --- The, Input V_DEPT is passed here.
L_EMP EMP%ROWTYPE;
BEGIN
OPEN CURR (30); -- Opening the Cursor to Process the Value for Department Number 30 and Processing it with a Loop below.
DBMS_OUTPUT.PUT_LINE ('Employee Details for Deptno:30');
LOOP
FETCH CURR INTO L_EMP;
EXIT WHEN CURR%NOTFOUND;
DBMS_OUTPUT.PUT ('EMPNO: ' || L_EMP.EMPNO || ' is ');
DBMS_OUTPUT.PUT_LINE (L_EMP.ENAME);
END LOOP;
CLOSE CURR;
DBMS_OUTPUT.PUT_LINE ('Employee Details for Deptno:20'); -- Opening the Cursor to Process the Value for Department Number 20
OPEN CURR (20);
LOOP
FETCH CURR INTO L_EMP;
EXIT WHEN CURR%NOTFOUND;
DBMS_OUTPUT.PUT ('EMPNO: ' || L_EMP.EMPNO || ' is ');
DBMS_OUTPUT.PUT_LINE (L_EMP.ENAME);
END LOOP;
CLOSE CURR;
END;Thanks,
Shankar -
Re: [iPlanet-JATO] Null values in Callable Statements
Kostas--
We have observed null pointer Exception when when executing Stored
Proc Models with a null parameter value.By the way, I've made the change that you suggested in your post back on the
21st and it will be in an upcoming release. I've changed line 472 of
StoredProcModelBase.java from this:
if (value==null || UNILATERALLY_REGISTER_INPUT_TYPE)
statement.setObject(i+1,value,descriptors.getSQLType());
else
statement.setObject(i+1,value);
to this:
if (value==null)
statement.setNull(i+1,descriptors[i].getSQLType());
else
if (UNILATERALLY_REGISTER_INPUT_TYPE)
statement.setObject(i+1,value,descriptors[i].getSQLType());
else
statement.setObject(i+1,value);
Thanks for the info, and keep 'em coming!
Todd
Todd Fast
Senior Engineer
Sun/Netscape Alliance
todd.fast@e...Hi,
I wanted to know how the getValues() method works the reason being,
when the tiled view is NOT bound to a model, it populates all the
fields with the same name as some thing like
PageDetail.rDetail[0].tbFieldValue
PageDetail.rDetail[0].tbFieldValue
in which case, the getValues() method works fine.
But in case where the tiled view is bound to a model, it populates
with different field names such as,
PageDetail.rDetail[0].tbFieldValue
PageDetail.rDetail[1].tbFieldValue
in this case, the getValues() doesn't work. Any soultion to this?
We are using Moko 1.1.1.
thanks in advance,
raju.
--- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
Does anyone know of is there a single method to get all values of a
display
field in a tiled view without having to iterate through all the
values ie
resetTileIndex() / nextTile() approach.
ie Something that returns an Object[] or Vector just like ND returned a
CspVector. I tried using the getValues() methods but that allways returns
a
single element array containing the first element.
(I think now, that method is used for multi selecteable ListBoxes)Actually, no. We can add this in the next patch, but for now, I'd recommend
creating a simple utility method to do the iteration on an arbitrary model
and build the list for you.
Todd -
I'm having some difficulty with transferring images from a UDP Client to a UDP Server. The issue is receiving the bytes necessary to update an original image sent from the Client to the Server and updating the Servers List(Of Byte) with the
new bytes replacing bytes in that list. This is a simplex connection where the Sever receives and the Client sends to utilize the least amount of bandwidth for a "Remote Desktop" style application where the Server side needs image updates of whatever
occurs on the Client desktop.
So far I can tranfer images with no issue. The images can be be any image type (.Bmp, .Gif, .JPeg, .Png, etc). I was working with sending .JPeg's as they appear to be the smallest size image when a Bitmap is saved to a memory stream as type
.JPeg. And then I am using GZip to compress that byte array again so it is much smaller. However on a loopback on my NIC the speed for sending a full size screen capture is not very fast as the Server updates fairly slowly unless the Clients screen capture
Bitmap is reduced in size to about 1/3'd of the original size. Then about 12000 bytes or less are sent for each update.
Due to .JPeg compression I suppose there is no way to get the difference in bytes between two .JPegs and only send those when something occurs on the desktop that alters the desktop screen capture image. Therefore I went to using .Bmp's as each
.Bmp contains the same number of bytes in its array regardless of the image alterations on the desktop. So I suppose the difference in bytes from a second screen capture and an inital screen capture are what is different in the second image from the initial
image.
What I have done so far is save an initial Bitmap of a screen capture using a memory stream and saving as type .Bmp which takes less than 93 milliseconds for 4196406 bytes. Compressing that takes less than 118 milliseconds to 197325 bytes for
the current windows on the desktop. When that is done PictureBox1 is updated from nothing to the captured image as the PictureBox's background image with image layout zoom and the PictureBox sized at 1/2 my screens width and 1/2 my screens height.
Then I save a new Bitmap the same way which now contains different image information as the PictureBox is now displaying an image so its back color is no longer displayed (solid color Aqua) and the cursor has moved to a different location. The
second Bitmap is also 4196406 in bytes and compressed it was 315473 bytes in size.
I also just found code from this link Converting a Bitmap to a Byte Array (and Byte Array to Bitmap) which gets a byte array
directly from a Bitmap and the size of that is 3148800 for whatever is full screen captured on my laptop. So I should be able to work with smaller byte arrays at some point.
The issue I'm having is that once the Client sends an image of the desktop to the Server I only want to update the server with any differences occuring on the Clients desktop. So what I have done is compare the first screen captures bytes (stored
in a List(Of Byte)) to the second screen captures bytes (stored in a List(Of Byte)) by using a For/Next for 0 to 4196405 where if a byte in the first screen captures List is not equal to a byte in the second screen captures List I add the index and byte of
the second screen captures list to a Dictionary(Of Integer, Byte). The Dictionary then only contains the indexes and bytes that are different between the first screen capture and second screen capture. This takes about 125 milliseconds which I think is pretty
fast for 4196406 byte comparison using a For/Next and adding all the different bytes and indexes for each byte to a Dictionary.
The difference in Bytes between the inital screen capture and the second screen capture is 242587 as an example which changes of course. For that amount of bytes the Dictionary contains 242587 integers as indexes and 242587 bytes as different
bytes totaling 485174 bytes for both arrays (keys, values). Compressed the indexes go from 242587 to 43489 bytes and the values go from 242587 to 34982 bytes. Which means I will have to send 78, 481 bytes from the Client to the Server to update the display
on the server. Quite smaller than the original 4196406 bytes of the second Bitmap saved to type .Bmp or the compressed size of that array which was 315473 bytes. Plus a few bytes I add as overhead so the server knows when an image array ends and how many packets
were sent for the array so it can discard complete arrays if necessary since UDP is lossfull although probably not so much in current networks like it may originally have been when the internet started.
In reality the data from the Client to the Server will mostly be the cursor as it moves and updating the Server image with only a few hundred bytes I would imagine at a time. Or when the cursor selects a Button for example and the Buttons
color changes causing those differences in the original screen capture.
But the problem is if I send the Dictionaries Indexes and Bytes to the Server then I need to update the original Bitmap List(Of Byte) on the server by removing the Bytes in the received informations Index locations array from the Servers Bitmap
List(Of Byte) and replacing those Bytes with the Bytes in the received informations Byte array. This takes so long using a For/Next for however many indexes are in the received informations Index array to update the Bitmap List(Of Byte) on the server using
"Bmp1Bytes.RemoveAt(Index As Integer)" followed by "Bmp1Bytes.Insert(Index As Integer, Item As Byte)" in the For/Next.
I've tried various For/Next statements including using a new List(Of Byte) with If statements so If the the integer for the For/Next ='s the Key in a Dictionary(Of Integer, Byte) using a Counter to provide the Dictionaries Key value then
the Dictionaries byte value will be added to the List(Of Byte) and the counter will increas by one Else the List(Of Byte) adds the original "Bmp1Bytes" byte at that index to the new List(Of Byte). This takes forever also.
I also tried the same For/Next adding to a new Dictionary(Of Integer, Byte) but that takes forever too.
I think I could use RemoveRange and AddRange to speed things up. But I don't know how to retrieve a contiguous range of indexes in the received indexes that need to be updated in the servers "Bmp1Bytes" List(Of Byte) from the received
array of indexes and bytes which are in a Dictionary(Of Integer, Byte). But I believe this would even be slower than some realistic method for replacing all Bytes in a List(Of Byte) when I have the indexes that need to be replaced and the bytes to replace
them with.
Even if I just used AddRange on a new List(Of Byte) to add ranges of bytes from the original "Bmp1Bytes" and the changes from the Dictionary(Of Integer, Byte) I think this would be rather slow. Although I don't know how to do that
by getting contiguous ranges of indexes from the Dictionaries keys.
So I was wondering if there is some method perhaps using Linq or IEnumerable which I've been unable to figure anything out which could do this.
I do have some copy and pasted code which I don't understand how it works that I am using which I would guess could be altered for doing something like this but I can't find information that provides how the code works. Or even if I did
maybe I can't understand it. Like the code below which is extremely fast.
Dim strArray() As String = Array.ConvertAll(Of Integer, String)(BmpComparisonDict.Keys.ToArray, Function(x) x.ToString())
La vida locaMonkeyboy,
That was quite a bit to read, but still a bit unclear. Could you put a specific list of goals/questions, asked in the smallest possible form?
It seems like either you're making a program that monitors activity on your computer, or you're writing some kind of remote pc app.
When you do get your bytes from using lockbits, keep in mind all the files header info would be lost. I think retaining the header info is worth the extra bytes.
The other, thing: I'm not sure if you're taking 32bpp screen shots, but also keep in mind that the "whole desktop" is the final destination for blended graphics, if that makes sense. What I mean is that there is no need to capture an "alpha"
channel for a desktop screenshot, as alpha would always be 255, this could save you 1 byte per pixel captured... Theres nothing "behind" the desktop, therefore no alpha, and every window shown above the desktop is already blended. I suggest using
24Bpp for a full screen capture.
Your X,Y information for the mouse could be stored as UINT16, this would save you a measly 2 bytes per location update/save.
When you update your byte arrays, maybe you can turn the array into a stream and write to whatever index, however many bytes, that should prevent a "Shift" of bytes, and instead overwrite any bytes that "get in the way".
ex
Dim example As String = "This is an example."
Dim insertString As String = "was"
Dim insertBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(insertString)
Dim bytes As Byte() = System.Text.Encoding.ASCII.GetBytes(example)
Dim modifiedBytes As Byte() = {}
Using ms As New System.IO.MemoryStream(bytes)
ms.Position = 5
ms.Write(insertBytes, 0, 3)
modifiedBytes = ms.ToArray
End Using
Dim newString As String = System.Text.Encoding.ASCII.GetString(modifiedBytes)
'Notice how below there isn't the word "is" anymore, and that there isn't a
'space.
'This demonstrates that you overwrite existing data, versus shifting everything to
'the right.
'Returns: This wasan example.
MsgBox(newString)
“If you want something you've never had, you need to do something you've never done.”
Don't forget to mark
helpful posts and answers
! Answer an interesting question? Write a
new article
about it! My Articles
*This post does not reflect the opinion of Microsoft, or its employees.
Well it's too much to read. I was really tired when I wrote it. Even the below is too much to read but perhaps gets the point across of what I would like to do which I think
Joel Engineer may have answered but I'm not sure. As I'm still too tired to understand that yet and research what he said in order to figure it out yet.
But maybe the code below can provide the concept of the operation with the comments in it. But seeing as how I'm still tired it may be confused.
Option Strict On
Imports System.Windows.Forms
Imports System.IO
Imports System.IO.Compression
Imports System.Drawing.Imaging
Imports System.Runtime.InteropServices
Public Class Form1
Dim Bmp1Bytes As New List(Of Byte)
Dim Bmp1BytesCompressed As New List(Of Byte)
Dim Bmp2Bytes As New List(Of Byte)
Dim BmpComparisonDict As New Dictionary(Of Integer, Byte)
Dim BmpDifferenceIndexesCompressed As New List(Of Byte)
Dim BmpDifferenceBytesCompressed As New List(Of Byte)
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
SomeSub()
End Sub
Private Sub SomeSub()
' Pretend this code is in UDP Client app. A screen capture is performed of the desktop. Takes about 90 milliseconds.
Bmp1Bytes.Clear()
Using BMP1 As New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
Using g1 As Graphics = Graphics.FromImage(BMP1)
g1.CopyFromScreen(0, 0, 0, 0, BMP1.Size)
Cursor.Draw(g1, New Rectangle(Cursor.Position.X, Cursor.Position.Y, Cursor.Size.Width, Cursor.Size.Height))
Using MS As New MemoryStream
BMP1.Save(MS, System.Drawing.Imaging.ImageFormat.Bmp)
Bmp1Bytes.AddRange(MS.ToArray)
End Using
End Using
End Using
Bmp1BytesCompressed.AddRange(Compress(Bmp1Bytes.ToArray))
' UDP Client app sends Bmp1BytesCompressed.ToArray to UDP Server which is the entire image of the desktop that the UDP
' Client is on. This image takes awhile to send since compressed it is about 177000 bytes from over 4000000 bytes.
' I will be using different code just to get the bytes from the actual Bitmap in the future. That is not important for now.
' Pretend the UDP Server has received the bytes, decompressed the array received into a List(Of Byte) and is displaying
' the image of the UDP Clients desktop in a PictureBox.
' Now the image on the UDP Clients desktop changes due to the mouse cursor moving as an example. Therefore a new Bitmap
' is created from a screen capture. This takes about 90 milliseconds.
Bmp2Bytes.Clear()
Using BMP2 As New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
Using g1 As Graphics = Graphics.FromImage(BMP2)
g1.CopyFromScreen(0, 0, 0, 0, BMP2.Size)
Cursor.Draw(g1, New Rectangle(Cursor.Position.X, Cursor.Position.Y, Cursor.Size.Width, Cursor.Size.Height))
Using MS As New MemoryStream
BMP2.Save(MS, System.Drawing.Imaging.ImageFormat.Bmp)
Bmp2Bytes.AddRange(MS.ToArray)
End Using
End Using
End Using
' Now I have the original images bytes in Bmp1Bytes and the new images bytes in Bmp2Bytes on the UDP Client. But I don't
' want to send all of the bytes in Bmp2Bytes to the UDP Server. Just the indexes of and the bytes that are different in
' Bmp2Bytes from Bmp1Bytes.
' This takes less than 100 milliseconds for what I've tested so far where over 500000 bytes in Bmp2Bytes are different
' than the bytes in Bmp1Bytes. Usually that amount would be much less. But during testing I was displaying the image
' from Bmp1 bytes in a PictureBox so a large amount of data would change between the first screen shot, the PictureBox
' then displaying an image on the same PC and then the second screen shot.
BmpComparisonDict.Clear()
For i = 0 To Bmp1Bytes.Count - 1
If Bmp1Bytes(i) <> Bmp2Bytes(i) Then
BmpComparisonDict.Add(i, Bmp2Bytes(i))
End If
Next
' So now I have all the difference bytes and their indexes from Bmp2Bytes in the BmpComparisonDict. So I compress
' the indexes into on List and the Bytes into another List.
BmpDifferenceIndexesCompressed.Clear()
BmpDifferenceBytesCompressed.Clear()
BmpDifferenceIndexesCompressed.AddRange(Compress(BmpComparisonDict.Keys.SelectMany(Function(d) BitConverter.GetBytes(d)).ToArray()))
BmpDifferenceBytesCompressed.AddRange(Compress(BmpComparisonDict.Values.ToArray))
' Now pretend the UDP Client has sent both those arrays to the UDP Server which has added both decompressed arrays
' to a Dictionary(Of Integer, Byte). And the server has the original image decompressed bytes received in a List
' called Bmp1Bytes also.
' This is where I am stuck. The UDP Server has the Dictionary. That part was fast. However there is no
' fast method I have found for creating a new List(Of Byte) where bytes in the originally received List(Of Byte) that
' do not have to be altered are placed into a new List(Of Byte) except for the indexes listed in the
' Dictionary(Of Integer, Byte) that need to be placed into the appropriate index locations of the new List(Of Byte).
' The below example for doing so is exceptionally slow. Pretend UpdateDictionary has all of the decompressed indexes
' and bytes received by the UDP Server for the update contained within it.
Dim UpdateDictionary As New Dictionary(Of Integer, Byte)
Dim UpdatedBytes As New List(Of Byte)
Dim Counter As Integer = 0
For i = 0 To Bmp1Bytes.Count - 1
If i = UpdateDictionary.Keys(Counter) Then ' Provides the index contained in the Keys for the Dictionary
UpdatedBytes.Add(UpdateDictionary.Values(Counter))
Counter += 1
If Counter > UpdateDictionary.Count - 1 Then Counter = 0
Else
UpdatedBytes.Add(Bmp1Bytes(i))
End If
Next
' So what I'm trying to do is find an extremely fast method for performing something similar to what the
' above operation performs.
End Sub
Private Function Compress(BytesToCompress() As Byte) As List(Of Byte)
Dim BytesCompressed As New List(Of Byte)
Using compressedStream = New MemoryStream()
Using zipStream = New GZipStream(compressedStream, CompressionMode.Compress)
zipStream.Write(BytesToCompress, 0, BytesToCompress.Count)
zipStream.Close()
BytesCompressed.AddRange(compressedStream.ToArray)
End Using
End Using
Return BytesCompressed
End Function
Private Function Decompress(BytesToDecompress() As Byte) As List(Of Byte)
Dim BytesDecompressed As New List(Of Byte)
Using DecompressedStream = New MemoryStream()
Using zipStream = New GZipStream(DecompressedStream, CompressionMode.Decompress)
zipStream.Write(BytesToDecompress, 0, BytesToDecompress.Count)
zipStream.Close()
BytesDecompressed.AddRange(DecompressedStream.ToArray)
End Using
End Using
Return BytesDecompressed
End Function
End Class
La vida loca -
How to pass multiple MDX values for a single parameter into a drill-through report?
I'm thinking this will be an easy question for any experienced SSRS/MDX developers, at least I hope so! I've created a report that gives the user the option to choose viewing data for the current/active week, or YTD. Depending on which link the
user selects, the report simply calls itself and needs to pass in the parameter value for Active week. If it's active week, the parameter value will simply be "true". If it's YTD, the parameter value needs to be both "True" and "False" so the current
week's data is accounted for as well. I've set everything up except for the final step, and I have no idea what to type into the Value field below. I've tried different things: false, as you see below (it errors saying I'm missing the parameter
value), the value in MDX format: =[School Dates].[Active Week].&[True] (it said I was missing a bracket), a 1 instead of the word true (again, missing a parameter value). Nothing is working.
So my question is kindof two-fold: 1) how do you pass in the value at all and 2) more specifically, how do you pass in multiple values (both true & false) ??I'm sorry for being so dense, but I'm not quite following, although what I've tried makes me think if I can follow you, it will work :)
To answer your initial questions, you are correct with both your assumptions:
1) detailType is the parameter that specificies YTD/Weekly, this is a "report defined" parameter that I am using to determine which Row Group to display (either YTD or Weekly)
2) SchoolDaysActiveWeek is the parameter that is being set to either true or false -- this is a field in the cube that states whether that record is for the current week or not
So in following your instructions, well that's the problem I'm not quite following :)
1) When you say Delete the SchoolDaysActiveWeek parameter from the report only, do you mean to mark the parameter as Hidden? If so, I've done this.
2) I'm not quite sure where to use the statement you provided me. You said to put it in the dataset, but I don't know which dataset. I assume you mean the "main" dataset (as opposed to the hidden dataset that gets generated when you mark a field
as a parameter). If this is the case, the only place I could see that would allow you to use such a statement is in the Filter section of the properties. I tried this, and it did not generate any errors, but it also kept my report groups from displaying
-- it just showed a blank report, so I think it probably wasn't bringing back any rows to populate them with.
I also tried going into the Expression section for the SchoolDaysActiveWeek parameter in the second screenshot and placing the statement there. When I did this and ran the report, I would get the following error:
The 'SchoolDaysActiveWeek' parameter is missing a value
So what am I missing!?
Also, thanks for taking the time to respond!! -
How to set default value for vc2_255_arr in plsql parameter directive?
Hi,
I would like to set a default values for a plsql parameter which is of vc2_255_arr type. How to do that?
Below is the example from PL/SQL Server Page.
+" To set a default value, so that the parameter becomes optional, include a default="expression" attribute in the directive. The values for this attribute are substituted directly into a PL/SQL statement, so any strings must be single-quoted, and you can use special values such as null, as in the following example:+
+<%@ plsql parameter="p_last_name" default="null" %> "+
My plsql parameter is p_arr which is of "TYPE vc2_255_arr IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER"
*<%@ plsql parameter="p_arr" type="PMP_LIB.VC2_255_ARR" %>*
Thanks in advance!
kwongMy plsql parameter is p_arr which is of "TYPE vc2_255_arr IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER"You need to declare it in a package specification and initialize in the package body:
SQL> create or replace package pmp_lib
as
type vc2_255_arr is table of varchar2 (255)
index by binary_integer;
vc2_255_arr_default vc2_255_arr;
end pmp_lib;
Package created.
SQL> create or replace package body pmp_lib
as
begin
vc2_255_arr_default (1) := 'abc';
vc2_255_arr_default (2) := 'def';
end pmp_lib;
Package body created.
SQL> declare
arr pmp_lib.vc2_255_arr := pmp_lib.vc2_255_arr_default;
begin
for i in 1 .. arr.count
loop
dbms_output.put_line (arr (i));
end loop;
end;
abc
def
PL/SQL procedure successfully completed.so in your case it would probably be sth like (assuming pmp_lib is a package):
<%@ plsql parameter="p_arr" type="PMP_LIB.VC2_255_ARR" default = "PMP_LIB.vc2_255_arr_default" %> -
GROUP BY - Is there a way to have some sort of for-each statement?
Hi there,
This discussion is a branch from https://forums.oracle.com/thread/2614679
I data mart I created for a chain of theatres. The fact table contain information about ticket sales, and I have a some dimensions including DimClient and DimTime.
Here is an example of each table:
FactTicketPurchase
TICKETPURCHASEID
CLIENTID
PRODUCTIONID
THEATREID
TIMEID
TROWID
SUMTOTALAMOUNT
60006
2527
66
21
942
40
7
60007
2527
72
21
988
36
6
60008
2527
74
21
1001
40
6
60009
2527
76
21
1015
37
6
60010
2527
79
21
1037
39
6
DDL for FactTicketPurchase
CREATE TABLE FactTicketPurchase(
TicketPurchaseID NUMBER(10) PRIMARY KEY,
ClientID NUMBER(5) CONSTRAINT fk_client REFERENCES DimClient,
-- ProductionID NUMBER(5) CONSTRAINT fk_prod REFERENCES DimProduction,
-- TheatreID NUMBER(5) CONSTRAINT fk_theatre REFERENCES DimTheatre,
TimeID NUMBER(6) CONSTRAINT fk_time REFERENCES DimTime,
-- TRowID NUMBER(5) CONSTRAINT fk_trow REFERENCES DimTRow,
SumTotalAmount NUMBER(22) NOT NULL);
DimClient
CLIENTID
CLIENT#
NAME
TOWN
COUNTY
2503
1
LEE M1
West Bridgford
Nottingham
2504
2
HELEN W2
Hyson Green
Nottingham
2505
3
LEE M3
Lenton Abbey
Nottingham
2506
4
LORA W4
Beeston
Nottingham
2507
5
SCOTT M5
Radford
Nottingham
2508
6
MINA W6
Hyson Green
Nottingham
..cff.
DDL for DimClient
CREATE TABLE DimClient(
ClientID NUMBER(5) PRIMARY KEY,
Name VARCHAR2(30) NOT NULL);
DimTime
TIMEID
FULLDATE
YEAR
SEASON
MONTH
MONTHDAY
WEEK
WEEKDAY
817
02-MAR-10
2010
Spring
3
2
9
3
818
03-MAR-10
2010
Spring
3
3
9
4
819
04-MAR-10
2010
Spring
3
4
9
5
820
05-MAR-10
2010
Spring
3
5
9
6
821
06-MAR-10
2010
Spring
3
6
9
7
822
07-MAR-10
2010
Spring
3
7
9
1
DDL for DimTime
CREATE TABLE DimTime(
TimeID NUMBER(6) PRIMARY KEY,
Year NUMBER(4) NOT NULL,
Season VARCHAR2(20));
I have the following analysis request to perform on this data mart:
Top 5 clients by value of ticket sale for each season
For this requirement I came up with the following query:
SELECT * FROM
(SELECT FacTIC.ClientID, DimCLI.Name, SUM(SumtotalAmount) SumTotalAmount, DimTIM.Season
FROM FactTicketPurchase FacTIC, DimClient DimCLI, DimTime DimTIM
WHERE FacTIC.ClientID = DimCLI.ClientID
AND FacTIC.TimeID = DimTIM.TimeID
AND Season = 'Spring' AND Year = 2010
GROUP BY Season, FacTIC.ClientID, DimCLI.Name
ORDER BY Season ASC, SumTotalAmount DESC)
WHERE rownum <=5;
As you can see, in line 06 of the above query, I am explicitly specifying the season for the query to return.
However what I would like to do is just one query that could autocratically go through the seasons and years available in the time dimension in a fashion similar to a FOR-EACH statement. This way, if we get more years added to the time dimension, we wouldn't have to amend the query.
Is this possible?
Regards,
P.I think I fixed it!
The trick was to look into the r_num value. As soon as I added it to my query I started to see how r_num was being calculated and I realised that I had to add Season to my partition, right after Year.
SELECT Year, Season, TotalAmount, Name
FROM (
SELECT DimCLI.Name
, DimTIM.Year
, DIMTIM.Season
, SUM(FacTIC.SumTotalAmount) TotalAmount
, RANK() OVER (PARTITION BY Year, Season
ORDER BY SUM(FacTIC.SumTotalAmount) DESC
) AS r_num
FROM FactTicketPurchase FacTIC
, DimClient DimCLI
, DimTime DimTIM
WHERE FacTIC.ClientID = DimCLI.ClientID
AND FacTIC.TimeID = DimTIM.TimeID
GROUP BY DimTIM.Year
, DimTIM.Season
, DimCLI.Name
WHERE r_num <= 5 -- Need to amend this line on my data sample to show 2 rows.
ORDER BY Year, Season, TotalAmount DESC;
Looking at my data sample, I got the following:
YEAR
SEASON
TOTALAMOUNT
CLIENTID
2010
Autumn
29
2504
2010
Autumn
26
2503
2010
Spring
25
2503
2010
Spring
14
2506
2010
Summer
26
2506
2010
Summer
26
2504
2010
Winter
28
2503
2010
Winter
26
2506
2011
Autumn
23
2506
2011
Autumn
14
2503
2011
Spring
25
2505
2011
Spring
13
2503
2011
Summer
21
2505
2011
Summer
14
2503
2011
Winter
19
2505
Now, looking at my real data, (considering the top 5 rows, not the top 2), I got:
YEAR
SEASON
TOTALAMOUNT
NAME
2010
Autumn
141
BUSH M225
2010
Autumn
140
DIANA W66
2010
Autumn
136
HANA W232
2010
Autumn
120
DIANA W220
2010
Autumn
120
WILSON M459
2010
Spring
137
DAVID M469
2010
Spring
125
ALEX M125
2010
Spring
124
PETER M269
2010
Spring
115
ZHOU M463
2010
Spring
114
TANIA W304
2010
Summer
138
JANE W404
2010
Summer
105
MINA W8
2010
Summer
97
DAVID M275
2010
Summer
96
CLINTON M483
2010
Summer
93
ANNA W288
2011
Spring
12
LUISE W20
2011
Spring
7
ANNA W432
2011
Spring
7
LEE M409
2011
Spring
7
CHRIS W274
2011
Spring
7
HELEN W136
2011
Spring
7
LILY W114
2011
Spring
7
LUISE W348
2011
Spring
7
LIU M107
2011
Spring
7
VICTORY W194
2011
Spring
7
DIANA W240
2011
Spring
7
HELEN W120
2011
Spring
7
LILY W296
2011
Spring
7
MATTHEW M389
2011
Spring
7
PACO M343
2011
Spring
7
YANG M411
2011
Spring
7
ERIC M101
2011
Spring
7
ALEX M181
2011
Spring
7
SMITH M289
2011
Spring
7
DIANA W360
2011
Spring
7
MATTHEW M63
2011
Spring
7
SALLY W170
2011
Spring
7
JENNY W258
2011
Spring
7 -
How do I autogen a value for primary key on inserts
I'm running 4.0. I am writing an app that maintains distributed database inventory information. All of my tables have surrogate numeric primary keys. I have created several report/form combinations. From the report, I can choose to create a new instance of an object; Server for instance. When I click the "Add Server >" button, the Detail page opens for me to create the new entry. On this page, I need to have the Server_ID autogenerated. I'm thinking something as simple as "Select (max(server_id)+1) from Server" should do. In fact, it looks like it is going to work because the field gets populated correctly. But, when I click the "Create" button on this page I get an error that says the Server_ID is null. Seems like the generated value isn't making it to the INSERT statement.
On the Page Definition, I have Server_ID set as Display Only and in the Source section for the attribute I have "Only when current value in session state is null" selected and "SQL Query (return single value)" selected with "Select (max(server_id)+1) from Server" in the "Source value or expresssion" field.Hi Ken,
From your description it appears you want the new server ID to be assigned and show on the page prior to collecting the rest of the information, rather than assigning it upon saving the new row. What you're doing will get the next available ID, but what happens if two or more people are entering new servers at once? There's a good chance they'll all get the same next ID.
Tony's suggestion will ensure the uniqueness of the server ID because it'll get assigned upon saving the row, rather than on display of the page where a user could leave the screen sitting there while others "take" that next ID. You can return the value that the trigger assigns for display - if you're using an Automatic Row Processing process, see the Return Key into Item setting.
If you're going to stick with your approach and just need to know how to make sure that field is included in the INSERT, you need to create a computation on that item and move your "select max..." there, and then for the server ID item change the Source Used to "Always...", Source Type to Database Column, and specify the column name from the table in the Source Value. The reason is hasn't been working is that field isn't currently mapped to the table column.
Hope this helps,
John -
Missing substitution value for variable [dispatcher.host]
Hello,
I'm getting the error message "com.sap.engine.deploy.manager.MissingSubstitutionException: Missing substitution value for variable [dispatcher.host]." if I'm trying to deploy an SCA file via SDM (remotegui.bat).
It seems that the problem is a missing variable setting. But I couldn't find any hints at the available SAP web sources which values needs to be set.
It would be really great if somebody could give me a hint which steps I need to do to solve this issue.
Many thanks in advance,
Steffen Zimmermann
Here is the whole GUI log :
==========================================================================
08/11/26 21:31:15 - ***********************************************************
08/11/26 21:31:35 - Start updating EAR file...
08/11/26 21:31:35 - start-up mode is lazy
08/11/26 21:32:45 - com.sap.engine.deploy.manager.MissingSubstitutionException: Missing substitution value for variable [dispatcher.host].
at com.sap.engine.deploy.manager.DeployManagerImpl.makeTempEar(DeployManagerImpl.java:3747)
at com.sap.engine.deploy.manager.DeployManagerImpl.makeNewEar1(DeployManagerImpl.java:3715)
at com.sap.engine.deploy.manager.DeployManagerImpl.deployUpdateAction(DeployManagerImpl.java:529)
at com.sap.engine.deploy.manager.DeployManagerImpl.deploy(DeployManagerImpl.java:513)
at com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performDeployment(EngineApplOnlineDeployerImpl.java:186)
at com.sap.sdm.serverext.servertype.inqmy.extern.EngineDeployerImpl.deploy(EngineDeployerImpl.java:96)
at com.sap.sdm.serverext.servertype.inqmy.EngineProcessor.executeAction(EngineProcessor.java:224)
at com.sap.sdm.app.proc.deployment.impl.PhysicalDeploymentActionExecutor.execute(PhysicalDeploymentActionExecutor.java:60)
at com.sap.sdm.app.proc.deployment.impl.DeploymentActionImpl.execute(DeploymentActionImpl.java:186)
at com.sap.sdm.app.proc.deployment.controllers.internal.impl.DeploymentExecutorImpl.execute(DeploymentExecutorImpl.java:48)
at com.sap.sdm.app.proc.deployment.states.eventhandler.ExecuteDeploymentHandler.executeAction(ExecuteDeploymentHandler.java:83)
at com.sap.sdm.app.proc.deployment.states.eventhandler.ExecuteDeploymentHandler.handleEvent(ExecuteDeploymentHandler.java:60)
at com.sap.sdm.app.proc.deployment.states.StateBeforeNextDeployment.processEvent(StateBeforeNextDeployment.java:127)
at com.sap.sdm.app.proc.deployment.states.InstContext.processEventServerSide(InstContext.java:73)
at com.sap.sdm.app.proc.deployment.states.InstContext.processEvent(InstContext.java:59)
at com.sap.sdm.app.view.controllers.DeployEventProcessor.processEvent(DeployEventProcessor.java:11)
at com.sap.sdm.client_server.deployserver.DeployCmdProcessor.processEvent(DeployCmdProcessor.java:264)
at com.sap.sdm.client_server.deployserver.DeployCmdProcessor.process(DeployCmdProcessor.java:108)
at com.sap.sdm.gui.server.GuiAdminRoleCmdProcessor.process(GuiAdminRoleCmdProcessor.java:72)
at com.sap.sdm.is.cs.session.server.SessionCmdProcessor.process(SessionCmdProcessor.java:67)
at com.sap.sdm.is.cs.cmd.server.CmdServer.execCommand(CmdServer.java:76)
at com.sap.sdm.client_server.launch.ServerLauncher$ConnectionHandlerImpl.handle(ServerLauncher.java:286)
at com.sap.sdm.is.cs.ncserver.NetCommServer.serve(NetCommServer.java:43)
at com.sap.sdm.is.cs.ncwrapper.impl.ServiceWrapper.serve(ServiceWrapper.java:39)
at com.sap.bc.cts.tp.net.Worker.run(Worker.java:50)
at java.lang.Thread.run(Thread.java:534)
08/11/26 21:32:45 - ***********************************************************
Nov 26, 2008 9:32:45 PM Info: End of log messages of the target system.
Nov 26, 2008 9:32:45 PM Info: ***** End of SAP J2EE Engine Deployment (J2EE Application) *****
Nov 26, 2008 9:32:45 PM Error: Aborted: development component 'Cognos8BI'/'cognos.com'/'Cog8BIFactory'/'1'/'1', grouped by software component 'Cognos8BI'/'cognos.com'/'Cog8BIFactory'/'1000.8.4.1.0.20081125093532''/'0':
Caught exception during application deployment from SAP J2EE Engine's deploy API:
com.sap.engine.deploy.manager.MissingSubstitutionException: Missing substitution value for variable [dispatcher.host].
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).DMEXC)
Nov 26, 2008 9:32:45 PM Info: Starting to save the repository
Nov 26, 2008 9:32:49 PM Info: Finished saving the repository
Nov 26, 2008 9:32:51 PM Info: Starting: Initial deployment: Selected software component 'Cognos8BI'/'cognos.com'/'Cog8BIFactory'/'1000.8.4.1.0.20081125093532''/'0' will be deployed.
Nov 26, 2008 9:32:51 PM Error: Aborted: software component 'Cognos8BI'/'cognos.com'/'Cog8BIFactory'/'1000.8.4.1.0.20081125093532''/'0':
Failed deployment of SDAs:
development component 'Cognos8BI'/'cognos.com'/'Cog8BIFactory'/'1'/'1' : aborted
Please, look at error logs above for more information!
Nov 26, 2008 9:32:51 PM Info: Starting to save the repository
Nov 26, 2008 9:32:52 PM Info: Finished saving the repository
Nov 26, 2008 9:32:53 PM Info: J2EE Engine is in same state (online/offline) as it has been before this deployment process.Thank you.
Yes, it was a really not a default variable.
Replacement of the variables directly at the archive with the correct value did solve the issue. -
Cannot determine a value for an exit variable in the Formula fn w/p empty
Hi All,
We have an exit variable Z_EX_AR_VAR, the would read a hierarchy node input variable (Z_HN_AREA), which is furthur based on a hierarchy input variable (Z_HR_AREA), and wouuld return the first leaf of it.
We have implemented a input ready query based on this exit variable and it is getting the first node and is input ready and saves the data to the database.
It works well in the query when we have filtered the characteristic with the hier and hier node and the exit variables.
We need to use the same value to be used in the Fox function.
As per the requirement, the Fox function has to process the zero (empty) records.
So, we have customized formula function to process emptry records.
And in the function of type formula function that processes empty records, we have used the following statement.
DATA AR type ZAREA.
AR = VARI ( Z_HN_AREA, HIENM=Z_HR_AREA, 1).
We are getting the following error message:
Cannot determine a value for the variable Z_HN_AREA.
Planning function ended with errors.
What is that we are doing wrong here. Is it with the 'Process Empty Records' function that cannot read the variable.
How come this variable is working in the query and it is not working in the FOX.
We have done the variable to variable binding in the WAD also. Still the same problem.
Any ideas? Thanks in advance.
Best Regards,
- Shashi
Thanks in 'Hi All,
Michael Wolf from SAP confirmed that we cannot use VARiable read functions in the customized Formula function that processes the zero (empty records) as he spoke to SAP AG about the issue.
Hence we have made a work around by creating a valid record using a dummy key figure in the Custom Formula function that processes empty records so that in the next step, the regular Formula function would get executed, where we could access the variable values by using VARV, VARI functions.
Thanks,
- Shashi -
11g-[nQSError: 42029] Subquery contains too many values for the IN predicat
Hi,
I am having 2 reports one is for subquery which returns inputs to Main report. Actually the report was working fine in 10g. But in 11g we are gettting following error:
View Display Error
Odbc driver returned an error (SQLExecDirectW).
Error Details
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 42029] Subquery contains too many values for the IN predicate.Please have your System Administrator look at the log for more details on this error. (HY000)
Please have your System Administrator look at the log for more details on this error.
Getting same error after modofying the parameter value MAX_EXPANDED_SUBQUERY_PREDICATES to 12000
Please suggest what could be the other reason it may fail or any other settings we need to check.
Regards,
ckengckeng,
Normally the IN clause has restriction of 10000 values in general sql/plsql we will go with inline queries i think model your rpd to generate inner queries
select * from emp where dept_id in (Select distinct dept_id from dept);
or have a condition/filter on sub report and make one more inner report with sub-filter but definitely it will cause performance issues.
thanks,
Saichand.v
Maybe you are looking for
-
Did you know you needed to clean your monitor from inside every 30 days??
Did you know that every 30 days it is necessary to clean the computer monitor from the inside? Many people ignore this fact and do not know how. Manufacturers take advantage of this ignorance to increase their sales click this link to learn an easy w
-
How to replace the end of a file name
I have a seriously dumb question... I have a row of thousands of file names (top-down, row a), these names are, for example, "photo-1.jpg" and I need to change the .jpg to .nef. How can I accomplish this? thanks!!
-
How does ip6 filing structure work ie. roll & data folders organization?
Can someone explain how ip6 folders/structure is layed out? When I import an image from the file/import to library what happens..? I did some house cleaning in my pics and after looking thur the structure of folders found some empty folders (in the i
-
How do I edit, delete, change a folder "untitled"
There are certain files/folders in my desktop\screensaver folder that I wish to delete. I just don't use them anymore, they're taking-up space. There are "untitled" folders that I want to Name, then... download pictures from a website to that folder.
-
I have iPhoto on my iPad and iMac how can I keep them both in sync Thanks