Wrong data being displayed

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.
tri_softAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

developmentguruPresidentCommented:
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
tri_softAuthor Commented:
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
developmentguruPresidentCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.