Error Report Sections Do Not Match Data Source
do not match the data source rated by 0 users This post has 1 Reply | 1 Follower pk_adam Since 12/12/2004 Posts 31 Reputation 635 Reply P Kadam (pk_adam) Posted: 12/22/2005 2:08 AM rated by 0 users Hi All. I am working on an app where i needed to do some changes to an already working data report that was already made by somebody. I added a few more column for the report and also to the query that was sent to the report. This query now has a GROUP BY clause also. In the report, i had to add another group and move some of the columns from the details section to the New Group. The problem is now that when i try to view the report i get an error saying "Report sections do not match the data source". I am passing the recordset as the Datareport's DataSource. What am i missing where ? Thanks in advance. | Post Points: 20 Deke Michigan Since 3/24/2002 Posts 2,659 Reputation 17,945 Reply Don Hanfland (Deke) replied on 12/22/2005 12:21 PM rated by 0 users Hi pk_adam,When ever you add a group header & footer sections, your recordset must match it. Usually a SHAPE statement is in order for that, or a COMPUTE, or using the GROUP feature of the dataenvironment(which actually just creates a SHAPE statement).Take a look at using the Datareport without the Dataenvironment FAQ, and that should pretty much answer your question.Hope this helps! --Deke:thumb:EX - Microsoft MVP - Visual BasicBeleive it or not? I still like to program!Just don't seem to have the time :( | Post Points: 5 < Previous Topic | Next Topic > Page 1 of 1 (2 items) | RSS Copyright 1998-2016 vbCity.com LLC
this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 10 of 10 Thread: Report Section Does Not match Data Source Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Jan 15th, 2011,05:19 PM #1 ailensamson View Profile View Forum Posts Thread Starter Member Join Date Nov 2010 Posts 40 Report Section Does Not match Data Source Hi everyone.... I am using data report and in there, I place http://vbcity.com/forums/t/114220.aspx a group and footer header and I get this error.. By the way, I am not using Dataenvironment, I manually put the fields name in each rptText. And I use this code. HTML Code: On Error Resume Next Call dbConek If Text4 = "" Or Text3 = "" Then MsgBox "Kindly Input the Academic Year", vbOKOnly, "Error in Printing" Text4.SetFocus Else With ar .Open "Select *From Student_Masterlist where Academic_Year='" & Text4.Text & Label8.Caption & Text3.Text & "' and Year='" & http://www.vbforums.com/showthread.php?638201-Report-Section-Does-Not-match-Data-Source sort & "'", strConek, adOpenStatic, adLockOptimistic If .RecordCount = 0 Then MsgBox "No record found.", vbExclamation Else Set DataReport5.DataSource = ar DataReport5.Show End If End With End If And by the way, the instance that I remove the group/footer header, that's when the datareport print... Reply With Quote Jan 16th, 2011,10:33 AM #2 mcsmba1 View Profile View Forum Posts Hyperactive Member Join Date Nov 2010 Location Pakistan Posts 287 Re: Report Section Does Not match Data Source I think, first you remove your line Code: On error resume next . It will give you exact error. And your problem is in my opinion related to two parameters in data report, you can search it on this forum. It has been solved earlier. Kindly check it. Reply With Quote Jan 16th, 2011,11:56 AM #3 MartinLiss View Profile View Forum Posts Former Admin/Moderator Join Date Sep 1999 Location San Jose, CA Posts 32,948 Re: Report Section Does Not match Data Source Moved. Do not worry about your difficulties in Mathematics. I can assure you mine are still greater. Albert EinsteinTips, Examples & Tutorials: A valuable forum tool • Generate unique TreeView keys • TreeView with "open" and "closed folder" icons • Time code using GetTickCount • How to trap the Tab key • Scroll a form • NumberBox ActiveX control • Color a ListView row • An InputBox form • How to use SaveSetting and GetSetting • A program regis
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for https://www.experts-exchange.com/questions/20921702/Report-sections-do-not-match-data-source.html a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions https://www.daniweb.com/programming/software-development/threads/76286/help-me-pls-data-report-data-section-does-not-match-data-source > Report sections do not match data source Want to Advertise Here? Solved Report sections do not match data source Posted on 2004-03-17 Visual Basic Classic 1 Verified Solution 7 Comments error report 1,293 Views Last Modified: 2013-12-25 experts, I am generating a report from Data Report from VB6 SP4. I have a report that have a grouping within. I understand that i need to set a group from the Data Environment if i am using one the DataEnvironment. However, i am using ADO directly. I have codes to generate my own ADO and attach it to error report sections the report. It work without the Group header/section. Anyone knows how to avoid "Report sections do not match data source" error in this case? My codes are like: set rsRegion = ................... With rptTop10 ' Bind the Recordset to the Report Set .DataSource = rsRegion .DataMember = rsRegion.DataMember DoEvents .Show End With 0 Question by:Heliumyap Facebook Twitter LinkedIn Google Best Solution byPashaMod Closed, 400 points refunded. PashaMod Community Support Moderator Go to Solution 7 Comments LVL 5 Overall: Level 5 Visual Basic Classic 5 Message Expert Comment by:Pi72004-03-17 The code below is a sample code that should guide you.Since you say you're using ADO i suppose you're familiar with the code below Copy and paste the code below into your code module, adapting it to your program by making the necessary changes Dim rs As New ADODB.Recordset Dim cn As New ADODB.Connection Dim Str As String Private Sub Form_Load() Dim i As Integer With cn .CursorLocation = adUseClient .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.
9 Years Ago With rptSalesEnquiryChecklist Set .DataSource = ar .DataMember = "" With .Sections("Section7").Controls For i = 1 To .Count If TypeOf .Item(i) Is RptTextBox Then Select Case .Item(i).Name Case "txtAddress" .Item(i).DataMember = "" .Item(i).DataField = ar.Fields("Address").Name Case "txtSupplier_Company_Name" .Item(i).DataMember = "" .Item(i).DataField = ar.Fields("Supplier_Company_Name").Name Case "txtSupplier_Name" .Item(i).DataMember = "" .Item(i).DataField = ar.Fields("Supplier_Name").Name Case "txtProduct" .Item(i).DataMember = "" .Item(i).DataField = ar.Fields("Product").Name Case "txtContact_No" .Item(i).DataMember = "" .Item(i).DataField = ar.Fields("Contact_No").Name End Select End If Next i End With End With [img] http://i48.photobucket.com/albums/f245/zykhoo/11.jpg [/img] why my data report will prompt out this msg box? the data report got subreport or not? visual-basic-6 kkh86 1 post since Apr 2007 Newbie Member 3Contributors 2Replies 4Views 9 YearsDiscussion Span 9 Years Ago Last Post by QVeen72 0 epok13hart 9 Years Ago With rptSalesEnquiryChecklist Set .DataSource = ar .DataMember = "" With .Sections("Section7").Controls For i = 1 To .Count If TypeOf .Item(i) Is RptTextBox Then Select Case .Item(i).Name Case "txtAddress" .Item(i).DataMember = "" .Item(i).DataField = ar.Fields("Address").Name Case "txtSupplier_Company_Name" .Item(i).DataMember = "" .Item(i).DataField = ar.Fields("Supplier_Company_Name").Name Case "txtSupplier_Name" .Item(i).DataMember = "" .Item(i).DataField = ar.Fields("Supplier_Name").Name Case "txtProduct" .Item(i).DataMember = "" .Item(i).DataField = ar.Fields("Product").Name Case "txtContact_No" .Item(i).DataMember = "" .Item(i).DataField = ar.Fields("Contact_No").Name End Select End If Next i End With End With [img] http://i48.photobucket.com/albums/f245/zykhoo/11.jpg [/img] why my data report will prompt out this msg box? the data report got subreport or not? i think u set ur datasource wrongly is ar the dataenvironment? check the file name of your source in the properies of the data report set datareport.datasource= ar 0 QVeen72 104 9 Years Ago Hi, Do u have "Section7" yn ur datareport.. If u dont have any Groups and detail section must be "Section1" Regards Veena visual-basic-6 This ar