473,404 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

export text show as html

hello again,
i was wandering if there is an easy way to export text from my
database to an html report...
amir.

Mar 11 '07 #1
6 1660
Hi Amir,
i was wandering if there is an easy way to export text from my
database to an html report...
Unless you want to use general-purpose reporting systems/engines like
Crystal Reports for this task, it is best to write your own code.

I've lost count of how many database-data-to-html applications I've written
during the years, but in every single one the basic principle has been the
same: run a SQL query, loop through the results, and generate your HTML code
based on the data.

From your question it is difficult to say whether you find the database side
or the HTML generation side more difficult, but outputting HTML is quite
simple actually. Also, you could use a web page editor two design an HTML
file skeleton, and then embed certain special tags inside it. Then your C#
application would replace those tags with the database data.

It is also possible to convert your database stuff into XML format, and then
use XSLT (XSL transformations) to generate the HTML from these XML files.

Good luck!

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
Mar 12 '07 #2
On Mar 12, 6:02 pm, "Jani Järvinen [MVP]"
<j...@removethis.dystopia.fiwrote:
Hi Amir,
i was wandering if there is an easy way to export text from my
database to an html report...

Unless you want to use general-purpose reporting systems/engines like
Crystal Reports for this task, it is best to write your own code.

I've lost count of how many database-data-to-html applications I've written
during the years, but in every single one the basic principle has been the
same: run a SQL query, loop through the results, and generate your HTML code
based on the data.

From your question it is difficult to say whether you find the database side
or the HTML generation side more difficult, but outputting HTML is quite
simple actually. Also, you could use a web page editor two design an HTML
file skeleton, and then embed certain special tags inside it. Then your C#
application would replace those tags with the database data.

It is also possible to convert your database stuff into XML format, and then
use XSLT (XSL transformations) to generate the HTML from these XML files.

Good luck!

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
j...@removethis.dystopia.fihttp://www.saunalahti.fi/janij/
Thnx for the info. Actually dont find niether of the sides (db,html)
difficult just wandered maybe they had a feature for that.
thnx a lot,
amir.

Mar 13 '07 #3
Dreamweaver does things like this

Visual Studio; we still don't understand the whole 'web development
persona' so you'll have to wait for the next version of 'Visual Web
Developer'

it should be out next month

-Todos

On Mar 12, 9:02 am, "Jani Järvinen [MVP]"
<j...@removethis.dystopia.fiwrote:
Hi Amir,
i was wandering if there is an easy way to export text from my
database to an html report...

Unless you want to use general-purpose reporting systems/engines like
Crystal Reports for this task, it is best to write your own code.

I've lost count of how many database-data-to-html applications I've written
during the years, but in every single one the basic principle has been the
same: run a SQL query, loop through the results, and generate your HTML code
based on the data.

From your question it is difficult to say whether you find the database side
or the HTML generation side more difficult, but outputting HTML is quite
simple actually. Also, you could use a web page editor two design an HTML
file skeleton, and then embed certain special tags inside it. Then your C#
application would replace those tags with the database data.

It is also possible to convert your database stuff into XML format, and then
use XSLT (XSL transformations) to generate the HTML from these XML files.

Good luck!

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
j...@removethis.dystopia.fihttp://www.saunalahti.fi/janij/

Mar 13 '07 #4
Hi Todos,
Dreamweaver does things like this
Yeah, you could use newest versions of Dreamweaver for these kind of things,
but also Crystal Reports, or the many reporting engines out there, and so
forth.

But since Amir posted his question to this C# forum, it is pretty safe to
assume he wants to use Visual Studio for the job. Although better solutions
could be available, developers just love the challenge to code, don't they?
:-)

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
Mar 14 '07 #5

a) Dreamweaver supports C#
b) C# was never invented
c) C# newsgroup is the property of the VB folk. you dipshits
shouldn't have jumped on the bandwagon and supported a new language
just because it has a # in the name of the language. I mean-- how
friggin trendy


On Mar 14, 8:08 am, "Jani Järvinen [MVP]"
<j...@removethis.dystopia.fiwrote:
Hi Todos,
Dreamweaver does things like this

Yeah, you could use newest versions of Dreamweaver for these kind of things,
but also Crystal Reports, or the many reporting engines out there, and so
forth.

But since Amir posted his question to this C# forum, it is pretty safe to
assume he wants to use Visual Studio for the job. Although better solutions
could be available, developers just love the challenge to code, don't they?
:-)

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
j...@removethis.dystopia.fihttp://www.saunalahti.fi/janij/

Mar 14 '07 #6
Dreamweaver is BETTER with C# than Visual Studio
and I repeat

C# was never invented

On Mar 14, 8:08 am, "Jani Järvinen [MVP]"
<j...@removethis.dystopia.fiwrote:
Hi Todos,
Dreamweaver does things like this

Yeah, you could use newest versions of Dreamweaver for these kind of things,
but also Crystal Reports, or the many reporting engines out there, and so
forth.

But since Amir posted his question to this C# forum, it is pretty safe to
assume he wants to use Visual Studio for the job. Although better solutions
could be available, developers just love the challenge to code, don't they?
:-)

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
j...@removethis.dystopia.fihttp://www.saunalahti.fi/janij/

Mar 14 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tim Eliot | last post by:
Just wondering if anyone has hit the following issue and how you might have sorted it out. I am using the command: DoCmd.TransferText acExportMerge, , stDataSource, stFileName, True after...
1
by: seash | last post by:
class xyz{ public void somefunction{ if(this.folderBrowserDialog1.ShowDialog() == DialogResult.OK) { m_varFolderPath = this.folderBrowserDialog1.SelectedPath; m_varFolderPath += ...
1
by: Kevin Blakeley | last post by:
I know this was just posted but I did not want this message to get lost in the other thread as it's slightly different. Yes I want to export my dataset to excel for my clients, but I don't want...
13
by: Hemant Sipahimalani | last post by:
The following piece of code is being used to export HTML to excel. HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"...
1
by: JawzX01 | last post by:
Hello All, First, thank you for any help you can provide. I'm trying to do a simple export to excel. I've used the classic code that is all over the internet, and of course it worked without a...
0
by: johnlim20088 | last post by:
Hi, Hi, currently I have a code below on my Listcontact.aspx file to export my gridview data to excel:- It is work success, and export the 'Contacts.xls' to my folder. But have following...
3
by: jmarcrum | last post by:
I want to export a report (that contains two separate queries, 1. Current year data, and 2. split-year data) from access into excel, but everytime I run my code and export the data to excel, it looks...
3
by: Wayne | last post by:
I'm trying to automate the export of a query to a text file using code. If I export the query manually I get the exact result that I want i.e. If I select the query then choose File/Export from...
4
by: David | last post by:
Hi I'm using this code to import data from an excel spreadsheet: DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel9, "tblStudents", _ "\\Egusersrv\Staff - Shared Work\PE Teach &...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.