SSRS Report Displaying Results Over and Over
I created a Inventory Turnover Report for GP2010 awhile ago. I decided to play with it and add Parameters.
The report is displaying the right details when i set the parameters. But it is displaying the same results over and over. It does not do this on the normal report without setting parameters. Any help would be great.
Using SQL Server 2008r2 10.50.1600
Here the my parameters expressions.
=Parameters!ITEMNUMBER.Value(0)
=Parameters!SERIALNUMBER.Value(0)
=Parameters!BUCKET.Value(0)
And my Query
SELECT
Ageing.ITEMNUMBER
,Ageing.ITEMNAME
,Ageing.DATERECEIVED
,Ageing.QTYRECEIVED
,Ageing.QTYSOLD
,Ageing.ITEMCLASS
,Ageing.UNITCOST
,Ageing.RECEIPTTYPE
,Ageing.RECEIPTNO
,Ageing.LOCATION
,Ageing.QTYAVAILABLE
,Ageing.CURRENTVALUE
,Ageing.AGEDDAYS
,Ageing.BUCKET
,Ageing.SERLNMBR
FROM
Ageing
WHERE
Ageing.QTYAVAILABLE >= 1
AND Ageing.ITEMCLASS = N'BOP'
June 12th, 2012 4:33pm
Hi There
I think you need to use your parameters also inside your query
SELECT
Ageing.ITEMNUMBER
,Ageing.ITEMNAME
,Ageing.DATERECEIVED
,Ageing.QTYRECEIVED
,Ageing.QTYSOLD
,Ageing.ITEMCLASS
,Ageing.UNITCOST
,Ageing.RECEIPTTYPE
,Ageing.RECEIPTNO
,Ageing.LOCATION
,Ageing.QTYAVAILABLE
,Ageing.CURRENTVALUE
,Ageing.AGEDDAYS
,Ageing.BUCKET
,Ageing.SERLNMBR
FROM
Ageing
WHERE
Ageing.QTYAVAILABLE >= 1
AND Ageing.ITEMCLASS = N'BOP'
and Ageing.ITEMNUMBER in (@ITEMNUMBER)
and Ageing.SERLNMBR in(@SERIALNUMBER)
AND Ageing.BUCKET IN (@BUCKET)
If you have any question please let me know.
Many Thanks
Syed Qazafi Anjum
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
Free Windows Admin Tool Kit Click here and download it now
June 12th, 2012 4:58pm
System.Web.Services.Protocols.SoapException: The report parameter ITEMNUMBER has a DefaultValue or a ValidValue that depends on the report parameter BUCKET. Forward dependencies are not valid.
at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.SetReportDefinition(String Report, Byte[] Definition, Warning[]& Warnings)
at Microsoft.ReportingServices.WebServer.ReportingService2010Impl.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
at Microsoft.ReportingServices.WebServer.ReportingService2010.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
Thanks for the reply. I added that to my query. And i got an error message along the lines of. "The report parameter ReportParameter1 has a DefaultValue or a ValidValue that depends on the report parameter ReportParameter1. So i created a
second dataset, But still getting this error.
June 12th, 2012 5:23pm
Hi There
You have to set the order of the parameter in such a way that one parameter is getting values based on another the dependent parameter must be after the first one. You error message say that
your ITEMNUMBER parameter values is dependent on BUCKET then in your report BUCKET must be defined before the ITEMNUMBER.
Please put some screenshot for your design which include your parameters.
Is all your parameter are multivalued? Where are you designing and running this report this reports
If you have any question please let me know.
Many Thanks
Syed Qazafi Anjum
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
Free Windows Admin Tool Kit Click here and download it now
June 12th, 2012 5:58pm
I cant even get to the point to define anything in the report. As soon as i hit run i get the error.
I am using msft Report Builder 3.0 and running it directly on the SQL server.
June 13th, 2012 9:50am
You have to set the order of the parameter in such a way that one parameter is getting values based on another the dependent parameter must be after the first one. You error message say that
your ITEMNUMBER parameter values is dependent on BUCKET then in your report BUCKET must be defined before the ITEMNUMBER.
No matter how i order them i get some
Free Windows Admin Tool Kit Click here and download it now
June 13th, 2012 10:09am
Hi There
Can you please share your query as well. Just please paste your query here
Is it the same error you are getting?
One thing I noticed you have two parameter one with
Itemnumber and other with Itemname
Why do you have two parameter?
Many Thanks
Syed Qazafi Anjum
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
June 13th, 2012 5:00pm
Here is my query.
I had both so users could run report by the product name or item number.
SELECT IV00101.ITEMNMBR AS ITEMNUMBER, IV00101.ITEMDESC AS ITEMNAME, IV10200.QTYRECVD AS QTYRECEIVED, IV10200.QTYSOLD,
IV00101.ITMCLSCD AS ITEMCLASS, IV10200.UNITCOST, IV10200.PCHSRCTY AS RECEIPTTYPE, IV10200.RCPTNMBR AS RECEIPTNO,
IV10200.TRXLOCTN AS LOCATION, IV10200.QTYRECVD - IV10200.QTYSOLD AS QTYAVAILABLE, (IV10200.QTYRECVD - IV10200.QTYSOLD)
* IV10200.UNITCOST AS CURRENTVALUE, DATEDIFF(day, IV10200.DATERECD, GETDATE()) AS AGEDDAYS, CASE WHEN DATEDIFF(day, IV10200.DATERECD,
GETDATE()) < 0 THEN 'Current' WHEN (DATEDIFF(day, IV10200.DATERECD, GETDATE()) > 0 AND DATEDIFF(day, IV10200.DATERECD, GETDATE()) <= 180)
THEN 'Less Then 6MO' WHEN (DATEDIFF(day, IV10200.DATERECD, GETDATE()) > 180 AND DATEDIFF(day, IV10200.DATERECD, GETDATE()) <= 360)
THEN '6 TO 12 MO' WHEN (DATEDIFF(day, IV10200.DATERECD, GETDATE()) > 360 AND DATEDIFF(day, IV10200.DATERECD, GETDATE()) <= 450)
THEN '12 TO 18 MO' WHEN (DATEDIFF(day, IV10200.DATERECD, GETDATE()) > 450 AND DATEDIFF(day, IV10200.DATERECD, GETDATE()) <= 5760)
THEN 'Greater then 18 MO' END AS BUCKET, dbo.IV00300.DATERECD, IV10200.DATERECD AS Expr1, IV00102.RCRDTYPE, dbo.IV00300.LOTNUMBR,
dbo.IV00300.ATYALLOC
FROM dbo.IV00101 AS IV00101 INNER JOIN
dbo.IV10200 AS IV10200 ON IV00101.ITEMNMBR = IV10200.ITEMNMBR INNER JOIN
dbo.IV00102 AS IV00102 ON IV00101.ITEMNMBR = IV00102.ITEMNMBR INNER JOIN
dbo.IV00300 ON IV00101.ITEMNMBR = dbo.IV00300.ITEMNMBR AND IV10200.DATERECD = dbo.IV00300.DATERECD
WHERE (IV00102.RCRDTYPE = 1) AND (IV10200.RCPTNMBR LIKE 'RCT%') AND (IV00101.ITEMNMBR = '02-2311222501')
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2012 1:22pm
Here the my parameters expressions.
=Parameters!ITEMNUMBER.Value(0)
=Parameters!SERIALNUMBER.Value(0)
=Parameters!BUCKET.Value(0)
Hi donniesd,
If we are using "Parameters! <MultivalueParameterName>.Value(0)" expression for the report, it will only returns the first value in a multivalue parameter. Please try to specify the following expressions for the report:
=Parameters!ITEMNUMBER.Value
=Parameters!SERIALNUMBER.Value
=Parameters!BUCKET.Value
For more information about Using Parameters Collection References in Expressions, please see:
http://technet.microsoft.com/en-us/library/aa337293(v=sql.100).aspx
Regards,
Bin Long
Bin Long
TechNet Community Support
June 18th, 2012 1:34am
Bin,
I still facing. No matter which way i move my prams up or down.
System.Web.Services.Protocols.SoapException: The report parameter ITEMNUMBER has a DefaultValue or a ValidValue that depends on the report parameter LOTNUMBER. Forward dependencies are not valid.
at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.SetReportDefinition(String Report, Byte[] Definition, Warning[]& Warnings)
at Microsoft.ReportingServices.WebServer.ReportingService2010Impl.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
at Microsoft.ReportingServices.WebServer.ReportingService2010.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
System.Web.Services.Protocols.SoapException: The report parameter LOTNUMBER has a DefaultValue or a ValidValue that depends on the report parameter LOTNUMBER. Forward dependencies are not valid.
at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.SetReportDefinition(String Report, Byte[] Definition, Warning[]& Warnings)
at Microsoft.ReportingServices.WebServer.ReportingService2010Impl.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
at Microsoft.ReportingServices.WebServer.ReportingService2010.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
Free Windows Admin Tool Kit Click here and download it now
June 18th, 2012 11:24am