How to make Spool receipent id is Unique
Hi All,
we are posting pdf into spool the same will retriving for further process.Right now we are passing receipent ID as date and time. we may read wrong spool becz at the same time same program will execute with different data selections.
how to make this receipent ID is unique?
or please give any other solution ?
One way of doing this is making the program wait for 1 second before you go onto submit the program again.,,
This will make sure that the program does not generate multiple spools in the same second...
WAIT UP TO 1 SECONDS.
If you are not using seconds to make the spool name and instead using minutes.. then you need to capture the minute which you are in right now and calculate the left over seconds and then again submit the program ..
I have earlier done this.. this is the sample code
*Schedule background using SA38
PERFORM schedule_background.
*Check whether background job is complete
PERFORM check_tbtco_job_complete.
WAIT UP TO w_leftsec SECONDS.
The code of schedule_background goes like this
FORM schedule_background.
PERFORM bdc_dynpro USING 'SAPMS38M' '0101'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RS38M-PROGRAMM'.
CALL TRANSACTION 'SA38' USING tbl_bdcdata MESSAGES INTO tbl_messtab MODE 'E' UPDATE 'S'.
w_sdlhrmin = sy-uzeit+0(4).
w_leftsec = sy-uzeit+4(2).
*start of changes by rahulk D01K9A0Y81
IF w_leftsec > 55.
WAIT UP TO 5 SECONDS.
w_sdlhrmin = sy-uzeit+0(4).
w_leftsec = sy-uzeit+4(2).
ENDIF.
*end of changes by rahulk D01K9A0Y81
w_leftsec = 60 - w_leftsec.
ENDFORM. "SCHEDULE_BACKGROUND
Similar Messages
-
How to make your memory ID as unique as possible...
Hello Experts,
I am currently using the EXPORT/IMPORT from memory ID statement in my objects
and my team lead has said that this is not safe as this might be also be used accidentally
by other programmers. So he instead urged me to use a unique memory ID. The memory ID I
am currently using is 3 letters.
So in these cases, what maybe the best generic combination for memory ID.Hi,
Usually it doesn't happen as the EXPORTed content will put into ABAP memory the source program with call stack remains.
Any how ID is character type object with maximum length of 60 characters.
If you make full use of 60 characters, you can generate a unique name always.
Regards,
Manne -
Hi guys,
I have a table of people with the following fields:
firstName
lastName
DOB
email
address
group
as you can see, nothing makes an entry unique. so say I would like to get some info about John Smith, I might found more than one entry for John Smith.
Question: any idea how to make an entry unique? hashing???
I'm using mySQL.
Thanks for any help
PeterYou need to assign a primary key to your table ( a field that can't be reproduced). You can add a social security field and make it your primary key.
Your mysql line might look like this (for a table with 2 fields):
mysql> CREATE TABLE Info( Name varchar(64),
SSN varchar(64) primary key); -
How to make a column unique in localdb
I created a database in localdb\projectv12 in my visual studio 2013, in it i created a table with a primary key, how can I make a additional table column unique without making it a primary key.
Knowledge is Power, Guard it Well!!You can also just create a UNIQUE index on the column.
UNIQUE KEY is based on UNIQUE index as well, but there are some subtle differences between the two solutions.
Related thread:
http://social.msdn.microsoft.com/forums/sqlserver/en-US/3ee27f0d-1c56-4788-b948-c061ec6eda70/difference-between-unique-index-and-unique-key
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
How to make the search faster in a table ?
hi ,
i have got a table wich has one field as a primary key , and this table got 500000 records in it
wich i try to pop up the (LOV) it takes about one minute to be retreived
i dodnt know how to make it faster ?
could anyone help me how to make faster ?
and what index should i put on this table ?thanks for your help
and here is the the
CREATE TABLE MOBWORKSHOP.MOBWSH_GUARANTY
GRNTY_NO VARCHAR2(10 BYTE),
I_CODE VARCHAR2(30 BYTE),
SERIAL_NO VARCHAR2(30 BYTE) NOT NULL,
GRNTY_START_DATE DATE,
GRNTY_EXPIR_DATE DATE,
GRNTY_VALIDTY NUMBER(1),
CAUSE_ID VARCHAR2(10 BYTE),
NOTE VARCHAR2(60 BYTE),
AD_U_ID NUMBER(5) NOT NULL,
AD_DATE DATE NOT NULL,
UP_U_ID NUMBER(5),
UP_DATE DATE,
BRN_NO NUMBER(6) NOT NULL,
BRN_YEAR NUMBER(4)
TABLESPACE MOBWRKSHPTRANS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
CREATE UNIQUE INDEX MOBWORKSHOP.MOBWSH_GUARANTY_PK ON MOBWORKSHOP.MOBWSH_GUARANTY
(GRNTY_NO)
LOGGING
TABLESPACE INDX_TRANS_MOBWRKSHP
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOPARALLEL;
ALTER TABLE MOBWORKSHOP.MOBWSH_GUARANTY ADD (
CONSTRAINT MOBWSH_GUARANTY_PK
PRIMARY KEY
(GRNTY_NO)
USING INDEX
TABLESPACE INDX_TRANS_MOBWRKSHP
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
ALTER TABLE MOBWORKSHOP.MOBWSH_GUARANTY ADD (
CONSTRAINT MOBWSH_QRNTY_I_CODE_FK
FOREIGN KEY (I_CODE)
REFERENCES MOBWORKSHOP.ITEM_DETAILS (I_CODE),
CONSTRAINT MOBWSH_CANCEL_CAUS_FK
FOREIGN KEY (CAUSE_ID)
REFERENCES MOBWORKSHOP.GUARANTY_CANCEL_CAUSES (CAUSE_ID));
i made a button to show (LOV) and when i press the putton it take about one minute to view the LOV -
How to make hidden Drop Lists functional in RBList Subforms?
I have created a form that contains 3 isolated Radio Button lists, each with hidden subforms that are unique per each button.
Two of my RBLists and subforms work perfectly, showing hidden Drop Down List options and other fields as they should when a button is selected.
However, RBList3 presents the Drop Down lists as user entry fields only. Each hidden subform in RBList3 contains one drop down menu and one text box for instructions.
I've used the same javascript to hide/show hidden fields when buttons are selected. All settings seem to match up. Here is a sample of my code:
if(RBList3.F.rawValue != 2)
this.presence = "hidden";
newsubform.presence = "hidden";
else if(RBList3.F.rawValue == 2)
this.presence = "visible";
newsubform.presence = "hidden";
Does anyone have any suggestions for how to make my Drop Down Lists in RBList3 show as functional Drop lists?
I have attached the form for reference.See example #62 on my blog for a 10.1.3 example:
http://tinyurl.com/smuench-adf-examples
For a tutorial on how to create them using the new features we enable in 11g, see my Oracle Magazine article:
Defining Cascading List of Values -
ICC file associated with photoshop process on Windows, how to make them not associated?
In my code, an ICC profile is created and copy to the system folder (C:\Windows\System32\spool\drivers\color)
then assign this profile to current document in photoshop using sPSActionControl->Play(&result, StringToKey("assignProfile"), iDescriptor, mode); // iDescriptor contains the ICC profile name
after assigning profile, the .icc file is associated with the ps process, that is, I can't delete it or rename it, nor can I replace it with another file having the same name. But on Mac, the ICC file won't be associated with the process, so I can overwrite the icc file and do other work, that's better.
How to make the icc file not taken by photoshop after assigning profile on windows?what i finally did to go around this problem was to make another user on my computer and only download podcasts. just as long as you don't hook the ipod up in this new profile, you should be fine
-
How to Make iPhone Ringtone From DVD Music/Music/Video?
People want to show their individuality anytime and anywhere with their inimitable hairstyle, clothing, and other things. Your phone's ringtone is also really important to show your difference from others. So how to make your own unique ringtone for your incoming calls, clock alarms, clock timer becomes a really important thing.
Today I will show you how to make your own iPhone ringtones from your DVD/video/music. Someone will say that you can buy them on itunes. Yes, everybody can buy it. It is not unique and special. Let's make our own iPhone ringtone together.
Things you need:
1. DVD/video/audio files that contains the music you want
2.http://www.aiseesoft.com/iphone-ringtone-maker.htmliPhone Ringtone Maker
3. Computer(Windows/Mac)
http://farm3.static.flickr.com/2786/4153313698_c1e11d1941.jpg
Step 1: Load File/DVD
Load your video/audio files or DVD to this iPhone Ringtone Maker
Step 2: Choose music
You need to choose which part you want to convert as your iPhone ringtone or you want to make the whole files as your iPhone ringtone. Just drag the bar to set the begin point and end point
Step 3: Pre-listening
You can pre-listening the ringtone, if you do not like it you can adjust the length of your ringtone.
Step 4: Make Ringtone
After you have done all the tings above, you can click “Generate” button to start the conversion.
Soon you will get your own ringtone.
Tips:
1. if you want to put your ringtone directly to your iPhone, please check the box before “import to iPhone”.
2. if you want to manage your ringtone, you can click “manage ringtone” button to do it easily.
For Mac users, you can use
http://www.aiseesoft.com/iphone-ringtone-maker-for-mac.htmliPhone Ringtone Maker for Mac to do this easily with the same operation as windows one.
http://farm3.static.flickr.com/2531/4153313838_7da8c360f3.jpg
To help you to make your iPhone and iPod more enjoyable here I also recommend you this
http://www.aiseesoft.com/dvd-to-ipod-converter.htmlDVD to iPod Converter,
http://www.aiseesoft.com/dvd-to-iphone-converter.htmlDVD to iPhone Converter and http://www.aiseesoft.com/ipod-transfer.htmliPod TransferRemoved post. Banned user due to spamming.
-
How to Make iPhone Ringtone From DVD Music/Music/V...
People want to show their individuality anytime and anywhere with their inimitable hairstyle, clothing, and other things. Your phone's ringtone is also really important to show your difference from others. So how to make your own unique ringtone for your incoming calls, clock alarms, clock timer becomes a really important thing.
Today I will show you how to make your own iPhone ringtones from your DVD/video/music. Someone will say that you can buy them on itunes. Yes, everybody can buy it. It is not unique and special. Let's make our own iPhone ringtone together.
Things you need:
1. DVD/video/audio files that contains the music you want
2.iPhone Ringtone Maker
3. Computer(Windows/Mac)
Step 1: Load File/DVD
Load your video/audio files or DVD to this iPhone Ringtone Maker
Step 2: Choose music
You need to choose which part you want to convert as your iPhone ringtone or you want to make the whole files as your iPhone ringtone. Just drag the bar to set the begin point and end point
Step 3: Pre-listening
You can pre-listening the ringtone, if you do not like it you can adjust the length of your ringtone.
Step 4: Make Ringtone
After you have done all the tings above, you can click “Generate” button to start the conversion.
Soon you will get your own ringtone.
Tips:
1. if you want to put your ringtone directly to your iPhone, please check the box before “import to iPhone”.
2. if you want to manage your ringtone, you can click “manage ringtone” button to do it easily.
For Mac users, you can use
iPhone Ringtone Maker for Mac to do this easily with the same operation as windows one.
To help you to make your iPhone and iPod more enjoyable here I also recommend you this
DVD to iPod Converter,
DVD to iPhone Converter and iPod TransferRemoved post. Banned user due to spamming.
-
Hi,
Im not expert in Oracle Database especially in querying of data's
My problem is about to be honest i have no idea how to make table format.
We have a problem in our production instance we raised it in Oracle Support but one of the technical support there is asking about this
"I want table data of the corresponding batch. Please take help of you DBA and ensure that you are connected to the correct instance, where you have this issue."
I am only one DBA here in our company and Im still Newbie.
here is the scripts the he want me to run it
select batch_id from gme_batch_header bh, mtl_parameters mp
where batch_no = '115982'
and organization_code = '101'
and bh.organization_id = mp.organization_id;
select *
FROM gme_batch_header
WHERE batch_id in (XXXXXX);
select batch_id, line_type, material_detail_id, inventory_item_id, plan_qty, actual_qty, wip_plan_qty, dtl_um, release_type, phantom_id,
locator_id, material_requirement_date, move_order_line_id, original_primary_qty, subinventory
FROM gme_material_details
WHERE batch_id IN (XXXXXX)
ORDER BY batch_id, line_type, material_detail_id;
SELECT 'MMT' as table_name, t.transaction_id as trans_or_rsrv_id, ty.transaction_type_name, h.batch_status, d.batch_id as batch_id, t.transaction_source_id as trans_or_rsrv_source_id, d.line_type, t.trx_source_line_id as material_detail_id,
t.organization_id, pa.organization_code, t.inventory_item_id, i.segment1 as item_number, t.subinventory_code, t.locator_id, lt.lot_number as lot_number, t.primary_quantity, t.transaction_quantity as trans_or_rsrv_qty, lt.transaction_quantity as lot_qty, t.transaction_uom as trans_or_rsrv_uom, t.secondary_transaction_quantity as sec_qty, t.secondary_uom_code,
to_char(t.transaction_date, 'DD-MON-YYYY HH24:MI:SS') as trans_or_rsrv_date, t.LPN_ID, t.TRANSFER_LPN_ID, t.transaction_mode, NULL as lock_flag, NULL as process_flag
FROM mtl_material_transactions t, gme_material_details d, gme_batch_header h, mtl_transaction_lot_numbers lt,
mtl_lot_numbers lot, mtl_system_items_b i, mtl_transaction_types ty, mtl_parameters pa
WHERE t.transaction_source_type_id = 5
AND h.batch_id in (XXXXXX)
AND t.transaction_source_id = h.batch_id
AND t.organization_id = h.organization_id
AND d.batch_id = h.batch_id
AND d.material_detail_id = t.trx_source_line_id
AND lt.transaction_id(+) = t.transaction_id -- This join allows us to get the lot number
AND lot.lot_number(+) = lt.lot_number -- This join allows us to get lot specific info if needed.
AND lot.organization_id(+) = lt.organization_id
AND lot.inventory_item_id(+) = lt.inventory_item_id
AND t.organization_id = i.organization_id
AND t.inventory_item_id = i.inventory_item_id
AND t.transaction_type_id = ty.transaction_type_id
And t.organization_id = pa.organization_id
UNION ALL
SELECT 'RSRV' as table_name, reservation_id as trans_or_rsrv_id , NULL, h.batch_status, d.batch_id as batch_id,
demand_source_header_id as trans_or_rsrv_source_id, d.line_type, demand_source_line_id as material_detail_id,
r.organization_id, pa.organization_code, r.inventory_item_id, i.segment1 as item_number, r.subinventory_code, r.locator_id, r.lot_number,primary_reservation_quantity, reservation_quantity as trans_or_rsrv_qty, NULL,reservation_uom_code as trans_or_rsrv_uom, secondary_reservation_quantity as sec_qty, r.secondary_uom_code,
to_char(requirement_date, 'DD-MON-YYYY HH24:MI:SS') as trans_or_rsrv_date, LPN_ID, NULL, NULL, NULL, NULL
FROM mtl_reservations r, gme_material_details d, gme_batch_header h, mtl_system_items_b i, mtl_parameters pa
WHERE demand_source_type_id = 5
AND h.batch_id in (XXXXXX)
AND demand_source_header_id = h.batch_id
AND r.organization_id = h.organization_id
AND d.batch_id = h.batch_id
AND d.material_detail_id = demand_source_line_id
AND r.organization_id = i.organization_id
AND r.inventory_item_id = i.inventory_item_id
And r.organization_id = pa.organization_id
UNION ALL
SELECT 'PPL' as table_name, pending_product_lot_id as trans_or_rsrv_id, NULL, h.batch_status, d.batch_id as batch_id, NULL, d.line_type, d.material_detail_id, h.organization_id, pa.organization_code, d.inventory_item_id, i.segment1 as item_number, NULL, NULL, lot_number, NULL, quantity as trans_or_rsrv_qty, NULL, NULL, secondary_quantity as sec_qty, NULL, NULL, NULL, NULL, NULL, NULL, NULL
FROM gme_pending_product_lots p, gme_material_details d, gme_batch_header h, mtl_system_items_b i, mtl_parameters pa
WHERE h.batch_id in (XXXXXX)
AND p.batch_id = h.batch_id
AND d.batch_id = h.batch_id
AND d.material_detail_id = p.material_detail_id
AND h.organization_id = i.organization_id
AND d.inventory_item_id = i.inventory_item_id
And h.organization_id = pa.organization_id
UNION ALL
-- Note that there should not be any transactions in MMTT. If there are, they are usually "stuck" there and
-- need to be processed or deleted
SELECT 'MMTT' as table_name, t.TRANSACTION_TEMP_ID as trans_or_rsrv_id, ty.transaction_type_name, h.batch_status, d.batch_id as batch_id, t.transaction_source_id as trans_or_rsrv_source_id, d.line_type, t.trx_source_line_id as material_detail_id, t.organization_id, pa.organization_code, t.inventory_item_id, i.segment1 as item_number, t.subinventory_code, t.locator_id, lt.lot_number as lot_number, t.primary_quantity, t.transaction_quantity as trans_or_rsrv_qty, lt.transaction_quantity as lot_qty, t.transaction_uom as trans_or_rsrv_uom, t.secondary_transaction_quantity as sec_qty, t.secondary_uom_code, to_char(t.transaction_date, 'DD-MON-YYYY HH24:MI:SS') as trans_or_rsrv_date,t.LPN_ID, t.TRANSFER_LPN_ID, t.transaction_mode, t.lock_flag, t.process_flag
FROM mtl_material_transactions_temp t, gme_material_details d, gme_batch_header h,
mtl_transaction_lots_temp lt, mtl_system_items_b i, mtl_transaction_types ty, mtl_parameters pa --mtl_lot_numbers lot
WHERE t.transaction_source_type_id = 5
AND h.batch_id in (XXXXXX)
AND transaction_source_id = h.batch_id
AND t.organization_id = h.organization_id
AND d.batch_id = h.batch_id
AND d.material_detail_id = trx_source_line_id
AND lt.TRANSACTION_TEMP_ID (+) = t.TRANSACTION_TEMP_ID -- This join allows us to get the lot number
--AND lot.lot_number(+) = lt.lot_number
--AND t.organization_id = lot.organization_id
AND t.organization_id = i.organization_id
AND t.inventory_item_id = i.inventory_item_id
AND t.transaction_type_id = ty.transaction_type_id
And t.organization_id = pa.organization_id
UNION ALL
SELECT 'MTI' as table_name, t.TRANSACTION_INTERFACE_ID as trans_or_rsrv_id, ty.transaction_type_name, h.batch_status, d.batch_id as batch_id, t.transaction_source_id as trans_or_rsrv_source_id, d.line_type, t.trx_source_line_id as material_detail_id, t.organization_id, pa.organization_code, t.inventory_item_id, i.segment1 as item_number, t.subinventory_code, t.locator_id, lt.lot_number as lot_number, t.primary_quantity, t.transaction_quantity as trans_or_rsrv_qty, lt.transaction_quantity as lot_qty, t.transaction_uom as trans_or_rsrv_uom, t.secondary_transaction_quantity as sec_qty, t.secondary_uom_code, to_char(t.transaction_date, 'DD-MON-YYYY HH24:MI:SS') as trans_or_rsrv_date, t.LPN_ID, t.TRANSFER_LPN_ID, t.transaction_mode, to_char(t.lock_flag), to_char(t.process_flag)
FROM mtl_transactions_interface t, gme_material_details d, gme_batch_header h,
mtl_transaction_lots_interface lt, mtl_system_items_b i, mtl_transaction_types ty, mtl_parameters pa --mtl_lot_numbers lot
WHERE t.transaction_source_type_id = 5
AND h.batch_id in (XXXXXX)
AND transaction_source_id = h.batch_id
AND t.organization_id = h.organization_id
AND d.batch_id = h.batch_id
AND d.material_detail_id = trx_source_line_id
AND lt.TRANSACTION_INTERFACE_ID (+) = t.TRANSACTION_INTERFACE_ID -- This join allows us to get the lot number
--AND lot.lot_number(+) = lt.lot_number
--AND t.organization_id = lot.organization_id
AND t.organization_id = i.organization_id
AND t.inventory_item_id = i.inventory_item_id
AND t.transaction_type_id = ty.transaction_type_id
And t.organization_id = pa.organization_id
ORDER BY batch_id, table_name, line_type, material_detail_id;
SELECT *
FROM gme_transaction_pairs
WHERE batch_id in (XXXXXX);
I used SQL Developer and connected in our Production instance where the problem is there
so i run it please see attached file:
please help how to make table format outpur what are the steps that i need to produce correctly.Hi,
From your post, it seems that you need to upload the results of the query to Oracle Support.
You can spool the output to a file and upload it.
Something like...
SQL>spool output.txt
SQL>set lines 200
SQL>set pages 200
--execute the queries
SQL>spool off
I don't know about SQL Developer but tools such as PL/SQL Developer and Toad will allow you to export the query results directly to MS Excel.
Regards,
Sujoy -
HT1420 How to make Apple ID and iCloud the same Id?
How to make Apple ID and iCloud ID the same after they have been created?
iTunes keeps asking for ID and passwords that were created differently.You can't im afraid. I wanted to do the same and got the following from Apple:
I am sorry, you cannot update your email address to MobileMe address as each Apple ID is unique.
Ross, I would like to let you know that, you cannot change your Apple ID if it was at any time a .Mac or MobileMe email address, even if your subscription has ended or been canceled.
The email address that ends in .me is already an Apple ID as well, as when you set up a MobileMe email its automatically set up as an Apple ID. So you cannot use this email address on another account. It is permanently associated with your MobileMe Apple ID.
This article provides helpful information when choosing which Apple ID to use with iCloud:
Apple IDs and iCloud
http://support.apple.com/kb/HT4895
This page also covers topics such as moving MobileMe accounts to iCloud, managing your Apple ID, and how to get content purchased with multiple Apple IDs onto your iOS device.
I hope this information was helpful. If you require further assistance, please do not hesitate to reply to this email and I will be more than happy to assist you further.
Sincerely,
Thenmozhi
iTunes Store Customer Support
http://www.apple.com/support/itunes/ww/
I wrote back and tried to escialte the issue but got no where. The whole thing is very disappointing and I hope Apple sort it out eventually. -
I recently broke my 2008 macbook. i was able to use an external hardrive to back up my data onto My Passport. I was going to buy a new computer but a friend told me sher had an older version of the iMac. (not sure how old but it doesnt have a camera if that helps) i was able to hook it up and turn it on but i ran into a few problems. 1) the "authentic" user or whatever it says is someone who previously used the computer. i added me as a user but im not sure how to make me the main user. 2) after hooking up My Passport, i was able to drag my files and copy them to the desktop.(i think i did it correctly) now, i dont know how to make my hard drive and applications and iformation the "main " info. The current apps on the iMac are super old versions of iTunes and iPhoto and such. 3) while trying to open the apps from my macbook on the iMac, it said it didnt have the right software to open these apps.
I am so computer illiterate so someone please help!!! Also, i do not have internet in my new apartment yet so if there is a way to make this happen without using the internet that would be preferred. sorry for the horrible spelling and poorly written paragraph.
THANK YOU!!You are not going to be able to run your old system from the backup on this old computer as the hardware is incompatible.
You need to get a new computer or a refurbished one. -
Hi my name is vishal
For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using iTextSharp.text;
using iTextSharp.text.pdf;
using System.Diagnostics;
using System.IO;
namespace DRRS_CSharp
public partial class frmPDF : Form
public frmPDF()
InitializeComponent();
private void button1_Click(object sender, EventArgs e)
Document doc = new Document(PageSize.A4.Rotate());
var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
doc.SetMargins(50, 50, 50, 50);
doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
doc.Open();
PdfPTable table = new PdfPTable(6);
table.TotalWidth =530f;
table.LockedWidth = true;
PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
cell.Colspan = 6;
cell.HorizontalAlignment = 0;
table.AddCell(cell);
Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
para.Alignment = Element.ALIGN_CENTER;
iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
png.ScaleToFit(105f, 105f);
png.Alignment = Element.ALIGN_RIGHT;
SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
conn.Open();
SqlDataReader dr;
dr = cmd.ExecuteReader();
table.AddCell("Reprocessing Date");
table.AddCell("Patient Name");
table.AddCell("Dialyzer(Manufacturer,Size)");
table.AddCell("No.of Reuse");
table.AddCell("Verification");
table.AddCell("DialyzerID");
while (dr.Read())
table.AddCell(dr[2].ToString());
table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
table.AddCell("@count".ToString());
table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
table.AddCell(dr[0].ToString());
dr.Close();
table.SpacingBefore = 15f;
doc.Add(para);
doc.Add(png);
doc.Add(table);
doc.Close();
System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
this.Close();
The above code executes well with no problem at all!
As you can see the file to which i create and save and open my pdf report is
AssignedDialyzer.pdf.
The column headers of table in pdf report from c# windows forms using iTextSharp are
"Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
"DialyzerID".
However the problem i am facing is after execution and opening of document is my
column headers in table in pdf report from
c# and datas in it all appear in bold.
I have browsed through net regarding to solve this problem but with no success.
What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
vb6,adodb with ms access using iTextSharp?
I have approached Sound Forge.Net for help but with no success.
I hope anyone/someone truly understands what i am trying to ask!
I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
I hope i get a reply in terms of solving this problem.
vishalHi,
About iTextSharp component issue , I think this case is off-topic in here.
I suggest you consulting to compenent provider.
http://sourceforge.net/projects/itextsharp/
Regards,
Marvin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to make downloadable links in Adobe Muse
I am new to website design and am trying to figure out how to make downloadable links for some PDF flyers, PSD templates I am creating. Not sure if "downloadable links" is the correct term for what I'm trying to say but in a nutshell I am creating Business Flyer's in PDF form and Photoshop PSD template files that I would like to be able to have my users click a link that allows them to download them right to their desktop. Any help would really be appreciated!
Hi caybar10gaming,
I had the same question as you and was searching online for how to add "downloadable links" as well so your not alone in that lol. Anyways, I found this video that explains how to do this. I hope this helps you, as it did me. Good Luck
http://tv.adobe.com/watch/muse-feature-tour/add-and-link-to-any-type-of-file/
-Caitlin -
How to find Spool number for a 2 steps background job.
Hi All,
How to find spool number (and also the background job name ) for a 2 steps background job.
in the table TBTCO i can see step numbers but i dont get the spool number. Is there any link between TBTCO and TSP01.
Also after getting the spool number i need to drill down on ALV report. I hard coded the spool number and was able to drill down using BDC and call transaction but when i press back button it is not returning to the ALV report.
Thanks,
Shiva.Which one creates the spool? (first one I guess)
What kind of spool? (WRITE, sapscript, smartform, pdf...)
Do you use special statements like NEW-PAGE, or other things?
Are you sure that the spools are generated by these jobs? (did you compare the spool generation times and job run dates to be sure...)
Maybe you are looking for
-
Help needed with coding error message
I have a webpage in which I have inserted a mortgage calculator widget from zillow. Everything looks good on browser view...but errors when validating. This is where I downloaded the widget. www.zillow.com/webtools/widgets/MortgageCalculatorWidget
-
Can anyone give me details regarding the feasilibilty issues and performance of migrating from a 7.x system to a 9.x system Thanks
-
Should EntryProcessors be used for long-running operations?
Hi Gene and All, a couple of other questions come from the seemingly unexhaustible list :-) - what happens if the caller of an InvocableMap.invokeAll or invoke method dies? - all entryProcessors complete regardless of the client being
-
Problem with LR4 Smart Collections
I have set up a set of smart collections to aid in my work flow. This is how I wish for it to work. Problem is that the photos will not move down thur the workflow. I also want to drag my newly imported photos to workflow collection set to begin the
-
I've been using Adobe software since the late 80s and I'm very disappointed with the stability of CS4 - specifically Illustrator and Flash. I've been using these two applications around 40 hours a week for the last few months and Illustrator crashes