Click here to Skip to main content
14,599,518 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have created 2 group 1 Product Id and 2 prodct name
in one product their can be multiple Items
its Bill of material
PRODUCT PRODUCT NAME ITEM                              BATCH SIZE   BATCH UOM
ID      AND          DESCRIPTION
        Item Name
101001  Punjabi Dal Tadka                                      100 KGS
        302010      Paneer
101002  Lucknowi Rajma Masala                                  220 KGS
        301009      Rajma
        302001      Sunflower Refind oil
        302007      Milk
        302007      Milk
        303001      Ajwain
        303004      Cardamom (Big/black)

so i want to put or draw a line after each product id ends
=Iif(Fields!productid.Value = Previous(Fields!productid.Value) OR Fields!productid.Value = First(Fields!productid.Value, "mydataset"),"None","Solid")
i tried but its not getting proper result

I get this error
The BorderStyle expression for the text box ‘prod_name’  has a scope parameter that is not valid for an aggregate function.  The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset.
Posted
Updated 19-Mar-20 13:39pm
v3
Rate this:
Please Sign up or sign in to vote.

Solution 1

You need to use your dataset name; "mydataset" may be a copy-paste error:

=Iif(Fields!productid.Value = Previous(Fields!productid.Value) OR Fields!productid.Value = First(Fields!productid.Value, "mydataset"),"None","Solid")
   
Comments
Member-515487 3-Dec-12 5:24am
   
yes that i know
Kuthuparakkal 4-Dec-12 4:53am
   
What do you mean ?
Member-515487 4-Dec-12 8:34am
   
i have changed name as per my dataset name
i cant choose prodname desc line
The BorderStyle expression for the text box ‘prod_name’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset.
this error came
Sam031991 3-May-19 4:34am
   
I also got the same error ....I want line after each group but struggling
Rate this:
Please Sign up or sign in to vote.

Solution 2

I was getting similar errors so I created a rownumber in the SQL Procedure

(ROW_NUMBER() OVER(PARTITION BY studentids ORDER BY classof, studentids, datechanged DESC) AS rownumber_studentids)

that resets to 1 with every group value change. No need to use PREVIOUS() in SSRS expression - no errors.
   
Comments
CHill60 20-Mar-20 7:44am
   
Fine - but how do you draw the line?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100