Run a query on linked tables to create a new datasource
Using Crystal XI
I have a report that draws from two data sources. They can't be joined at the server side, but they are linked in Crystal Database Expert.
I can't figure out if Crystal gives me a way to write an SQL Query to run an aggregate function referencing both tables. The results of this query would be the datasource for a graph in the report. I'm wondering if Crystal gives me a way, maybe through subreports, to write the query I need.
More concretely:
And I want to include in my datasource alarmId, Hour and the Maximum amount of calls received in any one hour for any one station (this maximum is to provide scale for a graph)
In one table nameed AlarmStartTimes I have data like
Alarms
AlarmID Hour Recipient
Alarm1 8 Joe
Alarm23 10 Mark
Alarm60 7 Joe
Alarm95 8 Linda
In another I have data like
EELocation
Recipient Location
Joe Station1
Mark Station2
Linda Station1
So if I could just join my talbes at the server side I'd use a query like:
select *, max(select count(AlarmID) from Alarms, EELocation from Alarms Join EELocationo on Alarms.Recipient=EELocation.Recipient group by Hour, Location) AS from Alarms
Anyway, that's probably got a syntax error or 4 in it, but you get the idea.
I can't group on the database side. Since Crystal is able to link the two tables and successfully group them out by Location, it seems like there should be some way for me to run a query against the tables reflecting that existing link, but I can't see how to do it.
The reason I can't link on database side is that the data is in two databases, and it's not known what the location of the databases is at report-writing time. The location of the databases gets set via the Crystal API when the report is launched from an application.
Since you have 2 datasource in the report you are limited on what you can use in crystal, such as crystal will not allow you to use sql expressions.
Similar Messages
-
JOIN two tables and creat a new one
dear all,
as a newbie in Bw i have a question.
I worked already with other etl tools (powercenter) where there are objects to join 2 tables and create a new one to create a total transforming process to load a fact table.
In BW an INFOSET is the only thing to join 2 odssen. On this a query can be created.
BUT HOW TO JOIN 2 TABLES (= only ODS object?) AND CREATE A NEW TABLE FOR FUTHER PROCESSING ????
Regards,
Hermanhi jacobs, refer to these links particularly second one
http://help.sap.com/saphelp_erp2004/helpdata/en/92/43ec39d0383f09e10000000a11402f/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/f1/713c3b
35703079e10000000a114084/content.htm
hope this clears ur doubt
Assigning points is the way of saying thanks in sdn
ravi -
Hi guys n girls. How do you copy a whole table to create a new table with all cell sizes in tact? Thanks for your help. Jason.
when you copy n paste into a new table, all the cell sizes are changed.
is there a way to put in a new table from your templates into an existing file, different to the standard very basic ones in insert table.
I look forward to your answers. Your help is very much appreciated.
Also how do you search for question answers already written in this support area please.Hi Jason,
In Numbers 3, you can select a whole table by clicking once in the table to make it active, then click once on the "bull's eye" at the top left.
Now copy and paste. All formatting (and any cell content) is pasted intact. In Numbers 2.3 (Numbers '09) it is a little different for selecting a whole table. But I won't go into that unless you are using Numbers '09. Please reply.
I don't like the look of the tables in Insert Table. I keep custom tables in My Templates. I have set Numbers > Preferences > General > For New Documents > Use template: (name of my favourite custom template)
That opens when I launch Numbers, or ask for a new document (command n). Note that if you follow this preference setting, then Menu > File > New From Template Chooser (for another template) requires you to hold down the option key in that menu.
Regards,
Ian.
Message was edited by: Yellowbox. All formatting (and any cell content) is pasted intact. -
Tables for creating a new sales order with reference to another
Hi Experts
In ABAP, how can identify that I'm creating a new sales order with reference to another in the userexit read_document??, In which tables is this information??.
Thanks
RegardsIn Table VBFA there are two fields
a) Preceding Document and
b) Subsequent Document category
Based on the above two fields, you can conclude that sale order is created with reference to a preceding document.
thanks
G. Lakshmipathi -
Database connection error | created a new datasource | web application
Hi,
I am trying to deploy a J2EE web application on SAP Netweaver 7.0. I have to connect to a Oracle database schema (Not the default schema used by SAP). I am using Java and JDBC to make connections to the database.
In order to accomplish this, I created a new data source in Visual Admin. Referenced this in the web.xml and deployed the application. The application is deployed successfully, without any errors or warnings.
However, when ever the Java program connects and executes a prepared statement, I get this error in the database logs
bc.direct.DirectPreparedStatement#Java#com.sap.sql_0003#com.sap.sql.log.OpenSQLResourceBundle#SQL error occurred on connection xxxx111:xxx:xxx: code=942, state="42000", message="ORA-00942: table or view does not exist
SQL statement is "SELECT "XMLVALUE" FROM "BC_DDDBTABLERT" WHERE "NAME" = ?".#5#942#42000#ORA-00942: table or view does not exist
#solad011:pidb:PIUSER#SELECT "XMLVALUE" FROM "BC_DDDBTABLERT" WHERE "NAME" = ?#
In java code, there are no references to this table "BC_DDDBTABLERT". I am trying to execute a SQL select for entirely different table. Why I am I getting this error?Hi,
System copy NW 70 - Error in "export from java database" phase
I am doing system copy of BI7.0 (Abap+Java) stack, I am getting error in
"export from java database" phase as mentioned below.
When I tried to run the query mentioned in SAP Note 1120872: ,
SQL> DELETE FROM BC_DDDBTABLERT WHERE NAME = 'CAF_GP_R3USRMPGCFG';
DELETE FROM BC_DDDBTABLERT WHERE NAME = 'CAF_GP_R3USRMPGCFG'
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> DELETE FROM BC_DDDBTABLERT WHERE NAME = 'CAF_GP_IF_CONTEXT';
DELETE FROM BC_DDDBTABLERT WHERE NAME = 'CAF_GP_IF_CONTEXT'
ERROR at line 1:
ORA-00942: table or view does not exist
I tried your Native_SQL also, but same error.
Kindly help me on this.
Regards,
Sampath.
SAP INST error log:
ERROR 2010-10-15 10:32:35
CJS-30049 Execution of JLoad tool '/usr/java/j2sdk1.4.2_12/bin/java
-classpath /usr/sap/BD1/SYS/global/sltools/sharedlib/launcher. jar
-showversion -Xmx512m com.sap.engine.offline.OfflineToolStart
com.sap.inst.jload.Jload
/usr/sap/BD1/SYS/global/security/lib/tools/iaik_jce .jar:/usr/sap/BD1/SYS/global/security/lib/tools/ia ik_jsse.jar:/usr/sap/BD1/SYS/global/security/lib/tools/ia ik_smime.jar:/usr/sap/BD1/SYS/global/security/lib/tools/ia ik_ssl.jar:/usr/sap/BD1/SYS/global/security/lib/tools/w3 c_http.jar:/usr/sap/BD1/SYS/global/sltools/sharedlib/jlo ad.jar:/usr/sap/BD1/SYS/global/sltools/sharedlib/ant lr.jar:/usr/sap/BD1/SYS/global/sltools/sharedlib/exc eption.jar:/usr/sap/BD1/SYS/global/sltools/sharedlib/jdd i.jar:/usr/sap/BD1/SYS/global/sltools/sharedlib/log ging.jar:/usr/sap/BD1/SYS/global/sltools/sharedlib/off lineconfiguration.jar:/usr/sap/BD1/SYS/global/sltools/sharedlib/ope nsqlsta.jar:/usr/sap/BD1/SYS/global/sltools/sharedlib/tc_ sec_secstorefs.jar:/oracle/client/10x_32/instantclient/ojdbc14.j ar
-sec
BD1,jdbc/pool/BD1,/usr/sap/BD1/SYS/global/security /data/SecStore.properties,/usr/sap/BD1/SYS/global/ security/data/SecStore.key
-dataDir /oracle/expocopy/JAVA/JDMP -remove_trailing_blanks
/tmp/sapinst_instdir/NW04S/LM/COPY/ORA/EXP/CENTRAL/ AS/EXP/removeTrailingBlanks.txt
-convert_empty_LOBs
/tmp/sapinst_instdir/NW04S/LM/COPY/ORA/EXP/CENTRAL/ AS/EXP/convertEmptyLobs.txt
-convert_empty_strings
/tmp/sapinst_instdir/NW04S/LM/COPY/ORA/EXP/CENTRAL/ AS/EXP/convertEmptyStrings.txt
-convert_empty_binary
/tmp/sapinst_instdir/NW04S/LM/COPY/ORA/EXP/CENTRAL/ AS/EXP/convertEmptyBinary.txt'
aborts with return code 1.<br>SOLUTION: Check 'jload.log' and
'/tmp/sapinst_instdir/NW04S/LM/COPY/ORA/EXP/CENTRAL/ AS/EXP/jload.java.log'
for more information.
Log details for jload.java.log:
java version "1.4.2_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_12-b03)
Java HotSpot(TM) Client VM (build 1.4.2_12-b03, mixed mode)
Oct 15, 2010 10:32:33 AM com.sap.inst.jload.Jload main
INFO: Jload -sec
BD1,jdbc/pool/BD1,/usr/sap/BD1/SYS/global/security /data/SecStore.properties,/usr/sap/BD1/SYS/global/ security/data/SecStore.key
-dataDir /oracle/expocopy/JAVA/JDMP -remove_trailing_blanks
/tmp/sapinst_instdir/NW04S/LM/COPY/ORA/EXP/CENTRAL/ AS/EXP/removeTrailingBlanks.txt
-convert_empty_LOBs
/tmp/sapinst_instdir/NW04S/LM/COPY/ORA/EXP/CENTRAL/ AS/EXP/convertEmptyLobs.txt
-convert_empty_strings
/tmp/sapinst_instdir/NW04S/LM/COPY/ORA/EXP/CENTRAL/ AS/EXP/convertEmptyStrings.txt
-convert_empty_binary
/tmp/sapinst_instdir/NW04S/LM/COPY/ORA/EXP/CENTRAL/ AS/EXP/convertEmptyBinary.txt
Oct 15, 2010 10:32:35 AM com.sap.inst.jload.db.DBConnection
connectViaSecureStore
INFO: connected to BD1 on jdbc/pool/BD1
Oct 15, 2010 10:32:35 AM com.sap.inst.jload.db.ExcludedObjects addObjects
INFO: excluded objects (type TB): [EP_ATTR_HEADERS, EP_ATTR_VALUES,
J2EE_CONFIGENTRY]
Oct 15, 2010 10:32:35 AM com.sap.inst.jload.db.ExcludedObjects addObjects
INFO: excluded objects (type EL): [EP_ATTR_HEADERS, KMC_DBRM_CONTENT,
EP_ATTR_VALUES, J2EE_CONFIGENTRY]
Oct 15, 2010 10:32:35 AM com.sap.inst.jload.db.ExcludedObjects addObjects
INFO: excluded objects (type ES): [EP_ATTR_HEADERS, KMC_DBRM_CONTENT,
BC_SCVERSION, J2EE_CONFIGENTRY]
Oct 15, 2010 10:32:35 AM com.sap.inst.jload.db.ExcludedObjects addObjects
INFO: excluded objects (type EB): [KMC_DBRM_CONTENT, J2EE_CONFIGENTRY]
Oct 15, 2010 10:32:35 AM com.sap.inst.jload.JobStatus readStatus
INFO: trying to read status file
/tmp/sapinst_instdir/NW04S/LM/COPY/ORA/EXP/CENTRAL/ AS/EXP/EXPORT.sta
Oct 15, 2010 10:32:35 AM com.sap.inst.jload.JobStatus readStatus
INFO: commencing restart
Oct 15, 2010 10:32:35 AM com.sap.inst.jload.Jload dbExport
SEVERE: DB Error during export of CAF_GP_IF_CONTEXT
Oct 15, 2010 10:32:35 AM com.sap.inst.jload.Jload printSQLException
SEVERE: Message: ORA-00942: table or view does not exist
Oct 15, 2010 10:32:35 AM com.sap.inst.jload.Jload printSQLException
SEVERE: SQLState: 42000
Oct 15, 2010 10:32:35 AM com.sap.inst.jload.Jload printSQLException
SEVERE: ErrorCode: 942
Oct 15, 2010 10:32:35 AM com.sap.inst.jload.db.DBConnection disconnect
INFO: disconnected -
In Administration Workbench->modelling->Source Systems:I want to creat Data source in BW and replicate it from R3.I have already created a Data source based on a table in R3 and when creating it,there is only one item in applcation component:NEW_HIER_ROOT,not a tree hierachy.And in BW,when I creat a new data source,the background user in BW is grey,couldn't be changed.After I finished the procedure,system displayed that source system already exit.but it contains the tree hierachy.After I replicated,It hadn't datasource which I created.What's the problem?How to fix it? Give me the hits,please.Thanks.
Hi dear and welcome on board!
First of all, if you want to see all the other items of the std hierarchy, you have to execute RSA9 transaction...
Then, I'm not undersatnding what are you doing with your new datasource...
You simply have to create your datasource in RSO2...then go in RSA1, source system, replicate datasources...
Then go to the infosource page, create a new infosource, assign a source system and then you will see a list of available datasources...here you have to see your new one, choose it, manage the transfer structure/rules...
That's all!
Hope it helps!
Bye,
Roberto
...and please don't forget to reward the answers...it's THE way to say thanks here !! -
SQL Query with 3 tables to create a view
Hi
I have got an existing view "View_output" formed with a query which works fine:
select A,B,C,D,E,F,G,H from GTS1 where D is not null
UNION
select A,B,C,D,E,F,G,H from GTSN1 where D is not null;It works fine, in the output I have columns A,B,C,D,E,F,G,H
New requirement : Modify the view, by adding a new column 'I' so that the view should have
columns A through I, and no column values should be null.
This column "I" is coming from a table, say DLC
Data in DLC is a subset of the original view "View_output"and DLC have the foll.columns:
("View_output" is a datablock source for a form and only selected column values are put as output in DLC
after form manipulation)
DLC is having only 5 columns -B,C,F,H,I
When I give:
(select A,B,C,D,E,F,G,H,NULLfrom GTS1 where D is not null
UNION
select A,B,C,D,E,F,G,H,NULL from GTSN1 where D is not null)
UNION
select NULL,B,C,NULL,NULL,F,NULL,H,I
from
DLC where I IS NOT NULL;It UNIONS all required rows in the 3 tables but columns A,D,E,G are NULL, but how can I get
data in these columns?
Edited by: Krithi on 30-Oct-2009 05:43
Edited by: Krithi on 30-Oct-2009 08:13Hi arun thats not the real isue..
I have corrected the second code now, it was a typo from my side..
all three tables already have 9 columns selected..
The view created from GTS1 and GTSN1 is constantly changing
There is no way to add column 'I' to any of these above tables
The view is the input to a form..User ticks a tickbox corresponding to records needed by them (These are the columns in the original view mentioned above)..and based on certain logic,only selected columns are now inserted/updated into the output table through the form..this is the table DLC
Now they want to insert a new data(free text) through the form, this field correspond to each record in the form ;this is supposed to be column 'I'(not designed yet)..
this is not there in the original input tables selected for the view...But then I added this column to the output table DLC (Cant think of any other method) so that column I can also get combined in the view.
Now what I want is recreate the view through,
create or replace view statement.
the view should effectively pull data from 3 tables .
The relation between 3 tables :
DLC is a subset of GTS1 and GTSN1
but may also contain data which is not in union of GTS1 and GTSN1
Only field I need from DLC is field 'I', and that too if the data is there in the union of GTS1 and GTSN1 -
Running a query in which table name and column name are passed as arguments
Hello,
I have a pl/sql code in which table_name and column_name are defined as variables.
I want to run a sql query like update table_name set column_name = <value> where id='xyz';
How can I achieve this?
Thanks in advance.
Regards.GHD wrote:
DECLARE
v_table_name VARCHAR2(50) := 'employees';
v_column_name VARCHAR2(50) := 'first_name';
V_SQL VARCHAR2(1000);
BEGIN
V_SQL := 'UPDATE '||v_table_name||' SET '||v_column_name||'= ''Ray'''||'WHERE EMPLOYEE_ID = 101';
EXECUTE IMMEDIATE v_sql;
END;Hope it will be helpful.Yes quite. (and the following applies to ALL responses thus far)
It helps in reducing performance.
It helps in fragmenting the shared pool.
It helps in causing ORA-04031 unable to allocate %s bytes of shared memory errors.
It is a brilliant example... OF HOW NOT TO WRITE ORACLE CODE. -
INSERT in the custom database table to create a new entry.
Hello Experts,
I'm trying to INSERT the entry in my custom databse table that i have created. But I'm not sure what i'm missing as i'm getting the sy-subrc = 4 after the INSERT statement and my records are not added to the database table.
I'm using the INSERT as below:-
APPEND gw_relax TO gt_relax.
INSERT INTO zmm_bg_relax VALUES gw_relax.
Please let me know your helpful responses on this,
Thanks,
NaveenCheck [INSERT dbtab|http://help.sap.com/abapdocu_70/en/ABAPINSERT_SOURCE.htm] [FROM TABLE itab [ACCEPTING DUPLICATE KEYS]|http://help.sap.com/abapdocu_70/en/ABAPINSERT_SOURCE.htm#&ABAP_ALTERNATIVE_2@2@],
If the addition ACCEPTING DUPLICATE KEYS is specified, all rows are inserted for which this is possible. The remaining rows are rejected and sy-subrc is set to 4. The system field sy-dbcnt is set to the number of lines that are inserted.
So if you get sy-subrc = 4, some of the records of the internal table are already contained in the database table.
You cannot put 2 or more records in a database table with the same primary key, primary keys are unique keys with the addition of a not-null constraint. If you need multiple records with a same key, you must add another key to the primary key. (use a timestamp or a counter)
Regards,
Raymond -
Join multiple tables to create one new table with data from all the other
CREATE TABLE NAME2012 (STOCKNAME2012 VARCHAR(255), VAL2012 FLOAT)
INSERT INTO NAME2012 VALUES (‘Stock3’, 50)
INSERT INTO NAME2012 VALUES (‘Stock2’, 55)
INSERT INTO NAME2012 VALUES (‘Stock4’, 45)
CREATE TABLE NAME2011 (STOCKNAME2011 VARCHAR(255), VAL2011 FLOAT)
INSERT INTO NAME2011 VALUES (‘Stock1’, 56)
INSERT INTO NAME2011 VALUES (‘Stock2’, 48)
INSERT INTO NAME2010 VALUES (‘Stock3’, 59)
CREATE TABLE NAME2010 (STOCKNAME2010 VARCHAR(255), VAL2010 FLOAT )
INSERT INTO NAME2010 VALUES (‘Stock1’, 47)
INSERT INTO NAME2010 VALUES (‘Stock2’, 46)
I would like a new Table STOCKS populated with names of stocks from the other tables as well as values. So I get a new table STOCKS, with data as below.
CREATE TABLE STOCKS (NAME VARCHAR(255), VALUE2012 FLOAT , VALUE2011 FLOAT, VALUE2010 FLOAT)
End result in table STOCKS should be like:
NAME VALUE2010 VALUE2011
VALUE2012
Stock1 47
56 NULL
Stock2 46
48 50
Stock3 NULL 59
55
Stock4 NULL NULL
45
How can I write a T-SQL expression that could do this?Hi
There must be StockMaster
Try this
CREATE TABLE NAME2012 (
STOCKNAME2012 VARCHAR(255)
,VAL2012 FLOAT
INSERT INTO NAME2012
VALUES (
'Stock3'
,50
INSERT INTO NAME2012
VALUES (
'Stock2'
,55
INSERT INTO NAME2012
VALUES (
'Stock4'
,45
CREATE TABLE NAME2011 (
STOCKNAME2011 VARCHAR(255)
,VAL2011 FLOAT
INSERT INTO NAME2011
VALUES (
'Stock1'
,56
INSERT INTO NAME2011
VALUES (
'Stock2'
,48
CREATE TABLE NAME2010 (
STOCKNAME2010 VARCHAR(255)
,VAL2010 FLOAT
INSERT INTO NAME2010
VALUES (
'Stock1'
,47
INSERT INTO NAME2010
VALUES (
'Stock2'
,46
INSERT INTO NAME2010
VALUES (
'Stock3'
,59
Create table stockMaster(STOCKNAME VARCHAR(255))
go
Insert into stockMaster values('Stock1')
Insert into stockMaster values('Stock2')
Insert into stockMaster values('Stock3')
Insert into stockMaster values('Stock4')
Select Distinct S.STOCKNAME , A.VAL2010 ,B.VAL2011,C.VAL2012 from stockMaster S
left join NAME2012 C on S.STOCKNAME = C.STOCKNAME2012
left join NAME2011 B on s.STOCKNAME = B.STOCKNAME2011
left join NAME2010 A on s.STOCKNAME = A.STOCKNAME2010
go
Drop table NAME2010
Drop table NAME2011
Drop table NAME2012
Drop table stockMaster
Mark as Ans if you find it useful
Shridhar J Joshi Thanks a lot -
Connection Pool Name Missing from Drop Down when Creating a New Datasource
Hi All,
I'm running Weblogic Server 8.1. I've successfully created a connection pool for DB2 using the Non-XA JDBC driver from IBM (Version 7.1). When I attempt to create a datasource for this pool and un-check the "Honor Global Transactions" checkbox, the connection pool is missing from the dropdown on the next page of the wizard. If I check the checkbox, the connection pool appears in the list.
I experience this behavior on one instance of Weblogic Server, but not on another (I can see the pool whether or not the check box is checked).
Is there some setting on the connection pool that could cause this behavior?
Any help would be appreciated.
Thanks,
SteveSteven Grant wrote:
Hi All,
I'm running Weblogic Server 8.1. I've successfully created a connection pool for DB2 using the Non-XA JDBC driver from IBM (Version 7.1). When I attempt to create a datasource for this pool and un-check the "Honor Global Transactions" checkbox, the connection pool is missing from the dropdown on the next page of the wizard. If I check the checkbox, the connection pool appears in the list.
I experience this behavior on one instance of Weblogic Server, but not on another (I can see the pool whether or not the check box is checked).
Is there some setting on the connection pool that could cause this behavior?
Any help would be appreciated.
Thanks,
SteveI can't reproduce this on 8.1sp5...
I would have you compare the JDBCConnectionPool entry
between the two instances. -
I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
1. Party (PartyId, Name)
2. Case (CaseId, CaseNo)
3. Petitioner (CaseId, PartyId) ............. Link Table
I am completely new to .Net and to begin with I download Microsoft's sample application and
following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
users can choose one from the dropdown list to add or edit the petitioner.Hello Barry,
Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
the sample available at the link you supplied.
To get the idea of the thing here is my code behind of a view vBoxPetitioner:
<UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:v="clr-namespace:CCIS.View.Case"
xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
mc:Ignorable="d"
d:DesignWidth="300"
d:DesignHeight="200">
<UserControl.Resources>
<DataTemplate DataType="{x:Type vm:vmPetitioner}">
<v:vPetitioner Margin="0,2,0,0" />
</DataTemplate>
</UserControl.Resources>
<Grid>
<HeaderedContentControl>
<HeaderedContentControl.Header>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Margin="2">
<Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
| <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
</TextBlock>
</StackPanel>
</HeaderedContentControl.Header>
<ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
</HeaderedContentControl>
</Grid>
</UserControl>
This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
Here is the code of vmPetitioner, a ViewModel:
Imports Microsoft.VisualBasic
Imports System.Collections.ObjectModel
Imports System
Imports CCIS.Model.Party
Namespace CCIS.ViewModel.Case
''' <summary>
''' ViewModel of an individual Email
''' </summary>
Public Class vmPetitioner
Inherits vmParty
''' <summary>
''' The Email object backing this ViewModel
''' </summary>
Private petitioner As tblParty
''' <summary>
''' Initializes a new instance of the EmailViewModel class.
''' </summary>
''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
Public Sub New(ByVal detail As tblParty)
If detail Is Nothing Then
Throw New ArgumentNullException("detail")
End If
Me.petitioner = detail
End Sub
''' <summary>
''' Gets the underlying Email this ViewModel is based on
''' </summary>
Public Overrides ReadOnly Property Model() As tblParty
Get
Return Me.petitioner
End Get
End Property
''' <summary>
''' Gets or sets the actual email address
''' </summary>
Public Property fldPartyId() As String
Get
Return Me.petitioner.fldPartyId
End Get
Set(ByVal value As String)
Me.petitioner.fldPartyId = value
Me.OnPropertyChanged("fldPartyId")
End Set
End Property
End Class
End Namespace
And below is the ViewMode vmParty which vmPetitioner Inherits:
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports CCIS.Model.Case
Imports CCIS.Model.Party
Imports CCIS.ViewModel.Helpers
Namespace CCIS.ViewModel.Case
''' <summary>
''' Common functionality for ViewModels of an individual ContactDetail
''' </summary>
Public MustInherit Class vmParty
Inherits ViewModelBase
''' <summary>
''' Gets the underlying ContactDetail this ViewModel is based on
''' </summary>
Public MustOverride ReadOnly Property Model() As tblParty
'''' <summary>
'''' Gets the underlying ContactDetail this ViewModel is based on
'''' </summary>
'Public MustOverride ReadOnly Property Model() As tblAdvocate
''' <summary>
''' Gets or sets the name of this department
''' </summary>
Public Property fldName() As String
Get
Return Me.Model.fldName
End Get
Set(ByVal value As String)
Me.Model.fldName = value
Me.OnPropertyChanged("fldName")
End Set
End Property
''' <summary>
''' Constructs a view model to represent the supplied ContactDetail
''' </summary>
''' <param name="detail">The detail to build a ViewModel for</param>
''' <returns>The constructed ViewModel, null if one can't be built</returns>
Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
If detail Is Nothing Then
Throw New ArgumentNullException("detail")
End If
Dim e As tblParty = TryCast(detail, tblParty)
If e IsNot Nothing Then
Return New vmPetitioner(e)
End If
Return Nothing
End Function
End Class
End Namespace
And final the code behind of the view vPetitioner:
<UserControl x:Class="CCIS.View.Case.vPetitioner"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
mc:Ignorable="d"
Width="300">
<UserControl.Resources>
<ResourceDictionary Source=".\CompactFormStyles.xaml" />
</UserControl.Resources>
<Grid>
<Border Style="{StaticResource DetailBorder}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Petitioner:" />
<ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
</Grid>
</Border>
</Grid>
</UserControl>
The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
what I need to Know is how to route the binding path if it exists in a different ViewModel?
Sir, I look forward to your early reply bringing a workable solution to the problem I face.
Warm Regards,
Arun -
How to use one query against multiple table and recieve one report?
I have duplicate tables, (except for their names of course) with commodities prices. They have the same column headings, but the data is different of course. I have a query that gives me a certain piece of information I am looking for but now I need to run this query against every table. I will do this every day as well, to see if the buying criteria is met. There are alot of tables though (256). Is there a way to say run query in all tables and return the results in one place? Thanks for your help.
hey
a. the all 256 tables whuld be one big partitoned table
b. you can use all_tables in order to write a select that will write the report for you:
SQL> set head off
SQL> select 'select * from (' from dual
2 union all
3 select 'select count(*) from ' || table_name || ' union all ' from a
4 where table_name like 'DB%' AND ROWNUM <= 3
5 union all
6 select ')' from dual;
select * from (
select count(*) from DBMS_LOCK_ALLOCATED union all
select count(*) from DBMS_ALERT_INFO union all
select count(*) from DBMS_UPG_LOG$ union all
remove the last 'union all', and tun the generated quary -
SQL> set head on
SQL> select * from (
2 select count(*) from DBMS_LOCK_ALLOCATED union all
3 select count(*) from DBMS_ALERT_INFO union all
4 select count(*) from DBMS_UPG_LOG$
5 );
COUNT(*)
0
0
0
Amiel -
While creating a new row in table,the total data present in table is coming
Hi,
From search page,i click add button,it goes to next transaction page.In transaction page i drag and drop one VO in table and in form also.But in that transaction page,The table is coming with data and a new row is also able to insert.But i don't want the previous data whatever present in table in create a new row time.Please give me the solution.
Thanks in advance
SravanthiNot sure I understand what you are trying to do.
If you have a table and a form based on the same data on one page you see the already existing data in the table. If you don't want to see the existing data in the table while entering a new row, the simplest solution would be to
a) hide the table after the use hits create new row or
b) navigate to an other page which only shows the form
Timo -
When I click a link in thunderbird and also on firefox it creates a new tab with nothing in it, a blank web page. If I click the link again it creates a new tab with the link. If i click it again, a blank tab, click it again,new tab with the correct info. It seems to work only on the even numbered clicks not the odd ones.
If you delete all the Adobe Reader stuff it will probably fix this. For almost everything, the Apple pdf handling works better.
Maybe you are looking for
-
Issue Previewing Songs in iTunes Store
When previewing songs in the iTunes store only 5-10 secs play instead of the full 90 secs. Anyone know how to fix this?I
-
Many to many relationships (Again)
Hello, There was a posting on above subject. Re: Many to many relationships between Fact and Dimension They asked to look chapter 3 in the user's guide... <http://download.oracle.com/docs/pdf/B10996_01.pdf>. chapter 3 talks about defining Oracle Data
-
When I turn on iPad it says connect to iTunes after attempting a restore
Been having a bit of trouble with my iPad recently so thought I would do a factory reset to try and fix it. So i put it on to do the reset using iTunes and left the room, only to come back 5 minutes later and see that my iPad is showing the iTunes lo
-
I am new to FCP. I have a canon 60d camera and purchased fcpX. I was recommended to download mgep streamline and convert my files to prores422. I do not have an option for prores 422 in my download. How can I fix the problem.Please help. There was an
-
I recently bought a used iPhone 4S from a seller on ebay, which is locked to the Three UK network. I am a Three PAYG customer so I assumed that my microsim would work fine in the 4S. However, I cannot get service on the iPhone. It says "No Service" i