90 Minds Sponsor

Suppressing a Sub-Report in Crystal But Still Use Variables Embedded There In Your Main Report

Crystal Reports Tips


Thanks to Jim Woodhead from DSD for this tip.

If you have a report (Crystal Reports XI R2) that containes one subreport that passed values back to your main report and want to suppress (not show) the subreport on the main report but still use the values from the shared variables (4 total shared variables) this can be difficule.   When you suppress or hide a section in the main report where the subreport lies, then Crystal  clears (zeroes) out any shared variable values because it doesn’t actual run the calculations and processing of the hidden subreport when it gets there.

So what do you do…..

Well we have the answer!!

What you need to do is on your subreport hide all of the fields. On the main report right click on the subreport and click on the last tab. Check the suppress blank subreport checkbox. This will allow your shared variables to still run without showing them. Their will still be a blank space on your main report. If you want to get rid of that go into the section export, and for the band which has the subreport in it, select underlay following section and suppress blank subreport. Now you will not have an empty space either.

Another option if the blank subreport overlaps something in the next section, you can also format it to not grow (deselect the Can Grow checkbox on the Common tab) then make it as small as possible.

How Do I Add the User ID To My Custom Report in MAS 90? How Do I Show The Name Of The Person Who Printed This Custom Report in Sage MAS 90 / 200 4.40?


Photo via psanford

How can I add the user who printed a report to a custom report I added to the menu in Sage MAS 90 / 200?

In order to print the User ID on any Crystal Report being run from the MAS 90 menu, you have to create a new formula in the Crystal Report named PrintedByUser. Using Basic Syntax the formula would be: Formula=””’ (and using Crystal Syntax would be: “”).


You can use this tip on custom reports for both business framework modules and legacy modules.

There are number of variables that MAS 90 passes through to Crystal Reports that are run from within MAS 90 and can be used in the same manner:
CompanyNameCode (CompanyName + CompanyCode)

That’s great, but I want the user name on my custom report.

OK, that’s a little trickier. You still need to create the PrintedByUser field as above, however to get the user name you’re going to need to create a subreport.

Creating a Subreport to Add the User Name to a Custom Report

You have to use a subreport because you’re going to have to join the SY_User table by the PrintedByUser formula field you created.

From the Crystal Report, go to Insert | Subreport.

Create a name in New Report Name; I’m calling mine UserNameSub and click Report Wizard.


Using the Report Wizard you’re going to create a new report based on the SY_User table. Add the First Name and the Last Name to the subreport and click Finish.

On the Link tab, select the PrintedByUser formula as the field to link by and from the dropdown select UserLogon. Click OK.


Drop the subreport on your main report.

Now for a little cleanup. Right click the subreport and select Edit Subreport. I’d suggest suppressing any Headers or Footers in the subreport and if you want instead of having the FirstName and LastName fields, you can create a formula combining the two into one field.

Close the Subreport and save your report and run from the MAS 90 menu and you should get the user name on your report.

Sage MAS 90/200 Quick Tip from Zip: Crystal, blank date

If you ever need the ability to enable criteria on a Crystal Report, for dates that equal ‘blank’, a simple formula like this will do the trick:  {date field} = Date (0000, 00, 00)

Posted by Brett Zimmerman.

MAS 90 and MAS 200 – Filename extraction in Crystal Reports

In addition to using the “File Path and Name” Special Field in Crystal Reports, have you ever wished you could just show the Filename?  You can with this formula:
Mid (Filename ,InstrRev (Filename,”\”) + 1 )

Posted by Brett A. Zimmerman – www.brettzimmerman.com – Twitter: MAS90_Zip

Beth Bowers – MAS 90 Consulting and Subcontracting to Resellers

About Me

Beth is a Sage MAS 90 and 200 Authorized Consultant, Certified Trainer and Certified Support Specialist who specializes in subcontracting services to other MAS 90 consultants. She has been working with Sage MAS 90 and 200 since 1989 and currently works with resellers from coast to coast.  As a Certified Consultant, Beth does not resell any Sage products.

Services Offered

New installation, training and setup of Sage MAS 90 and MAS 200, as well as:

  • Crystal Report Design
  • Consulting on upgrades
  • Visual Integrator Jobs
  • Certified Training on Visual Integrator, Custom Office, and Intro to Crystal Reports
  • Backup phone, email, and remote support

Beth Bowers Contact Information

Email Beth Bowers

Web Site