Connect OBIEE to a SAS data Set
Has anyone done this before? and do you know of any gotchas? I am able to see the SAS data set and my two tables, However I don't see the columns and if I try to View data I get an error saying it can't read the base tables.
Thanks
Yeah, it is actually my second post. I forgot I post once before. I just checked and LabVIEW version is 8.5.1. The FP of the child VI is hidden when the main VI is running. Could you let me know is the child VI FP is still updating if it is hidden? Thank you very much.
Jeff Bohrer wrote:
Yaqi wrote:
Hi Everyone,
It is my first Post here. I am buiding software for an autoprober and I have a large set of data (not really large actually about 640kB). There are lots of devices on the wafer so I want to minimize the time it takes to read/write data. I tried lots of different ways but it still takes me several hundred ms to perform data reading/writing, and it get slower and slower when the data set grows larger. I am using LabVIEW 8.5.1 and attached is my block diagram for testing a single die. I tried using Global variables, Local variables, Global functional variables, but I am not able to improve the performance. It is greatly appreciated if someone can help me on this problem. Thanks!
Best,
Yaqi
No, It is your second post! and LabVIEW 8.5.1 did not have an In-Place-Element structure
Now go look at the Producer Consumer (events) template. READ the examples, and undrestand the method "defer FP updates"
Sorry if that sounded harsh
Similar Messages
-
Connect Business Objects to SAS Data Set?
Has anyone ever been able to use a SAS data set as a data source for Business Objects?
I've connected to a SAS datastore in Business Objects Data Services, and it's straightforward.
What you need is to set SAS up as an ODBC server.
This can be done in 2 ways:
- Using the SAS/SHARE product on any server that is accessible from BOBJ. This is quite pricey, so maybe you should only consider this if you have a SAS/SHARE license already, or your project can pay for it.
- Using an ordinary running SAS session on the same server.
You also need to install an ODBC driver on your BOBJ server, in order to access your SAS ODBC server.
You can read about SAS ODBC on SAS Institutes website. Start here:
http://support.sas.com/documentation/cdl/en/odbcdref/63284/HTML/default/viewer.htm#p0pqrmjmkckqugn1099ywy9o8myj.htm -
Connect Crystal 11 with SAS data sets
Hi, when I try to start making a report from scratch in Crystal, first I set a connection data source with SAS data files and then when I move a field of this sets it's appera a message error; "Failed to retrieve data from the database.", and after click OK appere another error message; "Error Code: 08x00a0bb9, Source: ADODB.Command, Descrition: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."
Anyboy who help me??Hi
Are you facing this issue with a particular SAS data file? and are the arguments provided compatible with the datatypes defined?
Which version of CR are you using ?
Please let me know the above information.So that I can proceed further.
Thanks
Pradeep Hulke -
Info needed on how to design xcelsius dashboards using SAS data sets.
Is it possible to design a xcelsius dashboard using SAS data sets? Any info on this subject is highly appreciated. Thanks.
Hi,
I am not much aware of the SAS datasets, but i can definitely provide some pointers on what data Xcelsius could consume.
Assuming you use Xcelsius 2008 - you can have static data within the embedded excel sheet..
You can recieve dynamic data using
1. QAAWS
2. Web Services
3. XML data
4.Live Office
and more....I am sure some of the Gurus could provide better pointers. -
OBIEE 11g BI Publisher; New Data Set Creation Error "Failed to load SQL"
Hi,
I'm trying to create a new SQL data set (from a client machine). I use "query builder" to build the data set. But when I click "OK", it fires the error "Failed to load SQL".
But strangely, if connect to the OBIEE server's desktop and create the data set it works without any issues. I wonder this would be a firewall issue. If so what are the ports I should open.
It's a enterprise installation. And we have already open 9703, 9704, and 9706.
Has anyone came across such a situation?Talles,
First of all you might have more chance of getting a response over in the BIP forum. Other than that all I can think of is: is your MS SQL Server running with mixed mode auth? -
ERROR : Cannot get data set while connecting to BI.
Hi,
I am trying to connect to BI trouggh my application. I am following one of the document which i got from SDN. But now i am getting ERROR : Cannot get data set while connecting to BI. Can any one tell me why i am getting this error.
when i tried to excecute first time it gave the same error for the bellow given Querry. But after that it got excecuted. Then again It gave the same error. But it got excecuted twise like that after that it dint get excecuted once also.
Querry: SELECT
[Measures].MEMBERS ON AXIS(0) ,
NON EMPTY [0VENDOR].MEMBERS ON AXIS(1)
FROM [0PUR_C01/0PUR_C01_DB_Q04];
Regards,
H.V.Swathi
Edited by: H.V Swathi on Jun 1, 2009 1:33 PMHI,
Thanks for ur reply.
NO
i am using this part of code to display the result in IFrame.
IConnectionFactory connectionFactory = null;
IBIConnection connection = null;
IBIDataSet dataset = null;
// get the MDX statement entered by the User
String mdxStatement = wdContext.currentContextElement().getMDXQ();
wdComponentAPI.getMessageManager().reportSuccess("mdxStatement "+mdxStatement.toString());
// Declare a stringbuffer to store the HTML Code
StringBuffer l_strXmlFile = new StringBuffer();
wdComponentAPI.getMessageManager().reportSuccess("l_strXmlFile "+l_strXmlFile.toString());
try {
// Connect to BW System
Context initctx = new InitialContext();
// Perform JNDI lookup to obtain connection factory
wdComponentAPI.getMessageManager().reportSuccess("l_strXmlFile eeeeee ");
connectionFactory =
(IConnectionFactory) initctx.lookup(
"deployedAdapters/SDK_XMLA/shareable/SDK_XMLA");
// Establish connection using default connection properties
wdComponentAPI.getMessageManager().reportSuccess("connectionFactory "+connectionFactory);
connection =
(IBIConnection) connectionFactory.getConnectionEx(null);
wdComponentAPI.getMessageManager().reportSuccess("connection "+connection);
IBIOlap olap = ((IBIConnection) connection).getOlap();
wdComponentAPI.getMessageManager().reportSuccess("olap "+olap);
// Execute the MDX statement and retrieve the data set
// using the execute method of the IBIOlap interface.
dataset = olap.execute(mdxStatement);
wdComponentAPI.getMessageManager().reportSuccess("dataset "+dataset);
} catch (Exception e) {
e.printStackTrace();
wdComponentAPI.getMessageManager().reportException(
e.getLocalizedMessage(),
true);
} finally {
try {
connection.close();
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
if (dataset == null) {
wdContext.currentContextElement().setResult_Visibility(
WDVisibility.NONE);
} else {
wdContext.currentContextElement().setResult_Visibility(
WDVisibility.VISIBLE);
// Render the data set.
l_strXmlFile
.append("<html>")
.append("<head></head>")
.append("<body>");
// Display the MDX that has been executed.
l_strXmlFile
.append("<p><b>MDX Statement that was executed:</b><br> ")
.append("<span class=\"code\">")
.append(mdxStatement)
.append("</span> </p>");
try {
BIDataSetTableModel table =
new BIDataSetTableModel(dataset, false);
l_strXmlFile.append("<p>Result set:</p>");
l_strXmlFile.append(
"<table width=700 border=1 cellpadding=0 cellspacing=0>");
int row = table.getRowCount();
int col = table.getColumnCount();
for (int i = 0; i < row; i++) {
l_strXmlFile.append("<tr>");
for (int j = 0; j < col; j++) {
BITableItem item = (BITableItem) table.getValueAt(i, j);
l_strXmlFile.append("<td class=\"headCenter\">"); l_strXmlFile.append(Helpers.escape(item.toString()));
l_strXmlFile.append("</td>");
l_strXmlFile.append("</tr>");
l_strXmlFile.append("</table>");
l_strXmlFile.append("</body></html>"); } catch (BISQLException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
// read the stringbuffer into bytes
byte[] l_byteData = null;
try {
l_byteData = l_strXmlFile.toString().getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
wdComponentAPI.getMessageManager().reportException(
e.getLocalizedMessage(),
false);
// Create a web resource and set the value of the
// context variable "IFrameData" to it's URL
IWDCachedWebResource l_File =
WDWebResource.getWebResource(
l_byteData,
WDWebResourceType.HTML);
try {
wdContext.currentContextElement().setIFrameData(
l_File.getURL());
} catch (WDURLException e1) {
wdComponentAPI.getMessageManager().reportException(
e1.getLocalizedMessage(),
false);
Reagards,
H.V.Swathi -
No data set found when creating a report
Dear all,
This is my first time using BI Publisher, and I am stuck at a very early stage.
I have followed the various steps described in the documentation, up to creating a new report.
When I try to do so, I fail as there is no available data set in the left panel.
Another curious behaviour is that I have first to export and then import sample data as xml for the sample to be saved. Otherwise, when I just click on 'Save as Sample Data', the sample file appears to be associated with the dataset, but disappears at the next logon.
What would cause such behaviours?
Are these issues linked?
Is it a configuration/setup issue?
Or could it be a privileges/roles issue?
Cordially,
AlbainVitaly,
1. Yes, I checked "More Data Sources" - not there.
2. I tried adding the Field Definitions using Control Panel Add/Remove - no help.
I tried removing the "Field Definitions" and then adding them again - no help.
3. Another machine does have the same version of CR. It is running Vista. Problem machine is running XP.
4. Clicked the "Reinstall" button in the Control Panel Add/Remove - this fixed the problem. I did not need to uninstall the program.
Both machines now exhibit the same list of connection types (with one small exception). Thank-you for your hellp.
.... Warren
Edited by: Warren Pickell on Oct 23, 2009 11:55 PM
Edited by: Warren Pickell on Oct 23, 2009 11:56 PM
I'm trying to indicate "Yes, my question has been answered.", but it does not seem to "take". -
Duplicating Data Sets depending on input parameters
I originally posted this question as part of Oracle Reports but I think its not really an Oracle Report issue, its more an SQL Issue. I am on Oracle 9i.
I need to generate a Report that is based on a maximum of 6 input parameters.
Three of them belong to Customer ID# and 3 belong to Number of Copies that need to be printed on the Report.
Parameters for Customers: P_CUST_ID1, P_CUST_ID2, P_CUST_ID3
Parameters for the Number of Copies: P_N1, P_N2, P_N3
So, at any given point, there could be a maximum of 3 Customer ID's passed to the main query. Here is an example of what the input parameters could look like.
User chose to enter values for Customer ID's 1 and 2 and left it blank for Customer 3.
Customer ID1 1001 Number of Copies 2
Customer ID2 1002 Number of Copies 3
Customer ID3 ---- Number of Copies -The Query that retrieves data looks something like this. The query below is intended to fetch Customer Home and Office Addresses.
Of course, it is possible that there might be No home or Office Address or both.
SELECT c.cust_no,
c.saln||c.first_name||' '||c.last_name cust_name,
a.address_type,
a.street,
a.city||' '||a.province||' '||a.postal_code city,
'('||a.tel_area||') '||a.tel_number telephone
FROM customer c, customer_address a
WHERE c.cust_no = a.cust_no
AND c.cust_no IN (:P_CUST_ID1, :P_CUST_ID2, :P_CUST_ID3);Based on my query:
Customer ID 1001 has 3 Addresses (2 Home and 1 Office) --> Total number of Records = 3
Customer ID 1002 has 2 Addresses (1 Home and 1 Office) --> Total number of Records = 2
The output should be something like this. I have put a Label Copy1, Copy2 and Copy3 to show
how the data will appear for readability.
Cust No Customer Name Address Type Address Line 1 Address Line 2 Telephone
Copy1
1001 Mr Robert Green H 2100 Picket Fences Vancouver BC V6E 2C9 (604)726-5555
1001 Mr Robert Green H 2300 Happy Valley Vancouver BC V6G 2N8 (604)308-5555
1001 Mr Robert Green O 1200 Davie Street Vancouver BC V1V 1X1 (604)211-5555
Copy2
1001 Mr Robert Green H 2100 Picket Fences Vancouver BC V6E 2C9 (604)726-5555
1001 Mr Robert Green H 2300 Happy Valley Vancouver BC V6G 2N8 (604)308-5555
1001 Mr Robert Green O 1200 Davie Street Vancouver BC V1V 1X1 (604)211-5555
Copy1
1002 Ms Cynthia Brown H 261 King Street W Calgary AB M5A 1N1 (416)432-5555
1002 Ms Cynthia Brown O 150 Bloor St W Calgary AB M1W 1S3 (416)321-5555
Copy2
1002 Ms Cynthia Brown H 261 King Street W Calgary AB M5A 1N1 (416)432-5555
1002 Ms Cynthia Brown O 150 Bloor St W Calgary AB M1W 1S3 (416)321-5555
Copy3
1002 Ms Cynthia Brown H 261 King Street W Calgary AB M5A 1N1 (416)432-5555
1002 Ms Cynthia Brown O 150 Bloor St W Calgary AB M1W 1S3 (416)321-5555Scripts for the table creation and INSERTs
CREATE TABLE CUSTOMER
"CUST_NO" VARCHAR2(4 BYTE) NOT NULL,
"SALN" VARCHAR2(4 BYTE),
"FIRST_NAME" VARCHAR2(20 BYTE),
"LAST_NAME" VARCHAR2(20 BYTE),
CONSTRAINT "CUSTOMER_PK" PRIMARY KEY ("CUST_NO")
Insert into CUSTOMER values ('1001','Mr','Robert','Green');
Insert into CUSTOMER values ('1002','Ms','Cynthia','Brown');
Insert into CUSTOMER values ('1003','Dr','David','Taylor');
CREATE TABLE CUSTOMER_ADDRESS
"CUST_NO" VARCHAR2(4 BYTE) NOT NULL ENABLE,
"ADDRESS_TYPE" VARCHAR2(1 BYTE) NOT NULL ENABLE,
"STREET" VARCHAR2(20 BYTE),
"CITY" VARCHAR2(20 BYTE),
"PROVINCE" VARCHAR2(2 BYTE),
"POSTAL_CODE" VARCHAR2(10 BYTE),
"TEL_AREA" VARCHAR2(3 BYTE),
"TEL_NUMBER" VARCHAR2(10 BYTE)
Insert into CUSTOMER_ADDRESS values ('1001','H','2100 Picket Fences','Vancouver','BC','V6E 2C9','604','726-5555');
Insert into CUSTOMER_ADDRESS values ('1001','H','2300 Happy Valley','Vancouver','BC','V6G 2N8','604','308-5555');
Insert into CUSTOMER_ADDRESS values ('1001','O','1200 Davie Street','Vancouver','BC','V1V 1X1','604','211-5555');
Insert into CUSTOMER_ADDRESS values ('1002','H','261 King Street W','Calgary','AB','M5A 1N1','416','432-5555');
Insert into CUSTOMER_ADDRESS values ('1002','O','150 Bloor St W','Calgary','AB','M1W 1S3','416','321-5555');
Insert into CUSTOMER_ADDRESS values ('1003','O','435 Richmond Street','Calgary','AB','M5A 4T6','416','453-5555');Any help or pointers in this regard would be great.
I could have adopted a procedure to use Temporary tables but I really would prefer not going in that direction as there could be quite a few reports that need to be generated in this manner.
Thanks and have a great weekend.Hi,
Roxyrollers wrote:
Hi Frank,
Here is my piece of code that I was working on Friday... Okay, but what's wrong with the solution I posted on Saturday?
WITH report_parameters AS
SELECT :p_cust_no_1 AS cust_no, :p_no_copies_1 AS no_copies FROM dual UNION ALL
SELECT :p_cust_no_2 AS cust_no, :p_no_copies_2 AS no_copies FROM dual UNION ALL
SELECT :p_cust_no_3 AS cust_no, :p_no_copies_3 AS no_copies FROM dual
, cntr AS
SELECT LEVEL AS n
FROM (
SELECT MAX (no_copies) AS max_no_copies
FROM report_parameters
CONNECT BY LEVEL <= max_no_copies
SELECT c.cust_no,
c.saln||c.first_name||' '||c.last_name cust_name,
a.address_type,
a.street,
a.city||' '||a.province||' '||a.postal_code city,
'('||a.tel_area||') '||a.tel_number telephone
, t.n -- If wanted
FROM customer c
, customer_address a
, report_parameters p
, cntr t
WHERE c.cust_no = a.cust_no
AND c.cust_no = p.cust_no
AND p.no_copies >= t.n
ORDER BY c.cust_no
, t.n
, a.address_type
;Output, given your sample data and parameters:
CUST CUST_NAME A STREET CITY TELEPHONE N
1001 MrRobert Green H 2100 Picket Fences Vancouver BC V6E 2C9 (604) 726-5555 1
1001 MrRobert Green H 2300 Happy Valley Vancouver BC V6G 2N8 (604) 308-5555 1
1001 MrRobert Green O 1200 Davie Street Vancouver BC V1V 1X1 (604) 211-5555 1
1001 MrRobert Green H 2100 Picket Fences Vancouver BC V6E 2C9 (604) 726-5555 2
1001 MrRobert Green H 2300 Happy Valley Vancouver BC V6G 2N8 (604) 308-5555 2
1001 MrRobert Green O 1200 Davie Street Vancouver BC V1V 1X1 (604) 211-5555 2
1002 MsCynthia Brown H 261 King Street W Calgary AB M5A 1N1 (416) 432-5555 1
1002 MsCynthia Brown O 150 Bloor St W Calgary AB M1W 1S3 (416) 321-5555 1
1002 MsCynthia Brown H 261 King Street W Calgary AB M5A 1N1 (416) 432-5555 2
1002 MsCynthia Brown O 150 Bloor St W Calgary AB M1W 1S3 (416) 321-5555 2
1002 MsCynthia Brown H 261 King Street W Calgary AB M5A 1N1 (416) 432-5555 3
1002 MsCynthia Brown O 150 Bloor St W Calgary AB M1W 1S3 (416) 321-5555 3 WITH DOES work in Oracle 9.1, and higher. Are you getting an error message that starts with "SP"? Those are SQL*Plus errors, that occur before your code is even sent to the database. In extremely old versions of SQL*Plus, a statement cannont begin with the keyword WITH. The best solution is to upgrade SQL*Plus, but you could also re-wqrite the query so WITH is not the first word of the statement. In this case, you could also use in-line views instead of WITH.
I tried to generate duplicate data sets as a Sub-Query like RP suggested and it seems to be working except the ordering seems to be messed up for Mr Robert Green. The correct order should have been Home, Home, Office and then Home, Home, Office again...The order above seems to be what you want, but there are many different reasons why a small set of sample data might just happen to appear in the right order.
Explain why you want that order. If you can say what you want in English, somebody can help you code it in SQL.
I don't recommend any solution that uses UNION. It will be inefficient, and difficult to debug and to maintain. -
Large OLTP data set to get through the cache in our new ZS3-2 storage.
We recently purchased a ZS3-2 and are currently attempting to do performance testing. We are using various tools to simulate load within our Oracle VM 3.3.1 cluster of qty5 Dell m620 servers-- swingbench, vdbench, and dd. The OVM repositories are connecting via NFS. The Swingbench load testing servers have a base OS disk mounted from the repos and NFS mounts via NFS v4 from within the VM (we would also like to test dNFS later in our testing).
The problem I'm trying to get around is that the 256G of DRAM (and a portion of that for ARC) is large enough where my reads are not touching the 7200 RPM disks. I'd like to create a large enough data set so the amount of random reads cannot possible be stored within the ARC cache (NOTE: we have no L2ARC at the moment).
I've run something similar to this in the past, but have adjusted the "sizes=" to be larger than 50m. My thought here is that, if the ARC is up towards around 200 or so MB's, if I create the following on four separate VM's and run vdbench at just about the same time, it will be attempting to read more data than can possibly fit in the cache.
* 100% random, 70% read file I/O test.
hd=default
fsd=default,files=16,depth=2,width=3,sizes=(500m,30,1g,70)
fsd=fsd1,anchor=/vm1_nfs
fwd=fwd1,fsd=fsd*,fileio=random,xfersizes=4k,rdpct=70,threads=8
fwd=fwd2,fsd=fsd*,fileio=random,xfersizes=8k,rdpct=70,threads=8
fwd=fwd3,fsd=fsd*,fileio=random,xfersizes=16k,rdpct=70,threads=8
fwd=fwd4,fsd=fsd*,fileio=random,xfersizes=32k,rdpct=70,threads=8
fwd=fwd5,fsd=fsd*,fileio=random,xfersizes=64k,rdpct=70,threads=8
fwd=fwd6,fsd=fsd*,fileio=random,xfersizes=128k,rdpct=70,threads=8
fwd=fwd7,fsd=fsd*,fileio=random,xfersizes=256k,rdpct=70,threads=8
rd=rd1,fwd=fwd1,elapsed=900,interval=30,fwdrate=max,format=yes,pause=30,openflags=fsync
rd=rd2,fwd=fwd2,elapsed=900,interval=30,fwdrate=max,format=yes,pause=30,openflags=fsync
rd=rd3,fwd=fwd3,elapsed=900,interval=30,fwdrate=max,format=yes,pause=30,openflags=fsync
rd=rd4,fwd=fwd4,elapsed=900,interval=30,fwdrate=max,format=yes,pause=30,openflags=fsync
rd=rd5,fwd=fwd5,elapsed=900,interval=30,fwdrate=max,format=yes,pause=30,openflags=fsync
rd=rd6,fwd=fwd6,elapsed=900,interval=30,fwdrate=max,format=yes,pause=30,openflags=fsync
rd=rd7,fwd=fwd7,elapsed=900,interval=30,fwdrate=max,format=yes,pause=30,openflags=fsync
However, the problem I keep running into is that vdbench's java processes will throw exceptions
... <cut most of these stats. But suffice it to say that there were 4k, 8k, and 16k runs that happened before this...>
14:11:43.125 29 4915.3 1.58 10.4 10.0 69.9 3435.9 2.24 1479.4 0.07 53.69 23.12 76.80 16384 0.0 0.00 0.0 0.00 0.0 0.00 0.1 7.36 0.1 627.2 0.0 0.00 0.0 0.00 0.0 0.00
14:12:13.071 30 4117.8 1.88 10.0 9.66 69.8 2875.1 2.65 1242.7 0.11 44.92 19.42 64.34 16384 0.0 0.00 0.0 0.00 0.0 0.00 0.1 12.96 0.1 989.1 0.0 0.00 0.0 0.00 0.0 0.00
14:12:13.075 avg_2-30 5197.6 1.52 9.3 9.03 70.0 3637.8 2.14 1559.8 0.07 56.84 24.37 81.21 16383 0.0 0.00 0.0 0.00 0.0 0.00 0.1 6.76 0.1 731.4 0.0 0.00 0.0 0.00 0.0 0.00
14:12:15.388
14:12:15.388 Miscellaneous statistics:
14:12:15.388 (These statistics do not include activity between the last reported interval and shutdown.)
14:12:15.388 WRITE_OPENS Files opened for write activity: 89 0/sec
14:12:15.388 FILE_CLOSES Close requests: 81 0/sec
14:12:15.388
14:12:16.116 Vdbench execution completed successfully. Output directory: /oracle/zfs_tests/vdbench/output
java.lang.RuntimeException: Requested parameter file does not exist: param_file
at Vdb.common.failure(common.java:306)
at Vdb.Vdb_scan.parm_error(Vdb_scan.java:50)
at Vdb.Vdb_scan.Vdb_scan_read(Vdb_scan.java:67)
at Vdb.Vdbmain.main(Vdbmain.java:550)
So I know from reading other posts, that vdbench will do what you tell it (Henk brought that up). But based on this, I can't tell what I should do differently to the vdbench file to get around this error. Does anyone have advice for me?
Thanks,
Joeah... it's almost always the second set of eyes. Yes, it is run from a script. And I just looked and realized that the list last line didn't have the \# in it. Here's the line:
"Proceed to the "Test Setup" section, but do something like `while true; do ./vdbench -f param_file; done` so the tests just keep repeating."
I just added the hash to comment that out and am rerunning my script. My guess is that it'll complete Thanks Henk. -
the VirtualizingObservableCollection does the following:
Implements the same interfaces and methods as ObservableCollection<T> so you can use it anywhere you’d use an ObservableCollection<T> – no need to change any of your existing controls.
Supports true multi-user read/write without resets (maximizing performance for large-scale concurrency scenarios).
Manages memory on its own so it never runs out of memory, no matter how large the data set is (especially important for mobile devices).
Natively works asynchronously – great for slow network connections and occasionally-connected models.
Works great out of the box, but is flexible and extendable enough to customize for your needs.
Has a data access performance curve so good it’s just as fast as the regular ObservableCollection – the cost of using it is negligible.
Works in any .NET project because it’s implemented in a Portable Code Library (PCL).
The latest package can be found on nugget. Install-Package VirtualizingObservableCollection. The source is on github.Good job, thank you for sharing
Best Regards,
Please remember to mark the replies as answers if they help -
DBMS_RANDOM and ORA-01436: CONNECT BY loop in user data
Hi,
The following query gets the error "ORA_01436: CONNECT BY loop in user data":
SELECT currentdate
, ADD_MONTHS ( currentdate
, (LEVEL - 1) * months
) + ((LEVEL - 1) * days) AS final_date
, level
FROM table_z
WHERE CONNECT_BY_ISLEAF = 1
CONNECT BY currentdate = PRIOR currentdate
AND PRIOR dbms_random.value IS NOT NULL
AND ADD_MONTHS ( currentdate
, (LEVEL - 2) * months
) + ((LEVEL - 2) * days) <= TO_DATE ( '05/01/2008'
, 'MM/DD/YYYY'
);I've seen "PRIOR dbms_random.value IS NOT NULL" used like this as as a way to get around ORA-01436 in Oracle 9, but I'm using Oracle 11, and it doesn't work
currentdate is unique.
If I hard-code any one set of values, like this:
DEFINE currentdate = "TO_DATE ('03/02/2006', 'MM/DD/YYYY')"
DEFINE days = 300
DEFINE months = 0
SELECT ¤tdate
, ADD_MONTHS ( ¤tdate
, (LEVEL - 1) * &months
) + ((LEVEL - 1) * &days) AS final_date
FROM dual
WHERE CONNECT_BY_ISLEAF = 1
CONNECT BY ¤tdate = PRIOR ¤tdate
AND PRIOR dbms_random.value IS NOT NULL
AND ADD_MONTHS ( ¤tdate
, (LEVEL - 2) * &months
) + ((LEVEL - 2) * &days) <= TO_DATE ( '05/01/2008'
, 'MM/DD/YYYY'
);I can get the correct results from dual. I was looking for a way to extend this to get multiple rows from table_z in the same query.
The problem came up in [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=894946&tstart=0], where the problem is:
Given this table:
CREATE TABLE table_z
( currentdate DATE
, months NUMBER
, days NUMBER
INSERT INTO table_z (currentdate, months, days) VALUES (TO_DATE ('03/02/2006', 'MM/DD/YYYY'), 0, 300);
INSERT INTO table_z (currentdate, months, days) VALUES (TO_DATE ('04/05/2006', 'MM/DD/YYYY'), 10, 0);
INSERT INTO table_z (currentdate, months, days) VALUES (TO_DATE ('05/04/2006', 'MM/DD/YYYY'), 3, 0);I'm trying to add the given number of months and/or days to currentdate until I reach a given hard-coded cutoff date (05/01/2008 in this case).
That is, the desired results from the data above are:
CURRENTDAT MONTHS DAYS FINALDATE
03/02/2006 0 300 08/18/2008
04/05/2006 10 0 10/05/2008
05/04/2006 3 0 05/04/2008Edited by: Frank Kulash on May 4, 2009 7:38 PM
Typo in CONNECT BY conditions fixed.Hi Frank,
Sounds like a bug. Funny enough, but this works:
SQL> select * from v$version where rownum = 1
2 /
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
SQL> SELECT currentdate
2 , ADD_MONTHS ( currentdate
3 , (LEVEL - 1) * months
4 ) + ((LEVEL - 1) * days) AS final_date
5 , level
6 FROM table_z
7 WHERE CONNECT_BY_ISLEAF = 1
8 CONNECT BY currentdate = PRIOR currentdate
9 AND PRIOR dbms_random.value IS NOT NULL
10 AND ADD_MONTHS ( currentdate
11 , (LEVEL - 1) * months
12 ) + ((LEVEL - 1) * days) <= TO_DATE ( '05/01/2008'
13 , 'MM/DD/YYYY'
14 );
FROM table_z
ERROR at line 6:
ORA-01436: CONNECT BY loop in user data
SQL>
SQL> ed
Wrote file afiedt.buf
1 SELECT currentdate
2 , ADD_MONTHS ( currentdate
3 , (LEVEL - 1) * months
4 ) + ((LEVEL - 1) * days) AS final_date
5 , level
6 FROM table_z
7 WHERE CONNECT_BY_ISLEAF = 1
8 CONNECT BY currentdate = PRIOR currentdate + 0
9 AND PRIOR dbms_random.value IS NOT NULL
10 AND ADD_MONTHS ( currentdate
11 , (LEVEL - 1) * months
12 ) + ((LEVEL - 1) * days) <= TO_DATE ( '05/01/2008'
13 , 'MM/DD/YYYY'
14* )
SQL> /
CURRENTDA FINAL_DAT LEVEL
02-MAR-06 23-OCT-07 3
05-APR-06 05-DEC-07 3
04-MAY-06 04-FEB-08 8
SQL> SY. -
Attempt to assign data set as datasource for existing report
There must be something stupid I am missing.
1) Created a report with Crystal Reports 2011
2) It queries a table in a SQL 2008 database
3) The internal select statement is
SELECT "CUSTOMER"."rname", "CUSTOMER"."radd", "CUSTOMER"."radd2", "CUSTOMER"."rcity", "CUSTOMER"."rprov", "CUSTOMER"."rpostal", "CUSTOMER"."rcountry"
FROM "Data"."dbo"."CUSTOMER" "CUSTOMER"
ORDER BY "CUSTOMER"."rname"
4) Now I am attempting to use the report in Visual Basic 2010 but using a data set as the source
5) Following examples I have looked at this is the code
Private Sub CustomerCrystalReport2frm_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
' Define connection information
Dim ConnectionInfo As New ConnectionInfo
ConnectionInfo.ServerName = "TEST7\TEST7"
ConnectionInfo.DatabaseName = "Data"
ConnectionInfo.UserID = "Master"
ConnectionInfo.Password = "MasterPassword"
' Load the existing report
Dim rd As ReportDocument = New ReportDocument
rd.Load(Application.StartupPath & "\Crystal Reports\DGVCustomerListing.rpt")
SetDBLogonForReport(ConnectionInfo, rd) ' Set the report table connections
' This shows the report has loaded the records using the internal select statement (18305 records)
Debug.Print(" Report Document Records=" & rd.Rows.Count)
' Create the data set with the records I want the report to use
Dim ReportInfo As DataSet = New DataSet() ' To hold data to pass to the report
Dim SQLSelect As String = "select * FROM Data.dbo.Customer where rname LIKE 'z%' order by rname"
ReportInfo = FillDataSet(SQLSelect, "ReportData") ' Fill the data set to pass to the report
' This shows the data set contains the expected records (57 records)
Debug.Print(" Data Set Records=" & ReportInfo.Tables("ReportData").Rows.Count)
' Change the source of the report
rd.SetDataSource(ReportInfo)
' This changing the source had no effect records still (18305 records)
Debug.Print(" Report Document Records=" & rd.Rows.Count)
CrystalReportViewer1.ReportSource = rd ' Bind report document to crystal report viewer
End Sub
Private Sub SetDBLogonForReport(ByVal ConnectionInfo As ConnectionInfo, ByVal ReportDocument As ReportDocument)
Dim Tables As Tables = ReportDocument.Database.Tables
For Each table As CrystalDecisions.CrystalReports.Engine.Table In Tables
Dim TableLogOnInfo As TableLogOnInfo = table.LogOnInfo
TableLogOnInfo.ConnectionInfo = ConnectionInfo
table.ApplyLogOnInfo(TableLogOnInfo)
Next
End Sub
end Sub
6) The report is appearing in the viewer with 18305 records
Any help would be appreciatedSetting the report table connections caused the report to fill with data.
At this point I seemed unable to reset the datasource.
Also the set data source needed further clearification.
The simplified following code works:
Dim rd As ReportDocument = New ReportDocument
rd.Load(Application.StartupPath & "\Crystal Reports\DGVCustomerListing.rpt")
' Create the data set with the records I want the report to use
Dim ReportInfo As DataSet = New DataSet() ' To hold data to pass to the report
Dim SQLSelect As String = "select * FROM Data.dbo.Customer where rname LIKE 'z%' order by rname"
ReportInfo = FillDataSet(SQLSelect, "ReportData") ' Fill the data set to pass to the report
' Change the source of the report
rd.SetDataSource(ReportInfo.Tables("ReportData"))
CrystalReportViewer1.ReportSource = rd ' Bind report document to crystal report viewer -
Spry Data Sets and IE7 and IE8
Whiile in IE 7 or IE 8, my spry data set is not displaying
the data. However, using the Firefox browser, you can see the data
within the spry data set. For some reason unbeknownst to me, IE 7
and IE 8 in not allowing the spry data set to display the necessary
data. Is there a fix to this issue? Can changing or modifying the
HTML code help make the connection between the spry data set and
its data in IE 7 and IE 8? Any assistance would be helpful. Thank
you.
To view my site where the problem is at, go to
http://www.hrconsortium.net/hrworkshops.htmIt gags in IE because you are saying that the Course_Date
column is a date, but you have an "Open" word in the date column
instead of a date. You can work around the problem by creating a
custom column that replaces the "Open" keyword with a date in the
past or the future, depending on where you want it to land when
sorting (top or bottom). Then, leave your Course_Date column as a
"string" column type, and set the new custom column to the date
column type. Try something like this:
<script type="text/javascript">
<!--
function CustomDateFilter(ds,row,rowIndex)
if (row.Course_Date.search("Open") != -1)
row.Course_Date2 = "01/01/2000";
else
row.Course_Date2 = row.Course_Date;
return row;
var dshrworkshops = new
Spry.Data.HTMLDataSet("hrworkshop_table.htm", "hrworkshoptable",
{sortOnLoad: "Course_Date", sortOrderOnLoad: "ascending",
filterDataFunc: CustomDateFilter});
dshrworkshops.setColumnType("Course_Date2", "date");
//-->
</script>
--== Kin ==-- -
Is complex type request supported by web service data set?
I just installed OBIEE 11g and tried to create data models with web services. It works fine for web services that takes simple data types and returns complex data types. But if the request to the web service is a complex type, it doesn't work. On the Edit Data Set page, I selected "true" for Complex Type. After I entered WSDL url, it populated the Web Service dropdown, but not the Method dropdown. Any ideas?
The other problem I am having with web service data set is that it seems to ignore the attributes in the xml response. Only xml element is recognized.
e.g. in <trigger priority="0" font_size="0"/>, priority and font_size are ignored in the data set. Please advise. Thanks.Hi,
In this usecase , you can DnD the <serviceOperationName>_parameters as an ADF from. Then DnD the operation as a method. The methods input arg value is automatically set to the parameterIterator.currentRow.DataProvider. This works fine. -
I have a list with data source A, which contains a ClientName, some dates, and a dollar amount. This is all displayed within a list, one client per row. I also have data source B, which also has ClientName and a list of notes about the client.
What I want to do is add another simple table in the SAME ROW as the table containing ClientName, dates, and dollar amounts. When I go to add the table below my other information I cannot choose data set B as the source of my data. I just
want to add this simple table and automatically filter all notes from data source B to have the same ClientName as the current item in the list. Is this possible?
Thanks!If you need to use a totally separate dataset (not datasource, that is the thing that connects to your database), inside a table, you might be better off creating a subreport.
The subreport will have this dataset B, then you can drop a subreport into your main report table cell and pass the parameters through.
Maybe you are looking for
-
My external hard drive (G-DRIVE Slim 500GB) won't mount?
My external hard drive (G-DRIVE Slim 500GB) won't mount? All of a sudden my hard drive didn't show up in my finder. I checked in disk utility and it was there but greyed out. If I tried mounting it told me that could not be mounted and that I should
-
How do I allow my iphone 5c to trust the computer if the screen doesn't work
I broke my screen and I wanted to back up my Iphone one last time so i can all of my recent pictures and contacts. I would use Icloud, but I didn't sign this phine up for it.
-
How to download Acrobat 6.0 Standard onto Windows 8? [was: Question]
I have a 6.0 Standard version which I am attempting to install on my new computer which has Windows 8. It will not download. Any known issues? It does not recognize it at all.
-
Java application deployment/setup
I'm in need of some information about how to go about creating an installation program for my java desktop application. We have a big project due in two months and one of the requirements is that it needs to be deployable on any machine, including ma
-
Unable to send myself a test picture or message using MMS
11-01-2009 02:01 PM I have a 8820 and my provider is t-mobile. I have been trying for a month now to figure how to send myself a test picture and message to verify that MMS is working. I have had several different phone models from other companies