How do I print this (easily?)

  • Thread starter Thread starter Jonathan Smith
  • Start date Start date
J

Jonathan Smith

Hi

In order to make it easier for my colleagues to write their school reports I
thought I might attempt to write a (simple) program.
At the moment I am working mentally through the steps I would have to code
just to make sure that I can do everything before I start. I have come to a
halt with regard to printing them out.

Any software I produce would have to produce a report in the same format as
the one we curently use (they are hand written at the moment on pre printed
forms although some staff use word templates that mimic the official forms).

Each subject is slightly different but in general they are as follows. I
hope you can follow this even if the formatting isn't perfect.
----------------------------------------------------------------------------
------
Subject Name

Name........................................ Form......................
Exam Mark................. Median Mark..........

Very Good Good Satisfactory Improvement Needed
Skill 1
Skill 2
Skill 3
Skill 4



----------------------------------------------------------------------------
----------
There are about 20 different subjects and each subject's report is slightly
different. Some do not have marks and hence do not have the line for the
marks (the rest of the report shifts up) and each subject will have
different skills listed and a different number of skills. Some skills occupy
two lines and some only one. The skill section is a table with grid lines
where a tick is placed to indicate the level achieved. Below the tick boxes
is a section for a comment of a few sentences which takes up the rest of the
page size (A5)

This is what I had thought of for the database structure.
Each record would contain the following fields:
Subject Name
Pupil Name
Form
Exam Mark
Median Mark
Skill 1 Level (4 fields - one for each level)
Skill 2 Level (4 fields - one for each level)
Skill 3 Level (4 fields - one for each level)
Skill 4 Level (4 fields - one for each level) I would need a maximum of 10
skills.
Comment

I hope you have grasped what I need. Now the big question - How do I print
it out? Any suggestions?

It would be much neater if I stored a single binary type string for the
skills and used this for storing the skill information. For example reading
from left to right 001010000100 would convert to 3 skills 0010
(satisfactory) 1000 (very good) and 0100 (good). Does this make it harder to
print.

The position of the sections on a page will depend on whether there are any
marks, how many skills there are and which skills take up two lines.

Is this a candidate for Crystal Reports or PrintDocument? (I have vb.net but
only have limited experience)

Any suggestions would be very much appreciated. It would greatly help an
already overworked teacher.

Thank you
--
Jonathan Smith
ICT Coordinator
Portsmouth High School
Kent Road
Southsea
Hants

http://www.gdst.net/portsmouthhigh/
 
XML + XSLT to HTML would be the easiest to my mind but you'd have to
generate the XML from the DB (shouldn't be too hard).
Marrowsoft Xselerator would then be the tool of choice for me to take that
XML and generate HTML (eg to print etc.).

Chris.

Hi

In order to make it easier for my colleagues to write their school reports I
thought I might attempt to write a (simple) program.
At the moment I am working mentally through the steps I would have to code
just to make sure that I can do everything before I start. I have come to a
halt with regard to printing them out.

Any software I produce would have to produce a report in the same format as
the one we curently use (they are hand written at the moment on pre printed
forms although some staff use word templates that mimic the official forms).

Each subject is slightly different but in general they are as follows. I
hope you can follow this even if the formatting isn't perfect.
----------------------------------------------------------------------------
------
Subject Name

Name........................................ Form......................
Exam Mark................. Median Mark..........

Very Good Good Satisfactory Improvement Needed
Skill 1
Skill 2
Skill 3
Skill 4



----------------------------------------------------------------------------
----------
There are about 20 different subjects and each subject's report is slightly
different. Some do not have marks and hence do not have the line for the
marks (the rest of the report shifts up) and each subject will have
different skills listed and a different number of skills. Some skills occupy
two lines and some only one. The skill section is a table with grid lines
where a tick is placed to indicate the level achieved. Below the tick boxes
is a section for a comment of a few sentences which takes up the rest of the
page size (A5)

This is what I had thought of for the database structure.
Each record would contain the following fields:
Subject Name
Pupil Name
Form
Exam Mark
Median Mark
Skill 1 Level (4 fields - one for each level)
Skill 2 Level (4 fields - one for each level)
Skill 3 Level (4 fields - one for each level)
Skill 4 Level (4 fields - one for each level) I would need a maximum of 10
skills.
Comment

I hope you have grasped what I need. Now the big question - How do I print
it out? Any suggestions?

It would be much neater if I stored a single binary type string for the
skills and used this for storing the skill information. For example reading
from left to right 001010000100 would convert to 3 skills 0010
(satisfactory) 1000 (very good) and 0100 (good). Does this make it harder to
print.

The position of the sections on a page will depend on whether there are any
marks, how many skills there are and which skills take up two lines.

Is this a candidate for Crystal Reports or PrintDocument? (I have vb.net but
only have limited experience)

Any suggestions would be very much appreciated. It would greatly help an
already overworked teacher.

Thank you
--
Jonathan Smith
ICT Coordinator
Portsmouth High School
Kent Road
Southsea
Hants

http://www.gdst.net/portsmouthhigh/
 
this is very much a job for crystal reports...i would sggest
conditionally supressed sections based on the subject for example...if
this is for a school, i would be glad to help in more detail if you would
like. i havent done crystal work in .net, but i have extensive
experience with it in versions 5-8 and some experience with c#

chris
(e-mail address removed)
 
Jonathan said:
Hi

In order to make it easier for my colleagues to write their school
reports I thought I might attempt to write a (simple) program.
At the moment I am working mentally through the steps I would have to
code just to make sure that I can do everything before I start. I
have come to a halt with regard to printing them out.

Personal suggestion - firstly design an Access database (any version) to
hold the data. Design it how you want, without thinking about how it is to
be displayed, for the moment. Concentrate on one thing at a time. Access
is cheap and available, and will be all that you require for the moment.
Don't go overboard yet.

Next, within Access, construct forms for the entering of the data. There
are various Access VBA groups in this news server, and they would be a lot
more relevent than most of the groups that you have sent this to.
Unfortunately, I don't know which group you are reading, or I would have
snipped some of them, but it seems that you are trying to run before you can
crawl. Don't worry, if you need to transfer it to a VB executable later,
you can, but for the moment, learn how to do it using only Access.

Once you have the storage and data entry out of then way, then and only then
should you look at reporting. Now Access does come with some reporting
tools, but I would suggest that you (or the school) look at purchasing and
using Crystal Reports. Seeing as you have addresses this to that group, you
may already have it. Once you get to that stage, post again.

Main point is, don't run before you can walk. This stuff may look easy, but
it isn't. Take it one step at a time, and take your time doing it. If you
are doing this part time, and I am assuming that your regular occupation is
a teacher, which doesn't leave a great deal of spare time, you probably
won't have a finished product for some months. Don't rush it.
 
crReportDoc = new ReportDocument();
{ ... Your set path, log on, parameters stuffs here ... }
ExportFormatType exportType;
string outputName;
if(radioPDF.Checked)
{
outputName = rptName.Substring(0, rptName.Length - 4) + ".pdf";
exportType = ExportFormatType.PortableDocFormat;
}
else if (radioXLS.Checked)
{
outputName = rptName.Substring(0, rptName.Length - 4) + ".xls";
exportType = ExportFormatType.Excel;
}
else
{
outputName = rptName.Substring(0, rptName.Length - 4) + ".doc";
exportType = ExportFormatType.WordForWindows;
}
ExportOptions CrExpOpt;
CrystalDecisions.Shared.DiskFileDestinationOptions DiskOpts = new
CrystalDecisions.Shared.DiskFileDestinationOptions();
DiskOpts.DiskFileName = ConfigurationSettings.AppSettings["ReportOutputDir"]
+ outputName;
CrExpOpt = crReportDoc.ExportOptions;
CrExpOpt.DestinationOptions = DiskOpts;
CrExpOpt.ExportDestinationType = ExportDestinationType.DiskFile;
CrExpOpt.ExportFormatType = exportType;
crReportDoc.Export();
{ ... then just redirect to the pdf/xls/doc file ... }

elv
 
i love databases and their uses and value to reporting are almost
unlimited, but in this case, i would like to respectfully disagree with
the choice of access as a data source unless they have alread started
down that route. for such a small, targeted application by a beginner,
it might be better to just serialize a dataset and avoid the added
complexity of access. the .net version of crystal understands datasets so
that's not an issue. that way, deployment is dramatically simplified by
keeping the app completely .net and free of com...chances are, the data
structures will need re-working soon anyway. there are obvious
normalization issues even with the given sample data structue, but i
intensionally ignored them since i didnt want to discourage such a noble
effort ;). of course, all of this assumes that this is a single user
app, but if they do choose to use a database, then i believe msde is a
better choice.
 
Back
Top