Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Wrong data being displayed

Posted on 2008-10-24
4
Medium Priority
?
613 Views
Last Modified: 2013-11-23
Hi,

I'm using Delphi 2007 using ReportBuilder.

I have a problem with wrong data being displayed in the report.
On the datamodule I have a few queriies, and matching datasources.
On the form with the report I have matching DataPipeLines.

The queries use parameters to narrow the records to a specific date of orders.
In the datamodule I have specified a certain date to see if it works.

When I walk through the resultset of the query of the datamodule, the application gives me the correct records. BUT .... the report is showing the records with the specific date mentioned above.

Can someone tell me what I'm doing wrong ???

Thanks in advance,
Benny.
0
Comment
Question by:tri_soft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 21

Expert Comment

by:developmentguru
ID: 22798424
You will need to show the query that you are using, let us know which database you are using... just give a lot more detail.  Odds are good that the field you are looking at in the dataset is not the same one being referenced in the report.  Does the report show the correct number of records?  I will try to help more when I have more to go on.
0
 

Author Comment

by:tri_soft
ID: 22800229
I'm using mySQL

The query on the datamodule shows 1 record, but the report prints 2 other records.
So no, the number of records is not correct.
AND ... the records displayed are also not correct.
The report prints the records found by the query with the default parameter (set in the datamodule)

Example : select * from orders where date_order=:date_selected
  In the datamodule "date_selected" = 20080205
  When executing the report the parameter "date_selected" is set to 20081023
  Showmessage of the details of the orders gives 1 record ==> 20081023
  The report prints 2 records ==> 20080205

DataPipeLine of the report is connected to the DataSource of the datamodule, DataSource is connected to the query above.

Thanks for looking into this strange behaviour.
0
 
LVL 21

Accepted Solution

by:
developmentguru earned 500 total points
ID: 22812358
Unfortunately I am more familiar with Rave reports instead of Report Builder, but I will give this a try.  One thing you can do to help in testing your report is to put in events on your dataset to stop after the dataset is opened and after scroll.  This will give you places where you can stop in your code and check a few things...

1) Is the query what you think it is when the dataset is opened?
2) Is the report component actually linked to the dataset you think it is when you run the report?

  If you find that the query is wrong then you can follow from the AfterOpen event beck up the call stack to where it was opened.  It is possible that you need to set the parameter within the reporting software and it is using a parameter from when the report was designed.

  If you check and the report is using a different dataset then you can place a data breakpoint on the address of the dataset within the reporting software.  This will break at the moment that it is changed and show you where it changed.

Let me know how this testing goes.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question