Solved

Crystal report referencing another report

Posted on 2013-05-11
7
439 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
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.

 

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

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

919 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

13 Experts available now in Live!

Get 1:1 Help Now