Window form Sapscript

Hi,
i need to draw a window like the following is it possible:
TEXT  ******************
TEXT  ******************
is it possible to draw a simple line?
thx,
Regards
Soufiane.

hi,
/: BOX FRAME 10 TW
draws a box
/: BOX INTENSITY 10
Fills the window background with shading having a gray scale of 10 %.
<b>/: BOX HEIGHT 0 TW FRAME 10 TW
Draws a horizontal line</b>
<b>/: BOX WIDTH 0 TW FRAME 10 TW
Draws a vertical line</b>
/: BOX WIDTH 5 CM HEIGHT 5 CM FRAME 10 TW INTENSITY 10
draws a box and fills the box with shading
/:BOX WIDTH 5 CM HEIGHT 5 CM FRAME 10 TW
no intensity
BOX XPOS 10 CM WIDTH 5 CM HEIGHT 5 CM FRAME 10 TW
specifying the position for the box
or
this is another way to create a box specifiying all the positions
POSITION WINDOW
POSITION XORIGIN 5 CM YORIGIN 5 CM
SIZE WIDTH 5 CM HEIGHT 5 CM
BOX FRAME 30 TW
regards

Similar Messages

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

  • SharePoint People picker control in Windows form

    Hi All,
    I have a requirement wherein, I have to create an outlook add in to save data into sharepoint list. I have created a sample outlook add in to save the data into sharepoint list (all columns are of text) using windows form and it works fine. However there
    is one field in form which requires people values to be picked from AD and saved to sharepoint list.
    I have browsed the net but could not find any useful information. Is it possible to use OOB people picker in windows form? If not what are the other ways to achieve people picker functionality in windows form.
    Thanks in advance.
    Regards,
    Vinayak

    Hi,
    The
    PeoplePicker control is part of the Microsoft.SharePoint.dll, it will only work on SharePoint hosted pages. 
    Here is a link about how to use PeoplePicker control:
    http://karinebosch.wordpress.com/sharepoint-controls/peopleeditor-control/
    Anyway, you can fetch Active Directly users as the link below:
    http://www.codeproject.com/Tips/599697/Get-list-of-Active-Directory-users-in-Csharp
    Best regards
    Patrick Liang
    TechNet Community Support

  • I Need Help Trying to Play (.pls) files in a simple windows forms Application

     So I'm try to build application that when I click on the icon it opens a little window and play the url .pls. I already got the graphics of the app i just to get the code and I've been looking around for but all i got was this code
    typedef struct
    int count;
    void **name;
    void **displayname;
    } Playlist;
    Playlist* my_playlist; // SHOUTCAST PLAYLIST
    #define BOX(text) MessageBox(NULL,text,"Info",MB_OK | MB_TOPMOST);
    char *stristr(char *string2, char *string1) // from /samples/fmod/Main.c
    char *s1 = strdup(string1);
    char *s2 = strdup(string2);
    char *ret = 0;
    int i, j;
    int len1 = (int)strlen(string1);
    int len2 = (int)strlen(string2);
    for (i=0;s1[i];i++) s1[i] = tolower(s1[i]);
    for (i=0;s2[i];i++) s2[i] = tolower(s2[i]);
    for (j=0;j < (len2 - len1);j++)
    char *a = s1;
    char *b = &s2[j];
    for (i=0;(i < len1) && *a && *b;a++, b++, i++)
    if (*a != *b)
    break;
    if (i == len1)
    ret = &string2[j];
    break;
    free(s1);
    free(s2);
    return ret;
    Playlist *ParsePlaylist(char *name) // from /samples/fmod/Main.c and MSDN
    char *filebuf, *p;
    Playlist *playlist = 0;
    int count, i;
    // Check if URL is null
    if (!name)
    BOX("Streaming URL is empty");
    return 0;
    // Check if URL is a *.pls file
    if (_stricmp((const char *)".pls", (const char *)(&name[strlen(name) - 4])))
    return 0;
    // Create a WinInet session
    HINTERNET hSession = InternetOpen(_T(""), INTERNET_OPEN_TYPE_PRECONFIG, 0, 0, 0);
    // Prepare a request
    HINTERNET hRequest = InternetOpenUrl(hSession, name, 0, 0, 0, 0);
    // Send the HTTP request.
    HttpSendRequest(hRequest, 0, 0, 0, 0);
    // Read the response data.
    DWORD dwNumberOfBytesAvailable = 0;
    do
    // Retrieve size of remote file
    InternetQueryDataAvailable(hRequest, &dwNumberOfBytesAvailable, 0, 0);
    if (0 < dwNumberOfBytesAvailable)
    // Allocate buffer memory
    filebuf = new char[dwNumberOfBytesAvailable + 1];
    filebuf[dwNumberOfBytesAvailable] = 0;
    DWORD dwBytesRead = 0;
    // Read remote file and put in buffer
    InternetReadFile(hRequest,
    filebuf,
    dwNumberOfBytesAvailable,
    &dwBytesRead);
    //BOX(filebuf);
    while (0 < dwNumberOfBytesAvailable);
    // Close the request handle.
    InternetCloseHandle(hRequest);
    // Close the WinInet session.
    InternetCloseHandle(hSession);
    // Parse the pls file (from Fmod sample)
    p = stristr(filebuf, "NumberOfEntries=");
    if (!p)
    BOX("Streaming : NumberOfEntries in pls file not found");
    return 0;
    p += 16;
    count = atoi(p);
    if (!count)
    BOX("Streaming : numeric value for NumberOfEntries not found");
    return 0;
    playlist = (Playlist *)calloc(sizeof(Playlist), 1);
    if (!playlist)
    BOX("Streaming : can't allocate memory for pls file (playlist)");
    return 0;
    playlist->count = count;
    playlist->name = (void **)calloc(sizeof(char *) * count, 1);
    if (!playlist->name)
    BOX("Streaming : can't allocate memory for pls file (playlist->name)");
    return 0;
    playlist->displayname = (void **)calloc(sizeof(char *) * count, 1);
    if (!playlist->displayname)
    BOX("Streaming : can't allocate memory for pls file (playlist->displayname)");
    return 0;
    for (i=0;i < count;i++)
    char tmp[32];
    char *filename, *displayname, *t;
    filename = displayname = 0;
    sprintf(tmp, "File%d=", i + 1);
    p = strstr(filebuf, tmp);
    if (p)
    p += strlen(tmp);
    t = p;
    for (;*t && (*t != 0xa) && (*t != 0xd);t++);
    if (*t)
    char tmpc = *t;
    *t = 0;
    filename = _strdup(p);
    *t = tmpc;
    if (strncmp(filename, "http://", 7) && strncmp(filename, "http:\\\\", 7))
    char *tmpname = _strdup(filename);
    p = &tmpname[strlen(tmpname) - 1];
    for (;(p > tmpname) && (*p != '\\') && (*p != '/');p--);
    if ((*p == '\\') || (*p == '/'))
    p++;
    displayname = _strdup(p);
    free(tmpname);
    playlist->name[i] = filename;
    playlist->displayname[i] = displayname;
    free(filebuf);
    return playlist;
    [main code]
    char string_music[256] = "http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=6042&file=filename.pls"; // For example
    // Parse the remote file (in case it's a Shoutcast playlist (*.pls))
    my_playlist = ParsePlaylist(string_music);
    if (my_playlist)
    strcpy(string_music, (char*) my_playlist->name[0]); // for the first song in the playlist
    FSOUND_STREAM * my_stream = FSOUND_Stream_Open(string_music, FSOUND_NORMAL | FSOUND_NONBLOCKING, 0, 0);
    int int_sound_mp3 = FSOUND_Stream_Play(FSOUND_FREE, my_stream);
    and i got to link it to Wininet.lib
    and I'm a noob so i got problems as soon as i tried to put everything together
    so any help greatly appreciated 
    BTW if you know any other ways, that I'll be able to stream the audio that will be great to.
    heres the link for the audio stream (.pls)
    http://panel3.serverhostingcenter.com:2199/tunein/nrlsxglp.pls

    Hello 0cooldex0,
    What library do you used in this scenario? I haven't saw this FSOUND_STREAM from MSDN library.
    By the way, winform general is used for talking about Windows Form library, is is using C# or VB.NET but not C or C++. You are not posting in the right forum.
    In my point of view, you may choose the forum depending on the library you choosed and post on specific forum.
    Regards,
    Barry
    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.

  • Crystal Report Windows Forms Viewer Error in 1 Workstation after upgrade of PL

    Hi all,
    We just upgraded SAP from 8.82 PL02 to 8.82 PL15.
    Afterwards, in just 1 workstation, Crystal Reports layouts have Crystal Report Windows Forms Viewer error I attach.
    Before the upgrade this error did not happen.
    No permissions or authorizations were changed  in the workstation.
    The Crystal Reports layouts remain working fine in server and in the other workstations.
    In the workstation following are installed:
    - Operating System Windows 7;
    - Microsoft .NET Framework 4.5;
    - SAP Crystal Reports runtime engine for. NET Framework;
    - Crystal Report 2008 Runtime SP6;
    - Microsoft SQL Server 2008 R2 Native Client.
    All, but the operating system, are equal to the other workstations.
    User has edit access to SAP folders, temp and access to the attach path.
    We already uninstalled SAP client and client agent and re-installed it but with no avail.
    Can anyone help me?
    Thanks in advance.
    Best regards,
    Pedro Mariano

    Hi San Xu,
    Thank you for your input.
    However I'm facing problem with each software is suitable.
    I installed SAP Crystal Reports for SAP Business One (CR 2011 V14.0.4.738), but with no avail.
    Thanks in advance.
    Best regards,
    Pedro Mariano

  • Crystal Report Windows Forms Viewer - No Error Popup

    Similar to this post:  Error message that says "No Error" from CR Viewer, I have just upgraded by Application to .net 4.0 and Crystal Reports 2010. The report viewer works fine the first time a report is loaded, but when I change the parameters on the report, and put the updated report back into the report viewer, I get the message shown above.  The report does not change its parameters and the updated report is not displayed.  The code in question is setting the date parameters for the report.  The user can select new date parameters from the form that encloses the report viewer.  The code subclasses the Report Object code to add additional functions through interfaces.  The IDateRange interface provides a starting and ending date range for the report using a property on the report class as follows:
        Public Property EndingDate() As Date Implements IDateRange.EndingDate
            Get
                Return _endingDate
            End Get
            Set(ByVal value As Date)
                _endingDate = value
                Me.SetParameterValue("EndingDate", value)
            End Set
        End Property
    In addition, the immediate Window shows the following message:
    A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in CrystalDecisions.CrystalReports.Engine.dll
    The code in the Report Viewer looks like this, see line marked in blue for when pop-up appears:
    ''' <summary>
    ''' Sets the report period and displays it.
    ''' </summary>
    ''' <param name="Report">The Report.</param>
    ''' <param name="Refresh">if set to <c>true</c> force a refresh.</param>
    Private Function PFSetReportPeriod(ByVal Report As Object, Optional ByVal Refresh As Boolean = True) As Boolean
        Dim fld As FormulaFieldDefinition
        Dim bRefresh As Boolean = False
        Dim rpt As ReportClass = CType(Report, ReportClass)
        Try
            If CRV.ReportSource IsNot Nothing Then
                rpt = CType(CRV.ReportSource, ReportClass)
            End If
    If TypeOf rpt Is IDateRange Then
        With DirectCast(rpt, IDateRange)
    .        StartingDate = dtpFromDate.Value
    .        EndingDate = dtpToDate.Value
        End With
        SetTitleLine2(DirectCast(Report, ReportClass), bRefresh)
        bRefresh = True
    Else
        If TypeOf rpt Is ReportClass Then
           fld = rpt.DataDefinition.FormulaFields("FromDate")
           If Not fld Is Nothing Then
                fld.Text = "Date(" & dtpFromDate.Value.Year & "," & dtpFromDate.Value.Month & "," & dtpFromDate.Value.Day & ")"
                bRefresh = True
            End If
            fld = rpt.DataDefinition.FormulaFields("ToDate")
            If Not fld Is Nothing Then
                fld.Text = "Date(" & dtpToDate.Value.Year & "," & dtpToDate.Value.Month & "," & dtpToDate.Value.Day & ")"
                bRefresh = True
            End If
            SetTitleLine2(rpt, bRefresh)
        End If
    End If
        If Refresh And bRefresh Then
            If dtpToDate.Value <> CDate(dtpToDate.Tag) OrElse _
               dtpFromDate.Value <> CDate(dtpFromDate.Tag) Then
                    System.Windows.Forms.Application.DoEvents()
                If CRV.Visible Then CRV.ReportSource = rpt ' The popup appears when this statement is executed.
                If CRV.Visible = True Then CRV.Refresh()
                dtpToDate.Tag = dtpToDate.Value
                dtpFromDate.Tag = dtpFromDate.Value
               Return True
            End If
        End If
    Catch ex As Exception
        DisplayException(ex)
    End Try
    Return False
    End Function

    Problem has been resolved.  I downloaded Support Pack 8 (v.13.0.8.1216) from this location.  I then applied the fix from the entry above:
    With CRV ' Report Viewer Control
        If .Visible Then
            If .ParameterFieldInfo IsNot Nothing Then .ParameterFieldInfo.Clear()
            .ReportSource = rpt
            .Refresh()
        End If
    End With
    And no more annoying "No Error" messages.

  • How to add entire new row at the top of table in pdf report from c# windows forms using iTextSharp

    Hi for past 3 days i was thinking and breaking my head on how to add entire new at top table created in pdf report from c# windows forms with iTextSharp.
    First: I was able to create/export sql server data in form of table in pdf report from c# windows forms. Given below is the code in c#.
    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.Text;
    using System.Data;
    using System.IO;
    using System.Data.SqlClient;
    using System.Windows.Forms;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    namespace DRRS_CSharp
    public partial class frmPDFTechnician : Form
    public frmPDFTechnician()
    InitializeComponent();
    private void btnExport_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.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(7);
    table.TotalWidth=585f;
    table.LockedWidth = true;
    PdfPTable inner = new PdfPTable(1);
    inner.WidthPercentage = 115;
    PdfPCell celt=new PdfPCell(new Phrase(new Paragraph("Institute/Hospital:AIIMS,NEW DELHI",FontFactory.GetFont("Arial",14,iTextSharp.text.Font.BOLD,BaseColor.BLACK))));
    inner.AddCell(celt);
    Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
    para.Alignment = iTextSharp.text.Element.TITLE;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(95f, 95f);
    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 t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("ID");
    table.AddCell("First Name");
    table.AddCell("Middle Name");
    table.AddCell("Last Name");
    table.AddCell("DOB" );
    table.AddCell("Gender");
    table.AddCell("Designation");
    while (dr.Read())
    table.AddCell(dr[0].ToString());
    table.AddCell(dr[1].ToString());
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString());
    table.AddCell(dr[4].ToString());
    table.AddCell(dr[5].ToString());
    table.AddCell(dr[6].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(inner);
    doc.Add(table);
    doc.Close();
    The code executes well with no problem and get all datas from tables into table in PDF report from c# windows forms.
    But here is my problem how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    As the problem i am facing is my title or Header(DCS Clinical Report-Technician wise) is at top of my image named:logo5.png and not coming to it's center position of my image.
    Second the problem i am facing is how to add new entire row to top of existing table in pdf report from c# windows form using iTextSharp?.
    given in below is the row and it's data . So how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    as you can see how i create my columns in table in pdf report and populate it with sql server data. Given the code below:
    Document doc = new Document(PageSize.A4.Rotate());
    var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.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(7);
    table.TotalWidth=585f;
    table.LockedWidth = true;
    Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
    para.Alignment = iTextSharp.text.Element.TITLE;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(95f, 95f);
    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 t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("ID");
    table.AddCell("First Name");
    table.AddCell("Middle Name");
    table.AddCell("Last Name");
    table.AddCell("DOB" );
    table.AddCell("Gender");
    table.AddCell("Designation");
    while (dr.Read())
    table.AddCell(dr[0].ToString());
    table.AddCell(dr[1].ToString());
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString());
    table.AddCell(dr[4].ToString());
    table.AddCell(dr[5].ToString());
    table.AddCell(dr[6].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    So my question is how to make my column headers in bold?
    So these are my questions.
    1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?
    I know that i have to do some modifications to my code but i dont know how to do it. Can anyone help me please.
    Any help or guidance in solving this problem would be greatly appreciated.
    vishal

    Hi,
    >>1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
    2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
    3.how to make my column headers in bold?<<
    I’m sorry for the issue that you are hitting now.
    This itextsharp is third party control, for this issue, I recommended to consult the control provider directly, I think they can give more precise troubleshooting.
    http://sourceforge.net/projects/itextsharp/
    Thanks for your understanding.
    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.

  • Need help with an Aforge and windows forms memory stack-up issue

    Hello,
    I am experiencing a strange memory stack-up in my c# windows form program that occurs all the time on slow PCs, and when the windows form loses focus or is otherwise interrupted on faster PCs.
    The program I have written uses Aforge to get images from my webcam, which I then display in an Aforge picturebox control (CurrImagePic in code) in the windows form.  The images are switched into the picture box and then disposed at the camera's native
    framerate, so it appears as video to the user, not still images.  The picture box is 1080x1920, but the space for it in the form is smaller and so I allow the user to scroll around the picture.
    After about ~30 seconds of memory-stable operation on slower PCs, the problem begins.  On faster PCs, the problem only occurs when holding down scroll bar arrows or clicking and dragging around either scroll bar, and if I lock the PC or bring up the
    Ctrl+Alt+Delete menu.
    The problem itself is that memory used by the program starts to increase in very large chunks, leading to an out of memory crash.  This is unstoppable on slower PCs, but on the faster PCs if you stop scrolling or return from the lock/Ctrl+alt+delete
    menu, the program stabilizes at the higher memory usage level.  The memory that was accrued during scrolling or while in the lock menu is never collected by the garbage collector.  I've even tried to put in a button that forces a GC.collect() when
    pressed, and it does not reduce this memory usage.
    I've run perfmon and found that the memory increase is on the unmanaged heap, but I don't know if it's coming from bitmaps which are not being disposed or what it could be from.  It's been impossible to track down since it does not occur except in the
    above conditions.  I've tried various solutions (like moving my image processing out of the event handler and even using both global flags and a "lock" statement to try and ensure that only one thread or frame can access the image processing
    and displaying method at at time, but I have seen no change.  In fact, I am now seeing some unexplained small jumps in memory usage that I wasn't seeing before I put in the lock and moved the processing out of the handler.
    Has anyone run into situations like this?  I am at a loss for what I need to fix.  I think the problem is based around my Aforge event handler and image processing method if it is in my code at all - but I also have a suspicion that this is something
    deeper in the windows form code that I am either misusing or that can't keep up with the demands of my code.  Code below:
    //Applicable Globals to this code snippet
    private bool ALLOWFRAME = true;
    private Object FRAMEKEY = new Object();
    private VideoCaptureDevice COMPVID;
    private Bitmap TMPLTCAP;
    private System.Drawing.Image OLDIMAGE;
    private bool RCRDPIC = false;
    private void COMPVID_NewFrame(object sender, NewFrameEventArgs eventArgs)
    //Only process a frame when another is done processing
    if (ALLOWFRAME == true)
    ALLOWFRAME = false;
    Bitmap PassFrame = AForge.Imaging.Image.Clone(eventArgs.Frame);
    ProcessFrame(PassFrame);
    PassFrame.Dispose();
    private void ProcessFrame(Bitmap frameIn)
    lock (FRAMEKEY)
    if (OLDIMAGE != null) { OLDIMAGE.Dispose(); }
    //Call comparison method if flag is set.
    if (COMPON == true)
    Difference TmpltFilter = new Difference(TMPLTCAP);
    TmpltFilter.ApplyInPlace(frameIn);
    OLDIMAGE = CurrImagePic.Image;
    CurrImagePic.Image = AForge.Imaging.Image.Clone(frameIn);
    OLDIMAGE.Dispose();
    else
    OLDIMAGE = CurrImagePic.Image;
    CurrImagePic.Image = AForge.Imaging.Image.Clone(frameIn);
    OLDIMAGE.Dispose();
    //Toggle the flag back to false to show it's safe (i.e., comparisons have stopped)
    //for the result-recording method to copy from the picture box if it is attempting to copy
    if (RCRDPIC == true)
    RCRDPIC = false;
    ALLOWFRAME = true;

    As you are using third party tools and controls, and I cannot find posts on parallel cases using native VS controls, have you asked in the Aforge forums about your memory issue?
    http://www.aforgenet.com/aforge/framework/

  • Could i use visual studio to make a windows form that could interact with facebook?

    I'm a beginner to windows forms and have just read my way through tutorials at learnc++.com so i want to get started on a project to practice my c++ and also a project that i could find usefull.
    What I want to do is check a facebook group page every minute for new posts that contain certain words. So im thinking i could make a web browser and then get the document from the facebook group page and extract the html from it to search for certain keywords. 
    I realize that I won't be able to just do this straight away and will have to learn more about certain functions and how to get html from a webpage. Where can i learn the skills I would need to be able to do this? I'm going to try searching youtube for related
    tutorials and I'm guessing that this site has all the documentation i will need to understand the functions to pull the html from a webpage.
    please help me to figure out how I could achieve this, if i haven't been clear I will try to reply to any questions you have. 
    Thanks for reading,
    Jake

    Hello,
    I'd search over here:
    https://developers.facebook.com/
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Error message when displaying a report in a windows form

    Hi,
    use Cr 2008.SP3 Fixpack 3.5,
    Visual Studio 2008 prof. editon version 9.0.30729.1 SP,
    :NET Framework 3.5 sp1
    vb.net 2008
    when displaying a report in a Windows form sometimes the following error message appears
    System.NullReferenceException: Object reference not set to an instance of an object
       bei CrystalDecisions.Windows.Forms.PageControl.OnMouseMove(MouseEventArgs e)
       bei System.Windows.Forms.Control.WmMouseMove(Message& m)
       bei System.Windows.Forms.Control.WndProc(Message& m)
       bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       bei System.Windows.Forms.ContainerControl.WndProc(Message& m)
       bei System.Windows.Forms.UserControl.WndProc(Message& m)
       bei CrystalDecisions.Windows.Forms.PageControl.WndProc(Message& m)
       bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    The rest of the error message is in german:
    ************** JIT-Debuggen **************
    Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
    Konfigurationsdatei der Anwendung oder des Computers
    (machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
    Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.
    Zum Beispiel:
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
    Ausnahmen an den JIT-Debugger gesendet, der auf dem
    Computer registriert ist, und nicht in diesem Dialogfeld behandelt.
    Thank you
    Otto

    Can you define "sometimes" a bit more?
    Is it after a number of runs of a report?
    Is it on a particular report?
    Is it after you do certain operations on the report (paging, zooming, dill down, print, etc., etc.)?
    Can you duplicate the issue if you isolate the report to a new test app?
    Did you happen to notice if the issue existed prior to FP 3.5?
    Is this on your dev computer or a client computer?
    OS?
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Windows Forms Application, the name does not exist in the current context

    Probably duplicated here somewhere but I haven't found it yet. I've solved all other errors, have using statements and references lined up yet get this error for my instances in GUI_Load method in PresentationGUI.cs. My solution contains class libraries/projects
    for Housing, SingleFamily, MultiUnit and HousingAPP w/contains PresentationGUI and Program.cs.
    Code looks like this:
    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 HousingNameSpace;
    using SingleFamilyNameSpace;
    using MultiUnitNameSpace;
    namespace HousingAPPNameSpace
        public partial class PresentationGUI : Form
            //private SingleFamily singlefamily;          apparently this is not the solution
            //private MultiUnit multiunit;       
            public PresentationGUI()
                InitializeComponent();
            private void PresentationGUI_Load(object sender, System.EventArgs e)
                singleFamily = new SingleFamily(32779, 1100, "one car", "plan B");
                multiUnit = new MultiUnit(32789, 1250, 16, 0);
    Haven't placed more than 2 simple controls on the Form in 'Design'. The 2 errors are on singleFamily and multiUnit. If I can figure out why and how to correct, I can add controls and finally, after eons, get to Error Checking.
    Thanks in advance for any and all interest!
    Mac

    The two lines that you have commented out with "apparently this is not the solution" would, in fact, be the solution if you use the right casing so that the variables match the lines with the errors - capital F in singleFamily and capital U in
    multiUnit.

  • I was wondering can i install windows on my mac when i have downloaded windows form the internet and do not have a C.D.??

    I was wondering can i install windows on my mac when i have downloaded windows form the internet and do not have a C.D.??
    Because when i get to the part in Boot Camp Assistant that says Start Windows Installation it says u need a disc... is there no other way??

    Get the physical copy (disk) this will enable you to reinstall when (not if ) it messes up.
    Make sure to purchase acopy that is compatible with your OSX

  • Object Referenced Error When calling the Windows Form during Runtime

    Hi,
    I am getting  Object reference errors when running windows form during runtime. In debugging mode in MS Visual studio 2005, I am not getting this error. I'm calling the window form from menu and called the window in a thread as suggested in one of forums . I don't see anyone in the forum mentioned this problem I have. Any help would be deeply appreciated. Below are the error and code samples.
    ERROR Message
    Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Project1.Loadxml.Loadxml_Load(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    Edited by: Albert Tio on Feb 16, 2011 9:55 AM

    Here is the code.
    Option Strict Off
    Option Explicit On
    Friend Class GetEvents
        Public WithEvents SBO_Application As SAPbouiCOM.Application
        Public SboGuiApi As SAPbouiCOM.SboGuiApi
        Public oForm As SAPbouiCOM.Form
        Public oDBDataSource As SAPbouiCOM.DBDataSource
        Public oCompany As SAPbobsCOM.Company
        Public RS As SAPbobsCOM.Recordset
        Public oPrev_Bank As String, oPrev_AcctType As String
        Public oLoadXml As Loadxml
        Public Sub SetApplication()
                 'Dim SboGuiApi As SAPbouiCOM.SboGuiApi
            Dim sConnectionString As String
            SboGuiApi = New SAPbouiCOM.SboGuiApi
            ' by following the steps specified above, the following
            ' statment should be suficient for either development or run mode
            sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
            ' connect to a running SBO Application
            SboGuiApi.Connect(sConnectionString)
            ' get an initialized application object
            SBO_Application = SboGuiApi.GetApplication()
        End Sub
        Public Sub SetCompany()
            Dim ret As Long
            Dim MsgStr As String
            Dim Cookie As String
            Dim ConnStr As String
            Try
                oCompany = New SAPbobsCOM.Company
                Cookie = oCompany.GetContextCookie
                ConnStr = SBO_Application.Company.GetConnectionContext(Cookie)
                '//before setting the SBO login context make sure the company is not connected
                If oCompany.Connected = True Then
                    oCompany.Disconnect()
                End If
                ret = oCompany.SetSboLoginContext(ConnStr)
                If Not ret = 0 Then
                    Exit Sub
                End If
                ret = oCompany.Connect
            Catch ex As Exception
                SBO_Application.MessageBox(ex.Message)
            End Try
            MsgStr = ""
            If Not ret = 0 Then
                oCompany.GetLastError(ret, MsgStr)
                SBO_Application.MessageBox(MsgStr)
            Else
            End If
        End Sub
        Public Sub New()
            MyBase.New()
            ' set SBO_Application with an initialized application object
            SetApplication()
            SetCompany()
            AddMenuItems()
        End Sub
        Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
            Dim myThread As New System.Threading.Thread(New System.Threading.ThreadStart(AddressOf LoadXmlMainThread))
            Try
                If (pVal.MenuUID = "MySubMenu") And (pVal.BeforeAction = False) Then
                    'SBO_Application.MessageBox("My sub menu item was clicked")
                    '// Create a form to be launched in response to a click on the
                    '// new sub menu item
                    myThread.SetApartmentState(System.Threading.ApartmentState.STA)
                    myThread.Start()
                    'Loadxml.ShowDialog()
                                End If
            Catch ex As Exception
                SBO_Application.MessageBox("1." & ex.Message)
            End Try
            'If (pVal.MenuUID = "MyGoToMenu") And (pVal.BeforeAction = False) Then
            '    SBO_Application.MessageBox("My GoTo Menu was clicked")
            'End If
            'If (pVal.MenuUID = "MySecondGoToMenu") And (pVal.BeforeAction = False) Then
            '    SBO_Application.MessageBox("My Second GoTo Menu was clicked")
            'End If
        End Sub
        Private Sub LoadXmlMainThread()
            'Dim lLoadxml As New Loadxml
            Try
                oLoadXml = New Loadxml
                oLoadXml.WindowState = FormWindowState.Maximized
                oLoadXml.ShowInTaskbar = True
                oLoadXml.TopMost = True
                oLoadXml.Activate()
                Application.Run(oLoadXml)
            Catch ex As Exception
                SBO_Application.MessageBox("2." & ex.Message)
            End Try
        End Sub
        Private Sub AddMenuItems()
            '// Let's add a separator, a pop-up menu item and a string menu item
            Dim oMenus As SAPbouiCOM.Menus
            Dim oMenuItem As SAPbouiCOM.MenuItem
            Dim i As Integer '// to be used as counter
            Dim lAddAfter As Integer
            Dim sXML As String
            '// Get the menus collection from the application
            oMenus = SBO_Application.Menus
            'Save an XML file containing the menus...
            'sXML = SBO_Application.Menus.GetAsXML
            'Dim xmlD As System.Xml.XmlDocument
            'xmlD = New System.Xml.XmlDocument
            'xmlD.LoadXml(sXML)
            'xmlD.Save("c:
    mnu.xml")
            Dim oCreationPackage As SAPbouiCOM.MenuCreationParams
            oCreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
            oMenuItem = SBO_Application.Menus.Item("43520") 'moudles'
            Dim sPath As String
            sPath = Application.StartupPath
            'sPath = sPath.Remove(sPath.Length - 3, 3)
            If sPath.EndsWith("\") = False Then
                sPath = sPath & "\"
            End If
            '// find the place in wich you want to add your menu item
            '// in this example I chose to add my menu item under
            '// SAP Business One.
            oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP
            oCreationPackage.UniqueID = "MyMenu01"
            oCreationPackage.String = "Unbridle Menu"
            oCreationPackage.Enabled = True
            oCreationPackage.Image = sPath & "unbridle.bmp"
            oCreationPackage.Position = 15
            oMenus = oMenuItem.SubMenus
            Try ' If the manu already exists this code will fail
                oMenus.AddEx(oCreationPackage)
                '// Get the menu collection of the newly added pop-up item
                oMenuItem = SBO_Application.Menus.Item("MyMenu01")
                oMenus = oMenuItem.SubMenus
                '// Create s sub menu
                oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
                oCreationPackage.UniqueID = "MySubMenu"
                oCreationPackage.String = "Unbridle Monitoring"
                oMenus.AddEx(oCreationPackage)
            Catch er As Exception ' Menu already exists
                'SBO_Application.MessageBox("Menu Already Exists")
            End Try
        End Sub
    End Class
    Public Class Loadxml
        'Inherits System.Windows.Forms.Form
        Public sBPpath As String
        Public sGLpath As String
        Public sBillpath As String
        Public bRun As Boolean
        Private Sub Loadxml_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Me.TextGL.Text = System.Configuration.ConfigurationSettings.AppSettings("GLAcctDownloadPath").ToString()
            Me.TextBP.Text = System.Configuration.ConfigurationSettings.AppSettings("BPAcctUPloadPath").ToString()
            Me.TextBill.Text = System.Configuration.ConfigurationSettings.AppSettings("BillUPloadPath").ToString()
            Me.NotifyIcon1.Visible = False
        End Sub
    End Class

  • How to Clear all the data of open windows form of another exe?

    Hi,
    I want to make utility which will clear all the data from one windows application.
    i know the application name. The application of which data i want to clear is made in C# and contains many windows forms and controls.
    out of that opened windows form and controls inside it need to be cleared.
    Please guide on how to do this in C#?

    Short version: Find the window and send it a message with
    SendMessage.
    Open up Spy++ and find your form's window.  You will see that the window has children and they have classes of the form "WindowsForms10.EDIT.*"  Those are TextBox controls.  You can call things like SetWindowText to set the
    text of the window to clear it.
    To do this programmatically, you'll have to obtain the window hand that corresponds to the control.  You can find windows with
    FindWindowEx or
    EnumWindows.  Locate the window by name or class or whatever else you can determine about it.  Find the child windows and "clear" them however you wish.  I assume you mean to set empty strings to all the TextEdit controls. If you
    intend to do something more sophisticated than that, then you'll have to be more specific about what you mean by "Clear all the data".
    It may or may not be obvious that you'll be poking around with Win32 API calls via PInvoke to accomplish much of this. Example:
    SetWindowText via PInvoke.

  • I need a list of libraries used in C# Windows Forms technology.

    Windows Forms is a technology to make apps for Windows.
    It uses only a part of .Net Framework.
    I need a list of what it uses.
    I am talking about Windows Forms technology, not Windows.Forms namespace.
    I don't need .Net Framework Class Library, i need only what Windows Forms uses.
    Thank you.

    > here are a few other namespaces that Windows Forms relies on
    It is not a few, there are lots of those it relies on.
    I need a list of namespaces that it relies on.
    I repeat, i open a new Windows Forms project, i should know names of references to add them, right?
    It uses a part of .Net Framework, and it doesn't use only System.Windows.Forms namespace, it uses others
    too.
    I repeat, i must know names of references to add them.
    How can i do it?
    It is a simple question.

Maybe you are looking for

  • I am sick to my stomach. I just wiped my wife's iphone...and lost everything.

    My wife has an iPhone 4.  I brought it to the Mac Store a few weeks back and they hooked it up to my computer and copied her files to my harddrive.  They told me that it would be the same to plug it into HER Macbook and copy her files over. Today, wh

  • Why does iMovie project jerk and stop and start in preview?

    I have been making iMovies with iMovieHD for years using photos with the Ken Burns effect. Recently after a movie project gets more than a few minutes long with typical audio and transitions, I no longer can preview it without it jerking and stopping

  • I can't install adobe audition

    Windows 7, Program started freezing a lot at commands a couple of days ago and wouldn't let me convert to mp3 it would just crash no longer how long i waited it out and come up with error need to terminate program so i deleted the program from drag a

  • Archive apply to standby

    Hai all, I confihgured physical standby and it is working fine.. but before making a switch over, oracle recommends to run this query inorder to Make sure the standby database is current with redo application. On each database server, run this query

  • I can't Access my External Harddrive.. Please Help

    OS = Vista on a PC I have a WD External Harddrive, that I Can't access. It is a plug in Harddrive (self Powered) If i open "Airport Utility" on the left side it will show the unit. I double click on it. It brings up a secondary window that allows me