Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Data Report Sum Function

I'm using VB6 with access97, I want to sum a column on the report, but I have a condition, - each row can contain the digit 1 OR 2 , I want to sum the number of rows containing digit 1,
(the data Report sum function allows to some a column with no conditions)

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Report Data In VB Function
Using: CR 9.0
       Database: Btrieve on Pervasive 2000i sql
       Visual basic 6.0

I have used a CR designer in my VB project. I would like to use the data from a specific field from my report in my VB application. I need it as an input fo a function. How can extract the data from this field?

Thanx for the help!!


How To Add Function In Data Report?

Have a problem, how to add a function to the data report?
In Datareport i see the option Function, but it is not highlighted/ enabled?


How To Use Function(Sum) In Data Report ???????
Give Me Source Of How To Use Function(Sum) In Data Report ???????

Data Report ExportReport Function
Hi All,
I am using ExportReport function to export the report format in HTML. But I am getting "Report width is greater than Paper width" error, even though if I am loading the report in landscape view.

ny ideas......

Is There A MINUS Function In The Data Report Functions?
I noticed, there's a built in SUM, AVE, COUNT and etc, in the rpt function in the data just wondering is there a way to use a minus function??????....

Putting Serial Nos In Data Report And Using Datediff Function
I have two problems
1. Give a solution for putting Serial Numbers for records in Data Report.
2. the Syntax of a functon to adding/deducting minutes from the current
datediff( "m",30,time) or datediff("m,-30, time) both not working



Datatype Mismatch In Function Object(data Report)
hai all,
     i am having doubt in datareport.

i am calling a datareport from vb6 and database oracle 8i.
In datareport in the section5 i am using the RptFuncSum to get the total amount of a particular coulmn.

the code is

 With .Sections("section5").Controls
            .Item(1).DataMember = ""
            .Item(1).FunctionType = 0 'rptFuncSum
            .Item(1).DataField = rsRColl("RCPTAMT").name
 End With

NOTE: RCPTAMT is the field of NUMBER(10) in ORACLE

 it is giving error like "datatype mismatch in function object for Function1".

but with same coding it is working with MS-access 2000.but not with ORACLE....

what might be the problem can anyone help out of this????

thankx in advance


Multiple Data Report Title In Data Report Designer....?
hello there, I'm working on a project that is using the Data Environment and the Data Report Designer to create reports. I've stumbled my way through setting up some reports but I'm having trouble with report title.

How can I make 2 report title in the insert control in vb? Is there any other way I can make another one report title in the insert control......?

How Can Make A Dynamic Report Using Data Report And Data Environment???
what i know is binding certain records using select sql statements. but the problem is that what if i would like to filter and use some conditions to get necessary records to be diplayed on the report using data report and data environment..

what i did was a static report using the tools.. somebody help me to show how to make a dynamic report queries and output it through data report with the help of the data environment.

thank you..

Urgent Data Report Error "Report Sections Do Not Match Data Source"
hi this is my code when i try to run the report, the error message will come out saying that "Report section do not match data source" thanks

datefrom1 = Format(DTPicker3.Value, "mm/dd/yyyy")
dateto1 = Format(DTPicker4.Value, "mm/dd/yyyy")
z = 0
medicationreport.Sections("Section4").Controls.Item("lblfrom").Caption = DTPicker3.Value
medicationreport.Sections("Section4").Controls.Item("lblto").Caption = DTPicker4.Value
          strConn = ("Driver={SQL Server};Server={.};database=ccmsEquine;Uid=;Pwd=;")
          conn.Open strConn
          Set rs1 = conn.Execute("SELECT count(*) FROM Drug D, Vdrug VD, Visit V WHERE V.visit_id = VD.visit_id AND D.drugid = VD.drug_id AND V.Time_in >= '" & datefrom1 & "' AND V.Time_in <= ('" & dateto1 & "')")
          numf = rs1(0)
          rs.Open "SELECT D.Druggroup,D.brand,SUM(VD.Qty)as qty,SUM(VD.UnitCost)as unitcost FROM Drug D, Vdrug VD, Visit V WHERE V.visit_id = VD.visit_id AND D.drugid = VD.drug_id AND V.Time_in >= '" & datefrom1 & "' AND V.Time_in <= ('" & dateto1 & "') GROUP BY D.DrugGroup,D.brand ORDER BY D.druggroup,D.brand", conn, adOpenStatic, adLockReadOnly
          If numf > 1 Then
          With medicationreport
              Set .DataSource = Nothing
              .DataMember = ""
              Set medicationreport.DataSource = rs
              With .Sections("Section6").Controls
                For intCtrl = 1 To .Count
                      'Place one unbound text at the details
                       If TypeOf .Item(intCtrl) Is RptTextBox Then
                            .Item(intCtrl).DataMember = ""
                            .Item(intCtrl).DataField = rs(z).Name
                            z = z + 1
                       End If
                  Next intCtrl
                End With
              With .Sections("Section1").Controls
                   For i = 1 To .Count
                      'Place one unbound text at the details
                       If TypeOf .Item(i) Is RptTextBox Then
                            .Item(i).DataMember = ""
                            .Item(i).DataField = rs(z).Name
                            z = z + 1
                       End If
                  Next i
               End With
          End With

Data Report</title> <script Type="text/javascript"> <!-- Function PrintTags() { Var Curr=document.getElementById('vB_Editor_QR_textarea').value; Newval=curr.replace(/[highlight]/gi,'[HIGHLIGHT=vb]');

I have placed a label in a report i VB6.
Depending on what button the user clicks on I want to change the label that I have in the report, is this possible ?

The report is done via the data report designer.

Thanks in advance

Storing And Retriving Images From Access Databse Through VB Data Report Or Crystal Report
hi friends
    i have a problem that i have a database of some 8000 students in which there is a field called "photo" which stores the photograph. it is stored as BLOB field. now i want to retrive it in my report. i'm getting very much difficulties in it. can i have a help from master minds to resove the same. it will be very much helpful to me.
    my e-mail id:
  ur suggestions r welcome. anybody can mail me. hoping for the best.

Adding Labels To A Report At Runtime (using Microsoft Data Report Designer 6.0)

I have just tarted using the Microsoft Data Report Designer and I need a little help. I am trying to get it to add labels to a report at run-time rather than design time.

The report is supposed to save the results of some analysis. Lets for simplicitry sake say that I just want to display a list of value stored in an array, but the number of placs in the array is not known until the proram has actually run. I.e. it would e something like this:

for i = 0 to ubound(myArray)-1
myReport.addItem (newLabel(i))
newLabel(i).caption = myarray(i)
next i

Does this make sense, but how would I do this (there is no 'addItem' property of the report)?

Help With Report - Easy One For People Familiar With Crystal Reports, Data Report Et Al
Till date, I have worked only with the Data Report
Utility that is dovetailed with the Data Environment
Designer, for the purpose of generating reports in my
applications. Shamefully, I am completely nescient of
Crystal Reports. I would want someone to kindly take
time to read my query and provide me a clue as to the
solution. The problem, I surmise, would be
interstingly simple for the creed of programmers who
are familiar with reporting softwares like Crystal

I have a table in MS-Access 2000 and its called
'Holidays'. The Holidays table has the following

Setting A Picture On Data Report At Runtime Using Report Image Control
Hello Everybody,
I got a very geniune problem I would like to share it with you all. Actually, I am developing a database software in VB inwhich program ask for name of student for which it should build a report personal report taking a data from the student database. The Problem is database also hold the picture of each students as one field. And when it generate a personal report discuss above it should also display his photo on the report. so, that when report is printed, it should print both picture and data.

till now what I have tried is placing the report image control on the data report during design time and then tried to chage the picture property of it during run time. But,a it gives error like method or property not supported.

So, do any body have idea to solve this problem


Copying Report Multiple Times In Data Report Writer

I am having a problem selecting saved files into the DataReport writer.

For example in the project Explorer I have


I want to copy the Standard1 report multiple times and make minor changes.


Crystal Report 6.0 Troubles To Get Data In The Report With Win 2000 Environement
I have migrated and old VB5 application that was running perfectly on windows 98 and millenium to Windows 2000.
All the application is working fine, but sometimes when a report (crystal Rep. 6.0) is called from the vb application, the report comes blank although the temporary table generated for the report is correctly populated in the access 97 database.
Restarting the application and re-asking the report often show the correctly filled data.
It sounds like Crystal report encouter troubles to read the database in windows 2000 although exactly the same process was used for the former windows version. All the software are the sames :
Visual Basic 5.0
Crystal report 6.0 
MS-access 97 Database
windows is now windows 2000 SP2
Has anybody an idea to help me ?
Thank you !

Data Report-report Width Not Exceding 12100
Hi All,

I have installed HP laser jet 2200 printer.The paper size is A4.If I take the printout in "Landscape" space is left on the both sides of the paper.My reportwidth property is 12100.If I increase the reportwidth property to say 12500 and few coloums in report at design time and then run the report.It gives the error that "Report width is larger then paper size."Is there any solution of this problem.Please relpy asap.

Waiting for the valuable advice with code.


Access Report &gt;to&gt; Visual Basic Data Report

I have created some pretty complex reports in access. Is there anyway to convert those to reports to data reports (.dsr) ?

I don't have enough knowledge to remake those reports in vb. Could anybody help me ? (good tutorial or something)

thx in advantage


Vb6 With Active Report - Cannot Call Other Report Data Field
Below is the coding:
Problem is this sentences: rptAmt2.Fields("Amt3").Value = 0
It cannot identifier rptAmt2 which another report data field.
Can anyone help me, thank you.

Dim rptAmt As New rptFinanceAmt
Dim rptAmt2 As New rptFinanceAmt2

If Fields("Amt3").Value = 0 And rptAmt2.Fields("Amt3").Value = 0 And rptAmt.Fields("Amt3").Value = 0 Then Fields("Amt3").Value = ""

ElseIf Fields("Amt3").Value = 0 And rptAmt2.txtAmt2 = Empty And rptAmt.txtAmt <> Empty Then Fields("Amt3").Value = 0

ElseIf Fields("Amt3").Value = 0 And rptAmt2.txtAmt2 <> Empty And rptAmt.txtAmt = Empty Then Fields("Amt3").Value = 0

ElseIf Fields("Amt3").Value = 0 And rptAmt2.txtAmt2 <> Empty And rptAmt.txtAmt <> Empty Thenb Fields("Amt3").Value = 0

End If

Printing A Blank Report With No Data, Just Report Format
I have a datareport designed in VB6 which is working fine with my data, however i am now trying to print out a blank report...for instance, in this case a blank invoice which would have all the correct layout and fields etc, just no data so it can be hand written after priting out.

I have tried sending a SQL string which i know will return no data but all i get when VB generates the report is a completely blank white sheet of paper.

Appreciate any assistance with this.

Thanks in advance

Khalid Rahaman

Data Environment Report Cannot Be Changed Once Report Has Been Opened...
i use a data environment like this:


deLexDB.Commands("fullStockList").CommandText = strSQL

full stock list is a prepared command with an empty command. i then open the report like this:


drptFullStock.Sections("Section1").Controls("txtItemMinQty").ForeColor = MIN_MAX_COLOURS(chosenColourScheme)
drptFullStock.Sections("Section1").Controls("txtItemMaxQty").ForeColor = MIN_MAX_COLOURS(chosenColourScheme)
drptFullStock.Sections("Section1").Controls("txtItemMinQty").Alignment = MIN_MAX_ALIGNS(chosenColourScheme)
drptFullStock.Sections("Section1").Controls("txtItemMaxQty").Alignment = MIN_MAX_ALIGNS(chosenColourScheme)
drptFullStock.Sections("Section1").Controls("Line1").BorderColor = MIN_MAX_LINE_COLOURS(chosenColourScheme)
drptFullStock.Sections("Section1").Controls("Line2").BorderColor = MIN_MAX_LINE_COLOURS(chosenColourScheme)

drptFullStock.Top = 10 * X
drptFullStock.Left = 10 * Y
drptFullStock.WIDTH = Screen.WIDTH - 2 * 10 * X
drptFullStock.HEIGHT = visY - (2 * 10 * Y)

drptFullStock.Orientation = rptOrientLandscape
drptFullStock.Show vbModal, Me
fullStockHasRun = True

the first few lines jsut set up some aspect of the report; sometimes things on the report appear in grey if the report is being used for a stocktake, or black if it is being used as a report of the declared levels

you will note there is a boolean on the last line, that becomes true after the report has been shown once. i use this boolean to say "Sorry, you cant change the report options without restarting the program"

how lame is that?

well anyways, the question is why can i not change the .CommandText to a different strSQL and show things in a different order, etc? how do i change the query that generates the report, without quitting the app ?

How To Make A Data Report In VB(not Crystal Report)
Hello guyz,
i want to make a data report in vb, not a crystal report. Plz help me guyz. Itz very important, my jobs gonna depend on it. Plz help.

Put String In Data Report's Report Footer
I need to put some string stored in DB, to be place at the report footer of data report for VB.

Got problem adding a group also, at run time show this error:
"Report section does not match data source"

Need Help In Generating Report From Data Report...urgent..
i have a problem here. i able to display data on the data report of visual basic but the problem here is the report show every data on the data report. i try filtering it but it can't. this is because i want the user to generate the report according the ID that they input. please help.

Add The Record No To The Report Using Data Report Designer
i want to display the No of the record being typed in the report , am using Report Designer. this may be done by creating the Record No field in the Query, i need the SQL code to do this, also by assigning a caption to a report label as the report is running but i dont know the event tnat must be used

Calling Data Report In Crystal Report
Hi all,
Is there any way by which I can insert data report in crystal report viewer?
Actually one of the client wants some features which are possible in crystal report viewer like email etc., only for that reason I dont want to create new reports from scratch. If there is any way then pls let me know. It is very urgent.

Any help is appreciated.

Report Width Problem With Data Report

My data reports are running fine on my PC, but when i run my application on another PC, it gives error that Report width is out of paper. May be this is a printer problem. How can I solve it that report will run finely on all PCs


Urgent Help - Report Header On Data Report
Someone please help me. I need to programatically place information like this on my report header:

"Report printed on"& Date & "By " & name

"name" is a data from a field in an access table.



Data Report : Adding An Info Into To The Report..
How do I add a value I wanted to any section in the data report during runtime of the program such as the Staff code that print the report ? The data report only allow me to add in fields of a table in a DataEnvironment only.

RptFunction On Report Footer Of Data Report
hi all,
i am using data report, wherein the recordset is made on fly..
the report footer consists of two RptFunctions(named Rptfunct1 and Rptfunc2), one is the sum of a particular field, while the other being average of another field.
now i need to show the sum of the values obtained from the two report can i achieve this?
the datafield for reportfunction(of functiontype 0-RptFuncSum)doesnt accept Rptfunct1 + Rptfunc2. what do i do?

please help me out...
thanking in anticipation.

How To Get Page Wise Report Using VB 6.0 Data Report
i need to get pagewise total in the report. Currently i am getting group wise help me ....

reply to

Problem Creating Report With Data Report
i have data enviroment with the connection to my data base. it has one command which it is supposed to select a single recordset based on the input by the user in a form in my app. if the command gets everything from the table it works properly and displays what i want. but when i use the sql statement it doesn't retrieve the record i want. when the user inputs the jobnumber it is store in a public variable called jNumber in the form frmReports. here is the sql statement i am using:
SELECT * FROM MainLog WHERE JobType = ' " & frmReports.jNumber & " '

wat am i doing wrong?

Convert MS Access Report To VB Data Report
Is there any software available to convert MS Access report to VB Data Report?

How To Print A Landscape Report With Data Report
How can I build a landscape Report with Data Report ?
Each time I enlarge my Data Report, when I run it, I have a message "the report is larger than the paper" (it is an approximative translation of the message, because I got it in french !)
Thank you in advance.

Data Report Doesnt Print In Data Environment With A Child Command Attached
I am trying to print a report using a Data report linked to a Data Environment recordset.

If I run the command:


when the recordset has a child command attached to it , I get an error.

If I go to the DE and dis-associate the child command with its parent the same command works. I conclude the child command is causing the problem.

Can anyone shed some light on this.


How To Load An Image On A Data Report Where The Source Is From A String Data Field?
In my table, I included a field name pictfile of string data type. It represents the path of the image file of a particular record. It is quite easy to load it on the form but no idea how to load it on a report since the image object on the data report has no data connection to a table.

Please help me to connect the string data path of to the image object of the data report!!!

HelP~~ Data Report Got Problem When Read Data From Multiple Database Table...
Can Data Report read data from diffrent table...???
because when at final set the Report.DataSource can only set to one record set... if I wan read from two table I ahve two record set......

Data Report can read data into label?? like Report.Label1.Caption= xxx ...??

Dim sqlcom As String
Dim rscom As New ADODB.Recordset

sqlcom = "SELECT * FROM Company"
rscom.Open sqlcom, Conn

With Report.Sections("Section1").Controls
.Item("Text7").DataField = rscom("CompanyName").Name
.Item("Text8").DataField = rscom("Address").Name
End With

Dim rsPrint As New ADODB.Recordset
Dim strPrint As String

strPrint = "SELECT * FROM QuoDetail"
rsPrint.Open strPrint, Conn

With Report.Sections("Section1").Controls
.Item("Text1").DataField = rsPrint("ItemNo").Name
.Item("Text2").DataField = rsPrint("ItemDescription").Name
.Item("Text3").DataField = rsPrint("Quantity").Name
End With

Set Report.DataSource = rsPrint
Load Report

Ms Data Report Designer--Error Method Or Data Member Not Found
Hie Guys

I am having some problems with my application. Firstly, I wrote it and used the Data Report Desiger and used the Orientation method to show my reports in Landscape type.

Like DataReport1.Orientation=rptOrientLandScape

Now i am having this error "Method or Data Meber not Found"

Help me so that i can use this method.


Need Coding For Making Data Report Using Data Environment In Visual Basic 6.0
I would like to know how to write the code to only print out data from a certain date. I know how to set the data environment and drag the field to the report design but do not know how to write the code to only print out a certain data. Please help

My question is this:



RESOLVED: (it Too Long Now)data Report Data Feild Empty Not Found
I am getting this Error while generating the report
"Data feild empty Not found"

my query is

SELECT R.* , S.* , SLC.DLEFT, SLC.CLASS_ID, r.reg_ph_res_code//' '//r.reg_ph_res as reg_ph ,
r.reg_ph_res_code//' '//r.reg_ph_res1 as reg_ph1 ,
r.reg_ph_off_code//' '//r.reg_ph_off as reg_ph_off ,
r.reg_ph_off_code//' '//r.reg_ph_off1 as reg_ph_off1 ,
s.gph_res_code//' '//s.gph_res as g_ph,
s.gph_off_code//' '//s.gph_off as g_ph_off,
r.fname//' '//r.mname//' '//r.lname as sname
and s.student_id = 102400
(this query is correct it work in pl/Sql interface (oracle) )

in this query many feilds are empty ..........
if error is due too this then How can I prevent.

I am using DATA Environment, and its s Single query (not hierarichal Records)

Edited by - haahoou on 2/6/2004 12:36:29 AM

Data Report, Filter Data Enviroment With User Input
Im using VB6 and have a data report with a data enviroment. The data enviroment runs off a query in my access db which combines the adviser with there rotas. The results of the query are a long list of everyone in the db and there rota which is fine. In my interfcae ive got a form called frmselectrota which has a text box, i need the user to be able to enter there ext number (unique) and then when a button is clicked the datareport will be filtered to show only that person rotas. Ive been looking around and i cant seem to find a simple piece of code to filter the data enviroment... as the data enviroment runs frtom a access query there is no vb side sql...
any ideas greatly appriciated!!

VERY URGENT!!! Report (unable To Bind To Data Member)
I have a problem with my data report...

I have this form with a DTPickert o allow user to select a date...and a 'Show' button to show the report...

The problwm is that after viewing the report and closing the form...when I open the same form again for the second gives me an error message saying 'Unable to bind to data members'...but I can still run the program and view the report...

But I just do not know why the error message pops up...

any solutions to it...

any help would be much appreciated

Printing The Contents Of A Data Grid - Data Report? Can Be Packaged?
Dear Friends,

I wish to provide a function to print the content of a data grid like that in Excel, including grid lines and column headers. But I don't want to use the capture image method of the grid and send to the Printer object because this is not applicable if the list is longer then the grid height.

So do I need to use data report? I just notice its existenece in the Designers in the Project Explorer of VB IDE. Can the project using DataReport be packaegd up as a standard standalone exe for installing on a new machine?

If special skills or tips are there, please kindly let me know.

Thank you very much for your help

Fill Data Footer Records With Data Report And DataShape

I can use the following to set up a datashape
AND it does contain all the Data ( I Have Used loop
and Debug.print to test )

AND I CAN PRODUCE A REPORT using the code below
that will give GROUP Heading and Detail Lines

BUT I Hit brick wall when trying to include the
detail footer line

PRINT the Data Grouped by LordId


   Tdate  Dref Payee Details MoneyOut MoneyOutGst LineTotal

      ' totals per NAME         
                   SumOfmoneyOUT  SumOfmoneyOUTGST SumOfMoney

Data Shape gives following Layout

 '  Dlno
 '  Tdate
 '  Dref
 '  Payee
 '  Details
 '  MoneyOut
 '  MoneyOutGst
 '  LineTotal
 '  rsFoot
 '     sxlno
 '     SumOfmoneyOUT
 '     SumOfmoneyOUTGST
 '     SumOfMoney

    Dim cnn As String
    Dim rs As ADODB.Recordset
    Dim rsDetail As ADODB.Recordset
    Dim rsFoot As ADODB.Recordset
    Dim strSQL As String
    Dim xx As Integer
    Dim yy As Integer 'Additional counter for fields

    Today = TodaysDateIs(Now)
    Printtitle = UCase(Printtitle)

    SumTheAmounts 0

    cnn = "Provider=MSDataShape;Data Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & TheDatabase
    Set rs = New ADODB.Recordset
    Set rsDetail = New ADODB.Recordset 'Child recordset
    Set rsFoot = New ADODB.Recordset 'Grand recordset

strSQL = "SHAPE  {" & sql1 & "}"
strSQL = strSQL & "APPEND (("
strSQL = strSQL & "SHAPE  {" & sql2 & "}"
strSQL = strSQL & " APPEND ({" & sql3 & "} AS rsFoot"
strSQL = strSQL & " RELATE Dlno TO Sxlno)) AS rsDetail"
strSQL = strSQL & " RELATE LordId TO Dlno)"

rs.Open strSQL, cnn, adOpenForwardOnly, adLockReadOnly, adCmdText
If Not rs.EOF And Not rs.BOF Then 'Check for empty recordset

    Set RptPROBLEM.DataSource = rs 'set the data source of our report to rs recordset
      With RptPROBLEM.Sections("Section2").Controls
           ' Page Heading
           .Item("Client").Caption = CLIENT
           .Item("Street").Caption = ClientStreet
           .Item("Town").Caption = CLIENTTownState
           .Item("ABN").Caption = "ABN: " & CLIENTabn
           .Item("Phone").Caption = "PHONE : " & CLIENTPhone
           .Item("Ptitle").Caption = Printtitle
           .Item("DateIs").Caption = Today
       End With
       'Populate our textboxes control in the group section with parent recordset
       With RptPROBLEM.Sections("SECTION6").Controls 'bind the textboxes in the Group section

    ' THE GROUP HEADING === Name and Address    

        .Item("Lname").DataField = rs.Fields(1).name
            .Item("LStreet").DataField = rs.Fields(2).name
            .Item("LTown").DataField = rs.Fields(3).name
       End With

       ' Grand Totals ALREADY exist from ISANYRoutine that works out
       ' if there are actually    any need to produce the &*%$!! report at all
       With RptPROBLEM.Sections("Section5").Controls

    ' REPORT FOOTER ------- Grand Totals

           .Item("Label2").Caption = SumOfAmount
           .Item("Label3").Caption = SumOfGst
           .Item("Label4").Caption = SumOfGrand
       End With
    'This is where our child recordset goes
      With RptPROBLEM.Sections("Section1")


          Set rsDetail = rs.Fields("rsDetail").Value 'our Child recordset is in the last field of our rs recordset
          'Access all the controls in this section and bind the textboxes to a
                                                           'child recordset
          For xx = 1 To .Controls.Count
              If TypeOf .Controls(xx) Is RptTextBox Then 'is it textbox control
                 'Start at field 1 to ignore the Dlno field we don't want it to appear in the detail section
                 .Controls(xx).DataField = rsDetail.Fields(xx).name 'bind it
                 'set the datamember to our child recordset
                 .Controls(xx).DataMember = rs.Fields("rsDetail").name 'we need to set
                                            'the datamember to point to our child recordset
              End If
       End With

' >>>>> PROBLEM
       With RptPROBLEM.Sections("Section7")

         '  THE GROUP FOOTER LINE --- TOTALS for Individual

           Set rsFoot = rsDetail.Fields("rsFoot").Value 'our Child recordset is in the last field of our rsdetail recordset
          'Access all the controls in this section and bind the textboxes
                                                     'to a Grandchild recordset
           For yy = 1 To .Controls.Count
               If TypeOf .Controls(yy) Is RptTextBox Then 'is it textbox control
                 'Start at field 1 to ignore the SxLno field we don't want it to appear in the Footer section
                 .Controls(yy).DataField = rsFoot.Fields(yy).name 'bind it
                 'set the datamember to our Grandchild recordset
                 .Controls(yy).DataMember = rsDetail.Fields("rsfoot").name 'we need to set the datamember to
                                                        'point to our Grandchild recordset
               End If
       End With
       rsFoot.Close 'we are safe to close the recordset
       Set rsFoot = Nothing 'release the object from memory

       rsDetail.Close 'we are safe to close the recordset
       Set rsDetail = Nothing 'release the object from memory

       RptPROBLEM.Refresh 'refresh the datareport to update changes
       'RptPROBLEM.WindowState = vbMaximized
       RptPROBLEM.WindowState = 2
       RptPROBLEM.Show vbModal

    ' message routine for *&$#@# problems    
End If

Data Refresh Problem In Visual Basic Data Report

The problem I am having is that my data report always displays the old set of data. Meaning, when I run the data report for the first time it correctly displays the data from the database table. However, if I change the data in the database table and run the same report again (same debug session), its still shows the data from the first run and not the modified data.

Can someone please help me.

Thank you.

Report Function
access 97 report

I have a textbox which has "=Sum([numJobComp])/Sum(([jobQuota]*[hoursWorkedOnJob])/8)" as the control source. Is there any way for me to skip over one when the jobQuota is equal to zero? There are some quotas that are set to zero since we are still deciding what they should be, and this is messing up the total percentage. I'd like it to skip over ones where the jobQuota is zero. I tried putting an iff statement inside the Sum, but it gave an error about an aggregate function.

How Can I Use Sum Function In My Report?
hello and good morning programers i print a report by using data enviroment and i success in this step but stel only one thing how i do sum for some records i know how i do sum for one record but if i have more than one and i want do total sum in my report which collect all of them in one thing for example tptal sum.
please help me

Copyright 2005-08, All rights reserved