use MID function to get a character of the lable in the subreport

G

Guest

Firstly, thanks to Duane Hookom. I refered Duane Hookom's Crosstab.mdb and
created a dynamic crosstab report.

In the "Level Header" section of the main report, there is a column headings
which comes from a subreport. The subreport has a label whose control source
is a SQL syntax.

I am trying to get a character of the lable in the subreport by using MID
function. I put this MID in the "Level Footer" section.

My MID function expression is like this:
=Mid(srptReport.Report!LabelName,6,1).

Although it returns a value, but it is not based on the corresponding column
headings. It does not give "dynamical" value as the column headings does.

What I want is if there are 3 column headings that have detail values in
detail section, then MID should give me only those 3's 6th character.

What should I do?

Greatly appreciate your help!
Lin
 
D

Duane Hookom

Can you give us an example of the values displayed as headings in the
subreport? Your Mid() function can only return a value from a single
control. You would need to use some other method if you want to concatenate
multiple values.
 
G

Guest

Sure.

The column headings is the classe name, like "AIM 6302", "MIS 6231". The 6th
character represts the credit hours of that class. Some class has 3 hrs, some
2 hrs. I need to use this value mutiple the detail sections's total students
to get how many credit hours taken by students.

The crosstab report summarize how many students enrolled in each class.
Classes are classified by Core course, AIM course, and Elective course
categories. I set course category to be Duane's "LastFirstName Section". For
different semester, this crosstab query has different result.

The subreport isn't modified too much from Duane's crosstab.mdb. It has only
one label. Its resource control is a Select query.

Thank you, Duane!
 
G

Guest

So, I gave up the idea of using MID function. I created another supReport to
show the credit hours info dynamically; then multiple this supReport's field
with the "total students" field.

Although it works, the result is not correct; it multiple 3 credit hours for
ever but there are some classes are 2 credit hours.

Any suggestions?

Thanks!
Lin
 
D

Duane Hookom

You aren't providing near enough information. I don't even know where to
begin asking for information. Maybe if you start by suggesting where the 3
and 2 should come from.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top