Home Subreports

Crosstables in subreports

edited April 2008 in Subreports
Hi,

I must build a report that show a crosstable per location.
I created 2 datapipeline, one with the location table, one with the
data per employee, linked to the location table by the location
number.

I then made a main report with a location group to be able to have one
location per page. And a subreport with the employee data.

When I run the report I get a nice 6 pages preview, but when I print
it, I get only the first page. If I navigate trough the report with
the > and < it goes nuts, I end up having no report at all. The
locations order changes, from 6 pages I end up with 1 with no data in
it.

It's really weird, if display the data of each employee without a
crosstable I don't have any problem.

Are there any specific conditions for a crosstable to work when called
from a subreport?

Maybe an option somewhere I might not have set right?

Thankx
Chantal

Comments

  • edited April 2008
    Hi Chantal,

    We haven't seen this behavior before. If you print directly from your
    delphi app (rather than preview first) do you still get the same incorrect
    output? Usually when the printed output does not match the previewed
    output, there is an issue with some event code firing (or not firing)
    somewhere in the application causing the problem.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2008
    Hi Nico,

    I unfortunatly don't have the option to print a report without first
    previewing it so I cannot try this, but I've removed the subreport and
    put the crosstable directly on the main report in the detail band of
    my location group, and this works fine...

    I'm wondering if the systeem doesn't treat crosstable the same way it
    does subreports...
    It would mean that my first design was like a subreport in a
    subreport. A 2 levels dataset, with a 3 levels report? Confusing
    everything?

    But it works this way, and I've learned something today ;)

    Thankx,

    Chantal

    On Thu, 24 Apr 2008 10:15:48 -0600, "Nico Cizik \(Digital Metaphors\)"
  • edited April 2008
    Hi Chantal,

    Excellent, I'm glad you got it working!

    Yes, not knowing the complexity of your initial report(s), I may have led
    you in the wrong direction telling you to place the crosstabs in their own
    subreports. Although it technically should work, there may be something in
    there that was confusing the engine. Sorry about that :).

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2008
    I've tried making a simple report with Delphi, the same way I did with
    the integrated report builder, and I can't replicate the problem.
    The report itself is simple, just a location table linked to an
    employe table on the location field.

    I've noticed that I often get problems when linking 2 datasets on a
    "text" field.

    In this case, the text field is also the keyvalue, there is no other
    "index" column...I canno't build an example this way in Delphi (but
    I'm really no expert), I think text fields are not allowed as index
    (logic) and without index I never get a valid dataset join.

    Groetjes,
    Chantal

    On Fri, 25 Apr 2008 07:15:54 -0600, "Nico Cizik \(Digital Metaphors\)"
  • edited May 2008
    Hi Chantal,

    Sorry, I'm a bit confused about the issue. Does this relate to the same
    issue you were having with crosstabs?

    There should be no problem with linking datasets on text fields. Be sure
    both datasets are ordered by the linking field. What problems exactly are
    you running across?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2008
    Same problem. A cross table in a subreport.
    I was trying to understand why it's not working.

    When I link the 2 dataset on a text field the crosstable in the
    subreport goes nuts. (data is not filtered, or data changes when I
    navigate between the pages).
    When I link the 2 dataset on a number field it's appears to work, I
    tried it with other data, same structure but a table with an index
    field. The text field of the other table is a key field and must be
    unique, but it's no index field.

    But putting the crosstable in the main report instead of subreport
    always works so...It's not logic to me but it works in that way.

    Chantal

    On Thu, 8 May 2008 09:56:08 -0600, "Nico Cizik \(Digital Metaphors\)"
  • edited May 2008
    Hi Chantal,

    I'm sorry, I had thought this issue was resolved. In my testing, placing a
    crosstab inside a subreport with a dataset linked on a text field seems to
    work correctly. If possible please send me a small example I can run on my
    machine that demonstrates the issue and I'll try to find a solution for you.

    --
    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.