Showing posts with label group. Show all posts
Showing posts with label group. Show all posts

Thursday, March 29, 2012

Dynamic Row group in matrix

Hi All !

I want to show row groups as hierarchy levels and need the

sub total values belongs to each group and sub group levels. But the

most important point is that my top next top group (from child to

parent ) is not static its dynamic.i.e for a diffrent senario my under

displayed example can have Universe>Earth as parent for Australia and USA.

eg:

1.Australia

|-sydney

|-Melbourne

2.USA

|North US


|North US(1)


|North US(2)

|South US


|South US(1)


|South US(2)

Can I get some help from anybody for making a dynamic row groups in the matrix.

Waiting for a kind help.

Regards,

This is the Dynamic Group I used. I am not the original author, I search on dynamic grouping for SSRS and modified the example showed.

Put this is group expression:

=iif(Parameters!Group_By.Value is Nothing,Fields!SomeField.Value , Fields(iif(Parameters!Group_By.Value is Nothing, "DefaultID",Parameters!Group_By.Value)).Value)

|||Look at this blog entry from Chris Hayes http://blogs.msdn.com/chrishays/archive/2004/07/15/DynamicGrouping.aspx|||thanx for ur help.
I have done this with some other logic.

Dynamic Row group in matrix

Hi All !
I want to show row groups as hierarchy levels and need the sub total values belongs to each group and sub group levels. But the most important point is that my top next top group (from child to parent ) is not static its dynamic.i.e for a diffrent senario my under displayed example can have Universe>Earth as parent for Australia and USA.
eg:
1.Australia
|-sydney
|-Melbourne
2.USA
|North US
|North US(1)
|North US(2)
|South US
|South US(1)
|South US(2)
Can I get some help from anybody for making a dynamic row groups in the matrix.
Waiting for a kind help.
Regards,

This is the Dynamic Group I used. I am not the original author, I search on dynamic grouping for SSRS and modified the example showed.

Put this is group expression:

=iif(Parameters!Group_By.Value is Nothing,Fields!SomeField.Value , Fields(iif(Parameters!Group_By.Value is Nothing, "DefaultID",Parameters!Group_By.Value)).Value)

|||Look at this blog entry from Chris Hayes http://blogs.msdn.com/chrishays/archive/2004/07/15/DynamicGrouping.aspx|||thanx for ur help.
I have done this with some other logic.sql

Dynamic Row Group in a matrix

Hi All !

I want to show row groups as hierarchy levels and need the

sub total values belongs to each group and sub group levels. But the

most important point is that my top next top group (from child to

parent ) is not static its dynamic.i.e for a diffrent senario my under

displayed example can have Universe>Earth as parent for Australia and USA.

eg:

1.Australia

|-sydney

|-Melbourne

2.USA

|North US


|North US(1)


|North US(2)

|South US


|South US(1)


|South US(2)

Can I get some help from anybody for making a dynamic row groups in the matrix.

Waiting for a kind help.

Regards,

Hi Sanjib,

Check this link.It will be helpful.

|||

Hi Dear !

Thanx for reply me , but i'm sorry to say that there is no link mentioned.

Plz mention the link.

waiting for u'r reply,

Tuesday, March 27, 2012

Dynamic RDL group title

I'm new to these forums. If this is not the right place to post this question, please let me know where I should ask. :)

Anyway, I have a report that is grouped something like this:

Team

Location

Score

TEAM 1

#Loc#

#Total#

Home

10

Away

14

Away

8

NULL

0

NULL

0

Home

14

TEAM 2

#Loc#

#Total#

Home

10

Away

14

Home

19

NULL

0

Home

14

TEAM 3

#Loc#

#Total#

Away

7

Away

12

For each team grouping, the header columns needs to perform an action on the grouped records to determine the text.

The #Total# header is easy -- here I want a total of the points ( =Sum(Fields!Points.Value) ). No problem.

The #Loc# header is the problem. What I want to do is to count the number of "Home" values in the group (so Team 1 location reads "Home (2 of 6)", and Team 2 location reads "Home (3 of 5)"). If there are no "Home" values, I want to use the "Away" value (so Team 3 location reads "Away (2 of 2)").

Can someone tell me how I can create a custom code function that will allow me to iterate through the values of the grouped records from the group header textbox? I assume I need to be able to create a custom aggregate function of some kind, but I don't quite know where to begin.

Thanks for your help.

Joe

To simplify the question:

How can I make a group header change to reflect the presence of a specific value from a child row? If I have a group that contains the value "X", how can I change the group header to read "X present"?

Dynamic RDL group title

I'm new to these forums. If this is not the right place to post this question, please let me know where I should ask. :)

Anyway, I have a report that is grouped something like this:

Team

Location

Score

TEAM 1

#Loc#

#Total#

Home

10

Away

14

Away

8

NULL

0

NULL

0

Home

14

TEAM 2

#Loc#

#Total#

Home

10

Away

14

Home

19

NULL

0

Home

14

TEAM 3

#Loc#

#Total#

Away

7

Away

12

For each team grouping, the header columns needs to perform an action on the grouped records to determine the text.

The #Total# header is easy -- here I want a total of the points ( =Sum(Fields!Points.Value) ). No problem.

The #Loc# header is the problem. What I want to do is to count the number of "Home" values in the group (so Team 1 location reads "Home (2 of 6)", and Team 2 location reads "Home (3 of 5)"). If there are no "Home" values, I want to use the "Away" value (so Team 3 location reads "Away (2 of 2)").

Can someone tell me how I can create a custom code function that will allow me to iterate through the values of the grouped records from the group header textbox? I assume I need to be able to create a custom aggregate function of some kind, but I don't quite know where to begin.

Thanks for your help.

Joe

To simplify the question:

How can I make a group header change to reflect the presence of a specific value from a child row? If I have a group that contains the value "X", how can I change the group header to read "X present"?

dynamic query

hi,

i'm using dynamic query in the dataset because i wanted the result to group by the particular parameter selected.

however, another parameter requires the data to be taken from another table.

is the following syntax acceptable?

=if (Parameters!rev_data = 'A')

begin

"select a,b,c.... from tableA"

end

else

begin

"select d,e,f.... from tableB"

end

i encounter this error : 'Expression expected'...

is the syntax wrong or this way is not possible?

thanks!

I use Stored Procedures to generate dynamic SQL used for reports. The conditional logic is handled in T-SQL to generate and execute the appropriate SQL based on the input parameters. For example, when users want to select the sort fields and sort order for the data in a report.|||Can you give us an example of how you made this work in the stored procedure?

dynamic query

hi,

i'm using dynamic query in the dataset because i wanted the result to group by the particular parameter selected.

however, another parameter requires the data to be taken from another table.

is the following syntax acceptable?

=if (Parameters!rev_data = 'A')

begin

"select a,b,c.... from tableA"

end

else

begin

"select d,e,f.... from tableB"

end

i encounter this error : 'Expression expected'...

is the syntax wrong or this way is not possible?

thanks!

I use Stored Procedures to generate dynamic SQL used for reports. The conditional logic is handled in T-SQL to generate and execute the appropriate SQL based on the input parameters. For example, when users want to select the sort fields and sort order for the data in a report.|||Can you give us an example of how you made this work in the stored procedure?

Dynamic Query

I use IIF in the dynamic query to dynamically change the Select, Group By, and Order By statements.

In the table grouping properties, i also use IIF to change the grouping Field.

There are no errors, the report processes OK, but the report is not grouped or shows any Field values for which i have to use dynamic query. What could be the problem? Can anybody help please.

Thanks

Can you post the dynamic query you are using, as well as the group expression? Also if you enable tracing on the database side, is the query being executed correct?|||

Thank you for answering to my problem. I did get over it after much trying. The dynamic query looks like this:

="SELECT SUM(BASE_UNIT) AS BASE_UNIT "
& IIF(Parameters!Type.Value = "Location", ", Location", IIF(Parameters!Type.Value = "Admit_Source", ", Admit_Source", ", Provider_Name")) &
" as grouping FROM TBL_EOM
WHERE (MONTH(ENTRY_DATETIME) =@.RepMonth) AND (YEAR(ENTRY_DATETIME) = @.RepYear)" &
IIF(Parameters!Pract.Value = "*** ALL ***", " ", " AND (NAME = @.Prac) ") &
" GROUP BY Provider_Name, NAME" & IIF(Parameters!Type.Value = "Location", ", Location", IIF(Parameters!Type.Value = "Admit_Source", ", Admit_Source", " "))

In layout view i have this strig for field, grouping and sorting:

IIF(Parameters!Type.Value <> "Provider", Fields!grouping.Value, " ")

Thank you

Monday, March 26, 2012

Dynamic Proxies - ServiceDescriptionImporter()

Hi,
I have a DPE (data processig extension) that calls a Dynamic Proxy DLL -
this DLL has been declared in a Code Group of the rssrvpolicy.config file -
for developmental purposes, it uses the "FullTrust" PermissionSet and it all
works well ... to a point.
In the dynamic proxy code when I try and instantiate a new instance of the
class: ServiceDescriptionImporter() I get an exception (see below) I'm
stumped as to why I get it.
Anyone got ideas - it seems to be a security related issue as when I run the
report request via the RS Report Designer UI, it works ok.
(btw: the Get Online Help link in the error takes me t a MS page tat tells
me there's no current help available)
thanks,
- Simon
Query execution failed for data set 'MyDataset'. (rsErrorExecutingCommand)
Get Online Help
at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet
grants, PermissionSet denied, PermissionSet demands) at
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) at
System.Activator.CreateInstance(Type type, Boolean nonPublic) at
System.Web.Services.Description.ServiceDescriptionImporter..ctor() at
My.Infrastructure.WebServices.DynamicWebServiceProxy.BuildAssemblyFromWsdl(String
strWsdl) in
d:\development\infrastructure\webservices\dynamicwebserviceproxy\dynamicwebserviceproxy.cs:line 318
Line 318: ServiceDescriptionImporter sdi = new ServiceDescriptionImporter();I discovered that the DPE and the Dynamic Proxy needed to be using the
Permission Set - they werent.
When aligned to use FullTrust, both worked OK

Thursday, March 22, 2012

Dynamic Page Header Height...

Group,
Does anyone know how to set the height of the Page Header dynamically, it's
not letting me set the Height property of the Page Header to an Expression
[something like = IIf(Globals!PageNumber = 1, 1.5in, 1in)?
Or is there any other way to achieve the following:
I want a certain page header on page 1 and then a different one (shorter in
height) to appear on all subsequent pages without the extra header
whitespace.
Thanks group.As far as I know report header is static - I think it is on the wish list for
the next release. [I saw a post on this from msft - search around & you will
see it]
"Terry Mulvany" wrote:
> Group,
> Does anyone know how to set the height of the Page Header dynamically, it's
> not letting me set the Height property of the Page Header to an Expression
> [something like = IIf(Globals!PageNumber = 1, 1.5in, 1in)?
> Or is there any other way to achieve the following:
> I want a certain page header on page 1 and then a different one (shorter in
> height) to appear on all subsequent pages without the extra header
> whitespace.
> Thanks group.
>
>

Monday, March 19, 2012

Dynamic Grouping.. Is it possible?

Hello All,
I have a table with 2 groups in my report. When I edit a group I can
specify the expression to "group on" for the groups.
I would like to be able to make the expression, for the top group, a value
from a report parameter so that the user can specify this when the report
is generated.
The Edit Group Window certainly allows me to pick a report parameter but I
am not sure if it would actually work.. nor what the value of the parameter
should be to make it work. Is this possible?
Example:
Top Group: User Selectable (Country, State, City)
Second Group: Product
Detail Row: Sales data for that product/place combo
So the user could say he would like to see sales grouped by
country/product, state/product, or city/product.
Is this doable without creating 3 different reports?
--
Message posted via http://www.sqlmonster.comTry the following dynamic group expression:
=Fields(Parameters!TopGroup.Value).Value
This requires that the values (or labels) of the TopGroup parameters have
matching field names in your dataset (i.e. Country, State, City).
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Brian W via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:7c78eafd5f1d46329db04bd95646fb57@.SQLMonster.com...
> Hello All,
> I have a table with 2 groups in my report. When I edit a group I can
> specify the expression to "group on" for the groups.
> I would like to be able to make the expression, for the top group, a value
> from a report parameter so that the user can specify this when the report
> is generated.
> The Edit Group Window certainly allows me to pick a report parameter but I
> am not sure if it would actually work.. nor what the value of the
> parameter
> should be to make it work. Is this possible?
> Example:
> Top Group: User Selectable (Country, State, City)
> Second Group: Product
> Detail Row: Sales data for that product/place combo
> So the user could say he would like to see sales grouped by
> country/product, state/product, or city/product.
> Is this doable without creating 3 different reports?
> --
> Message posted via http://www.sqlmonster.com|||Worked like a charm. Thanks.
--
Message posted via http://www.sqlmonster.com

Dynamic Grouping with Report Designer

I've got this working -- I allow users to have 2 groups, and choose what they want to group by. I'd like to add one extra bit of functionality -- for the inner grouping, I would like my users to have the option "None" -- i.e. don't have an inner group.

I've tried setting the group expression of the second (inner) group to "" when the user chooses the "None" option but the report errors out. Any suggestions as to how to dynamically get rid of the inner group?

Thx

Helen

Helen:

I had a similar requirement and here's how I solved it. For the "None" entry at each grouping level you'll need to include a value for it in the combobox that's the following functions will recognize. Include the following in the "Code" and call the appropriate function. You're probably most interested in the "GetSubGrouping" function but I'm including "GetGrouping" so you can also use it at the main grouping level. Include the call to GetSubGrouping in the "Group on"; you'll also find that "GetField" is useful instead of coding a lot of iif's for controlling the visibility of the groupings.

Hope this helps

Glenn L

SharedFunction GetGrouping(ByVal Parameters AsObject, ByVal Fields AsObject) AsObject

Return GetField(Fields, Parameters("GroupBy").Value, "no_grouping")

EndFunction

SharedFunction GetSubGrouping(ByVal Parameters AsObject, ByVal Fields AsObject) AsObject

Return IIf(Parameters("GroupBy").Value = "no_grouping" _

Or Parameters("GroupBy").Value = Parameters("SubGroupBy").Value, Nothing, GetField(Fields, Parameters("SubGroupBy").Value, "no_sub_grouping"))

EndFunction

SharedFunction GetField(ByVal Fields AsObject, ByVal FieldName AsString, ByVal NoGroupingValue AsString) AsObject

If Trim$(FieldName) = Trim$(NoGroupingValue) Then

ReturnNothing

ElseIf IsDate(Fields(Trim$(FieldName)).Value) Then

Return FormatDateTime(Fields(Trim$(FieldName)).Value, 2)

Else

Return Fields(Trim$(FieldName)).Value

EndIf

EndFunction

|||

Thank you Glenn! That did the trick!

Helen

Dynamic Grouping with Report Designer

I've got this working -- I allow users to have 2 groups, and choose what they want to group by. I'd like to add one extra bit of functionality -- for the inner grouping, I would like my users to have the option "None" -- i.e. don't have an inner group.

I've tried setting the group expression of the second (inner) group to "" when the user chooses the "None" option but the report errors out. Any suggestions as to how to dynamically get rid of the inner group?

Thx

Helen

Helen:

I had a similar requirement and here's how I solved it. For the "None" entry at each grouping level you'll need to include a value for it in the combobox that's the following functions will recognize. Include the following in the "Code" and call the appropriate function. You're probably most interested in the "GetSubGrouping" function but I'm including "GetGrouping" so you can also use it at the main grouping level. Include the call to GetSubGrouping in the "Group on"; you'll also find that "GetField" is useful instead of coding a lot of iif's for controlling the visibility of the groupings.

Hope this helps

Glenn L

SharedFunction GetGrouping(ByVal Parameters AsObject, ByVal Fields AsObject) AsObject

Return GetField(Fields, Parameters("GroupBy").Value, "no_grouping")

EndFunction

SharedFunction GetSubGrouping(ByVal Parameters AsObject, ByVal Fields AsObject) AsObject

Return IIf(Parameters("GroupBy").Value = "no_grouping" _

Or Parameters("GroupBy").Value = Parameters("SubGroupBy").Value, Nothing, GetField(Fields, Parameters("SubGroupBy").Value, "no_sub_grouping"))

EndFunction

SharedFunction GetField(ByVal Fields AsObject, ByVal FieldName AsString, ByVal NoGroupingValue AsString) AsObject

If Trim$(FieldName) = Trim$(NoGroupingValue) Then

ReturnNothing

ElseIf IsDate(Fields(Trim$(FieldName)).Value) Then

Return FormatDateTime(Fields(Trim$(FieldName)).Value, 2)

Else

Return Fields(Trim$(FieldName)).Value

EndIf

EndFunction

|||

Thank you Glenn! That did the trick!

Helen

Dynamic Grouping please?

Hi, I want to have an optional group for a table.
I place this in the group expression:
=iif(Code.m_RR.GetControlParameter(Parameters!ENVIRONMENT.Value,"PA_Split_Internal_External")="true",Fields!MAKE_BUY.Value,"")
But it doesn't group at all.
If I just put =Fields!MAKE_BUY.Value it does. I thought the grouping
allowed dynamic groups? Does anyone know how to do this?
Thanks heaps,
CraigSilly me, you can do this and it works great. It helps if you group on the
correct field though!!!
"Craig" <craigm_richardson@.hotmail.com> wrote in message
news:O2i3zs4MGHA.3908@.TK2MSFTNGP10.phx.gbl...
> Hi, I want to have an optional group for a table.
> I place this in the group expression:
> =iif(Code.m_RR.GetControlParameter(Parameters!ENVIRONMENT.Value,"PA_Split_Internal_External")="true",Fields!MAKE_BUY.Value,"")
> But it doesn't group at all.
> If I just put =Fields!MAKE_BUY.Value it does. I thought the grouping
> allowed dynamic groups? Does anyone know how to do this?
> Thanks heaps,
>
> Craig
>

Dynamic Grouping Group Header Problem

Hi, I am currently trying to create a report the dynamicaly groups from parameters. The grouping part works fine but I need to show the parameter label name or the field referenced by a parameter.

=iif(Parameters!Param1.Value="P",Parameters!Param2.Label,Fields(Parameters!Param1.Value).Value)

This is the expression I have written to do this. The problem seems to be is with the true part of the iif statement. The false displays fine in the group header. The Parameters!Param2.Label also displays if used on its own.

This is the error that is fires back when I run the report.

The Value expression for the textbox ‘textbox4’ contains an error: The expression referenced a non-existing field in the fields collection.

I am quite new to SSRS and I am using VS2005 pro.

Thanks


D

D,

Try

iif(Parameters!Param1.Value="P",Fields(Parameters!Param2.Label).Value,Fields(Parameters!Param1.Value).Value)

I believe this should work for you.

Ham

dynamic grouping

Hi,
I have a report with grouping. I am passing a parameter via asp.net and if
that parameter @.paramrep=7 then i want to group by type and by region
otherwise i want to group only by region.
I have looked at Chris Hay's example but I am still not sure i do get it to
work as I keep on getting an error: the expression referenced a non-existing
field in the fields collection.
This is my expression:
=iif(Parameters!Paramreport.Value
=7,1,Fields(iif(Parameters!Paramreport.Value =7,
"region",Parameters!Paramreport.Value)).Value)
I am not sure what I am doing wrong as basically I didn't really understand
the article.
I would appreciate any help offered.
ThanksWhile I haven't seen the example you mention, I often use functions for
dynamic grouping ie...( my syntax here might be bad...)
Public function GetGroups(Byref Groupid as integer, Byref Paramval as
Integer) as String
Switch Paramval
Case 7 If Groupid = 1 Then
Return("Price")
Else Return("Productname")
End IF
Case Else If Groupid = 1 Then
Return("Othercol1")
Else Return("Othercol2")
End IF
End
End
THen in the Grouping dialog
=Fields(GetGroups(1,Parameters!Parametername.Value)).Value
=Fields(GetGroups(2,Parameters!Parametername.Value)).Value
Hope this helps... By the way, sometimes I have to dynamically change the
sort to match the grouping at the highest level, otherwise I have gotten an
error...But the sort is handled the same way..
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"collie" <collie@.discussions.microsoft.com> wrote in message
news:416E56D8-9856-412A-8381-A7BBD1DCBAC5@.microsoft.com...
> Hi,
> I have a report with grouping. I am passing a parameter via asp.net and if
> that parameter @.paramrep=7 then i want to group by type and by region
> otherwise i want to group only by region.
> I have looked at Chris Hay's example but I am still not sure i do get it
to
> work as I keep on getting an error: the expression referenced a
non-existing
> field in the fields collection.
> This is my expression:
> =iif(Parameters!Paramreport.Value
> =7,1,Fields(iif(Parameters!Paramreport.Value =7,
> "region",Parameters!Paramreport.Value)).Value)
> I am not sure what I am doing wrong as basically I didn't really
understand
> the article.
> I would appreciate any help offered.
> Thanks|||Hi,
Thanks so much for your response.
I have a few questions about your code if you could please clarify (I feel
stupid for asking but...)
Ok here goes :-)
What do you mean by groupid such as groupid=1?
What is price? A field name to group by if groupid=1?
Parmetername in my case would be the parameter that i send from asp.net
@.paramrep=7 correct?
Thanks
"Wayne Snyder" wrote:
> While I haven't seen the example you mention, I often use functions for
> dynamic grouping ie...( my syntax here might be bad...)
> Public function GetGroups(Byref Groupid as integer, Byref Paramval as
> Integer) as String
> Switch Paramval
> Case 7 If Groupid = 1 Then
> Return("Price")
> Else Return("Productname")
> End IF
> Case Else If Groupid = 1 Then
> Return("Othercol1")
> Else Return("Othercol2")
> End IF
> End
> End
>
> THen in the Grouping dialog
> =Fields(GetGroups(1,Parameters!Parametername.Value)).Value
> =Fields(GetGroups(2,Parameters!Parametername.Value)).Value
> Hope this helps... By the way, sometimes I have to dynamically change the
> sort to match the grouping at the highest level, otherwise I have gotten an
> error...But the sort is handled the same way..
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "collie" <collie@.discussions.microsoft.com> wrote in message
> news:416E56D8-9856-412A-8381-A7BBD1DCBAC5@.microsoft.com...
> > Hi,
> >
> > I have a report with grouping. I am passing a parameter via asp.net and if
> > that parameter @.paramrep=7 then i want to group by type and by region
> > otherwise i want to group only by region.
> > I have looked at Chris Hay's example but I am still not sure i do get it
> to
> > work as I keep on getting an error: the expression referenced a
> non-existing
> > field in the fields collection.
> > This is my expression:
> > =iif(Parameters!Paramreport.Value
> > =7,1,Fields(iif(Parameters!Paramreport.Value =7,
> > "region",Parameters!Paramreport.Value)).Value)
> > I am not sure what I am doing wrong as basically I didn't really
> understand
> > the article.
> >
> > I would appreciate any help offered.
> >
> > Thanks
>
>|||Wayne your code was a great help.
Thanks :-)
"Wayne Snyder" wrote:
> While I haven't seen the example you mention, I often use functions for
> dynamic grouping ie...( my syntax here might be bad...)
> Public function GetGroups(Byref Groupid as integer, Byref Paramval as
> Integer) as String
> Switch Paramval
> Case 7 If Groupid = 1 Then
> Return("Price")
> Else Return("Productname")
> End IF
> Case Else If Groupid = 1 Then
> Return("Othercol1")
> Else Return("Othercol2")
> End IF
> End
> End
>
> THen in the Grouping dialog
> =Fields(GetGroups(1,Parameters!Parametername.Value)).Value
> =Fields(GetGroups(2,Parameters!Parametername.Value)).Value
> Hope this helps... By the way, sometimes I have to dynamically change the
> sort to match the grouping at the highest level, otherwise I have gotten an
> error...But the sort is handled the same way..
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "collie" <collie@.discussions.microsoft.com> wrote in message
> news:416E56D8-9856-412A-8381-A7BBD1DCBAC5@.microsoft.com...
> > Hi,
> >
> > I have a report with grouping. I am passing a parameter via asp.net and if
> > that parameter @.paramrep=7 then i want to group by type and by region
> > otherwise i want to group only by region.
> > I have looked at Chris Hay's example but I am still not sure i do get it
> to
> > work as I keep on getting an error: the expression referenced a
> non-existing
> > field in the fields collection.
> > This is my expression:
> > =iif(Parameters!Paramreport.Value
> > =7,1,Fields(iif(Parameters!Paramreport.Value =7,
> > "region",Parameters!Paramreport.Value)).Value)
> > I am not sure what I am doing wrong as basically I didn't really
> understand
> > the article.
> >
> > I would appreciate any help offered.
> >
> > Thanks
>
>

Dynamic Group Sorting in Crystal Report

i am using crystal report application in visual studio .net. Now, I make one crystal report, has 5 groups. Now, I want to change their order from VB .net application. What to do for that?? I'm new in crystal report.... I guess you need to organize your dynamic grouping in your report. You can use a parameter(s) for that, it will let you/user to select/change a group. Then create a formula based on the parameter response.

For example:
I would create a parameter to allow you/user to select 'SDate' Shipping Date or 'CustID' - Customer ID.

Then I would write a formula for my 1st group @.Group1:

If {?Group1}='SDate' then {table.shipping_date} else {table.CustomerID}

For my 2nd group, I would write a formula @.Group2:

If {?Group1}='SDate' {table.CustomerID} else {table.shipping_date}

After that, I would grouped my records on @.Group1 and on @.Grop2.

----

Or you can create one parameter per group and then a formula based on that parameter (1 per group as well):
For your 1st group I would create a parameter {?Group1} which allows me to select 'SDate' for shipping date, 'CustID' for CustomerID, 'Country' for country code etc.

Then create a formula @.Group1:

If {?Group1}='SDate' then {table.shipping_gdate} else
If {?Group1}='CustID' then {table.CustomerID} else
If {?Group1}='Country' then {table.CountryCode} else

For my 2nd group I would create a parameter {?Group2} and then a formula @.Group2:

If {?Group2}='Source' then {table.origination_number} else
If {?Group2}='DestCity' then {table.destination_city} else
If {?Grop2}='Carrier' then {tabme.CarrierID} else
.
.
.
You can create as many group options as you need.

I hope this will be helpful

Dynamic Graph

Hello Group.
I have to do some reports, but the brequeriments are that the reports have
dynamic graphs, can Reporting Services have dynamic graphs?
That's the end user can change between an pie or a bar char'
Tanks.You can make a button that will make visable/hidden the bar and pie chart.
"Carlos López." <CarlosLpez@.discussions.microsoft.com> wrote in message
news:781EAA39-3C33-4301-B3C8-08FD2F0E5197@.microsoft.com...
> Hello Group.
> I have to do some reports, but the brequeriments are that the reports have
> dynamic graphs, can Reporting Services have dynamic graphs?
> That's the end user can change between an pie or a bar char'
> Tanks.
>|||This is one way of doing it but I'd personally avoid hidden regions. First,
the hidden element space is not reclaimed and second, the datasets for
hidden elements are processed which may impact performance.
Instead, I address a similar requirement in the past by changing the report
definition (RDL) file. True, this will require a custom application front
end, so it may not be applicable always.
--
Hope this helps.
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
"Cindy Lee" <cindylee@.hotmail.com> wrote in message
news:uexXpFrxEHA.3908@.TK2MSFTNGP12.phx.gbl...
> You can make a button that will make visable/hidden the bar and pie chart.
>
>
> "Carlos López." <CarlosLpez@.discussions.microsoft.com> wrote in message
> news:781EAA39-3C33-4301-B3C8-08FD2F0E5197@.microsoft.com...
> > Hello Group.
> > I have to do some reports, but the brequeriments are that the reports
have
> > dynamic graphs, can Reporting Services have dynamic graphs?
> > That's the end user can change between an pie or a bar char'
> > Tanks.
> >
>|||Hi
I have a requirement to do excatly the same
Hide/show based on a button with in the report
Please let me know how to do this
Regards
George
"Cindy Lee" wrote:
> You can make a button that will make visable/hidden the bar and pie chart.
>
>
> "Carlos López." <CarlosLpez@.discussions.microsoft.com> wrote in message
> news:781EAA39-3C33-4301-B3C8-08FD2F0E5197@.microsoft.com...
> > Hello Group.
> > I have to do some reports, but the brequeriments are that the reports have
> > dynamic graphs, can Reporting Services have dynamic graphs?
> > That's the end user can change between an pie or a bar char'
> > Tanks.
> >
>
>|||You might be better off creating two reports. One with the Pie Chart and one
with the Bar Graph. This has the added advantage of optimizing the way each
chart appears to the user.
"Carlos López." wrote:
> Hello Group.
> I have to do some reports, but the brequeriments are that the reports have
> dynamic graphs, can Reporting Services have dynamic graphs?
> That's the end user can change between an pie or a bar char'
> Tanks.
>

Sunday, March 11, 2012

Dynamic Filter, Group, and Sort Report Builder Template

I have prepared a report by using report builder. And I want that user can
change filter, group, and sort property of this report template when running
report. How can it possible?I am also looking for similar funcationality in 2005 Reporting Services...Any
help is greatly appreciated!!
-Brian
"Yuksel" wrote:
> I have prepared a report by using report builder. And I want that user can
> change filter, group, and sort property of this report template when running
> report. How can it possible?

Friday, March 9, 2012

Dynamic Expression

I would like to display calculated field on a group header.
The nature of the calculation must be passed as a parameter to the report.
For example lets assume that my report lists X,Y pairs.
On the break I would like to display the value of
Sum(X)/Sum(Y) or Sum(X/Y) or Sum(X*Y) or Sum(X)*SUM(Y).
It is not practical to prepare an expression for every possible option and
use a selector as X,Y are also dynamically selected values from the query.
So I need a dynamic way to define the expression based on input parameters.
Is Custom code is the way to go ? How do I access the Parameters collection,
and the Report's data from Custom code ?
Any Ideas ?
Thanks.I think that custom code will be needed. You can pass the values you need
(Parameters, Report Data) in as parameters to a function.
"NL" wrote:
> I would like to display calculated field on a group header.
> The nature of the calculation must be passed as a parameter to the report.
> For example lets assume that my report lists X,Y pairs.
> On the break I would like to display the value of
> Sum(X)/Sum(Y) or Sum(X/Y) or Sum(X*Y) or Sum(X)*SUM(Y).
> It is not practical to prepare an expression for every possible option and
> use a selector as X,Y are also dynamically selected values from the query.
> So I need a dynamic way to define the expression based on input parameters.
> Is Custom code is the way to go ? How do I access the Parameters collection,
> and the Report's data from Custom code ?
> Any Ideas ?
> Thanks.
>
>
>
>
>
>|||How does one create a custom function that manipulates the headers of a
report based on parameter values?
"John W" wrote:
> I think that custom code will be needed. You can pass the values you need
> (Parameters, Report Data) in as parameters to a function.
> "NL" wrote:
> > I would like to display calculated field on a group header.
> > The nature of the calculation must be passed as a parameter to the report.
> >
> > For example lets assume that my report lists X,Y pairs.
> > On the break I would like to display the value of
> > Sum(X)/Sum(Y) or Sum(X/Y) or Sum(X*Y) or Sum(X)*SUM(Y).
> >
> > It is not practical to prepare an expression for every possible option and
> > use a selector as X,Y are also dynamically selected values from the query.
> > So I need a dynamic way to define the expression based on input parameters.
> >
> > Is Custom code is the way to go ? How do I access the Parameters collection,
> > and the Report's data from Custom code ?
> >
> > Any Ideas ?
> >
> > Thanks.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >|||The previous question was asking about display a calculated field on a group
header. You can do this by adding a field to the group header that references
a function defined in VB.NET code in the Report Properties Code tab.
Code sample:
Public Function GetDoubledValue(ByVal NumToDouble As Int) As String
Return CStr(NumToDouble * 2)
End Function
Field Reference:
=Code.GetDoubledValue(4)
"Leneise44" wrote:
> How does one create a custom function that manipulates the headers of a
> report based on parameter values?
> "John W" wrote:
> > I think that custom code will be needed. You can pass the values you need
> > (Parameters, Report Data) in as parameters to a function.
> >
> > "NL" wrote:
> >
> > > I would like to display calculated field on a group header.
> > > The nature of the calculation must be passed as a parameter to the report.
> > >
> > > For example lets assume that my report lists X,Y pairs.
> > > On the break I would like to display the value of
> > > Sum(X)/Sum(Y) or Sum(X/Y) or Sum(X*Y) or Sum(X)*SUM(Y).
> > >
> > > It is not practical to prepare an expression for every possible option and
> > > use a selector as X,Y are also dynamically selected values from the query.
> > > So I need a dynamic way to define the expression based on input parameters.
> > >
> > > Is Custom code is the way to go ? How do I access the Parameters collection,
> > > and the Report's data from Custom code ?
> > >
> > > Any Ideas ?
> > >
> > > Thanks.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >