SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Error: Sub report Could not be shown
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sandesh.ravi
Posting Yak Master

United Kingdom
110 Posts

Posted - 08/01/2012 :  07:08:05  Show Profile  Reply with Quote
Hi,

I have a main report report1 and sub report report2.

Report2: Sub report
It has a dataset D2 and report requires a parameter P2 to run. P2 available values are populated from D2.

Report1: main report

It has a dataset D1 and it returns a value(res) 'A,B,C,D'.
It calls the sub report Report2 with the parameter value =Split(fields!res,",")

When the report is run I am getting the error as
"An error occurred while executing the subreport ‘report1’: One or more parameters required to run the report have not been specified."


Kindly help me out please.

Thanks,
Sandesh

Edited by - sandesh.ravi on 08/01/2012 08:59:39

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 08/01/2012 :  09:52:16  Show Profile  Reply with Quote
it means the parameter P2 is not able to get proper value from report 1

make sure D2 gives expected values correctly and also you're passing parameter value correctly from report 1 to report 2 in subreport properties

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sandesh.ravi
Posting Yak Master

United Kingdom
110 Posts

Posted - 08/01/2012 :  10:15:27  Show Profile  Reply with Quote
Hi Visakh,
I checked the parameter values they are fine.
However, If I make the available values for parameter p1 in sub reports to non query. Then the report is executing successfully.
But I am not supposed to change the available values of parameter P1 since report2 is also a main report

Thanks,
Sandesh
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 08/01/2012 :  11:14:42  Show Profile  Reply with Quote
that means the value passed from main report is not matching with available values for parameter of subreport which dataset d2 returns. you should analyse query for d2 and see why values doesnt match with those send for report1

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

sandesh.ravi
Posting Yak Master

United Kingdom
110 Posts

Posted - 08/02/2012 :  03:08:50  Show Profile  Reply with Quote
Hi Visakh,

Yes that was the issue. the data was not matching there was additional - in between the data. So now its working. Thanks for the help.



Thanks,
Sandesh
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 08/02/2012 :  10:13:50  Show Profile  Reply with Quote
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000