Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 7786
  • Last Modified:

Subreport could not be shown

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.


0
Kevin Robinson
Asked:
Kevin Robinson
  • 6
  • 5
  • 2
  • +1
2 Solutions
 
YurichCommented:
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
0
 
Kevin RobinsonAuthor 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.
0
 
YurichCommented:
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
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
Kevin RobinsonAuthor 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>
0
 
YurichCommented:
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
0
 
simon_kirkCommented:
Make sure the subreport is deployed wihin the same Report Manager folder as the main report as well.
0
 
Kevin RobinsonAuthor Commented:
They are in the same folder.  Unless a "Report Manager folder"  is something different.
0
 
YurichCommented:
do you have this problem in the visual studio or on the report server?
0
 
Kevin RobinsonAuthor Commented:
Visual Studio.  Not using a report server, these are local reports
0
 
YurichCommented:
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
0
 
chrismcCommented:
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
0
 
YurichCommented:
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
0
 
chrismcCommented:
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
0
 
Kevin RobinsonAuthor Commented:
Sorry I will try this. Sorry for delay
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 6
  • 5
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now