Solved

How to merge two reports using ttx file as datasource.

Posted on 2004-08-24
11
696 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now