VB.NET +reports
Author
Discussion

sstein

Original Poster:

6,249 posts

285 months

Tuesday 1st May 2007
quotequote all
Hi,

Any .NET programmers on here (Visual Basic.NET 2005) know anything about reports.

I want to put some printing ability into an App, the data is quite complex though and I would like to be able to lay it out on the page into columns, with headers, a main heading at top of page etc.

I can't find much on google on help on printing and the BIG book I have doesn't cover much in the way of printing beyond printing the contents of the a RTF textbox!

I thought I could do this by building a basic report and setting up the textboxes in the report and use a reportViewer to view / print the report.

My problem is I am not using a database, all the data is stored locally within the application while it is running (loads it in from csv text files when it loads). I have my report named Report1.rdlc and I have the text boxes set up on it and all are named. e.g. txtBusinessName,

I also have the reportViewer working and displaying the reports BUT i cannot seem to programmatically edit the details of the textboxes in the reports. Can I do this without linking the report to a database or dataset. I can pull all the data into variables locally in the reportviewer form if that helps.

THANKS!!!

-

Stuart

sstein

Original Poster:

6,249 posts

285 months

Tuesday 1st May 2007
quotequote all
Update I have my report and a dataset

The textbox value is as shown below in designer mode

=First(Fields!BusinessName.Value, "DataSet1_DataTable1"

I use the line below to enter a row into the dataset, where DataSet1 is the name of my dataset.

Dim ds As New DataSet1
ds.DataTable1.Rows.Add(myBusiness.bizName, myBusiness.YearEnd)

The textbox in the report once its generated is blank though

I have no idea if the problem is with the line adding the details to the datatable or if its a problem with the report!

-

Stuart