Question

Help with sub-reports in Crystal Reports XI

Asked by: jgerbitz

Hi,

I'm trying to put together a CR XI sub-report for a report in an ASP.NET application, and I'm having difficulty...  I don't understand how fields in the sub-report are linked to the main one.  I've tried a couple of things, but had no luck with making data appear.

I know I must be doing _something_ right: I have created a combined lastname, firstname text field in the details section of the sub-report.  The data isn't showing, but the comma that I use to separate the fn and ln is showing up twice in the preview, consistent with the exptected number of records to be returned.

I have tried using the Subreport Links dialog to establish links between the main and sub reports.  But when I try to establish a link between the only the lastname fields from the main report to the same field in the sub-report, nothing shows when I preview it.  In fact, the two commas mentioned above are gone, replaced by only one comma.

Please help-

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2007-03-30 at 12:10:05ID22483612
Tags

reports

,

sub

,

subreports

Topic

Crystal Reports Software

Participating Experts
1
Points
0
Comments
21

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Configuration of CR Server XI
    After installing CR Server XI, when you click .NET Infoview on the menu shortcut it opens the webpage in design mode in .Net 2003. How do I change this so that I can actually see the web page?
  2. CR XI
    I'm currently using Seagate Info (V. 7, I think) and using a little bit of CR 10. My company is upgrading to the CR XI, would I be able to work on the CR XI without going on training courses first?
  3. CR XI R2 Merge Modules?
    Hi, Does anyone know which .msm to use to do an install of Crystal Reports XI R2? I'm trying to build a setup program to install all the CR runtime s/w on a remote machine to support multiple asp.net and vb.net applications (on .Net 2.0/VS 2005) and the Crystal Reports docum...
  4. Set parameter values in subreport from VB6 / Crystal XI
    I have an existing Crystal Reports XI report but have recently added an *unlinked* subreport. I have the subreport working through Crystal's IDE, but now I need to integrate it into my VB6 app. The datasource for the subreport is a SQL 2000 stored procedure with 5 inpu...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: jgerbitzPosted on 2007-03-30 at 12:47:39ID: 18826043

Update:

When I remove the GroupBy on the subreport, the names show up fine.  Somehow the Group needs to be linked...

 

by: mlmccPosted on 2007-03-30 at 14:10:41ID: 18826577

The link between the main report and the subreport establishes a filter for the subreport.  It shouldn't have anything to do with the grouping.

What are you trying to group by?

mlmcc

 

by: jgerbitzPosted on 2007-03-30 at 14:43:17ID: 18826717

I think I have figured it out, the grouping seems to be working now.... finally.

Could I ask you to answer this for me?  The group by name is simply the index referring to a record in another table.  How can I get the name in the table to show instead of the index?

For example, in the Group Name#1 field, I have a single integer between 1 and 9 showing.  I'd like this to show the name that the integers are referring to from another table.  Instead of 3, show 'Arrhythmia'.  Normally, it would be easy to construct a SQL statement, but that doesn't work...
I tried to construct a formula in the 'display string' dialog when I right click on the Group Name #1 field --> Format Object --> Common tab --> Display String, but I'm having issues.

 

by: mlmccPosted on 2007-03-30 at 17:58:13ID: 18827286

WHen you set the group you can select a different field for the name.
Right click the group header left margin
Click CHANGE GROUP
Click CUSTOMIZE GROUP OPTIONS
Click use a field
Select the field from the drop down

mlmcc

 

by: jgerbitzPosted on 2007-04-02 at 08:42:52ID: 18837258

I think I need a formula of some kind.
When I run the report, the Group Name#1 field shows as a "5".  I need it to say "Excessive Bleeding", which is record #5 in another table in SQL Server.

(SELECT "OutcomeCode"."OutcomeCodeName" WHERE "OutcomeCode"."OutcomeCodeID" = '5')

Obviously the '5' needs to be the Group Name#1 field, so that the OutcomeCodeName changes for each separate group of outcomes.  But I'm not sure how to do this.

Thanks

 

by: jgerbitzPosted on 2007-04-02 at 10:16:24ID: 18837932

Should this be done in the "Display String" formula field in the Format Editor?

 

by: mlmccPosted on 2007-04-02 at 10:27:51ID: 18838016

Do you have the outcomecode table in the report?
You should be able to drag the name field onto the report

mlmcc

 

by: jgerbitzPosted on 2007-04-02 at 12:20:01ID: 18838878

I do have the OutcomeCode table in the report.  I dragged it onto the report but nothing appears in the preview...  I double-checked the links, deleted them, re-created them and made them all LEFT OUTER JOINS.  This is what helped me the last time I was running into a similar problem.

I followed your lead from your post on Friday under  CUSTOMIZE GROUP OPTIONS.  But I chose 'Use a Formula as Group Name' instead of choosing OutcomeCodeName from the drop down list.
As a formula I simply dragged OutcomeCodeName into the box.  It's probably the same as picking that field from the ddl, but thought I'd try it.

 

by: jgerbitzPosted on 2007-04-02 at 13:33:34ID: 18839409

One thing:  while browsing the fields in the join table between the OutcomeCode table and the PatientComplete View from SQL (right-clicking on a field --> browse field), neither of the PatientID or OutcomeCodeID foreign key fields are displaying any data.  

 

by: jgerbitzPosted on 2007-04-02 at 15:18:41ID: 18840012

....which makes sense since the fields are in an association table used to break up a many-to-many relationship between the OutcomeCode and PatientComplete tables.

Do I actually need data in the association table?  (I hope not, what would be the point of links?)

 

by: jgerbitzPosted on 2007-04-02 at 17:02:37ID: 18840396

mlmcc-- (I hope you haven't given up on me!)

Another thing: do I need to explicitly include the OutcomeCodeName field in the "Fields to link to" box in the Subreport Links dialog if I want to use them?

 

by: mlmccPosted on 2007-04-02 at 17:43:05ID: 18840554

Haven't given up on you.  Tool advantage of the nice weather here to fix a leaky roof.

You can use the field to link if that is the field to link with. I doubt that it is.

mlmcc

 

by: jgerbitzPosted on 2007-04-03 at 09:39:37ID: 18844729

I don't know why this is giving me so much trouble.  I should just be able to drag the OutcomeCodeName onto the report.  The links between the tables should be able to interpret the numbers that are showing up in the Group headers as the corresponding OutcomeCodeName...!  What gives?

I've included links to images of the table links and what the report looks like... hopefully it helps.

Image of the table links: http://img117.imageshack.us/img117/2894/linksfa0.jpg

Image of the sub-report preview: http://img110.imageshack.us/img110/5069/groupingsss4.jpg
(all fake testing data)

Thanks again-

 

by: jgerbitzPosted on 2007-04-03 at 09:41:17ID: 18844746

hope you got your roof fixed!

 

by: mlmccPosted on 2007-04-03 at 11:59:17ID: 18845883

Why is the link FROM the OutcomeCode table to the i_PatientOutcome.  It should go the other direction.

mlmcc

 

by: jgerbitzPosted on 2007-04-03 at 13:25:58ID: 18846589

I changed the direction, then right-clicked on Group Name --> Format Object --> Display String (Formula) and dragged OutcomeCodeName field onto the editor.  Saved / closed it and previewed the report.     The groupings remain the same, but the group header is now invisible  --> neither the OutcomeCode nor the OutcomeCodeName are showing.

 

by: mlmccPosted on 2007-04-03 at 16:31:50ID: 18847610

Have you tried to VERIFY THE DATABASE under the DATABASE menu?

mlmcc

 

by: jgerbitzPosted on 2007-04-04 at 09:09:56ID: 18851639

Yes, no change.

 

by: mlmccPosted on 2007-04-04 at 09:38:37ID: 18851857

I am stumped.

mlmcc

 

by: jgerbitzPosted on 2007-04-04 at 12:21:26ID: 18853055

Could you close this thread?  I'll try again with a rephrased question, hopefully someone will be able to help.
Thanks again-

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...