Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Produce Report from Visual C#

Status
Not open for further replies.

Aubs010

Technical User
Apr 4, 2003
306
GB
I may be barking up the wrong tree, but I have just picked up a copy of Visual C# Express Edition from the MS site and have messed about a little with it.

Anyway, to the point...

I created an *application* in Access. The mdb/mde file is placed in a folder where .jpg photos are saved, open the app and click reset. This then populates a table with photo names. User then enters a description for each photo and presses the Report button and an access report is produced with 2 photos on each page and below each photo is the description.

From what I gather, C# is able to save a small amount of data to a text file to be recalled at a later date. That's fine.

What I want to be able to do though, is recreate the report that is used in Access.

I have very little knowledge of C#, but a very keen interest in learning it!

Any help greatly appreciated.

Aubs

Aubs
 
I should have added...

I am trying to create an exe file instead of mdb/mde. Preferably it will be able to store the table info within itself, but that's not essential, a txt file will suffice. I am trying to get away from relying on Access.

Thanks!

Aubs
 
If you want to write to textfiles you can use the streamwriter and streamreader to read them.

you could also use access as a database and use it's report engine to create your reports.

or create you reports via code and the printdocument.


Christiaan Baes
Belgium

"My new site" - Me
 
Hi Christiaan,

Thanks for your reply.

The streamWriter and Reader sounds like what I want for saving/loading the data.

You say I can create reports via code and then use the PrintDocument to obviously print the report.

Do you have any suggestions as to where I can get information on how to create the reports using code? - I don't know where to start looking!

Thanks,



Aubs
 
This site may help me, and maybe others so thought I'd post it:

Visual C# Developer Center : Download 23 C# Code Samples

This bit:
Using System Printing in C# Applications(PrintDocumentSample.exe). A sample application that shows how to print a formatted report from sample data stored in an XML file using the PrintDocument class in the System.Drawing.Printing namespace. Also illustrates the user selection of a destination printer and multiple print fonts.


Any comments greatly appreciated!



Aubs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top