Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 705
  • Last Modified:

How to merge two reports using ttx file as datasource.

I'm trying to merge two reports using a ttx data file with a disconnected recordset as the data source. However I cannot get the second report to show any data.  

When I use MS Access as the data source, I can merge two reports by placing the second report as a subreport in the first report footer, linking on a similar parameter. So its like the first report will cycle through all its records.  Then at the report footer, the second report knows to cycle through all its records before being displayed -in effect giving me two merged reports.

However when I use a ttx file with a disconnected recordset as the data source.  The first report dispalys all the records.  But in the report footer no records are displayed for the second report. This scenario is actually what I expect, why will data appear in the second report with MS Access but not with a disconnected recordset?

I know I may not have been completely clear so any help on this would be appreciated.

0
TommyTupa
Asked:
TommyTupa
  • 5
  • 3
  • 2
  • +1
3 Solutions
 
ebolekCommented:
is the ttx file inserted to the main report as the sub report too. If it is, it should work . what version of crystal are using
0
 
TommyTupaAuthor Commented:
Yes.  I'm using crystal 9.0 developer.  I've donwloaded all the latest service packs/hot fixes.
0
 
ebolekCommented:
why are you using ttx file as the datasource of the sub report. Are the link sto the sub report right
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
TommyTupaAuthor Commented:
I kinda thought I had to use the ttx file as the data source of the subreport.  And I believe my links are correct because I  accomplished my goal first in MS Access for testing.  And now I'm trying to get it to work with ttx files.
0
 
frodomanCommented:
Sounds like there's no data available to the second report.  You didn't create the dataset with a forward-only cursor that may be preventing the second report from reading?

0
 
mlmccCommented:
Is there a need to link the subreport?  When you do that it will filter the data for the second report to match to linking value.

mlmcc
0
 
TommyTupaAuthor Commented:
I didn't create a forward-only cursor.  And I need to pass parameter values to the subreport.  Thats why I'm linking.  
0
 
TommyTupaAuthor Commented:
And I can take away the links to the second report and it still shows no data.
0
 
TommyTupaAuthor Commented:
Turns out the problem was with my code (...sigh) and not Crystal. I didn't mention this portion in the original question because I just knew the problem couldn't be my doing!!!   The DataSource method is new to RAS and lists some things as optional which turn out not to be optional at all.  Adding all the optional items finally got it to work:
Session("oClientDoc").SubReportController.setDataSource  "Report2.rpt", rstTableData,  Session("oClientDoc").SubReportController.GetSubreportDatabase("Report2.rpt").Tables.Item(0).Alias, "ADORecordset"

Thank you everyone for your input. I'll distribute the points evenly.
0
 
ebolekCommented:
Glad to help

Regards
Emre
0
 
mlmccCommented:
Glad i could help

mlmcc
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now