.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

populate pdf form fields from database or XML

Posted By:      Posted Date: October 24, 2010    Points: 0   Category :ASP.Net

 Hi, I have a web app that stores data in an SQL database. What I want to be able to do is to have a pdf form with fields that I can later populate with the database info. I can either go directly from the database or I can perform an intermediate conversion to XML if that will work better. Can anyone point me towards a tutorial or a step by step explanation of how to get started? I'm pretty much a noob in the pdf world.


Mark B

View Complete Post

More Related Resource Links

Need help on Select button column in Data Grid to populate fields in Form View


 When I have a select a row in a Data Grid that when I click on it I want it to show the info for the person I selected in a form view on the same page as the Data Grid. Here are the columns for the Data Grid that I have set up, the column is highlighted:

<asp:DataGrid ID="MHGrid" AutoGenerateColumns="False"  
        DataSourceID="MHFoundation" DataKeyField="POPULATION_LIST_ID" 
        AllowPaging="True" AllowSorting="True" BorderStyle="Solid" 
        BorderColor="#999999" BorderWidth="3px" CellPadding="4" PageSize="4" 
        CellSpacing="2" runat="server" BackColor="Gray" Font-Bold="False" 
        Font-Italic="False" Font-Overline="False" Font-Strikeout="False" 
        <SelectedItemStyle BackColor="#FF9900" Font-Bold="False" Font-Italic="False" 
            Font-Overline="False" Font-Strikeout="False" Font-Underline="False" />
            <asp:ButtonColumn CommandName="Select"  Text="Select"></asp:ButtonColumn>
            <asp:BoundColumn D

Create a pdf document from win form application by fetching fields from database


Assuming i have a winform that has a button called "Create a Quote". Once user clicks it, a PDF File gets created on desktop. The PDF File has a fixed design/structure e.g. the logo is at the top left corner, the headers are fixed, etc. However, the data it self is pulled from a database.

As you see above, Quotation #, Description, Qty, U.P (USD), T.P (USD) records should be fetched from the db and dumped in the pdf template then create the pdf for user.

I haven't done this before. I hope my question is clear enough. Feel free to put useful web links that help me achieve it.

Any help will be appreciated.

Is it possible to populate property choices from a database?


I'm creating my first server control, and have it working where I can set up an enum and the user can set a property's choices,  based off of that enum.  But I'd like it to pull records from a database and populate the list of choices for the property from a database.  This would allow me to add a new "Host System" to the database, and the other designers wouldn't have to get a new copy of the dll.



Send an Email with User fields data entered in the form


Hi All,

          I have a form which have some user input fields(like textboxes,dropdownlists,textarea etc) fields and a submit button.

on click i need to send email with body contents as all the details entered by user in the form

Can anyone suggest how i should approach to this in sharepoint..

any code examples would be appreciated.


How to fill out a form as another user , while using profiles database


I have created an InfoPath 2007 form. It works great.. I have 5 data connections to sharepoint lists and profile's database. The form displays public data (profile database) about the user, such as name, manager.. etc.

What I would like to do is have an option on the form that says " If you are not this person , click here" , manually type the persons last name , and bring up their information.

Basically , there are some people who will have someone else fill the form out for them. But I don't want them to be giving out their username and password to the system.

I want the ability to fill out a form as another user without logging off sharepoint. 

Add new fields Profile database


I have new "Fields" which is not in the AD of my users. I want to add these new "Fields/ Columns" in the Profile database?

The objective is to create custom page in MOSS to facilitate the HR to update these new fields for the users.

How to achieve this?


Change database fields automatically according to date

Hi, I'm currently developing a software application for my client. Part of the project is to keep track of his stock's shipping status. The client must insert the stock's pick-up date, expected time of departure (ETD) and expected time of arrival (ETA). The stocks will be called out using Grid View and the status, being one of the keys of the database, will be shown. Before the current date reaches pick-up date, the status must show "in warehouse", and after the current date reaches pick-up date and is before ETD, status must show that its "on the way to the port", and after ETD and before ETA, "in freight", and finally after ETA, "arrived". What datatype should I use for the database and where should I program it so that it changes automatically accordingly ?

error in MVC2 on empty string form fields which are required: "This property cannot be set to a null

In model I have:[DisplayName("ISBN")] [Required(ErrorMessage = "ISBN is required.")] [StringLength(50, ErrorMessage = "ISBN book must have max {1} chars.")] [DisplayFormat(ConvertEmptyStringToNull = false)] public string isbn { get; set; }But when I submit form with empty field ISBN I have an error - ConstraintException: This property cannot be set to a null value.I have find that other people have the same problem and they say that debbugger in VS2010 works wrong - yes ?http://p2p.wrox.com/book-professional-asp-net-mvc-2/79788-constraintexception-unhandled-user-code.html#post259245http://efreedom.com/Question/1-3129080/Server-Side-Validation-REQUIRED-String-Property-MVC2-Entity-Framework-Workhttp://mvcmusicstore.codeplex.com/workitem/6604

sharepoint New Item form database table

hi, i want to know if i create a custom list in sharepoint designer and i modify it with my own fields. when the user filled this form where in the database are the filled data stored. thus in witch table in the wss_content db will the data be stored?

Cannot crawl sharepoint site and mysite after database attach upgrade form sharepoint 2007 to 2010.

After database attach upgrade site and mysite from sharepoint 2007 to 2010 , I have full crawl and get "The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly. If the repository was temporarily unavailable, an incremental crawl will fix this error. ( Error from SharePoint site: HttpStatusCode ServiceUnavailable The request failed with HTTP status 503: Service Unavailable. )" for mysite and get "Access is denied. Verify that either the Default Content Access Account has access to this repository, or add a crawl rule to crawl this repository. If the repository being crawled is a SharePoint repository, verify that the account you are using has "Full Read" permissions on the SharePoint Web Application being crawled." for sharepoint site. The content access account for search is "db_owner" of both of site and mysite. How do I solved this problem ?

Changing fields while updating an InfoPath Form to a SharePoint 2010 Document library

My document library has following EventReceiver: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Receivers ListTemplateId="101"> <Receiver> <Name>EventReceiverDocumentLibraryItemUpdating</Name> <Type>ItemUpdating</Type> <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly> <Class>EventHandling.EventReceiverDocumentLibrary</Class> <SequenceNumber>10000</SequenceNumber> </Receiver> </Receivers> </Elements> Updating a browser enabled InfoPath form in the document library fires following event: Public Overrides Sub ItemUpdated(ByVal properties As SPItemEventProperties) Try Me.EventFiringEnabled = False properties.ListItem("Lastname") = "Testperson" properties.ListItem.ParentList.ParentWeb.AllowUnsafeUpdates = True properties.ListItem.SystemUpdate(False) ' solution 1 properties.ListItem.Update() ' solution 2 properties.ListItem.UpdateOverwriteVersion() ' solution 3 properties.ListItem.ParentList.ParentWeb.AllowUnsafeUpdates = False Me.EventFiringEnabled = True MyBase.ItemUpdated(properties) Catch ex As Exception Me.EventFiringEnabled = True E

Populate NewForm fields using QueryString

Hi, I know this has been talked about before, but wanted to know if there is new and better approaches? We have many different lists with lookups to other lists. Lets use the Customer and Contact example? The contact list has a lookup to the customer list. I want to be able to call /Lists/Contacts/NewForm.aspx?Customer=Customer A and have the field "Customer" populated with "Customer A" I have tried http://www.endusersharepoint.com/2009/04/20/jquery-for-everyone-pre-populate-form-fields/ but this only works for text fields for some reason, choice field, lookup fields etc. does not get populated. Also most of the examples use a CEWP, but I would really like the script to be loaded in the master page so it will work with less customization on the the NewForm.aspx pages, as we might add new lists that need this feature. Hope you can share some insight on how this is possible :) --  Christian

on submission the form doesn't write to the database

I have my code behind from my webform and it does everything but write to the database. The form comes up I can fill it out then click the button and it takes me to the thankyou.aspx page but no entry in the database. I can't find what I am doing wrong.using System;using System.Data;using System.Data.SqlClient;namespace orderfinal{    public partial class _Default : System.Web.UI.Page    {        protected void Page_Load(object sender, EventArgs e)        {        }        protected void btnSave_OnClick(object Src, EventArgs E)        {            if (Page.IsValid)            {                // Define data objects                SqlCommand comm;                // Open the connection                SqlConnection conn = new SqlConnection();     &n

Write select query with a paremetrized where clause, and populate database with the retrieved column

I want to be able to retrieve column values using the dropdownlist values as parameters then populate the tbPO table with the retreived values. Where and how do I do it. ImportsSystem.Data.OleDb ImportsSystem ImportsSystem.IO Imports ?directcostDataSetTableAdapters PartialClass po_header  Inherits System.Web.UI.Page  Dim cn As OleDbConnection  Dim cmd As OleDbCommand  Dim dr As OleDbDataReader  Dim icount As Integer  Dim str As String  Dim vendor_id As Object   ?  Public Sub btn_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.ClickTry   context.Items.Add(     cmd.CommandType = System.Data.   cmd.CommandText = Dim context As HttpContext = HttpContext.Current"Company_Name", DropDownList3.Text)Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Users\Owner\Documents\Visual Studio 2010\WebSites\WebSiteJun25\App_Data\directcost.mdb;")Dim cmd As New OleDbCommand()CommandType.Text"insert into tbPO(ponumber, suppliername, ShipTo, basictype, DateNeeded, Purpose,ShippingInstr, ProjId) values(?,?,?,?,?,?,?,?)" cmd.Parameters.AddWithValue( cmd.Parameters.AddWithValue( cmd.Parameters.AddWithValue( cmd.Parameters.AddWithValue( cmd.Parameters.AddWithValue( cmd.Parameters.AddWithValue( cmd.Parameters.AddWithValue( cmd.Parameters.Add

namespace of fields problem when creating form template from xml?

I created a form template from a predefined xml, where I do not have any namespace. Later I added more fields. The output xml of the form is for the fields from the xml they have not prefix, for those added later, they have prefix my. I already have them all done. How can I make them consistent to have prefix my? Is there any options in InfoPath to turn on or off the prefix my?   thanks,

Using UserName to enable disable access to InfoPath form fields

Hi Everyone, I have created a browser enable form in InfoPath and restrict certain fields depending on the official logged on User Name. Now this works most of the time but my problem has to do with the "case" of User Names for some of the site users. In most cases the User Name is an exact match but for some reason, some user's names are reported by SharePoint (the Welcome at top of screen) with some parts captilized. Example - my hidden filed on the form reports my user name as xrs_master but the Welcome up top says XRS_Master - and the fields act as though I am not the correct user and won't enable. On the other hand there are users who's user name matches the case exactly and all works fine. Why is SharePoint reporting the user name differently? And if this is the reason they don't match, how do I fix it? Any Ideas? Many thanks in advance for help!

How to submit my form to Sharepoint Library as well as Sharepoint List with specific Fields only.

Hello ,   I have a Infopath form that contain 50 of fields. i want to submit those form into sharepoint library as well as Sharepoint Custom List(Specific Fields). Please suggest best practice to develop such a functionality.   Thank you.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend