DeveloperBarn Forums

DeveloperBarn

Programming & IT forum

Create/Print Form data

This is a discussion on Create/Print Form data within the ASP Development forums, part of the Programming & Scripting category; Ok, this post could go here but probably somewhere else….what I want to know what is the best way to ...

Go Back   DeveloperBarn Forums > Programming & Scripting > ASP Development

  #1  
Old December 4th, 2008, 04:27 PM
Rebelle's Avatar
Barn Loyal
 
Join Date: Mar 2008
Posts: 748
Rep Power: 2
Rebelle will become famous soon enough
Question Create/Print Form data

Ok, this post could go here but probably somewhere else….what I want to know what is the best way to do the following…..

I have a web form users fill in and upload files…when submitted this go to database/server. Currently, they can search the records in the database but no form output for a record. I want to know what is the best tool/way to create/print out the form data in a form report output?

I have crystal reports 8.5 on my server but never have had to use it. Although a few years ago, I use to create the layout of the reports but just sent them to someone else to place on the server/connect.

Would crystal reports be the best option? Or is there something else I should use? I've exported to data to excel before..using Response.ContentType = "application/vnd.ms-excel"...wonder if its ok to use this with word?

Last edited by Rebelle; December 5th, 2008 at 10:51 AM. Reason: added last line.
  #2  
Old December 5th, 2008, 05:20 PM
Rebelle's Avatar
Barn Loyal
 
Join Date: Mar 2008
Posts: 748
Rep Power: 2
Rebelle will become famous soon enough
Default

Ok...I started on something but not sure I'm heading in the right direction....I tried to use : Response.ContentType = "application/vnd.ms-word" but didn't know how/where to place it and have it come up...so I started on an asp page that layouts out the form data in a more form like looking document...but only thing is when I print it, it prints the page name at the top and the url info/date at the bottom, anyway to not have this print? when i'm viewing the asp page in IE, I just hit the IE printer button.
  #3  
Old December 5th, 2008, 05:57 PM
jmurrayhead's Avatar
The Barnfather
 
Join Date: Mar 2008
Real name: Jason
Location: Washington, D.C.
Posts: 1,964
Blog Entries: 8
Rep Power: 15
jmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud of
Default

What would be best to use depends on the requirement. Crystal Reports allows you to do things like graphs, charts, export to desired file, etc.

If you don't need any of this, then it may be better to export to Word, Excel or another file type.

You need to make this decision first.
__________________
jmurrayhead
If you agree with me... click the icon!
If my post solved your problem, click the button in the lower right-hand corner of the post.

If you like it here...throw us a few bones to help
support us.

Join our Folding team: DeveloperBarn Folding

  #4  
Old December 8th, 2008, 03:50 PM
Rebelle's Avatar
Barn Loyal
 
Join Date: Mar 2008
Posts: 748
Rep Power: 2
Rebelle will become famous soon enough
Default

Hiya JMH,

Okie dokie, think I'm going to just try the export to word, using:

Response.ContentType = "application/vnd.ms-word"

I'll give it a try again...I have a file but need to test it..and hope it works. will let ya know.

Thankies!
  #5  
Old December 9th, 2008, 05:11 PM
Rebelle's Avatar
Barn Loyal
 
Join Date: Mar 2008
Posts: 748
Rep Power: 2
Rebelle will become famous soon enough
Default

hey,

is export to word the same as excel? using the

Response.ContentType = "application/vnd.ms-word"

for some reason, if get my prompt, do you want to export? then click ok to open or save to save file...but keeps trying to come across as ...

MyForm.asp?FormID="122"....instead of MyForm.doc?FormID="122"...I know I had this issue with excel before but I've checked those issues so its not any of those.
  #6  
Old December 10th, 2008, 10:25 AM
Rebelle's Avatar
Barn Loyal
 
Join Date: Mar 2008
Posts: 748
Rep Power: 2
Rebelle will become famous soon enough
Default

Got it! didn't think i need the extra line because i don't use one for excel...but looks like that was the trick.

needed line in blue:

Code:
<%
Response.ContentType = "application/vnd.ms-word"
Response.AddHeader "Content-Disposition","inline;filename=Myword.doc"
%>
Closed Thread

  DeveloperBarn Forums > Programming & Scripting > ASP Development

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
print option todd2006 ASP Development 6 September 12th, 2008 11:37 AM
print problem todd2006 JavaScript Programming 5 June 25th, 2008 01:36 PM
The data source 'ObjectDataSource1' does not support sorting with IEnumerable data Shem .Net Development 5 June 25th, 2008 08:07 AM
Print out data on a letterhead format Shem .Net Development 3 May 22nd, 2008 09:15 AM
Maintaining Form Data after forms authentication timeout richyrich .Net Development 13 April 17th, 2008 01:28 AM


All times are GMT -4. The time now is 10:48 AM.


Copyright ©2008-2010, DeveloperBarn

Content Relevant URLs by vBSEO 3.3.2