Showing posts with label expression. Show all posts
Showing posts with label expression. Show all posts

Wednesday, March 21, 2012

Report Model Expressions

I would like to define a new field in one of my Report Model entities, by
creating an expression that references some attributes of an entity related
by a role. Is this possible?
Also, is there a kludge I can use to handle the fact that there is no IIF
function available?
--
Helen Warn, PhD
Agile Software Inc.
www.agile-soft.comOK, I upgraded to SP2 (CTP) and now I can get it to work, but it is still
buggy. I need to combine 3 attributes. I was able to concatenate 2 of them
with a new field definition, and add the 3rd as a column expression. When I
tried to combine the 3 in the new field definitiion, I kept getting errors.
Also, I understand that one can inject one's own expression directly into
the rdl, so I am going to experiment with that as a means of getting IIF.
--
Helen Warn, PhD
Agile Software Inc.
www.agile-soft.com
"Helen Warn" wrote:
> I would like to define a new field in one of my Report Model entities, by
> creating an expression that references some attributes of an entity related
> by a role. Is this possible?
> Also, is there a kludge I can use to handle the fact that there is no IIF
> function available?
>
> --
> Helen Warn, PhD
> Agile Software Inc.
> www.agile-soft.com

Report Model Expression

I'm new to Report Model and trying to create a new expression field with IF condition on related Role's attribute when i do this it gives error "The arguments to the following function are not valid: = (Equal to)" but if put direct Entity's column it works fine.. heres the expression

IF(Activity Type List Value Display Name = "Sick Day", 1, 0)

"Activity Type" is the Role(1--*) in Employee Table, and i'm adding this expression in the Employee Table

are there any sample models that i can download with some complex filters/expressions etc?

regards

faraz

any idea?|||It seems microsoft people are not interested in Report Model :)|||

Sorry for the delay in responding. Based on the cardinality of the role (1-*), it sounds like you are trying to compare a *set* of activity type display names to a single value. The equals operator cannot do this. Instead, wrap the field reference in the COUNT aggregate function, then double-click to expand the field reference and add a filter to count only the activity types where the display name is "Sick Day". You can then use your IF function to return a result based on the number of activity types that meet this condition.

Hope this helps!

sql

Report Model Expression

I'm new to Report Model and trying to create a new expression field with IF condition on related Role's attribute when i do this it gives error "The arguments to the following function are not valid: = (Equal to)" but if put direct Entity's column it works fine.. heres the expression

IF(Activity Type List Value Display Name = "Sick Day", 1, 0)

"Activity Type" is the Role(1--*) in Employee Table, and i'm adding this expression in the Employee Table

are there any sample models that i can download with some complex filters/expressions etc?

regards

faraz

any idea?|||It seems microsoft people are not interested in Report Model :)|||

Sorry for the delay in responding. Based on the cardinality of the role (1-*), it sounds like you are trying to compare a *set* of activity type display names to a single value. The equals operator cannot do this. Instead, wrap the field reference in the COUNT aggregate function, then double-click to expand the field reference and add a filter to count only the activity types where the display name is "Sick Day". You can then use your IF function to return a result based on the number of activity types that meet this condition.

Hope this helps!

Friday, March 9, 2012

Report Manager

I've recently installed SQL Server 2005 Expression with Advanced Services. I'm exploring Report Server, deploying and executing reports, but I'm having some problems. If I hit a report in IE 7 using the URL naming scheme, everything is fine. If (on an ASP.NET page) I embed a local (RDLC) report in a ReportViewer control, all is well. If I link to a remote (RDL) report with ReportViewer, even though IIS, SQL Server Express, Report Server, and the user are on the same machine, I get an error:

The permissions granted to user 'SERVER1\ASPNET' are insufficient for performing this operation. (rsAccessDenied).

This is whether I'm using integrated security or anonymous for my web application. The ReportServer$SQLEXPRESS vdir is set at integrated security by default. The message states ASPNET either way, even when a LoginName control on the page confirms that it's using my actual login info. I've seen some places that show elaborate code-based ways to impersonate to get this working better, but it seems like it should just work without resorting to custom code.

I also keep reading about setting roles properly on the server, but I see no way whatsoever to assign users/roles to reports. I've seen several links about the Report Manager (http://msdn2.microsoft.com/en-us/library/ms365166.aspx and http://msdn2.microsoft.com/en-us/library/ms161561.aspx). Supposedly I can go to http://localhost/Reports$SQLEXPRESS (the links both state this), but I get nothing, and IIS doesn't show a vdir with the Reports$SQLEXPRESS name. Is this something that I need to install separately? I've installed on two different XP Pro boxes with the same results.

What am I doing wrong? Help would very much appreciated!

-Arian

Any thoughts anyone?

Please?

|||

Report Manager should be an optional installation option with your SQL Express with Advanced Services edition.

I can't remember the exact UI layout for this but you should be able to either:

1) go into Add/Remove programs and use the change option to open the Installation program for SQL Express with Advanced Services. You should see a Feature selection screen (or need to click an 'advanced' button) to open it. There you should be able to check the report manager.

Or if you're OK doing a reinstall, (I check this on my comptuer) -

Run the express w/ adv svcs installation again.

Uncheck the "Hide advanced configuration options" check box on the Resgistration Information dialog.

On the Feature Selection dialog, in the tree view, click "Reporting Services" and select "Entire feature will be installed on local hard drive". You should see the X disapear from the Report Manager feature.

Proceed with the installation and you should get report manager.

-Lukasz

|||

Right you are! I went back through setup and saw it nested under Report Server. Thanks for that!

Is that all I need to get rid of the ASPNET issue? Once I have Report Manager I just assign permissions to any user, including ASPNET, right?

|||

I don't know off the top of my head. I need to check with some other folks. In the meantime, assiging permissions to ASP.Net user will get you running. If you don't hear back from me in a day or so, just ping this thread and I'll see it in my inbox again :-).

-Lukasz

Wednesday, March 7, 2012

Report item not linked to a dataset

I have a need to add a text box to a report. The text box will have an
expression that I need to have that captues the value of a field from a
second data set associated with the report. I add a text box but in the edit
expresssion process I can't access any fields (from any data set) and i get
the message Report item not linked to a dataset. I'm not trying to add a new
table or anything like that. I just want to be able to grab that field value
and disply.
--
Thanks, JimOn Sep 21, 11:38 am, Jim B <J...@.lightning.com> wrote:
> I have a need to add a text box to a report. The text box will have an
> expression that I need to have that captues the value of a field from a
> second data set associated with the report. I add a text box but in the edit
> expresssion process I can't access any fields (from any data set) and i get
> the message Report item not linked to a dataset. I'm not trying to add a new
> table or anything like that. I just want to be able to grab that field value
> and disply.
> --
> Thanks, Jim
If I'm understanding you correctly, you should be able to reference a
dataset via an aggregate expression. Something like this should work.
=Max(Fields!SomeFieldName.Value, "SomeDatasetName")
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||That's exactly what I needed to know. Thanks for your response to my question.
--
Thanks, Jim
"EMartinez" wrote:
> On Sep 21, 11:38 am, Jim B <J...@.lightning.com> wrote:
> > I have a need to add a text box to a report. The text box will have an
> > expression that I need to have that captues the value of a field from a
> > second data set associated with the report. I add a text box but in the edit
> > expresssion process I can't access any fields (from any data set) and i get
> > the message Report item not linked to a dataset. I'm not trying to add a new
> > table or anything like that. I just want to be able to grab that field value
> > and disply.
> > --
> > Thanks, Jim
>
> If I'm understanding you correctly, you should be able to reference a
> dataset via an aggregate expression. Something like this should work.
> =Max(Fields!SomeFieldName.Value, "SomeDatasetName")
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>|||On Sep 23, 9:20 am, Jim B <J...@.lightning.com> wrote:
> That's exactly what I needed to know. Thanks for your response to my question.
> --
> Thanks, Jim
> "EMartinez" wrote:
> > On Sep 21, 11:38 am, Jim B <J...@.lightning.com> wrote:
> > > I have a need to add a text box to a report. The text box will have an
> > > expression that I need to have that captues the value of a field from a
> > > second data set associated with the report. I add a text box but in the edit
> > > expresssion process I can't access any fields (from any data set) and i get
> > > the message Report item not linked to a dataset. I'm not trying to add a new
> > > table or anything like that. I just want to be able to grab that field value
> > > and disply.
> > > --
> > > Thanks, Jim
> > If I'm understanding you correctly, you should be able to reference a
> > dataset via an aggregate expression. Something like this should work.
> > =Max(Fields!SomeFieldName.Value, "SomeDatasetName")
> > Hope this helps.
> > Regards,
> > Enrique Martinez
> > Sr. Software Consultant
You're welcome. Glad I could help.
Regards,
Enrique Martinez
Sr. Software Consultant

Report item expression can only refer to fields within the current data set scope

I switched my reports datasource and made sure the new query outputs
the same fields. However i now get this error...
Report item expression can only refer to fields within the current
data set scope or, if inside an aggregate, the specified data set
scope
I've checked everywhere to confirm I'm pointing to the right dataset
and I am.On Oct 10, 9:09 pm, jobs <j...@.webdos.com> wrote:
> I switched my reports datasource and made sure the new query outputs
> the same fields. However i now get this error...
> Report item expression can only refer to fields within the current
> data set scope or, if inside an aggregate, the specified data set
> scope
> I've checked everywhere to confirm I'm pointing to the right dataset
> and I am.
You might want to select the Refresh icon in the Data view. Also, if
you are using a parameter in the dataset, you will want to make sure
that it is mapped correctly (via the Data view >> Edit Selected
Dataset [...] >> Parameters tab). Another thing to check is to make
sure that you did not accidentally misspell one of the dataset fields
since the previous dataset. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

Saturday, February 25, 2012

Report header expression

I have create a report with date parameters -- @.FromDate and @.ToDate.
The report requested if @.FromDate is null and @.ToDate is null, will use
GetDate()-7 and GetDate().
I have included this condition into report SQL and had no problem.
My question is how to display the dates on the report header.
For example, "Rental Date from (@.FromDate or GetDate()) to (@.ToDate or
GetDate())".
Thanks a lot for any help.
JeanneOn Dec 28, 10:25 pm, "JeanneZhang" <u39996@.uwe> wrote:
> I have create a report with date parameters -- @.FromDate and @.ToDate.
> The report requested if @.FromDate is null and @.ToDate is null, will use
> GetDate()-7 and GetDate().
> I have included this condition into report SQL and had no problem.
> My question is how to display the dates on the report header.
> For example, "Rental Date from (@.FromDate or GetDate()) to (@.ToDate or
> GetDate())".
> Thanks a lot for any help.
> Jeanne
In terms of using an expression to show the conditions, something like
this should help.
="Rental Date from " + iif(Parameters!FromDate.Value Is Nothing and
Parameters!ToDate.Value Is Nothing, DateAdd("d", -7,
Now()).ToString(), Parameters!FromDate.Value.ToString()) + " to " +
iif(Parameters!FromDate.Value Is Nothing and Parameters!
ToDate.Value Is Nothing, Now().ToString(), Parameters!
ToDate.Value.ToString())
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

Tuesday, February 21, 2012

Report Header

How can I

create a header that will only appear on the first page? The page

header doesn't seem to have an expression area that would accomplish

this and globals are not useable in table headers.

Thanks

You could try putting your first page header inside a rectangle in the page header. You can set the visibility of the rectangle to the expression:

=(Globals!PageNumber <> 1)

If you have another header that you want to appear on other pages you could use a second rectangle with the visibility expression:

=(Globals!PageNumber = 1)

|||

However if the header sizes are different then it's showing whitespace.

Is there any workaround to resize the page footer?

|||

Hi

If your using a table report you can go to the table
properties and uncheck the combobox that says:

'Repeat row header on every page'

G

Report Header

How can I create a header that will only appear on the first page? The page header doesn't seem to have an expression area that would accomplish this and globals are not useable in table headers.

Thanks

You could try putting your first page header inside a rectangle in the page header. You can set the visibility of the rectangle to the expression:

=(Globals!PageNumber <> 1)

If you have another header that you want to appear on other pages you could use a second rectangle with the visibility expression:

=(Globals!PageNumber = 1)

|||

However if the header sizes are different then it's showing whitespace.

Is there any workaround to resize the page footer?

|||

Hi

If your using a table report you can go to the table
properties and uncheck the combobox that says:

'Repeat row header on every page'

G