How to make outbound plug to Public attr

Hi All,
           I am trying to call outbound plug from get_v method for f4 help. But when i click on f4 help, it getting dump by giving below error.
View 'ZXXXX/GeneralData' does not have the public outbound plug 'OP_FINDXXXX' for value help navigation
In get_v method, using below piece of code.
     CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_navdescr
     EXPORTING
      iv_outbound_plug = 'FINDXXXX'.                    "#EC NOTEXT
My concern is how to make Outbound plug to public or if there any other way to call Outbound plug from Get_v then please advice.
I appriciate your suggestion.
Thanks
RI

Hi Imran!
To make outbound plug public please do the following things:
1)In BSP_WD_CMPWB: go to the code of your outbound plug and switch to edit mode;
2)Save & Activate your outbound plug.
3)Menu "Go to" -> "Method Definition"-> tab "Attributes":
- set "Visibility" = Public
- "Event" block: "Active" should be marked.
Warning: after changing of visibility the content(code) of method will be removed automatically!
So, save it beforehand.
4) Then go to method and try to do save and activate.
You will get a error message. Double click at this message - so you will be redirected to the error place - protected section of the current class.
5) Find out in this protected section the rows with your outbound plug - cut out them.
6)On the toolbar you will see button for public section - go there and past you rows there.
7) save and activate everything.
8) Now you can fill your outbound plug with your logic and activate again.
I did this just recently many times and it worked fine.
Please tell me if something is unclear or doesn't work.
Good luck!
Evgenia

Similar Messages

  • How to fire outbound plugs of a window?

    I have a component which I want to re-use in applications. The component should have 2 outbound (interface) plugs which can be wired into parent applications. When the user clicks buttonA in the component it should fire outboundPlugA, likewise for buttonB we have outboundPlugB. My problem is that I can only seem to fire outbound plugs of the view and not of the window.
    Until now, we've solved this by firing interface events of the component controllers but it seems plugs would be more elegant.
    How does one fire outbound plugs of the window?

    OK, I've done what you said and have the following in the event handler (action of a button) in my view:
      DATA:l_ref_test TYPE REF TO ig_comp1_window.
      l_ref_test = wd_this->get_comp1_window_CTR( ).
    The compiler error message is:
    Method "GET_COMP1_WINDOW_CTR" is unknown or PROTECTED or PRIVATE.
    This method does not exist as far as I can see.

  • How to make IIS plug-in do STICKY load balancing

    There are two classes of scalable services: pure and sticky. A pure service
    is one where any instance of the application can respond to client requests.
    A sticky service is one where a client sends its requests to the same
    instance; those requests are not redirected to other instances.
    It seems to me that weblogic IIS proxy plug-in does not support the sticky
    load balancing.
    Could someone give me some information on how to make the proxy sticky?
    Is there configuration parameters for this?
    Thanks,
    -Lei

    I set the cluster.
    It seems to me that there is some problem with the Set-Cookie mechanism of
    the plug-in.
    Sometime it set the cookie in my browser, sometime it is not.
    Even from the wlproxy.log, I could set something like
    Fri Aug 03 17:56:12 2001 Hdrs to
    client:[Set-Cookie]=[AribaNode=O2tII92qHlP2tpZjUV0m5ued1s6X028cUPu24QcGj1Q25
    AE5VXOd!1782877802312707887!ltang.ariba.com!8001!7002; domain=ariba.com;
    path=/]
    But the cookie is not set in my browser, what might be wrong here?
    Thanks,
    -Lei
    "Eric Gross" <[email protected]> wrote in message
    news:[email protected]...
    I do believe that this will not work since if clustering is not enabled, a
    cookie will not be set on the browser that contains the primary and
    secondary server.
    You are specifying two different ports in your servers. You need to use
    clustering in order to get this functionality with the plugin.Furthermore,
    you will achieve fail-over.
    Regards,
    Eric
    "Lei Tang" <[email protected]> wrote in message
    news:[email protected]...
    Here is what I did for the examples under the bea sample directory.
    I put the following in test1/WEB-INF/weblogic.xml
    <session-descriptor>
    <session-param>
    <param-name> CookieDomain </param-name>
    <param-value> *.ariba.com </param-value>
    </session-param>
    <session-param>
    <param-name> CookieName </param-name>
    <param-value> AribaNode </param-value>
    </session-param>
    <session-param>
    <param-name> CookiePath </param-name>
    <param-value> /test1 </param-value>
    </session-param>
    </session-descriptor>
    </weblogic-web-app>
    I add the following in iisproxy.ini
    # This file contains initialization name/value pairs
    # for the IIS/WebLogic plug-in.
    WebLogicCluster=ltang.ariba.com:8001,achu.ariba.com:7001
    ConnectTimeoutSecs=20
    ConnectRetrySecs=2
    Debug=ALL
    WLLogFile=c:\tmp\wlproxy.log
    WlForwardPath=/test1
    DynamicServerList=OFF
    CookieName=AribaNode
    I use SesssionServlet.java as an example
    When I involk http://proxy/test1/SessionServlet, I always get 1
    if I use
    http://proxy/test1/SessionServlet:AribaNode=................................
    I could see the session becomes sticky.
    If I do not want to use URL rewriting, what should I do in order to makethe
    session STICKY
    for this example.
    Thanks,
    -Lei
    "Eric Gross" <[email protected]> wrote in message
    news:[email protected]...
    If you leave the CookieName untouched on the WebLogic side, then there
    should be no reason to make the change in the plug-in.
    But yes, you need to make sure the cookie names are the same.
    Regards,
    Eric
    "Mark Vaughn" <[email protected]> wrote in message
    news:[email protected]...
    Actually, you also need to make sure you set the "CookieName" in theplugin.
    That let's the plugin read the cookie set by WebLogic to determine
    who
    the
    primary and secondary servers are for that session. Otherwise, theplugin
    has no
    way of knowing if you are establishing a new session or returning to
    an
    existing
    one. The cookie will tell it if you have a current session and who
    it
    should
    send you to for continuing that session, or failing that session
    over.
    >>>>
    Eric Gross wrote:
    Without having clustering enabled, you will not get Sticky load
    balancing.
    You need to have clustering so that a cookie is sent back to the
    client
    that
    contains information about where it's session is located.
    Otherwise,
    you
    are just going to get round-robin each time.
    You can refer to the following page for more information:
    http://e-docs.beasys.com/wls/docs61/cluster/servlet.html
    Regards,
    Eric
    "Lei Tang" <[email protected]> wrote in message
    news:[email protected]...
    WebLogicCluster=machine1:7001,machine2:7001
    ConnectTimeoutSecs=20
    ConnectRetrySecs=2
    Debug=ALL
    WLLogFile=c:\tmp\wlproxy.log
    WlForwardPath=/test,/test1
    DynamicServerList=OFF
    I run two standone (Admin server) weblogic servers on machine1
    machine2.
    Then I deploy application test.war on machine1 first, then onmachine2.
    Should I make machine2 as a managed server and machine1 as an
    admi
    n
    server?
    Will this make the session sticky?
    Thanks,
    -Lei
    "Eric Gross" <[email protected]> wrote in message
    news:[email protected]...
    It would help us to know how you have iisproxy.ini configured.
    Sticky
    load
    balancing should work fine if you have the plug-in and
    WebLogic
    Server
    setup
    correctly.
    How have you setup the plug-in?
    Thanks,
    Eric
    "Lei Tang" <[email protected]> wrote in message
    news:[email protected]...
    There are two classes of scalable services: pure and sticky.
    A
    pure
    service
    is one where any instance of the application can respond to
    client
    requests.
    A sticky service is one where a client sends its requests to
    the
    same
    instance; those requests are not redirected to other
    instances.
    It seems to me that weblogic IIS proxy plug-in does notsupport
    the
    sticky
    load balancing.
    Could someone give me some information on how to make the
    proxy
    sticky?
    Is there configuration parameters for this?
    Thanks,
    -Lei
    .-. Mark Vaughn
    /V\ 7024 Corona Dr.
    // \\ North Richland Hills, TX 76180
    /( )\ [email protected]
    ^^-^^
    "Give a man a fish and you feed him for a day;
    teach him to use the Net and he won't bother you for weeks."
    Ben Woodbridge

  • How to make an ABAP Proxy public as an asynchronous WebService

    Hello together,
    i have made an ABAP-Proxy public as an WebService by generating the WSDL from the directory for my asynchronous <b>outbound interface</b>. This outbound interface is mapped to the ABAP-inbound interface and so on. This works fine.
    But actually i don't need any mapping. So i'm thinking about to how to send the WebService <i>directly</i> and to the ABAP-Inbound-Interface <u>asynchron</u>.
    1. Is this possible at all (and how), and if so
    2. does it makes sense in order to improve the performace (there is a mass-processing in behind)?
    Gunnar

    Gunnar,
    I guess its simple...go for SOAP to Proxy scenario.
    If ur source and target structure is same ..u need not require mapping.u can execute the scenario without mapping also.
    I have done same scenario 2 months ago.....
    following things u need to do.
    1)create outbound message interface
    2)create inbound message interface
    3)No need of message mapping and interface mapping(if u dont require any transformation of source structure)
    4)create WSDL for outbound message interfce
    5)create proxy for inbound MI
    6)write the necessare code in ur proxy
    7)using any SOAP editor like XML spy send data to proxy...
    u have done the work!!!!
    All the best
    regards
    biplab

  • TUTORIAL: How to make PPC Plug-Ins work on Intel Macs!

    Hi guys, I wanted to share this brillant method with you all, collect ideas and create a list of Plug-Ins, you have succeeded to make work (I guess nearly all PPc Plugs will work this way but lets better stick to facts). Maybe there is a way to work with more than 1 Plug - Feel free to report and contribute! Kudos goes to a dear friend of mine... Let' share some power...
    "I noticed some people complaining about not being able to use Trilogy and Atmosphere on Intel Macs. There's a tricky way to do it that takes about ten minutes to set up the first time and after that is easy. It probably works for other PPC-only instruments as well.
    Here's the outline: OSX for Intel contains a layer called Rosetta, which runs PPC software that hasn't been updated. (You might run Microsoft Word via Rosetta and not even know it.) In general, Rosetta is no good for audio software: you can't use it for a sequencer or a recording application. But it's good enough for a lightweight plugin host like Rax, which does nothing but serve as a host for Atmosphere. So you can load Atmosphere into Rax via Rosetta, then run it alongside a UB sequencer like Live or Logic.
    The only tricky part is connecting the two together. You need to get MIDI out of your sequencer and into Rax, and you need to get audio out of Rax and back into the sequencer. The MIDI can go via an internal IAC bus. The audio can go via the handy freeware audio-routing utility Soundflower.
    Here's how to set up:
    -- download Rax version 1.2.3. (Version 2 and up won't work.) You can find it at http://macmusic.org/software/view.php?id=395 . Use the serial in SerialBox to install.
    -- download and install Soundflower from http://www.cycling74.com/downloads/soundflower
    -- in Audio MIDI Setup, create a new IAC bus. Instructions on how to do this are at http://www.spectrasonics.net/news/Creating-an-IAC-Bus.html . Name it Rhino. (You can name it whatever you want, but in these instructions I'm going to call it Rhino.)
    Now you're ready to go.
    -- Open your sequencer and create a MIDI track and an audio track. Set the MIDI track's output to Rhino. Set the audio track's input to Soundflower 2ch.
    -- Open Rax and load Atmosphere. In the Preferences, go to the Audio tab and set Audio Device to Soundflower 2ch. Now go to the MIDI tab and, under MIDI Inputs, make sure Rhino is the only thing checked.
    You should now be able to send MIDI from your sequencer to Atmosphere, and then hear the audio through the sequencer. One last stage is to sync Atmosphere to your sequencer's MIDI clock, so that tempo-synched effects will work properly.
    -- Still in Rax Preferences, on the MIDI tab, set the MIDI Clock dropdown menu to Rhino. Close the Preferences window. At the top of the main Rax window, make sure the Ext. Sync box is checked. The Tempo window should say 0, which means Rax is following the sequencer's master tempo.
    And you're done. Save the Rax document and you can open Atmosphere with a single click. Trilogy works the exact same way, obviously.
    If you want to use multiple instruments from Rax, you'll need to use SoundFlower 16ch and send MIDI on a different MIDI channel for each instrument (using the same IAC bus).
    Anyone who's tried this, please post your results in this thread. Especially, try out other PPC instruments, and try using multiple instruments at the same time, and let us know how it works for you."
    Maybe one of the Admins wants to sticky this
    With my very best,
    Vic.

    There's another shortcut I've used successfully in order to access 'old' PlugIns on an Intel MBP :
    Just use Logic 6 - and take full advantage o' that ole rotatin' rosetta
    Meaning : Other than with native Logic versions 7 and 8, Logic 6 has to be fully emulated by the rosetta engine, and if your intel mac is fast enough, it does so very well - thus including all PPC PlugIns you still may have installed. Also works fine for PlugIns that were converted via FXpansion's VST-AU manager.

  • [iPhone] How to make a plug-in for Safari?

    Hi!
    Is there an ability to create a plug-in for Safari on iPhone, which could interact with user (have several buttons and could open webpages with Safari)?
    If so, please, tell in a few words, how this plug-in can be implemented, which documents have useful information related to this, or even if there any source code examples with similar functionality?
    Thanks.

    This is odd because in the settings for Safari on the iPhone is the ability to turn plugins on and off. If they didn't allow plugins to be written for Safari on the iPhone then why give the ability to turn plugins off?
    Message was edited by: GalenRhodes

  • My ipad mini is totally drain and after plug it to regain the power its not working anymore.can somebody knows how to make my ipad work again

    my ipad mini is totally drain and after plug it to regain the power its not working anymore.can somebody knows how to make my ipad work again

    Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • How to pass parameters of outbound plug of one view to other view...

    Hello All,
    i have a scenario like this.
    1) i have two views(View1, View2) and iam calling View2 using View1 Outbound plug which is having one parameter(Par1). iam filling this parameter in lead_select method using
    "wd_this->fire_op_to_display_plg (
    par1           =   itab-name1
    In the debugging iam able to see Par1 is filled with value.
    2) In View2 iam calling View1 using Inbound plug with no parameters.
    3) I have to pass this Par1 which i got in View1 to View2 so that i can use this for displaying the output(this parameter is mandatory in processing the data of View2.
    Could any one suggest how can i approach to solve this problem step by step.
    Thanks,
    Sree.

    go to the the method of inbound plug in methods tab of view 2
    and add the same parameter with same name and with the same type and directly access in the method..
    see the picture  test is the inbound plug
    http://flickr.com/photos/28584284@N04/2845020873/
    Abhi

  • How To Make A Public Page Parameter (similar to session)

    Hi, I'm new to Oracle Portal
    I wonder how to make a public parameter that can be accessed from any page (similar to session).
    So the portlets can use the public parameter.
    Case:
    when user logged in, I pass the employee_ID to the session.
    Portal pages, which contains employee portlet, and some other portlet depends on employee_ID.
    So I think, may be there's a way to set the parameter for once, but the value is accessible until the user log off.
    Any suggestion or help?
    Thx before,
    Chris

    Let me explain the problem once again:
    Page 1 Portlet 1 contains employee table
    ID, Name, Address
    When I click the employee ID (using event), it will be pass the value to page parameter EMPID
    And i want this EMPID can be accessed by
    Portlet 2 - Showing sales report
    Portlet 3 - Showing report
    Portlet 4 - Showing chart
    Portlet 5
    and so on
    Portlet 2, 3 4, 5, and so on is using EMPID as the parameter too,
    but these portlets are located in different page
    Portlet 2 is in page 2
    Portlet 3 is in page 3
    Portlet 4 is in page 4
    Portlet 5 is in page 5
    and so on
    First I think about using Package wwpro_api_parameters
    but after read further, this package can get and retrieve only
    I wonder can this (public page parameter) be done by using default Oracle Portal Tools / API, or I should do some java coding, or something else?
    Please help me...
    Thanx before,
    Chris

  • How to make plug ins show up in the filter menu, several Topaz plug ins are in the 13 plug in folder?

    How to make plug ins show up in the filter drop down menu, when several Topaz plug ins have been moved from Elements 11 to the plug in folder for Elements 13?

    Thank you for your advice. I followed your directions, but came up with the same results. However, I did discover that whenever I open up the iPhoto Library that is already existing on my MacBook a certain set of pictures shows up. But then when I open up the iPhoto Library from the Hard drive another set of pictures shows up. BUT not ALL of my pictures are showing up on the iPhoto Library from the hard drive. At least the last two years of pictures are not showing up?! Actually, it appears that all the pictures are there from when I started using iPhoto about 5 years ago up until around the time that I got my iMac desktop computer and started using that (2 years ago). I have noticed that more recent videos I have made are showing up in a folder on the hard drive, but will not appear when I open up iMovie?! Any ideas on how to access my pictures from the last 2 years off of the hard drive???

  • Fire outbound plug of interface view controller?

    Hello Experts-
        In my WD project I have two apps A and B.
        I need to navigate from app A to app B.
        In the interface view controller of app A, I have created an outbound plug called GotoB.
        I determine the URL of app B using the WDURLGenerator and store that value in a string.
        In a view of the app A I have the code:
    <code>
    wdThis.wdGetAInterfaceViewController().wdFirePlugGoToB("URLtoB");
    </code>
        For some reason nothing seems to be happening when the event triggers in the view of app A that runs the above code. The view of app A just seems to refresh. The one thing that does happen is that on the refreshed view of app A if I click on the button to trigger this event again I get an 'app A has expired' WAS error.
        What am I missing here? How can I make the navigation from app A to app B work?
    Thank you,
    - Vik.

    Hi,
    well step by step:
    1) Create component Component1 (package="com.sap.sdn", window name = "Component1CW", View name="Conponent1CV")
    2) Create component Component2 (package="com.sap.sdn", window name = "Component2CW", View name="Conponent2CV")
    3) Create application "App1" (package="com.sap.sdn", Web Dynpro component="Component2", the rest - by default)
    4) In Component1CWInterfaceView create outbound plug "GoToComp2"
    5) In Conponent1CV add Component1CWInterfaceView as required controller
    6) In Conponent1CV add button and in action handler put following:
      public void onActionGoToComp2(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionGoToComp2(ServerEvent)
        wdThis.wdGetConponent1CWInterfaceViewController().wdFirePlugGoToComp2();
        //@@end
    7) In component Component2 add Component1 as Used Web Dynpto Component (name="Component1CU")
    8) In Component2CW embed view (Component1CWInterfaceView) as Embed Interface View of a Component Interface, and set this view as default.
    9) In Component2CV add inbound plug "FromComponent1"
    10) In Component2CW link embedded View Component1CU.Conponent1CWInterfaceView.GoToComp2 with Component2CV.FromComponent1
    11) Build-deploy-run. Click on button. It should work.
    Regards, Maxim R.

  • How to make the swing drawings to appear in a specific jPanel?

    hi,
    I have a frame which I divided in two panels - one for the jComboBoxes/buttons and the other one for showing graphics. but the paint(Graphics g) overpaints it all =(
    how should my code look like if I want some rectangles (depending on the combo choices and on button click which means update) to appear in the second panel?
    the code's structure is like :
    import *;
    public class NewJFrame extends javax.swing.JFrame {
         private JPanel jPanel1;
    public static void main(String[] args) {
              NewJFrame inst = new NewJFrame();
              inst.setVisible(true);
         public NewJFrame() {
              super();
              initGUI();          
         public void paint(Graphics g) {
              g.fillRect (x, y, w, z)
         private void initGUI() {
              jPanel1 = new JPanel();
                   // combo boxes and buttons
                   // action listeners for them
              jPanel2 = new JPanel();
                   // the place where the rectangles should be shown
                   // and updated if combos are changed and button clicked
    }now, I wonder if anyone could possibly give me a hint how to make it correctly, because I'm really a total newb in Java and I can't find any good examples from www which I've search through for the solution.
    P.S. is there a plug-in for eclipse for visual programming of the graphics? =)
    thank You for the kindest help!
    J.M.

    You should not be mixing AWT and Swing component in
    a Swing application, so don't use a Canvas.
    If you need some custom painting then you should
    override the paintComponent() method of JComponent or
    JPanel and then add this component to the GUIwhat does mean the override the paintComponent() method of JComponent or JPanel?
    how can I add that component to the GUI?
    =)
    can you give a short code example, please! the code structure would be more than enough.
    J.

  • Fire WindowInterfaceView outbound plug

    For my webdynpro I use cross-component navigation.
    From ComponentA, ViewA i'm using a plug to navigate to ComponentB, ViewB.
    Now I want to navigate back to ComponentA, ViewA when the user press Cancel.
    I created a outbound plug in my WindowInterfaceView with a link to the inbound plug from viewA.
    How can I fire this plug in the WindowInterfaceView from ViewB?
    Regards,
    Björn

    Hallo B.
    what's the problem? You just apply the same technique twice.  You navigate back to CompB from CompA just like you navigated from CompB to CompA before?
    You declare an additional outbound plug on the interface view of CompB and link it to an interface view inbound plug of CompB.
    Firing the outbound plug from WindowInterfaceView (you mean ComponentInterfaceView which is 1:1-related with a Window inside the component) is explained in the tutorial:
    public void onActionNavigateBackToUICompB( com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, int targetView )
    //@@begin onActionNavigateBackToUICompB(ServerEvent)
    wdThis.wdGetUICompAInterfaceViewController() .wdFirePlugBackToOtherCompOut(targetView);
    //@@end
    I allready adapted the code to your question.
    Regards, Bertram

  • Fireing outbound plug of interface view from within component

    Hi all,
    is there a better way of firing an outbound plug of an wd component interface view than from within the interface view controller itself?
    The problem is, that you easly get a cyclic reference if you evaluate inbound component plugs in the interface controller (usage from int view ctrl --> int ctrl needed) and then try to fire an outbound plug from this interface controller (usage comp int --> comp int view usage needed).
    One workaround is to use some custom controller with usage of the interface view, but this doesn't seem to be a nice solution.
    So is it possible to fire outbound comp plugs from, lets say the component controller - without any usage releation to the comp int view - instead, maybe via wdComponentAPI? If yes, could you provide a code snippet?
    Thanks you and best regards,
    Christian

    Hi Christian,
    this is not possible by using the public API only, i'm afraid. It is of course possible, if you decide to forget about the possible drawbacks of using methods and classes reserved for internal use. But you have to use it at your own risk. I hacked this together some weeks ago, don't know whether it still works
    * Fires an outbound plug of an interface view with parameters.
    * @param wdComponentAPI Component API "owning" the interface view.
    * @param windowName Name of window
    * @param plugName Name of outbound plug
    * @param callerParameterMap optional Map of plug parameters.
    public static final void fireOutboundPlug(
      IWDComponent wdComponentAPI,
      String windowName,
      String plugName,
      Map callerParameterMap)
      throws WDRuntimeException {
      // Find window requested
      IWDWindowInfo windowInfo = wdComponentAPI.getComponent().getComponentInfo().findInWindows(windowName);
      if (windowInfo == null) {
        throw new WDRuntimeException(
          "Can't find window: " + windowName + " in component: " + wdComponentAPI.getQualifiedName());
      // Get info of interface view
      IWDInterfaceViewInfo ifViewInfo = windowInfo.getInterfaceView();
      if (ifViewInfo == null) {
        throw new WDRuntimeException("Window: " + windowName + ", no interface view info found");
      // Find outbound plug
      IWDOutboundPlugInfo outboundPlug = ifViewInfo.findInOutboundPlugs(plugName);
      if (outboundPlug == null) {
        throw new WDRuntimeException(
          "The interface view: " + ifViewInfo.getName() + " has no outbound plug: " + plugName);
      // Parameter passing
      Collection plugParameters = outboundPlug.getParameters();
      // TODO make check optional, check caller map parameter keys against existing
      if (plugParameters == null || plugParameters.isEmpty()) {
        // No caller parameters allowed.
        if (callerParameterMap != null && !callerParameterMap.isEmpty()) {
          throw new WDRuntimeException(
            "The outbound plug: " + plugName + " has no parameters, callerParams must be empty/null.");
      // TODO This is a hack, use of internal WD runtime classes and methods (don't use productive).
      InterfaceView ifViewController =
        (InterfaceView) ((Component) wdComponentAPI.getComponent()).getController(ifViewInfo.getName());
      ifViewController.navigate(outboundPlug.getName(), callerParameterMap);
    Please remember, that not everything which is technically possible, makes sense
    Regards
    Stefan

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    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.
    vishal

    Hi,
    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.

Maybe you are looking for