Bug in usage of date field from another module
Today I encontered very weird behaviour in the use of a datefield in a rule. I have made a small video of my screen, which shows the behaviour.
Can anyone help me with a workaround, or tell my what I do wrong?
Thanx!
Han Joosten
The error is probably not specifically identifying the problem - it is merely trying to guess the cause. I have reproduced this error based on what I *think* are the defined attributes and I think the true error is that there's no attribute "de emigratiedatum van de migratie" in the entity "de migratie". Once I added that attribute (either as a date or date-time) then the rule compiles.
Similar Messages
-
CRVS2010 beta - Date field from database does not display in report
Hi there - can someone please help?!
I am getting a problem where a date field from the database does not display in the report viewer (It displays on my dev machine, but not on the client machines...details given below)
I upgraded to VS 2010
I am using the CRVS2010 Beta
My development machine is Windows 7 - and so is my fellow developer's
We are using Microsoft SQL Server 2000
We run the queries within VS and then we send the data table to VS using .SetDataSource
We have a few reports which display the date on our dev machines (whether we run the EXE or from within Visual Studio)
When we roll out to the client machines (running Windows XP SP3) then everything works, except that the date does not display (on quite a few reports)
This is the only real issue I have had - a show stopper for me
The rest works well - any input will be greatly appreciated
Regards,
RidwanHi Ridwan,
After much testing I have it all working now using CRDB_adoplus.dll as a data source ( XML )
Alter your Config file to look like this:
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
Then using the code below, and CR requires the Schema to be able to read the date format.
private void SetToXML_Click(object sender, EventArgs e)
CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
ISCDReportClientDocument rcd;
rcd = rptClientDoc;
string connString = "Provider=SQLOLEDB;Data Source=dwcb12003;Database=xtreme;User ID=sb;Password=password";
string sqlString = "Select * From Orders";
OleDbConnection oleConn = new OleDbConnection(connString);
OleDbDataAdapter oleAdapter = new OleDbDataAdapter(sqlString, oleConn);
//OleDbDataAdapter oleAdapter2 = new OleDbDataAdapter(sqlString2, oleConn);
DataTable dt1 = new DataTable("Orders");
oleAdapter.Fill(dt1);
System.Data.DataSet ds = new System.Data.DataSet();
// We need the schema to get the data formats
ds.WriteXml("c:
sc.xml", XmlWriteMode.WriteSchema);
//Create a new Database Table to replace the reports current table.
CrystalDecisions.ReportAppServer.DataDefModel.Table boTable = new CrystalDecisions.ReportAppServer.DataDefModel.Table();
//boMainPropertyBag: These hold the attributes of the tables ConnectionInfo object
PropertyBag boMainPropertyBag = new PropertyBag();
//boInnerPropertyBag: These hold the attributes for the QE_LogonProperties
//In the main property bag (boMainPropertyBag)
PropertyBag boInnerPropertyBag = new PropertyBag();
//Set the attributes for the boInnerPropertyBag
boInnerPropertyBag.Add("File Path ", @"C:\sc.xml");
boInnerPropertyBag.Add("Internal Connection ID", "{680eee31-a16e-4f48-8efa-8765193dccdd}");
//Set the attributes for the boMainPropertyBag
boMainPropertyBag.Add("Database DLL", "crdb_adoplus.dll");
boMainPropertyBag.Add("QE_DatabaseName", "");
boMainPropertyBag.Add("QE_DatabaseType", "");
//Add the QE_LogonProperties we set in the boInnerPropertyBag Object
boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag);
boMainPropertyBag.Add("QE_ServerDescription", "NewDataSet");
boMainPropertyBag.Add("QE_SQLDB", "False");
boMainPropertyBag.Add("SSO Enabled", "False");
//Create a new ConnectionInfo object
CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo boConnectionInfo =
new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
//Pass the database properties to a connection info object
boConnectionInfo.Attributes = boMainPropertyBag;
//Set the connection kind
boConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
//*EDIT* Set the User Name and Password if required.
boConnectionInfo.UserName = "";
boConnectionInfo.Password = "";
//Pass the connection information to the table
boTable.ConnectionInfo = boConnectionInfo;
//Get the Database Tables Collection for your report
CrystalDecisions.ReportAppServer.DataDefModel.Tables boTables;
boTables = rptClientDoc.DatabaseController.Database.Tables;
//For each table in the report:
// - Set the Table Name properties.
// - Set the table location in the report to use the new modified table
boTable.Name = "Orders";
boTable.QualifiedName = "Orders";
boTable.Alias = "Orders";
rptClientDoc.DatabaseController.SetTableLocation(boTables[0], boTable);
//Verify the database after adding substituting the new table.
//To ensure that the table updates properly when adding Command tables or Stored Procedures.
rptClientDoc.VerifyDatabase();
MessageBox.Show("Data Source Set", "RAS", MessageBoxButtons.OK, MessageBoxIcon.Information);
Thanks again
Don -
How to load date field from a remote Oracle DB with DB Connect
Hi,
Does any one have experience extracting Date field from a remote Oracle database through DB Connect to BW? I am experiencing data format issue. The extracted data shows '04-Oct-0' for '10/4/05'. It works fine if I create a view in Oracle database to preformat the data to '20051004'. But, I am not allowed to create view in Remote DB.
Any suggestion is very appreciated.
Regards,
FrankYou have to change it to a varchar2 field. YYYYMMDD. I do not know of any other option.
-
Updating a date field witha field from another table
Hi friends
I have a table called Customer_Type with following fields
Customer_type ,Active_date, Inactive_date
regular,11/01/2011
daily,11/04/2011
monthly,11/05/2011/11/11/2011
Tbale 2:Customer
Customer_name,Customer_type,Customer_Inactive_date
John,regular,
James,monthly,
Jake,daily,
Jill,monthly
What i wnat is to update the Customer_inactive_date with the Incative_date field from Customer_type
based on their Customer_type... So james and Jill would have their rows updated in this scneario ..How can i achive this in pl/Sql
Thank you in advance...Hi,
You can look at this code; it's not PL/SQL but a simple MERGE statement:
CREATE TABLE CUSTOMER_TYPE
type_code VARCHAR2(10),
active_date DATE,
inactive_date DATE
INSERT INTO customer_type VALUES('REGULAR', TO_DATE('11/01/2011', 'DD/MM/YYYY'), null);
INSERT INTO customer_type VALUES('DAILY', TO_DATE('11/04/2011', 'DD/MM/YYYY'), null);
INSERT INTO customer_type VALUES('MONTHLY', TO_DATE('11/05/2011', 'DD/MM/YYYY'), TO_DATE('11/11/2011', 'DD/MM/YYYY'));
CREATE TABLE CUSTOMERS
customer_name varchar2(10),
customer_type varchar2(10),
customer_inactive_date DATE
INSERT INTO customers VALUES('John', 'REGULAR', null);
INSERT INTO customers VALUES('James', 'MONTHLY', null);
INSERT INTO customers VALUES('Jake', 'DAILY', null);
INSERT INTO customers VALUES('Jill', 'MONTHLY', null);
MERGE INTO customers dst
USING customer_type src
ON (dst.customer_type = src.type_code)
WHEN MATCHED THEN
UPDATE set dst.customer_inactive_date = src.inactive_date;
SELECT * FROM customers;
CUSTOMER_NAME CUSTOMER_TYPE CUSTOMER_INACTIVE_DATE
John REGULAR
James MONTHLY 11-NOV-11
Jake DAILY
Jill MONTHLY 11-NOV-11 If you don't understand it, just let me know... -
How do you add a Day to a Date Referenced from another field
I tried this and all of the other Date Calcs in the other posts but can't get it to work. The field (Read Only Text or Calculated Date field:
var MyDate=xfa.resolveNode("form1.#subform.RepeatableSubform.#subform.StartDate")
if(HasValue(MyDate)) then
Num2Date( (Date2Num(MyDate.formattedValue, "EEEE, MMMM D, YYYY") + 1), "EEEE, MMMM D, YYYY")
null
endif
Any Suggestions?Try it like this...
Num2Date( (Date2Num(MyDate.rawValue, "YYYY-MM-DD") + 1), "EEEE, MMMM D, YYYY") -
DTP can Not extract data of date field from PSA to Target DSO
Hi everyone.
I enhanced several fields in datasource "2LIS_12_VCITM". that is date field "BLDAT" and another date type fields.
The data of date type fields are extracted very well from datasource to PSA.
But only field "BLDAT" among them are NOT extracted from PSA to target DSO.
Another date type fields is good. but only "BLDAT" field is empty.
I added "BLDAT" later than another date fields.
Is that the reason??
I don't know why.
Let me know the solution. pls~~~~Hi,
Try deleting and recreating the DTP and loading again.
This solution refers to note 925941 and should be solved in SPS10.
Best regards,
Olav -
Copy data customer PO and PO date field from quotation to sales order
Hi Friends,
Can you please let me know what copy control settings I need to maintain in order to copy customer PO# and PO date field data in quotation to sales order.
All the data is getting copied from quotation to sales order when I create sales order with reference to quotation but the customer PO no. and PO date is not getting copied.
Can anyone please help.
Regards,
Wasim.HI
Not sure if this is possible via Customization or not but you can try the user-exits or Routines for the Sales Order program for this
You need to change the include FV45C102 (assuming you have copied standard order and the copy controls). ABAP team should be able to make changes to this routine and achieve your requirement.
In VTAA, after choosing the Source and Target order type and choosing the right Quatation item, check the routine for 'Bus.data/item compl.' and it will be what has been mentioned above.
Please check &Revert
Thanks&Regards
Raghu.k -
Set Default Value based on Field from another table for a custom object
I'm trying to set the default value on a custom object field to the value of an account field. I have tried the syntax 50 different ways, and just am getting no where. The account field label displays as DBA, the integration tag is ltDBA_ACCT, and it shows up in reporting fx area as Account.Text_22.
The custom object field I'm triying to update is also called DBA, which was originally the "NAME" required field. Does the table name, Account, have to be included? Do I need a function in front of the field?
I have been updating the external ID using the row ID with syntex <ID> (Less than ID greater than) so I know it is possible to set the Default Value, but <DBA>, <ltDBA_ACCT>, "Account"."DBA", and so on just don't not work.
If anyone knows how to enter this I'd really appreciate the help.Ok, so if you want to default a field to the value from another object, you have to use the JoinFieldValue function. I think you understand that, based on your original post, but I want to be sure that you do.
Next, this will only work as a default if the record is created from the object that you wish to join on because a default works at record creation and the ID needs to be available for it to work properly. It will not work if you choose the related object record after the custom object record is created. You could set the value as a post-default, but that does not seem to meet your requirements.
The syntax for the Default Value would be as follows: JoinFieldValue(ref_record_type, foreign_key, field_name).
In your case, ref_record_type is '<Account>', foreign_key is [<AccountId>], and field_name is '<YourFieldName>'. The best way to determine what the field name is would be to create a new workflow for Account and use the Workflow Rule Condition expression builder to pick your field ("DBA") from the list. The value that is returned by the expression builder should be placed in the field_name variable in the JoinFieldValue function (minus the brackets and in single quotes).
Give this a shot and let me know how you do.
Thom -
Hi
I am trying to import date fields in an Oracle database in to SQL Server 2012, using SSIS. The package is using DT_DBTIMESTAMP type in the Data Flow, but this has the same range as SQL Server datetime, and it bombs out all the time.
I have tried to change the type used to DT_DBDATE, but no matter what I do the data type on the input columns is readonly and will not change.
Any help would be much appreciated
Andy
CRM 4, SQL Server and .Net developer using C#Hi Andy,
From the Mapping of Integration Services Data Types to Database Data Types section of the document, we can get the detailed information about mapping the Oracle data types to Integration Services data types. To change the data type from DT_DBTIMESTAMP to
DT_DBDATE, we can use the following two methods:
Method 1:
Right click on the Source component and click “Show Advanced Editor”.
Switch to the “Input and Output Properties” tab, expand the XX Source Output node, and expand the Output Columns node.
Click the target column, and change the DataType property to DT_DBDATE.
Method 2:
Add a Data Conversion component to the Data Flow Task
Double click the Data Conversion component to open the Data Conversion Transformation Editor
Select the target input column, and change the Data Type to database date [DT_DBDATE].
If I have anything misunderstood, please feel free to let me know.
Regards,
Mike Yin
If you have any feedback on our support, please click
here
Mike Yin
TechNet Community Support -
Problem With Crystal Reports Reading Date Fields From CSV File
I have a date field in a CSV file in the format 06/28/09 17:23:55.523. When I use ODBC the configuartion picks it up a character field. I overright the recommendation type by specifing it is a date field but whne I bring the data into crystal reports the dates are blanks. Any suggestions on how to get around this problem. I need to use the date for selection records.
PhasorThe question was answered under another thread. I had to use the split commmand to get rid of the fractions of a second
-
Loading Date fields from flat file to Oracle tables
Hi,
I have a flat file with a few date columns. I have given the format for the date field while creating the data store for the flat file. The format I used is 'YYYY-MM-DD'.
But I get an error when I execute it after associating the module with LKM & IKM.
The error message is as follows:
org.apache.bsf.BSFException: exception from Jython: Traceback (innermost last):
File "<string>", line 3, in ?
OS command has signalled errors
Can anyone help me out.
ThanksAt the time of DataStore creation. You take that date field as string.
After this, in interface, when you map this date field with table field. You should use CONVERT(<field name>,DATE) in expression editor. -
Target Spry RowID on page with Multiple data sets from another page
Hi all,
I am trying to target a specific data item, on a page with
multiple data sets, from a link on another page. (I also have to
pass the link through Flash, but lets start with the simple
part...)
You can take a look at the site in progress here:
http://www.3andband.com/TestSite/iframeTest3.html
From the Home page I want to link to specific news or concert
items on the News page
I have been trying to get SpryURLUtils to do it but I can't
seem to get it working.
Any help would be greatly appreciated.
Thanks!
Bendid u try if it even passes the row value?? with a simple
alert? alert(params.row)
Also maby u need to reorder the scripts to this;
<script src="../SpryAssets/SpryURLUtils.js"
type="text/javascript"></script>
<script src="../SpryAssets/xpath.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryData.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryCollapsiblePanel.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryEffects.js"
type="text/javascript"></script>
<script src="../SpryAssets/SpryAccordion.js"
type="text/javascript"></script>
and your js script
var params = Spry.Utils.getLocationParamsAsObject();
var dsConcerts = new
Spry.Data.XMLDataSet("includes/concerts.xml", "Concerts/concert");
dsConcerts.setColumnType("image", "image");
var dsNews = new Spry.Data.XMLDataSet("includes/news.xml",
"News/item");
//Set an observer so that when the data is loaded, we update
the current row to the url param value
dsNews.addObserver({ onPostLoad: function(ds, type) {
dsNews.setCurrentRow(params.row); }
function MM_effectBlind(targetElement, duration, from, to,
toggle)
Spry.Effect.DoBlind(targetElement, {duration: duration,
from: from, to: to, toggle: toggle});
So url params get loaded before the data -
Adf-Struts/JSP/BC4J- and setting date fields from jsp
Hi,
I'm working with the new ADF Frameworks (JDev 9.0.5.1) and ran into some questions regarding exception handling using BC4J, Struts and JSPs.
I have a DATE column in database and an entity and VO with a datefield with type oracle.jbo.domain.Date.
My JSP shows a textfield and the user should enter a valid date. Everything fine, until date is of wrong format or contains illegal characters...
Problem:
ADF tries to do a setAttribute on the datefield in VO row which expects a parameter with type oracle.jbo.domain.Date. When the user entered e.g. "NiceWeather" as date, I get an IIlegalArgumentException while converting to the correct Date format. This exception isn't thrown by bc4j as AttrValException and therefore my JSP renders a global error instead of a message directly behind the date field.
I tried to validate the datefield in my DataForm and in my Action in the validateModelUpdates() method, but with no fitting solution.
Any ideas how to validate a datefield with adf/struts/jsp/bc4j?
Thanks for your help!
Torsten.Torsen - In the first instance I'd recommed that you try and handle it declaritively using the Struts Validator Framework . See http://otn.oracle.com/products/jdev/howtos/10g/StrutsValidator/struts_validator_howto.html
There is a section in there on how to use the validator with ADF databound pages and you can check the format the user enters via generated JavaScript.
Also check out the matching sample project:
http://otn.oracle.com/sample_code/products/jdev/10g/ADFandStrutsValidator.zip - this has a data field check on it as well -
Date range using "Date Field" from basic component
Hello Everyone,
I have been trying to create date range option available on the dashboard based on 2 Date Filed component.
Backend for this Dashboard is BW with using BEx query. I have a info object (Z_Date)
Now I want to have 2 date box using Date Field component 1. Start Date 2. End Date.
I have tried following
1. Start Date - on Select
DS_1.setFilter("Z_Date", {"low":StartDate.getDate()});
2. End Date - on Select
DS_1.setFilter("Z_Date", {"High":EndDate.getDate()});
both the scripts do not have any problem but it doest work as it is suppose to be.
I have also tried based on following How to write script for DATE Range
But no luck so far.
Please share if any one have achieved date range working as mentioned.
Thanks,
RajanHi,
Set Default Date in Both Date Prompts initially .
1. Start Date - on Select
var startDate = StartDate.getDate();
var endDate = EndDate.getDate();
var varRange = startDate + " - " + endDate;
DS_1.setFilterExt("Z_SDPCD", varRange);
2. End Date - on Select
var startDate = StartDate.getDate();
var endDate = EndDate.getDate();
var varRange = startDate + " - " + endDate;
DS_1.setFilterExt("Z_SDPCD", varRange);
Or
Select Dates First Then Provide a Button (Done) .
And write code On Click Event of that Button
var startDate = StartDate.getDate();
var endDate = EndDate.getDate();
var varRange = startDate + " - " + endDate;
DS_1.setFilterExt("Z_SDPCD", varRange); -
Combined more Data Fields from different segments in single report
Hi all,
i want to combined report from more then one segment(like 2 fields from Sales & Distribution & one Field from Inventory) then what should i do so far,
should i create cubes in respective segment,
either i create that but when i add it into Select item in that after selection of a field all of others segment disabled.Hi
By far the simplest method would be to concatenate the two fields in a calculation like this: FIELDA || FIELDB
Should you want spaces between them then do this: FIELDA || ' ' || FIELDB
If you want a dash and spaces either side you do this: FIELDA || ' - ' || FIELDB
Does this help?
Best wishes
Michael
Maybe you are looking for
-
Time machine for new HOME FOLDER location?
i am on lion on a mac pro and for some reason i am getting a bit clutched here redoing my backup routine after having MOVED MY HOME FOLDER to a NEW DISK (it is now in bay 3). i have just wiped the external "Time Machine" disk and then in TIME MACHINE
-
Where can I find updates for Acrobat Pro 9 for Mac?
I have just changed computers, and after installing Acrobat Pro 9 from the disk, I can't find updates anywhere. All the links to Mac updates only go back to 10. Also, my Help menu does not contain the traditional "check for updates." I know there a
-
White Screen of Death on 5800 xm
Clue anybody to probable cuase of white screen of death on a 5800 xm . Where phone just sticks on the white screen or sometimes the actual boot screen . Its not a reboot that happens phone just freezes battery out solves the problem . Have an id
-
I have been using create a book for a few weeks with maps working perfectly with place names and arrows. Now I get the below. Maps don't display properly in the book or when previewing. They work fine in Places, i have cleared cookies, deleted my pre
-
Source of .png email attachment problem
When opening .png email attachments from some companies, instead of seeing a photo of an object, I get an image such as the following: This is actually a company logo, as opposed to the photo that was supposed to be there. I can't get anything differ