Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Subreport Help

Author  Topic 

chrpeter
Starting Member

31 Posts

Posted - 2008-04-25 : 17:14:56
I'm having trouble getting a subreport to work inside a main report.
I keep getting this error upon preview:"A parameter in the subreport 'Summary' has the name @DB. Parameter names must be CLS-Compliant identifiers"

Here's a description of my setup right now.

In my Main Report, I have a Year(String) and CompanyCode(string) Report Parameters, with Available Values that I specified.
Right Clicking the subreport, in the SubReport Properties(still on the main report), I specified the subreport I want to use and on the parameters tab, I have two parameters @DB with the value of =Parameters!CompanyCode.Value, and @Yr with the value of =Parameters!Year.Value

In the Subreport, the Dataset has 2 parameters, @DBName and @Year
On the Layout section, the Report Parameters are the same as the main report.

I do not have a dataset on the main report because it's not needed, I basically only need it to pick between either the Detail and Summary sub-reports to show.

Any help on this would be greatly appreciated, I'm still pretty new to SRS, but I'm learning quickly and have picked up a lot, some things I still struggle with.

Thanks!








visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-26 : 02:31:33
You dont need @ symbol for parameters used in report.
Go to Top of Page

chrpeter
Starting Member

31 Posts

Posted - 2008-04-28 : 14:32:08
I haven't had any problems with using the @ symbol for parameters so far, and I've converted about 100 of them right now. I'll try and play around with that idea, but I'm thinking it's something else.
Anyone else have any ideas?

EDIT: I'm not using the @ symbol on the Report Parameters, i'm using it in the dataset parameters.
Go to Top of Page

chrpeter
Starting Member

31 Posts

Posted - 2008-04-28 : 15:04:38
OK, after changing all the parameters to the same name in all datasets *report parameters I get the sub report to run now
Go to Top of Page
   

- Advertisement -