If image file not exist in image path crystal report not open and give me exception error problem
Hi guys my code below show pictures for all employees
code is working but i have proplem
if image not exist in path
crystal report not open and give me exception error image file not exist in path
although the employee no found in database but if image not exist in path when loop crystal report will not open
how to ignore image files not exist in path and open report this is actually what i need
my code below as following
DataTable dt = new DataTable();
string connString = "data source=192.168.1.105; initial catalog=hrdata;uid=sa; password=1234";
using (SqlConnection con = new SqlConnection(connString))
con.Open();
SqlCommand cmd = new SqlCommand("ViewEmployeeNoRall", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
da.Fill(dt);
foreach (DataRow dr in dt.Rows)
FileStream fs = null;
fs = new FileStream("\\\\192.168.1.105\\Personal Pictures\\" + dr[0] + ".jpg", FileMode.Open);
BinaryReader br = new BinaryReader(fs);
byte[] imgbyte = new byte[fs.Length + 1];
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
dr["Image"] = imgbyte;
fs.Dispose();
ReportDocument objRpt = new Reports.CrystalReportData2();
objRpt.SetDataSource(dt);
crystalReportViewer1.ReportSource = objRpt;
crystalReportViewer1.Refresh();
and exception error as below
First: I created a New Column ("Image") in a datatable of the dataset and change the DataType to System.Byte()
Second : Drag And drop this image Filed Where I want.
private void LoadReport()
frmCheckWeigher rpt = new frmCheckWeigher();
CryRe_DailyBatch report = new CryRe_DailyBatch();
DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter ta = new CheckWeigherReportViewer.DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter();
DataSet1.DataTable_DailyBatch1DataTable table = ta.GetData(clsLogs.strStartDate_rpt, clsLogs.strBatchno_Rpt, clsLogs.cmdeviceid); // Data from Database
DataTable dt = GetImageRow(table, "Footer.Jpg");
report.SetDataSource(dt);
crv1.ReportSource = report;
crv1.Refresh();
By this Function I merge My Image data into dataTable
private DataTable GetImageRow(DataTable dt, string ImageName)
try
FileStream fs;
BinaryReader br;
if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + ImageName))
fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
else
// if photo does not exist show the nophoto.jpg file
fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
// initialise the binary reader from file streamobject
br = new BinaryReader(fs);
// define the byte array of filelength
byte[] imgbyte = new byte[fs.Length + 1];
// read the bytes from the binary reader
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
dt.Rows[0]["Image"] = imgbyte;
br.Close();
// close the binary reader
fs.Close();
// close the file stream
catch (Exception ex)
// error handling
MessageBox.Show("Missing " + ImageName + "or nophoto.jpg in application folder");
return dt;
// Return Datatable After Image Row Insertion
Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]
Similar Messages
-
My itunes will not open and gives me an error message
My itunes will not open and give me an error message of 126... PLEASE HELP
Hello, sarahehines.
Thank you for visiting Apple Support Communities.
Here are the steps I would recommend going through as they should resolve the issue.
iTunes 11.1.4 for Windows: Unable to install or open
http://support.apple.com/kb/TS5376
Cheers,
Jason H. -
How to update an image file into existing file
how to update an image file into existing file
Hi,
So, i assume you want to change one picture. On Stage, i have edgeAnimate (an image), and
1) i am using the div tag.
So: sym.$("edgeAnimate").css("background-image", "url(images/myImage.png)" ); will change my picture.
Link: CSS properties.
More CSS:
sym.$("edgeAnimate").css( { "background-image": "url(images/myImage.png)", "background-size": "100% 100%", "background-repeat": "no-repeat", "cursor": "pointer" } );
Using a path variable:
var myPath = "images/myImage.png";
sym.$("edgeAnimate").css( { "background-image": "url("+myPath+")", "background-size":"100% 100%", "background-repeat":"no-repeat", "cursor": "pointer" } );
2) i am using the img tag.
I can add a class using Edge Animate user interface.
I choose one class name: "newImage".
So: sym.$(".newImage").css("background-image", "url(images/myImage.png)" ); will change my picture.
Note: I assumed you don’t need to preload your picture. -
Bursting Problem - A file or directory in the path name does not exist
I'm trying to burst some data via email using the standard DocumentProcessor java code but receiving an error relating, I assume, to an invalid temporary directory. I've checked that the directory exists, as do the data file and control file. By the way I am not running in Apps, just stand alone mode. Any ideas would be much appreciated.
[042308_104249440][oracle.apps.xdo.batch.bursting.FileHandler][EXCEPTION] java.io.FileNotFoundException: /u02/DIAS/bursting/BIPublisher/tmp/042308_104249338/xdo2.tmp (A file or directory in the path name does not exist.)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:205)
at java.io.FileOutputStream.<init>(FileOutputStream.java:96)
at oracle.apps.xdo.template.RTFProcessor.setOutput(Unknown Source)
at oracle.apps.xdo.batch.bursting.FileHandler.rtf2xsl(Unknown Source)
at oracle.apps.xdo.batch.bursting.ProcessDocument.getXSLFile(Unknown Source)
at oracle.apps.xdo.batch.bursting.ProcessDocument.processTemplate(Unknown Source)
at oracle.apps.xdo.batch.bursting.ProcessCoreDocument.processLayout(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.addDocument2Queue(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.createBurstingDocument(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.burstDocument(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.globalDataEndElement(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.endElement(Unknown Source)
at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201)
at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingRequest(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingEndElement(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.endElement(Unknown Source)
at oracle.xml.parser.v2.XMLContentHandler.endElement(XMLContentHandler.java:196)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1212)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201)
at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingConfigParser(Unknown Source)
at oracle.apps.xdo.batch.BurstingProcessorEngine.process(Unknown Source)
at oracle.apps.xdo.batch.DocumentProcessor.process(Unknown Source)
at PIreportburst.bEngine(PIreportburst.java:24)
at PIreportburst.main(PIreportburst.java:51)
-Below is the java code I'm using
public void bEngine(String ctrlFile, String dataFile, String tmpDir) {
try {
DocumentProcessor dp = new DocumentProcessor(ctrlFile,dataFile,tmpDir);
dp.process();
catch (Exception e) {
System.out.println(e);
}Thanks Ike
Where do you suggest setting the temp directory:
DocumentProcessor("control.xml","data.xml","/u02/DIAS/bursting/BIPublisher/tmp/042308_104249338/xdo2.tmp")
or in the xdo.cfg:
<property name="system-temp-dir">/u02/DIAS/bursting/BIPublisher/tmp/042308_104249338/xdo2.tmp</property>
..and thanks for the link to the BIPublisherIDE
Cheers, Mike -
/etc/oratab (a file or directory in the path name does not exists)
Hello All,
I ma trying to create a database oracle 11g R2 on AIX 6.1.
But i am facing the below error at the beginning of the installation:
/etc/oratab (a file or directory in the path name does not exists)
Your help pls..When I am trying to run root.sh. it gives the below error:
IST76SIT:/apps/oracle/oracle11/app/product/11.2.0/db1> ./root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle11
ORACLE_HOME= /apps/oracle/oracle11/app/product/11.2.0/db1
Enter the full pathname of the local bin directory: [usr/local/bin]: /usr/local/bin
Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
./root.sh[14]: /apps/oracle/oracle11/app/product/11.2.0/db1/rdbms/install/rootadd_rdbms.sh: not found.
./root.sh[16]: /apps/oracle/oracle11/app/product/11.2.0/db1/rdbms/install/rootadd_filemap.sh: not found.
IST76SIT:/apps/oracle/oracle11/app/product/11.2.0/db1> -
T-FV-1030 CIN File Not Exists in required Path.
Dear Gurus,
When executing FVU 3.0 I am getting error as T-FV-1030 CIN File Not Exists in required Path. Please guide where I have missed something .Dear Gurus,
When executing FVU 3.0 I am getting error as T-FV-1030 CIN File Not Exists in required Path. Please guide where I have missed something . -
My Time Machine is not backing up and gives me this error report:
The backup disk image "/Volumes/Data/Valarie'siMac.sparsbundle" is already in use
Time Machine could not complete backup
Can anyone help me?Look at the discussion on the following forum:
https://discussions.apple.com/thread/3882138?start=0&tstart=0
The responses given there may help. -
Package javax.servlet does not exist, package javax.servlet.http does not
Dear All,
I am a newbie to JAVA.
I installed JDK1.6.0_04, then NetBeans IDE 6.0
I tried compiling an example servlet, but got this error message:
package javax.servlet does not exist, package javax.servlet.http does not exist
I tried locating these packages, but in vain. I also tried setting the CLASSPATH to many values, still it did not work.
Can anyone, please, help me with this.
Should I be able to see/locate these packages, do I have to download them?
Thank you very much.davidgoodman wrote:
Dear All,
I am a newbie to JAVA.
I installed JDK1.6.0_04, then NetBeans IDE 6.0
I tried compiling an example servlet, but got this error message:
package javax.servlet does not exist, package javax.servlet.http does not exist
What servlet/JSP engine do you plan to deploy to? Tomcat, perhaps?I think it's Tomcat (C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14). Are there other engines that come with NetBeans IDE 6.0 (when I downloaded NetBeans, I chose ALL)
>
If so, you'll need to put the servlet JAR in your CLASSPATH. (servlet-api.jar for Tomcat 5.5 and earlier, servlet.jar for 6.0 >and later.)
I tried locating these packages, but in vain.
You won't find them until you realize that you have to deploy that servlet someplace.How to deploy?
I also tried setting the CLASSPATH to many values, still it did not work.
See above. What were you planning to set CLASSPATH to?First I set to:
C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14\lib (because I found jar named servlet-api.jar in this folder)
Later I added this:
C:\Program Files\Java\jdk1.6.0_04\lib (out of trial-and-fail)
Finally I added some paths that lead to a library such as
C:\Program Files\glassfish-v2\lib
C:\Program Files\glassfish-v2\lib\ant\lib
Can anyone, please, help me with this.
Should I be able to see/locate these packages, do I have to download them?
You have to get a servlet/JSP engine. Step 1.Thank you for your help -
Crystal report not able to export in EXCEL file in windows 7
Hi Expert,
I have an Form, in which there is a button print. when I press Print button Crystal report open with data. upto here is fine with any operating system (OS).
When I press Export report in XP it working fine, ShowDialog is show on screen where I have to save this file. but When I run as application on windows 7 I got below as error
Current thread must be set to single thread apartment (STA) mode before OLE calls can be made .......
rptDoc.PrintOptions.PaperSize = CType(rawKind, CrystalDecisions.Shared.PaperSize)
rptView.ReportSource = rptDoc
rptView.Show()
Dim oFrm As New System.Windows.Forms.Form
rptView.DisplayGroupTree = False
rptView.Dock = System.Windows.Forms.DockStyle.Fill
rptView.Location = New System.Drawing.Point(0, 0)
oFrm.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
oFrm.Controls.Add(rptView)
oFrm.Name = "Report Viewer"
oFrm.Text = "Report Viewer"
oFrm.ResumeLayout(False)
oFrm.WindowState = System.Windows.Forms.FormWindowState.Maximized
oFrm.TopMost = True
oFrm.ShowDialog()
Catch ex As Exception
objMain.objApplication.MessageBox(ex.Message)
Can you please tell me why is I am not able to export report on windows 7 thru Crystal report
Thanks
KevinHi Kevin,
You may check: Error in Export to PDF for crystal reports
Thanks,
Gordon -
Header ID does not exist on this record or does not match ID
Hi ,
I'm trying to import the sales order using OE_ORDER_PUB.process_order() API. If all my orders has equal no. of lines, I can able to import all the orders at one stoke. But if each order has different no. of lines, I'm unable to import all the orders at single stoke. At first run, certain no. of records are getting processed and remaining records are ending up with error stating *'Header ID does not exist on this record or does not match ID specified on header record. You require a valid header ID if the operation is Create*'. If I re-execute the errored records, its getting processed successfully.
Please help me in getting it resolved.
Find below the procedure code which I'm using to import sales order.
CREATE OR REPLACE PROCEDURE XXRT_SALES_ORDER (ERRBUF VARCHAR2, RETCODE NUMBER)
AS
l_header_rec OE_ORDER_PUB.Header_Rec_Type;
l_line_tbl OE_ORDER_PUB.Line_Tbl_Type;
l_line_adj_tbl OE_ORDER_PUB.Line_Adj_Tbl_Type;
l_return_status varchar2(200);
l_msg_count number;
l_msg_data varchar2(20000);
l_header_val_rec OE_ORDER_PUB.Header_Val_Rec_Type;
l_Header_Adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type;
l_Header_Adj_val_tbl OE_ORDER_PUB.Header_Adj_Val_Tbl_Type;
l_Header_price_Att_tbl OE_ORDER_PUB.Header_Price_Att_Tbl_Type;
l_Header_Adj_Att_tbl OE_ORDER_PUB.Header_Adj_Att_Tbl_Type;
l_Header_Adj_Assoc_tbl OE_ORDER_PUB.Header_Adj_Assoc_Tbl_Type;
l_Header_Scredit_tbl OE_ORDER_PUB.Header_Scredit_Tbl_Type;
l_Header_Scredit_val_tbl OE_ORDER_PUB.Header_Scredit_Val_Tbl_Type;
l_line_val_tbl OE_ORDER_PUB.Line_Val_Tbl_Type;
l_Line_Adj_val_tbl OE_ORDER_PUB.Line_Adj_Val_Tbl_Type;
l_Line_price_Att_tbl OE_ORDER_PUB.Line_Price_Att_Tbl_Type;
l_Line_Adj_Att_tbl OE_ORDER_PUB.Line_Adj_Att_Tbl_Type;
l_Line_Adj_Assoc_tbl OE_ORDER_PUB.Line_Adj_Assoc_Tbl_Type;
l_Line_Scredit_tbl OE_ORDER_PUB.Line_Scredit_Tbl_Type;
l_Line_Scredit_val_tbl OE_ORDER_PUB.Line_Scredit_Val_Tbl_Type;
l_Lot_Serial_tbl OE_ORDER_PUB.Lot_Serial_Tbl_Type;
l_Lot_Serial_val_tbl OE_ORDER_PUB.Lot_Serial_Val_Tbl_Type;
l_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type;
v_remarks varchar2(250);
v_count number;
v_transaction_type number;
v_cust_id number;
v_invoice_to number;
v_ship_to number;
v_itemid1 number;
v_itemid2 number;
v_itemid3 number;
v_itemid4 number;
v_itemid5 number;
v_item_type1 varchar2(15);
v_item_type2 varchar2(15);
v_item_type3 varchar2(15);
v_item_type4 varchar2(15);
v_item_type5 varchar2(15);
cursor c_data_val is select * from XXSC_SALES_ORDER_IMPORT
where process_flag='N';
cursor c_data is select * from XXSC_SALES_ORDER_IMPORT
where process_flag='N';
Begin
fnd_global.apps_initialize(1681,51411,660);
for c_data_val_rec in c_data_val
loop
v_remarks:=NULL;
select count(*) into v_count from apps.oe_order_headers_all
where cust_po_number=c_data_val_rec.iwb_no;
if v_count > 0 then
v_remarks:='Customer PO already used';
end if;
BEGIN
select transaction_type_id into v_transaction_type
from apps.OE_TRANSACTION_TYPES_tl
where name like c_data_val_rec.BILL_TO||'-DOMESTIC';
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_remarks:=v_remarks||'Invalid trans type';
END;
BEGIN
select cust_account_id into v_cust_id
from apps.hz_cust_accounts hca,
apps.hz_parties hp
where hca.party_id=hp.party_id
and hp.party_name=c_data_val_rec.CUSTOMER_NAME;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_remarks:=v_remarks||'Invalid Customer name';
END;
BEGIN
select SITE_USE_ID into v_invoice_to
from apps.hz_parties hp,
apps.hz_party_sites_v hps,
apps.hz_cust_acct_sites_all hcasa,
apps.hz_cust_site_uses_all hcsua
where
party_name=c_data_val_rec.CUSTOMER_NAME
and hp.party_id=hps.party_id
and hps.address1 like '%'||c_data_val_rec.BILL_TO||'%'
and hps.site_use_type='BILL_TO'
and hps.party_site_id=hcasa.party_site_id
and hcasa.cust_acct_site_id=hcsua.cust_acct_site_id
and SITE_USE_CODE='BILL_TO'
and hcsua.Status='A';
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid BILL_TO';
END;
BEGIN
select SITE_USE_ID into v_ship_to
from apps.hz_parties hp,
apps.hz_party_sites_v hps,
apps.hz_cust_acct_sites_all hcasa,
apps.hz_cust_site_uses_all hcsua
where
party_name=c_data_val_rec.CUSTOMER_NAME
and hp.party_id=hps.party_id
and hps.address1 like '%'||c_data_val_rec.SHIP_TO||'%'
and hps.site_use_type='SHIP_TO'
and hps.party_site_id=hcasa.party_site_id
and hcasa.cust_acct_site_id=hcsua.cust_acct_site_id
and SITE_USE_CODE='SHIP_TO'
and hcsua.Status='A';
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid SHIP_TO';
END;
IF c_data_val_rec.item1 is not null then
BEGIN
select distinct inventory_item_id into v_itemid1
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item1;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid ITEM1';
END;
BEGIN
select distinct Item_type into v_item_type1
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item1;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid Itemtype1';
END;
END IF;
IF c_data_val_rec.item2 is not null then
BEGIN
select distinct inventory_item_id into v_itemid2
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item2;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid ITEM2';
END;
BEGIN
select distinct Item_type into v_item_type2
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item2;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid Itemtype2';
END;
END IF;
IF c_data_val_rec.item3 is not null then
BEGIN
select distinct inventory_item_id into v_itemid3
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item3;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid ITEM3';
END;
BEGIN
select distinct Item_type into v_item_type3
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item3;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid Itemtype3';
END;
END IF;
IF c_data_val_rec.item4 is not null then
BEGIN
select distinct inventory_item_id into v_itemid4
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item4;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid ITEM4';
END;
BEGIN
select distinct inventory_item_id into v_item_type4
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item4;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid Itemtype4';
END;
END IF;
IF c_data_val_rec.item5 is not null then
BEGIN
select distinct inventory_item_id into v_itemid5
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item5;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid ITEM5';
END;
BEGIN
select distinct inventory_item_id into v_item_type5
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item5;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid Itemtype5';
END;
END IF;
IF v_remarks is not null then
update XXSC_SALES_ORDER_IMPORT
set process_flag='E', remarks=v_remarks
where iwb_no=c_data_val_rec.iwb_no;
commit;
END IF;
end loop;
for c_data_rec in c_data
loop
select transaction_type_id into v_transaction_type
from OE_TRANSACTION_TYPES_tl
where name like c_data_rec.BILL_TO||'-DOMESTIC';
select cust_account_id into v_cust_id
from hz_cust_accounts hca,
hz_parties hp
where hca.party_id=hp.party_id
and hp.party_name=c_data_rec.CUSTOMER_NAME;
select SITE_USE_ID into v_invoice_to
from hz_parties hp,
hz_party_sites_v hps,
hz_cust_acct_sites_all hcasa,
hz_cust_site_uses_all hcsua
where
party_name=c_data_rec.CUSTOMER_NAME
and hp.party_id=hps.party_id
and hps.address1 like '%'||c_data_rec.BILL_TO||'%'
and hps.site_use_type='BILL_TO'
and hps.party_site_id=hcasa.party_site_id
and hcasa.cust_acct_site_id=hcsua.cust_acct_site_id
and SITE_USE_CODE='BILL_TO'
and hcsua.Status='A';
select SITE_USE_ID into v_ship_to
from hz_parties hp,
hz_party_sites_v hps,
hz_cust_acct_sites_all hcasa,
hz_cust_site_uses_all hcsua
where
party_name=c_data_rec.CUSTOMER_NAME
and hp.party_id=hps.party_id
and hps.address1 like '%'||c_data_rec.SHIP_TO||'%'
and hps.site_use_type='SHIP_TO'
and hps.party_site_id=hcasa.party_site_id
and hcasa.cust_acct_site_id=hcsua.cust_acct_site_id
and SITE_USE_CODE='SHIP_TO'
and hcsua.Status='A';
IF c_data_rec.item1 is not null then
select distinct inventory_item_id into v_itemid1
from apps.mtl_system_items_b
where segment1=c_data_rec.item1;
select distinct Item_type into v_item_type1
from apps.mtl_system_items_b
where segment1=c_data_rec.item1;
ELSE
v_itemid1:= null;
v_item_type1:= null;
END IF;
IF c_data_rec.item2 is not null then
select distinct inventory_item_id into v_itemid2
from apps.mtl_system_items_b
where segment1=c_data_rec.item2;
select distinct Item_type into v_item_type2
from apps.mtl_system_items_b
where segment1=c_data_rec.item2;
ELSE
v_itemid2:=null;
v_item_type2:= null;
END IF;
IF c_data_rec.item3 is not null then
select distinct inventory_item_id into v_itemid3
from apps.mtl_system_items_b
where segment1=c_data_rec.item3;
select distinct Item_type into v_item_type3
from apps.mtl_system_items_b
where segment1=c_data_rec.item3;
ELSE
v_itemid3:=null;
v_item_type3:=null;
END IF;
IF c_data_rec.item4 is not null then
select distinct inventory_item_id into v_itemid4
from apps.mtl_system_items_b
where segment1=c_data_rec.item4;
select distinct Item_type into v_item_type4
from apps.mtl_system_items_b
where segment1=c_data_rec.item4;
ELSE
v_itemid4:= null;
v_item_type4:= null;
END IF;
IF c_data_rec.item5 is not null then
select distinct inventory_item_id into v_itemid5
from apps.mtl_system_items_b
where segment1=c_data_rec.item5;
select distinct Item_type into v_item_type5
from apps.mtl_system_items_b
where segment1=c_data_rec.item5;
ELSE
v_itemid5:= null;
v_item_type5:= null;
END IF;
l_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC; -- Required attributes (e.g. Order Type and Customer)
l_header_rec.order_type_id := v_transaction_type;
l_header_rec.ordered_date := c_data_rec.iwb_date;
l_header_rec.sold_to_org_id := v_cust_id;
l_header_rec.price_list_id := 93174;
l_header_rec.cust_po_number := c_data_rec.iwb_no;
l_header_rec.ship_to_org_id := v_ship_to;
l_header_rec.invoice_to_org_id := v_invoice_to;
l_header_rec.CONTEXT:='566' ;
l_header_rec.ATTRIBUTE1:=c_data_rec.DELIVERY_TYPE;
-- l_header_rec.freight_term_code = NULL;
l_header_rec.operation := OE_GLOBALS.G_OPR_CREATE;
-- FIRST LINE RECORD. Initialize record to missing
if c_data_rec.item1 is not null and
c_data_rec.item2 is not null and
c_data_rec.item3 is not null and
c_data_rec.item4 is not null and
c_data_rec.item5 is not null then
l_line_tbl(1) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(1).inventory_item_id :=v_itemid1;
l_line_tbl(1).ordered_quantity := c_data_rec.quantity1;
l_line_tbl(1).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(1).UNIT_SELLING_PRICE := c_data_rec.price1;
l_line_tbl(1).UNIT_LIST_PRICE := c_data_rec.price1;
l_line_tbl(1).attribute13:= v_item_type1;
l_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- SECOND LINE RECORD
--elsif c_data_rec.item2 is not null then
l_line_tbl(2) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(2).inventory_item_id := v_itemid2;
l_line_tbl(2).ordered_quantity := c_data_rec.quantity2;
l_line_tbl(2).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(2).UNIT_SELLING_PRICE := c_data_rec.price2;
l_line_tbl(2).UNIT_LIST_PRICE := c_data_rec.price2;
l_line_tbl(2).attribute13:=v_item_type2;
l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- THIRD LINE RECORD
--elsif c_data_rec.item3 is not null then
l_line_tbl(3) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(3).inventory_item_id := v_itemid3;
l_line_tbl(3).ordered_quantity := c_data_rec.quantity3;
l_line_tbl(3).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(3).UNIT_SELLING_PRICE := c_data_rec.price3;
l_line_tbl(3).UNIT_LIST_PRICE := c_data_rec.price3;
l_line_tbl(3).attribute13:=v_item_type3;
l_line_tbl(3).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- FOURTH LINE RECORD
--elsif c_data_rec.item4 is not null then
l_line_tbl(4) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(4).inventory_item_id := v_itemid4;
l_line_tbl(4).ordered_quantity := c_data_rec.quantity4;
l_line_tbl(4).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(4).UNIT_SELLING_PRICE := c_data_rec.price4;
l_line_tbl(4).UNIT_LIST_PRICE := c_data_rec.price4;
l_line_tbl(4).attribute13:=v_item_type4;
l_line_tbl(4).operation := OE_GLOBALS.G_OPR_CREATE;
--END IF;
-- FIFTH LINE RECORD
--elsif c_data_rec.item5 is not null then
l_line_tbl(5) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(5).inventory_item_id := v_itemid5;
l_line_tbl(5).ordered_quantity := c_data_rec.quantity5;
l_line_tbl(5).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(5).UNIT_SELLING_PRICE := c_data_rec.price5;
l_line_tbl(5).UNIT_LIST_PRICE := c_data_rec.price5;
l_line_tbl(5).attribute13:= v_item_type5;
l_line_tbl(5).operation := OE_GLOBALS.G_OPR_CREATE;
elsif c_data_rec.item1 is not null and
c_data_rec.item2 is not null and
c_data_rec.item3 is not null and
c_data_rec.item4 is not null then
l_line_tbl(1) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(1).inventory_item_id :=v_itemid1;
l_line_tbl(1).ordered_quantity := c_data_rec.quantity1;
l_line_tbl(1).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(1).UNIT_SELLING_PRICE := c_data_rec.price1;
l_line_tbl(1).UNIT_LIST_PRICE := c_data_rec.price1;
l_line_tbl(1).attribute13:= v_item_type1;
l_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- SECOND LINE RECORD
--elsif c_data_rec.item2 is not null then
l_line_tbl(2) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(2).inventory_item_id := v_itemid2;
l_line_tbl(2).ordered_quantity := c_data_rec.quantity2;
l_line_tbl(2).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(2).UNIT_SELLING_PRICE := c_data_rec.price2;
l_line_tbl(2).UNIT_LIST_PRICE := c_data_rec.price2;
l_line_tbl(2).attribute13:=v_item_type2;
l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- THIRD LINE RECORD
--elsif c_data_rec.item3 is not null then
l_line_tbl(3) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(3).inventory_item_id := v_itemid3;
l_line_tbl(3).ordered_quantity := c_data_rec.quantity3;
l_line_tbl(3).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(3).UNIT_SELLING_PRICE := c_data_rec.price3;
l_line_tbl(3).UNIT_LIST_PRICE := c_data_rec.price3;
l_line_tbl(3).attribute13:=v_item_type3;
l_line_tbl(3).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- FOURTH LINE RECORD
--elsif c_data_rec.item4 is not null then
l_line_tbl(4) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(4).inventory_item_id := v_itemid4;
l_line_tbl(4).ordered_quantity := c_data_rec.quantity4;
l_line_tbl(4).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(4).UNIT_SELLING_PRICE := c_data_rec.price4;
l_line_tbl(4).UNIT_LIST_PRICE := c_data_rec.price4;
l_line_tbl(4).attribute13:=v_item_type4;
l_line_tbl(4).operation := OE_GLOBALS.G_OPR_CREATE;
elsif c_data_rec.item1 is not null and
c_data_rec.item2 is not null and
c_data_rec.item3 is not null then
l_line_tbl(1) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(1).inventory_item_id :=v_itemid1;
l_line_tbl(1).ordered_quantity := c_data_rec.quantity1;
l_line_tbl(1).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(1).UNIT_SELLING_PRICE := c_data_rec.price1;
l_line_tbl(1).UNIT_LIST_PRICE := c_data_rec.price1;
l_line_tbl(1).attribute13:= v_item_type1;
l_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- SECOND LINE RECORD
--elsif c_data_rec.item2 is not null then
l_line_tbl(2) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(2).inventory_item_id := v_itemid2;
l_line_tbl(2).ordered_quantity := c_data_rec.quantity2;
l_line_tbl(2).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(2).UNIT_SELLING_PRICE := c_data_rec.price2;
l_line_tbl(2).UNIT_LIST_PRICE := c_data_rec.price2;
l_line_tbl(2).attribute13:=v_item_type2;
l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- THIRD LINE RECORD
--elsif c_data_rec.item3 is not null then
l_line_tbl(3) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(3).inventory_item_id := v_itemid3;
l_line_tbl(3).ordered_quantity := c_data_rec.quantity3;
l_line_tbl(3).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(3).UNIT_SELLING_PRICE := c_data_rec.price3;
l_line_tbl(3).UNIT_LIST_PRICE := c_data_rec.price3;
l_line_tbl(3).attribute13:=v_item_type3;
l_line_tbl(3).operation := OE_GLOBALS.G_OPR_CREATE;
end if;
-- CALL TO PROCESS ORDER
OE_Order_PUB.Process_Order(
p_api_version_number=>1.0,
p_header_rec => l_header_rec,
p_line_tbl=> l_line_tbl,
p_line_adj_tbl=> l_line_adj_tbl,
-- OUT variables,
x_header_rec =>l_header_rec
, x_header_val_rec =>l_header_val_rec
, x_Header_Adj_tbl =>l_Header_Adj_tbl
, x_Header_Adj_val_tbl =>l_Header_Adj_val_tbl
, x_Header_price_Att_tbl =>l_Header_price_Att_tbl
, x_Header_Adj_Att_tbl =>l_Header_Adj_Att_tbl
, x_Header_Adj_Assoc_tbl =>l_Header_Adj_Assoc_tbl
, x_Header_Scredit_tbl =>l_Header_Scredit_tbl
, x_Header_Scredit_val_tbl=>l_Header_Scredit_val_tbl
, x_line_tbl =>l_line_tbl
, x_line_val_tbl =>l_line_val_tbl
, x_Line_Adj_tbl =>l_Line_Adj_tbl
, x_Line_Adj_val_tbl =>l_Line_Adj_val_tbl
, x_Line_price_Att_tbl =>l_Line_price_Att_tbl
, x_Line_Adj_Att_tbl =>l_Line_Adj_Att_tbl
, x_Line_Adj_Assoc_tbl =>l_Line_Adj_Assoc_tbl
, x_Line_Scredit_tbl =>l_Line_Scredit_tbl
, x_Line_Scredit_val_tbl =>l_Line_Scredit_val_tbl
, x_Lot_Serial_tbl =>l_Lot_Serial_tbl
, x_Lot_Serial_val_tbl =>l_Lot_Serial_val_tbl
, x_action_request_tbl =>l_action_request_tbl,
x_return_status=> l_return_status,
x_msg_count=> l_msg_count,
x_msg_data=> l_msg_data);
if l_msg_count > 0 then
for l_index in 1..l_msg_count loop
l_msg_data := oe_msg_pub.get(p_msg_index => l_index, p_encoded => 'F');
update XXSC_SALES_ORDER_IMPORT
set process_flag='E',remarks=l_msg_data
where iwb_no=c_data_rec.iwb_no;
commit;
dbms_output.put_line('Order Failed.'||l_msg_data);
end loop;
end if;
-- Check the return status
if l_return_status = FND_API.G_RET_STS_SUCCESS then
update XXSC_SALES_ORDER_IMPORT
set process_flag='Y',ORDER_NUMBER=l_header_rec.order_number,remarks='SUCCESS'
where iwb_no=c_data_rec.iwb_no;
commit;
fnd_file.put_line (fnd_file.output,'Order no:'||l_header_rec.order_number||' Created for the IWB no:'||c_data_rec.iwb_no);
dbms_output.put_line('Order..'||l_header_rec.order_number);
Else
dbms_output.put_line('Order Failed.');
end if;
commit;
END LOOP;
End;
/Your code always sends 4 line records with each header. Code is not checking if it belongs to same header or not. Please check your code.
-
Display more pictures in crystal report not work why
Hi guys i try to show picture of specified employee from network path in crystal report it work
but i don't know how to show all pictures to all employees in crystal report
Can any one help me to customize my code to accept show all employee pictures
i try to make this from crystal report and assign path but version of crystal report not allow to me
to put path
my code below show picture to one employee from text box control from network path
I need to customize this code to accept show more one pictures of employees from employee table
the following fields i show in report
EmployeeNo integer
EmployeeName nvarchar(50)
Image datatype image
btnemployeeno_click
DataTable dt = new DataTable();
string connString = "data source=192.168.1.105; initial catalog=hrdata;uid=sa; password=1234";
using (SqlConnection con = new SqlConnection(connString))
con.Open();
SqlCommand cmd = new SqlCommand("ViewEmployeeNoR", con);
cmd.CommandType = CommandType.StoredProcedure; // Viewxxx doesn't seem a good name for a sp
cmd.Parameters.Add("@EmployeeNo", SqlDbType.NVarChar, 20);
cmd.Parameters["@EmployeeNo"].Value = textBox1.Text;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
da.Fill(dt);
string path = Path.Combine("\\\\192.168.1.105\\Personal Pictures", textBox1.Text) + ".jpg";
FileStream fs=null;
if (File.Exists(path))
fs = new FileStream("\\\\192.168.1.105\\Personal Pictures\\" + textBox1.Text + ".jpg", FileMode.Open);
else
MessageBox.Show("Please File Not Exist");
BinaryReader br = new BinaryReader(fs);
byte[] imgbyte = new byte[fs.Length + 1];
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
foreach (DataRow dr in dt.Rows)
dr["Image"] = imgbyte;
ReportDocument objRpt = new Reports.CrystalReportData2();
objRpt.SetDataSource(dt);
crystalReportViewer1.ReportSource = objRpt;
crystalReportViewer1.Refresh();Hi,
Put an image field in your report, then change the image’s Graphic Location:
right click the image, select Format Graphic, select Picture tab, click the conditional-formula button that look like a x2 and set the formula’s text to
the name of the formula or parameter field that will contain the image’s URL.
Save the formula and click the OK button. Save the report and test it.
Be carefull with the size of the image field. If this size is not equal to the image itself it could get resized.
Good Tutorial
Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP] -
Not able to see the crystal reports XI version in the IE 7 and IE 8
Hi Team,
I am using web based application developed in VB,ASP,SQL SERVER,Crystal Reports(XI). I am able to see the Crystal Reports in IE 6. But i am not able to see the reports in IE 7 and IE 8. While clicking on the reports button it is showing the red X image top left cornor.
I am using CrystalActiveX viewer11 version for viewing the reports.
In IE 6,if the client using fiirst time for vieiwing the reports,it will ask the Activexviewer control prompt and says ok,it will display the reports.
Thanks and Regards
EshwarThanks your advise.But we are using following crystal reports (XI) version and we don't have CRXI with R1 and R2.
CurrentVersion:11.0.0.895 ( CR Developer and Product Type:Full)
Crystal Reportviewer11 configured in the IIS which is version (5.0). and configured the virtual folder to C:\Program Files\Common Files\Business Objects\3.0\crystalreportviewers11\.
Our web application code also configured in the IIS at same level.
When the user wants to see the reports through the application,it will ask the Plugin of Crystal Report Viewer and user will download this plugin and it will save in the IE plug ins.It will ask only first time viewing the reports for the next onwards it will not ask or prompt of the Activex control.
So please suggest me, is there any upgrade version of this Crystal Reportviewer11 needs to be installed or any browser setting need to be configured for IE 7 and IE 8.
waiting for your reply.
Regards
Eshwar -
Crystal Reports 8.5 and blank pdf file
Post Author: JimLW
CA Forum: Older Products
We have an old asp application and we are moving it to Windows 2003 server. The reports are coming up fine in the viewer. However, when we export to pdf, xls, Word, we the file names are being created in the appropriate folder but they are 0 length. Programmatically, I'm trapping for errors and the application is throwing an error right after the report object runs the export method. The error number is 507. Any thoughts.There is a document for Crystal Reports in Citrix environment written for exporting error, but I think it could be applicable for your situation.
I quote it here:
"... errors occur because Citrix Server and Terminal Server use the User Path Variable rather than the System Path Variable for clients.
Solution:
This solution has been written for Crystal Reports 8.5. The directory path to the Crystal folder may be different in other versions. For example, in Crystal Reports 9, copy files from c:\program files\Common Files\Crystal Decisions\2.0\bin to winnt\crystal.
By default, the Crystal Reports export drivers (DLLs) are installed to the %systemroot%\Crystal directory (generally C:\Winnt\Crystal), which is not included in the User Path Variable. Each user will have a specific User Path Variable making it difficult to update each one.
Steps to Resolve:
Therefore, to resolve these issues, copy files from the Crystal directory to the Citrix Serveru2019s or Terminal Serveru2019s System directory.
1. Copy the files from the following directory:
%systemroot%\Crystal
CAUTION
Do not delete the %systemroot\Crystal directory. Other Business Objects products may require this directory.
2. Paste the files to the System directory. For example, in Terminal Server, the System directory is generally:
Winnt\System32
NOTE
Verify the correct directory location in your environment.
With the DLLs in the System directory, the User Path Variable will be able to locate them. The error messages should be resolved and exporting should be successful." -
Crystal Report not listed Add New Item for Visual Studio 2010
I just finished installing cryestal report for visual studio 2010.
During the installation a visual studio error dialog popped up "Operation cannot be completed. Access Denied", the crystal report installation continued and was informed that the installation was successful.
But on opening my visual studio project to add new item, crystal report item is not listed there.
Is there anything that needs to be done to get it listed in the Add New Item dialog for visual studio?I wonder what file you ran to install CRVS2010? Was it the MSI as opposed to the actual install file?
The link to the correct install is here:
http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_2.exe
Is that the file you ran to install CRVS2010? E.g. as opposed to:
http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_32bit_13_0_2.zip
- Ludek -
Crystal reports 11: Values displayed in crystal report not showing in VB6
Hi!
I updated an existing lower version of crystal report 7 to crystal report 11. Changes are the following:
1. sql query in VB6 to add fields
2. sql query in crystal report to manipulate values and not use formula. crx11 doesn't allow summary/total in formula fields.
3. report orientation
4. additional fields to view
5. font sizes, length, can grow properties, etc.
When I tested it directly in crx 11, all fields/values are displaying correctly. When I integrated it in VB 6 using Crystal ActiveX Report Viewer Library 11.0 and CR Viewer object, the field is blank.
I've tried several checking like field suppressions, conditional suppressions, etc.
By the way, I also have a report using a subrepot with conditional suppressions. Same thing is happening. The subreport data only displays the alloted space but does not show values in VB6.
Thank you in advance for your help.
Edited by: Naga01 on Jun 28, 2011 8:46 AMThanks for your response.
Before I read your response, I tried tweaking my reports and was able to resolve the issue.
Steps taken to solve the issue are the following:
a. Value not showing one field of four (4) reports.
Solution: I created new ones and integrate it in VB 6. The values are now showing. Tweaked on the line object properties, got a problem with the extended line but solved it by adjusting the height of the detail section.
b. Value not showing in sub-report.
Solution: My report used a shared variable so I can pass the condition to my sub-report. I used the new reports and just pass a query during runtime. The values in the subreport is still not showing. I added a formula and called the value in it. Values in the subreport is now showing.
I'll try to update the crystal reports version as suggested at a later time.
Maybe you are looking for
-
Interactive Report - One column based on a list of values
I have an Interactive Report that's part of a Form with Report. The form works fine, but I have a problem with the interactive report. One of the fields is based on a list of values. That is, the data in the table in the State field has numeric state
-
Hi, I have a portal installed on a standalone java based on sp13. I also have a backend ECC5.0 on a web as abap (sp9). If I want to connect the portal to the backend ecc, do I need to upgrade the abap to the same patch level as the standalone java
-
How to replace 'CALL DIALOG' with 'CALL TRANSACTION'
IF NOT bkpf-bukrs IS INITIAL. CLEAR buztab. REFRESH buztab. buztab-zeile = bseg-buzei. buztab-bukrs = bkpf-bukrs. buztab-belnr = bkpf-belnr. buztab-gjahr = bkpf-gjahr. buztab-buzei = bseg-buzei. APPEND buztab. bu
-
Umax Astra 1200S scanner (SCSI) not being recognized in OS 9.2.2
I have a Umax Astra 1200S scanner connected to a Power Mac G4 which is no longer being recognized in OS 9.2.2. I keep getting a message -- "scanner not found." The connection is a SCSI connection. I have reinstalled the drivers from the original scan
-
Desktop's item info doesn't sync
Hi all mac-users. I have a slight problem with my MB, the HD's item info (the one shows how many free spaces and used spaces) doesn't seem to be correct. The problem is the HD's item info (size) can't be updated once i add or remove files from the HD