?
Solved

2 Subreports sharing the same link to the main report

Posted on 2013-05-20
9
Medium Priority
?
382 Views
Last Modified: 2013-05-23
Previous topic answered : http://rdsrc.us/lCZiFR, and I want to ask if I have 2 subreports and want to share the same link - is this possible. Currently with on linking of the subreport 1 to a field in the main report gives the right value but when I add a second subreport and also share the same link to the same value in the main report my value changes.

Can this be done.
0
Comment
Question by:John-S Pretorius
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
9 Comments
 

Author Comment

by:John-S Pretorius
ID: 39183252
I actually found by adding another Group Header and placing the second subreport in there and linking to another copy of the same field works without changing the data. Now that I have 2 subreport which I'm 'hiding'. This approach doesn't give me much 'cleanliness' with the spaces between Groups or even when I export to Excel - any suggestions how to make a report with subreport carrying over values look a little cleaner ?

Image
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39183301
Are the subreports blank when they display?
If so you can format them to suppress when blank.  You can also suppress the section when blank

mlmcc
0
 

Author Comment

by:John-S Pretorius
ID: 39184060
The subreports - not blank -  are being 'tweaked' text shrunk to smallest height then I change the color to white.

Suggestions with 'exporting' to excel ?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 300 total points
ID: 39184253
You can't change the exporting to excel.

Why if you don't want the subreport to show anything do you have it display anything?
What is the subreport doing?

mlmcc
0
 

Author Comment

by:John-S Pretorius
ID: 39184270
If I hide the Subreport the values in the main report disappear - Previous question : http://rdsrc.us/lCZiFR - The subreport carry's values over into the main report header, I then have formulas which use these values from the subreport.

Am I doing something wrong maybe ?
0
 

Author Comment

by:John-S Pretorius
ID: 39184288
Below is 'work in progress', I would like to know if I'm maybe doing something wrong here - appreciated.

GALT-Folio-Raw-Local-Complete052.rpt
0
 
LVL 35

Accepted Solution

by:
James0628 earned 900 total points
ID: 39186907
If you're using a subreport just to set some shared variables and it's not producing any output that you need to see on the report, you can't just suppress the subreport, or the section that the subreport is in.  If you do that, the subreport won't be executed and any shared variables in the subreport don't get set.

 What you need to do is:

 Make the subreport not produce any visible output.  The simplest thing is to just suppress all of the sections in the subreport.  Any formulas in those sections should still be evaluated (so the variables should still be set).

 Back in the main report, right-click on that subreport and select "Format Subreport" and on the Subreport tab, check the "Suppress blank subreport" option.

 Go to the Section Expert for the section that the subreport is in and check the "Suppress Blank Section" option.

 If you do that, then the subreport is run and sets the shared variables, but it's blank, so the subreport is suppressed, and then the section is suppressed because it's blank.

 This is what mlmcc was referring to in his first post.

 Obviously, if you have more than one subreport in the same section, you'll need to do the first two steps for each subreport.  And if there are other fields in the same section as the subreport, they'll need to be suppressed, or not produce any visible output, so that the section is blank.

 James
0
 

Author Closing Comment

by:John-S Pretorius
ID: 39189436
Thank you guys, James your explanation describes mlmcc's suggestion perfectly.
0
 
LVL 35

Expert Comment

by:James0628
ID: 39190357
FWIW, I'd have probably given some points, if not most of them, to mlmcc's first post.  That had the basics.

 James
0

Featured Post

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.

Question has a verified solution.

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

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. …
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 …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

777 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