Home Datapipelines
New Blog Posts: Merging Reports - Part 1 and Part 2

Wrong data displayed

edited November 2008 in Datapipelines
?Hi,

I'm using Delphi 2007 using ReportBuilder 10.07

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.

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.


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

Thanks in advance,
Benny.



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited November 2008
    Hi Benny,

    For future reference, please post using your name as the sender (instead of
    "trisoft").

    ReportBuilder simply prints the data it is given. It sounds like the
    parameter is not being applied when the report is running. Try placing a
    DBGrid on your form and connecting it to the same datasource the report's
    datapipeline is and watch it as the report generates. This will give you an
    idea of the data that is being sent to the report.

    Next, trace through and be sure the date parameter is actually being applied
    when printing the report.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2008
    @Nico
    Sorry, but trisoft is the name of my company, that's why I post it with
    that name.


    "just to confrim, it sounds like you are getting your data from the data
    module, and not using DADE. Correct?"

    That's right, I'm using a DataModule.
    I have placed the MyQuery's and MyDataSources on the form with the report
    and now it works.
    Can someone explain this behaviour ?
    Or am I doing something wrong ?


    of
    a
    report's
    you an
    applied



    --- posted by geoForum on http://delphi.newswhat.com
  • edited November 2008
    Hello,

    We prefer that you use your real name rather than your company name when
    posting to these newsgroups. Please see #1 of the Newsgroup Guidelines.

    http://www.digital-metaphors.com/support/newsgroups.html

    I'm unsure where you received the quote you made below. In my previous
    post, I recommended that you place a dbGrid on your form to take a look at
    the data as it is passed to the report. Did you try this? You need to be
    sure the proper parameters are being passed into your queries when they are
    on the data module. As I mentioned before, ReportBuilder simply displays
    the data it is given.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.