We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Subreport could not be shown

Kevin Robinson
on
Medium Priority
7,814 Views
Last Modified: 2008-01-09
Hi

I am using Microsoft Reporting Services.  When I added A subreport to my report i got the error "Subreport could not be shown" .  I searched for the error I found lots of people saying that it was beacuse of the report perameters.  To test this I added a blank report with just a textbox and I am still getting the error.

Normal reports ( i.e. wihtout subreports) are working for me OK.


Comment
Watch Question

Commented:
that's definitely parameters of a subreport. you normally can set 'em if you right click your sub-report and select properties. then go to parameters and ifyou click drop down arrow on the left, it'll show you all parameters in your subreport. you can pass something to it from your main report.

if you have no parameters in your subreport, you should not have any troubles displaying it. the only reason i can think of is you didn't rebuild you project. so, just go to "build" menu, select "build your_project_name" and then go to preview again. your subreport should be shown just fine.

good luck,
yurich
Kevin RobinsonPrivate VB.NET Contractor

Author

Commented:

there is no parameters on the report the report is blank.  I have rebuild the whole solution and I am still getting the same error.

Commented:
Do you have a data set in your blank sub-report? can you post xml of your sub-report here - it shouldn't be too big if it's empty.

regs,
yurich
Kevin RobinsonPrivate VB.NET Contractor

Author

Commented:
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
  <BottomMargin>2.5cm</BottomMargin>
  <RightMargin>2.5cm</RightMargin>
  <PageWidth>21cm</PageWidth>
  <rd:DrawGrid>true</rd:DrawGrid>
  <InteractiveWidth>21cm</InteractiveWidth>
  <rd:GridSpacing>0.25cm</rd:GridSpacing>
  <rd:SnapToGrid>true</rd:SnapToGrid>
  <Body>
    <ColumnSpacing>1cm</ColumnSpacing>
    <ReportItems>
      <Textbox Name="textbox1">
        <Left>3cm</Left>
        <Top>0.75cm</Top>
        <rd:DefaultName>textbox1</rd:DefaultName>
        <Width>2.53968cm</Width>
        <Style>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingBottom>2pt</PaddingBottom>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
        </Style>
        <CanGrow>true</CanGrow>
        <Height>0.63492cm</Height>
        <Value>TEst</Value>
      </Textbox>
    </ReportItems>
    <Height>5cm</Height>
  </Body>
  <rd:ReportID>ba488b09-dcc1-4960-9c1e-6f0af00b3d94</rd:ReportID>
  <LeftMargin>2.5cm</LeftMargin>
  <Width>16cm</Width>
  <InteractiveHeight>29.7cm</InteractiveHeight>
  <Language>en-US</Language>
  <TopMargin>2.5cm</TopMargin>
  <PageHeight>29.7cm</PageHeight>
</Report>

Commented:
your subreport is fine - i copy-pasted a whole thing into my report and used it as a subreport and it worked just fine, no errors, no problems. how did you rebuild your project? can you try creating a new report (preferably in a new project) and try to use the report above as a subreport in there (with no parameters), and see if it's going to work (you'll have to "add existing item" in order to add a subreport to your report).

!! are  you getting this error in the visual studio or on your report server???
do you know that subreports are not embedded - you have to deploy them as well and then you can just hide 'em in the list view.

good luck,
yurich
Make sure the subreport is deployed wihin the same Report Manager folder as the main report as well.
Kevin RobinsonPrivate VB.NET Contractor

Author

Commented:
They are in the same folder.  Unless a "Report Manager folder"  is something different.

Commented:
do you have this problem in the visual studio or on the report server?
Kevin RobinsonPrivate VB.NET Contractor

Author

Commented:
Visual Studio.  Not using a report server, these are local reports
Commented:
have you tried to create absolutely new report and subreport (in a new project)? it should take no longer than 5-6 minutes but you'll give an idea whether the problem is.

Re. Report server. You'll have to deploy your reports at the end of development regardless of whether they're local or not. Unless of course you're going to do some programming and embed 'em somewhere else. Your report server might be the very same machine you're developig your reports on.

Regs,
Yurich

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Chris McGuiganBI & Database Architect & Developer, Sitecore Developer
CERTIFIED EXPERT
Commented:
Reading this thread, and Yurich's test in particular would point towards the calling report having the problem.
Maybe check out the XML around the cell where the sub-report goes.

I have known the XML to get screwed up occassionally in a report, normally to do with merged cells. I've also had issues with parameters that were deleted from a report, but still left traces in the XML and caused weird problems when running the report.

Cheers
Chris

Commented:
I still think that following my advice and re-creating a new report would solve the problem completely. There was no problem with the submitted report.
Regards,
Yurich
Chris McGuiganBI & Database Architect & Developer, Sitecore Developer
CERTIFIED EXPERT

Commented:
I have no issue with Yurich getting the points. It does sound like something was corrupted at their end so recreating would be the surest solution.

Chris
Kevin RobinsonPrivate VB.NET Contractor

Author

Commented:
Sorry I will try this. Sorry for delay
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.