Solved

Crystal report referencing another report

Posted on 2013-05-11
7
460 Views
Last Modified: 2013-05-12
I have a report which sorts by 'Room numbers' and calculate duration from 'Entry' and 'Exit' data, this data is compiled from a SQL database table from one system. I then have a second 'folio' report which is also sorting by 'room-number' and compile data from a different Database table/source. Room numbers, registration data booked in from 'date' to expiry date is reflected in this report.

When I eventually get the first report data to reflect duration properly I will need to find a way to 'reference the second 'folio' reports by room number to get a count of how many days each room number was actually booked for. This combined data will then be used to show the actual duration a patron was parked inside the facility. (Total registration period from the folio - Total Duration spend outside the facility)

I'm using Visual cut to transfer separate data tables from separate sources into one local database and separate tables, which makes it easier to work with when creating the 2 reports.

Is there a way to reference the room number in the folio report from the main report or carry multiple room number (Array, stored variable) to the main report ?
0
Comment
Question by:John-S Pretorius
  • 4
  • 3
7 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 39158268
You can't reference data from another report unless you include it in the report as a subreport.

Since you are putting the data into a single database how about using both tables in the report to get the data you need.

mlmcc
0
 

Author Comment

by:John-S Pretorius
ID: 39158276
I have tried that but can only use 'room-number' to link them and the data is not the same from the one to the other so when you do this the data is all over the place no matter how you construct it.

I was thinking of including the second report in the main report as a sub report, how will I reference it if I have it in the main report as a subreport ?
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39158350
First make sure you link the subreport in correctly.
Probably at lest by room number

Basic method

In the main report report header add a formula

WhilePrintingRecords;
Shared NumberVar MyNumber;
""

In the subreport add a formula to set the value
WhilePrintingRecords;
Shared NumberVar MyNumber;
MyNumber := 45;  //Use some formula or expression
""

IN the main report in a section after the subreport add a formula

WhilePrintingRecords;
Shared NumberVar MyNumber;
myNumber

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

 

Author Comment

by:John-S Pretorius
ID: 39158358
Question,

Since I have multiple groups (Room numbers) in the main report and in the subreport will the subreport 'value' populate in each one of the main reports Group headers ?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 39158531
You will have to put the subreport in the group header by itself.
add a second group header and move what is in the group header to it
Put the subreport in the group header

mlmcc
0
 

Author Comment

by:John-S Pretorius
ID: 39158835
Thank you for your input, you have always been extremely on the dot with everything. Before I jump into this approach would you mind having a look at my snapshot and actual 'saved' report data.

I have finally figured out to get the duration for daily movements In and out, and want to take/reference the main report with them or visa versa with values 'Parked' and 'Not Parked'

Snapshot
Do you think I will be able to do this by having the main report as the Folio data and fill out the 'Skidata movements' and 'Total Duration' by 'carrying from the Subreport (Skidata Movements) based on room number ?

Appreciated.
SkiUsers-localDetailed.rpt
GALT-Folio-Raw-Local.rpt
0
 

Author Closing Comment

by:John-S Pretorius
ID: 39159428
I got it to work by following your Instructions, thank you - RUNS slow as expected by I am happy with the results which is as required.
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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
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…

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