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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DAP and Memo Field

Status
Not open for further replies.

samusa

Programmer
Jan 1, 2001
107
US
Ok. Here is the issue. I have DAP report that is based on a query.Report is grouped on StudentID.
I want to display memo field text only once with a record but it repeats as many times as student's Assessment history displays. I can't move memo field up in a group as well. When I try to move in a group , I get a message " you can't group on a control bound to a field that has a Memo....." I want to display contents of Memo field only once with each student record. Can someone help me out.


Sam
 
Is StudentID and memo in one table and then you have another table with StudentID and assessment records? I don't understand your table structures.
 
Query is based on tblstudent and tblhistory. Memo field is in tblhistory as well as assessment records. Memo field contains overall assessment of the student and should appear only once.




Sam
 
So Joe Smith has a record in tblStudent. He has many records in tblhistory. Each of his records has a memo field. So do they all say the same thing for each of his records? So the stuff in the memo field is repeating for Joe Smith?
Record 1 has memo "Joe is good"
Record 2 has memo "Joe is good"
Record 3 has memo "Joe is good"

Is that the way you have it set up?
 
Here is what my report should look like

StudentID LastName FirstName Address SOC .....

1 Smith Joe 231 Lake View .....
--------------------------------------------------
Nameof Task Start Date End Date .......
----------------------------------------------------- Task 1 1/1/2004 6/1/2004
Task2 2/1/2004 ........
.
.
TaskN
------------------------------------------------------

Overall Assessment: Here I am using Memo field.




Sam
 
But how is the memo field stored? Is it on every assessment record for a student such as my example?
It seems you might want to keep the memo in a separate table so it would have the following fields
StudentID MemoField.
That way you have a single memofield per student.
Does the output of your query show duplicate info in the memo field for a student?
I am only interested in one student.
 
Yes memo field is on every assessment record such as in your example. Also memo field data as well as other data like name etc is duplicate in query output. However, I have grouped name etc on report so they appear only once for each record

Sam
 
As I understand it, StudentID, LastName, FirstName, Address, SocSec come from tblStudent. NameofTask, StartDate, EndDate, Assessment come from the other table. Assessment is the memo field. How is this collected CULMULATIVELY? I type in an assessment record and add a memo. Then you type in another assessment record and add a memo. Do you type in the same memo for record one, or is it a new memo? This is the confusing part and must be explained very carefully.
You should have the memo field in the tblStudent. It should appear only once. Then in your forms, it can be updated by everyone and the notes stay in one place.
Maybe a listing of the fields or you two tables and what the output of your query looks like would help me.
 
There is only one memo field associated with each student record. If I make it text box , I can easily promote it and it will appear only once.Like I said in my earlier post , I can't promote memo field. Moving memo field to tblstudent didn't solve the problem as well.

Sam
 
Obvious response but have you tried placing the Memo field in the student grouping footer? It sounds like you are already grouping on Student ID, therefore placing it in the footer will only display it once.

I agree with FNeily, that the memo field should be stored in your Student Table. As you may know its a waste of space, resources, and your time to have it in the student detail records. (Unless of course, for each assignment you are tracking assessments.) It that is the case you will need to process each memo record and store it into a string variable. Then assign it to a text box in the Student footer of your report.

I hope this answers or gives you a different alternative to your question.

Ascent
 
Ascentient has a good idea - try the footer. I forgot about that.
Here are two other ways you might want to think about. The first, I like this, is to create a popup page. When the user clicks on a record, a popup of the memo can appear. They can then read or edit it.
see

The second is to create a frame on your page. It involves using the severfilter.
see

By the way, whatever happen to the DataPageSize? Did that article help?
 
Ok .. I tried to put the memo field in the footer section but got same meesage" you can't group on a control bound to a field that has a Memo....."

I also tried to create subreport on DAP but am getting script error " Expected end of statement" Here is the script that i used in Main.htm

<SCRIPT language=vbscript event=Current(para) for=MSODSC>
<!--
dim Loc
dim Ser

Loc = "embed1.htm?serverfilter =" Ser = chr(34) &"StudentID=" & _ para.section.htmlcontainer.all.StudentID.value & chr(34)
Loc = Loc & Ser

window.frames("IFrm").location = Loc
-->
</SCRIPT>

<SCRIPT language=vbscript event=Current(oEventInfo) for=MSODSC>
<!--
-->
</SCRIPT>

<IFRAME id=IFrm src="embed.htm" width="80%"
height="45%">
</IFRAME>

However when i open Main.htm I can see both pages but serverfilter doesn't work.

fneily: Datapagesize issue is still there, however i resolved another issue( Saving and updating another table with single command button.)





Sam
 
On what line is the error.
First, the sample code of MSDN is missing the source(the
page you´re calling)in the Frame script. Make sure who have spaces where spaces should be, before and after &. IFrame statement is on one line.

</SCRIPT language=vbscript FOR="MSODSC" EVENT="Current(para)"><!--
Dim vLocation
Dim vServerfilter
vLocation = "Order_details.htm?serverfilter="
vServerfilter = chr(34) & "Orderid=" & _
para.section.htmlcontainer.all.OrderID.value & chr(34)
vLocation = vLocation & vServerfilter
window.frames("Frm").location = vLocation

--></SCRIPT></SCRIPT language=vbscript FOR="MSODSC"
EVENT="Current(oEventInfo)"><!--
--></SCRIPT>

<IFRAME id=Frm width="80%" height="45%"
src = "Order_details.htm">
</IFRAME>






 
The above script didn't generate any error,but server filter is not working at all. When i pull studentID from one frame that updates rest of the frame with student information, but second frame shows same memo field data for all.That means server filter is not pulling the corresponding value.

Sam
 
First I noticed that in your code for Loc you have = "embed1.htm? , but in IFrame statement you have src="embed.htm". Did you correct this?

Also, I don't know if you're working on a web server, but I found this article:
How to Use Server Filters on Data Access Pages Without a Web Server

 
Ok... I resolved the issue. I created new DAP in a Design View and set the Defaulttypecontrol of the page property to BoundSpan.After that I dragged all the fields included memo field from the tblestudent instead of query. Selected them and clicked on "Group By Table" icon. All these fields are grouped included Memo field and then i pulled history records from the query and put them below the memo field. It just worked fine.

The only problem i am having now is printing. I have set Pagebreaker to Always but can't see the report in print preview( getting blank page). However, if I remove some fields vertically, than i can see print preview as well as can print the report.Any idea how to force pagebreaker

Fneily: embed1.htm was typo.Thanks for sending above link. It was indeed helpful although I am currently testing DAP's under virtual directory environment.

thanks


Sam
 
I get a feeling the print preview problem is a margin one. Decrease the margins to .5 or .3 and see what happens. This is just a guess.

So, when are you going to write your book on creating DAP's?
 
Anyways, somehow i managed it. About writing a book, I am still going through learning process and just playing with DAP's. You are the DAP GURU...

Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top