Solved

How to merge two reports using ttx file as datasource.

Posted on 2004-08-24
11
700 Views
Last Modified: 2011-10-03
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
Comment
Question by:TommyTupa
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 10

Accepted Solution

by:
ebolek earned 250 total points
ID: 11882296
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
 
LVL 13

Author Comment

by:TommyTupa
ID: 11882379
Yes.  I'm using crystal 9.0 developer.  I've donwloaded all the latest service packs/hot fixes.
0
 
LVL 10

Expert Comment

by:ebolek
ID: 11882394
why are you using ttx file as the datasource of the sub report. Are the link sto the sub report right
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
LVL 13

Author Comment

by:TommyTupa
ID: 11882544
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
 
LVL 42

Assisted Solution

by:frodoman
frodoman earned 125 total points
ID: 11882689
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
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 125 total points
ID: 11883141
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
 
LVL 13

Author Comment

by:TommyTupa
ID: 11884027
I didn't create a forward-only cursor.  And I need to pass parameter values to the subreport.  Thats why I'm linking.  
0
 
LVL 13

Author Comment

by:TommyTupa
ID: 11884083
And I can take away the links to the second report and it still shows no data.
0
 
LVL 13

Author Comment

by:TommyTupa
ID: 11887271
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
 
LVL 10

Expert Comment

by:ebolek
ID: 11887826
Glad to help

Regards
Emre
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 11887969
Glad i could help

mlmcc
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Crystal  - Shared vairable capture wile printing 1 46
Parameter transfer to cristal report 3 88
Crystal Reports 13 5 82
Crystal Report - Charts 4 28
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

685 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