Showing posts with label user. Show all posts
Showing posts with label user. Show all posts

Thursday, March 29, 2012

Dynamic selection of flat file

I am writing a package where the user uploads a flat file to a web folder. I need to automate this package to run everytime it sees a new file.

How can I implement this?

Can I make a call to a package or a sql server job to run from .net 2.0?

Do I need to use a service broker to look for a new file and run the package or a stored proc....I am looking for an async process where user doesnt have to wait for the package to run as it involves data validation of flat file and its huge...

Please help!!

How about a scheduled package that runs every minute, and if it finds a file it runs the load task, otherwise it just ends.

You could do something event driven with the WMI event task, but I dislike that since it does not tell you what file has been found, or try the File Watcher Task (http://www.sqlis.com/default.aspx?23)

|||

Appreciate your response...

I was wondering about creating a config file in the database and update the Connection string value everytime a new file is uploaded with the new file name

And then call the package to run by adding dts assembly to visual studio and doing package.load....

Any suggestion or comments on this as I really dont want to run this every min....

Dynamic Security to Cube

I have the requiremrnt that when a User loggs in He would be able to see only his and his Ancestores Details(means he ll be able to see the users deatils those are reporting him)

The MDX Query i wrote in Roles--> Dimension Data-->Advanced-->Allowed Memberset is.

FILTER( [DIMUSERS].[DIMUSERS].Members,

'POLARIS\'+ [DIMUSERS].[DIMUSERS].Currentmember.Name=username)

When After execuing the above MDX Its doing hardcode as the login of the Current User

which is not affecting for other Users.

So that Who ever user login to the system everybody getting all the User deatils

This is Urgent plz help me in this regards

Thank U

Check that your users are not setup in the Administrators group, or are not part of a windows group that is in the admin role. This is definitely true for the server admins and possibly also for database admins, but I have not double checked that.|||

Thanks Daren

what you gav solution I did the same still its comming the same

|||

I'm not entirely sure I understand your issue. Are you possibly saying that the members are restricted at the lower level, but the parent levels still have the total for all members? If this is your problem, go into the advanced tab and turn on the "Visual Totals" option. This will make the value for all the parent members only show a total which is the sum of the values to which the user has access.

If this is not your issue maybe an example of what you are seeing and what you would like to see would help.

|||

I want the cube data to be filtered on the basis of the current domain user. Is there any way to get that filter implemented on analysis cube or through MDX query as said above.....please its urgent...

|||You can either do what the first poster was doing and setup a "users" dimension and setup the allowed set in your role to filter using the username function. or you can setup a series of different roles with different allowed sets and allocate users to the different roles - it really depends on your specific security needs as to which is the better approach.

Dynamic Security to Cube

I have the requiremrnt that when a User loggs in He would be able to see only his and his Ancestores Details(means he ll be able to see the users deatils those are reporting him)

The MDX Query i wrote in Roles--> Dimension Data-->Advanced-->Allowed Memberset is.

FILTER( [DIMUSERS].[DIMUSERS].Members,

'POLARIS\'+ [DIMUSERS].[DIMUSERS].Currentmember.Name=username)

When After execuing the above MDX Its doing hardcode as the login of the Current User

which is not affecting for other Users.

So that Who ever user login to the system everybody getting all the User deatils

This is Urgent plz help me in this regards

Thank U

Check that your users are not setup in the Administrators group, or are not part of a windows group that is in the admin role. This is definitely true for the server admins and possibly also for database admins, but I have not double checked that.|||

Thanks Daren

what you gav solution I did the same still its comming the same

|||

I'm not entirely sure I understand your issue. Are you possibly saying that the members are restricted at the lower level, but the parent levels still have the total for all members? If this is your problem, go into the advanced tab and turn on the "Visual Totals" option. This will make the value for all the parent members only show a total which is the sum of the values to which the user has access.

If this is not your issue maybe an example of what you are seeing and what you would like to see would help.

|||

I want the cube data to be filtered on the basis of the current domain user. Is there any way to get that filter implemented on analysis cube or through MDX query as said above.....please its urgent...

|||You can either do what the first poster was doing and setup a "users" dimension and setup the allowed set in your role to filter using the username function. or you can setup a series of different roles with different allowed sets and allocate users to the different roles - it really depends on your specific security needs as to which is the better approach.

Dynamic Row Level Security

Hi,
Is it possible to configure Reporting Services 2005 so that the same report
will apply different data filters depending on the user running the report ?
i.e A German user will only see German data and an English user will only
see English data even if they enter a parameter for 'All Europe'.
Thanks.RS supports a property User!UserID which returns the identity of the
interactive user (assuming Windows authentication). You can pass the user
identity to the data source as a query parameter to implement data filtering
at the data source.
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
"Duncan Allen" <DuncanAllen@.discussions.microsoft.com> wrote in message
news:B76E2612-99F1-490B-AFBF-E11B5280BE43@.microsoft.com...
> Hi,
> Is it possible to configure Reporting Services 2005 so that the same
> report
> will apply different data filters depending on the user running the report
> ?
> i.e A German user will only see German data and an English user will only
> see English data even if they enter a parameter for 'All Europe'.
> Thanks.

Dynamic report parameters

hells
Does anyone know a way to set up a report with two parameters that the
user can select, where one parameter's populated with data depending on
what's selected in the other parameter?
I'm doing a report of some questionnaire data. I want to let the user
select a question, then select one of the possible responses to that
question. The report will then display answers to *all* questions from
people that gave the selected response to the selected question.
I thought maybe I could use subreports to do this but can't seem to get
that working.
Help much appreciated!
NickTake a look at cascading parameters described here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rscreate/htm/rcr_creating_interactive_v1_50fn.asp
nthompson@.gmail.com wrote:
> hells
> Does anyone know a way to set up a report with two parameters that the
> user can select, where one parameter's populated with data depending on
> what's selected in the other parameter?
> I'm doing a report of some questionnaire data. I want to let the user
> select a question, then select one of the possible responses to that
> question. The report will then display answers to *all* questions from
> people that gave the selected response to the selected question.
> I thought maybe I could use subreports to do this but can't seem to get
> that working.
> Help much appreciated!
> Nick|||Excellent. I'll have a read. Many thankssql

Monday, March 26, 2012

dynamic query

Hello friends,

I want to create a dynamic query based on input of the parameter.

If the user passes nothing then all fields should be displayed else use query based on parameter.

I had view sample of MSDN ,but I got error [BC30203].

Is there another way to it ?Please help.

I use:

= iif(Parameters!SQLQuery.Value<>"",Parameters!SQLQuery.Value,"SELECT somecolumn from sometable") as "select statement"

and provide a query in the SQLQuery-Parameter..

You could also use:

= iif(Parameters!SomeID.Value<>"","SELECT somecolumn from sometable where id=" & Parameters!SQLQuery.Value,"SELECT somecolumn from sometable where id=123")

|||

Thanks For Your Reply

But I m still confusing.

I had used the iif (condition) in the generic query designer but i cannot retrive the fields which I want from the query.

The Query is executing but the data set does not contain any fields.

for eg:

="Select Idnummer,.....

iif(parameter is null,nothing,"AND ART IN ( " & parameter.value & ")")

Please reply sooner.

|||

You can't check your query anymore, thats right. When writing the query as ="select .. " & some_condition .. Hitting the "!"-Button has no effect.. This statement is evaluated at runtime.. So, you have to go to Preview-Mode and check if the result looks right..

If you are missing the Fields!.. for report design, the easiest way is to execute a "normal" sql-statement once (this will add the fields) and then transform your sql-string..

|||

Dynamic query should be avoided wherever possible. It is much harder to do (as you have seen).

I do this, I have a parameter that says All and returns a value of All (it could also return a number if a number field, just make it a value that does not exist in the database.

Do this:

selct * from sometable where (somefield = @.MyParam or @.MyParam = 'All') and ...

|||

I dunno if this is better, but should do the same thing:

The query will be:

select * from TableName
where FieldName LIKE (CASE WHEN @.param IS NULL THEN '%' ELSE @.param END)

|||

Hello Sir,

How can I implement "ALL" in my parameter

The table field does not contain 'ALL" .

If the parameter selected is 'ALL',then query should execute with the parameter contaning 'ALL' the values.Then my problem could be solve if the parameter contains 'ALL'.

please give a sample to implement 'ALL' in my parameter and in query.

Please reply soon.

Thanks

|||

u can use the query in this way,


SELECT AreaName, AreaCode
FROM Area
UNION
SELECT ' All' AS Areaname, '' AS AreaCode
ORDER BY AreaName

This will add 'All' n ur drop down box n using case statement in query u can get the desired results.

regards

Satyendra

dynamic procedure creation - possible?

Hi Gurus
I am trying to develop an application around SQL server. The app allows
the user to input a where clause at runtime, which the application runs
against. The only way the app can use the input where clause is by
building an SQL statement including the where clause, and then calling
sp_executeSQL against it. This is inefficient; ideally I would like to
compile the SQL statement (as it will be used multiple times) - but how
can I do this? I cannot call CREATE PROCEDURE, as that cannot be done
from inside another statement (it must be done explicitly with a
hardcoded where statement).
Is there any wat I can improve on building the statement and calling
sp_executeSQL every time I need to run it?"neilsolent" <neil@.solenttechnology.co.uk> wrote in message
news:1169494423.824216.35130@.38g2000cwa.googlegroups.com...
> Hi Gurus
> I am trying to develop an application around SQL server. The app allows
> the user to input a where clause at runtime, which the application runs
> against. The only way the app can use the input where clause is by
> building an SQL statement including the where clause, and then calling
> sp_executeSQL against it. This is inefficient;
Why do you think that? SQL Server will cache and reuse SQL queries sent
using sp_executesql, especially if you use parameter markers in the query.
See
Batch Compilation, Recompilation, and Plan Caching Issues in SQL Server 2005
http://www.microsoft.com/technet/pr...005/recomp.mspx
Execution Plan Caching and Reuse
http://msdn2.microsoft.com/en-us/library/aa175244(SQL.80).aspx

> ideally I would like to
> compile the SQL statement (as it will be used multiple times) - but how
> can I do this? I cannot call CREATE PROCEDURE, as that cannot be done
> from inside another statement (it must be done explicitly with a
> hardcoded where statement).
> Is there any wat I can improve on building the statement and calling
> sp_executeSQL every time I need to run it?
>
No. That is really a perfectly fine thing to do. Consider using parameter
markers in sp_executesql to get query plan reuse and reduce compilations.
However if the volume of these dynamic queries is not great, or the cost of
each query to execute is large, then plan reuse may not be important or even
desirable.
David|||Thanks very much for that David.
The queries don't have parameters - they are always exactly the same
every time they are run (the user may change the where clause, but this
will be a very infrequent event). However, there could be up to 255 of
these queries (and where clauses), which could potentially all get
called (in series) every time a row is inserted into a certain key
table. A row is inserted in the key table possibly several times a
second (worst case).|||"neilsolent" <neil@.solenttechnology.co.uk> wrote in message
news:1169495992.357049.50780@.m58g2000cwm.googlegroups.com...
> Thanks very much for that David.
> The queries don't have parameters - they are always exactly the same
> every time they are run (the user may change the where clause, but this
> will be a very infrequent event). However, there could be up to 255 of
> these queries (and where clauses), which could potentially all get
> called (in series) every time a row is inserted into a certain key
> table. A row is inserted in the key table possibly several times a
> second (worst case).
>
Ok, 255 different queries isn't much at all. I would just let SQL Server
cache them.
David

dynamic procedure creation - possible?

Hi Gurus
I am trying to develop an application around SQL server. The app allows
the user to input a where clause at runtime, which the application runs
against. The only way the app can use the input where clause is by
building an SQL statement including the where clause, and then calling
sp_executeSQL against it. This is inefficient; ideally I would like to
compile the SQL statement (as it will be used multiple times) - but how
can I do this? I cannot call CREATE PROCEDURE, as that cannot be done
from inside another statement (it must be done explicitly with a
hardcoded where statement).
Is there any wat I can improve on building the statement and calling
sp_executeSQL every time I need to run it?
"neilsolent" <neil@.solenttechnology.co.uk> wrote in message
news:1169494423.824216.35130@.38g2000cwa.googlegrou ps.com...
> Hi Gurus
> I am trying to develop an application around SQL server. The app allows
> the user to input a where clause at runtime, which the application runs
> against. The only way the app can use the input where clause is by
> building an SQL statement including the where clause, and then calling
> sp_executeSQL against it. This is inefficient;
Why do you think that? SQL Server will cache and reuse SQL queries sent
using sp_executesql, especially if you use parameter markers in the query.
See
Batch Compilation, Recompilation, and Plan Caching Issues in SQL Server 2005
http://www.microsoft.com/technet/prodtechnol/sql/2005/recomp.mspx
Execution Plan Caching and Reuse
http://msdn2.microsoft.com/en-us/library/aa175244(SQL.80).aspx

> ideally I would like to
> compile the SQL statement (as it will be used multiple times) - but how
> can I do this? I cannot call CREATE PROCEDURE, as that cannot be done
> from inside another statement (it must be done explicitly with a
> hardcoded where statement).
> Is there any wat I can improve on building the statement and calling
> sp_executeSQL every time I need to run it?
>
No. That is really a perfectly fine thing to do. Consider using parameter
markers in sp_executesql to get query plan reuse and reduce compilations.
However if the volume of these dynamic queries is not great, or the cost of
each query to execute is large, then plan reuse may not be important or even
desirable.
David
|||Thanks very much for that David.
The queries don't have parameters - they are always exactly the same
every time they are run (the user may change the where clause, but this
will be a very infrequent event). However, there could be up to 255 of
these queries (and where clauses), which could potentially all get
called (in series) every time a row is inserted into a certain key
table. A row is inserted in the key table possibly several times a
second (worst case).
|||"neilsolent" <neil@.solenttechnology.co.uk> wrote in message
news:1169495992.357049.50780@.m58g2000cwm.googlegro ups.com...
> Thanks very much for that David.
> The queries don't have parameters - they are always exactly the same
> every time they are run (the user may change the where clause, but this
> will be a very infrequent event). However, there could be up to 255 of
> these queries (and where clauses), which could potentially all get
> called (in series) every time a row is inserted into a certain key
> table. A row is inserted in the key table possibly several times a
> second (worst case).
>
Ok, 255 different queries isn't much at all. I would just let SQL Server
cache them.
David
sql

dynamic procedure creation - possible?

Hi Gurus
I am trying to develop an application around SQL server. The app allows
the user to input a where clause at runtime, which the application runs
against. The only way the app can use the input where clause is by
building an SQL statement including the where clause, and then calling
sp_executeSQL against it. This is inefficient; ideally I would like to
compile the SQL statement (as it will be used multiple times) - but how
can I do this? I cannot call CREATE PROCEDURE, as that cannot be done
from inside another statement (it must be done explicitly with a
hardcoded where statement).
Is there any wat I can improve on building the statement and calling
sp_executeSQL every time I need to run it?"neilsolent" <neil@.solenttechnology.co.uk> wrote in message
news:1169494423.824216.35130@.38g2000cwa.googlegroups.com...
> Hi Gurus
> I am trying to develop an application around SQL server. The app allows
> the user to input a where clause at runtime, which the application runs
> against. The only way the app can use the input where clause is by
> building an SQL statement including the where clause, and then calling
> sp_executeSQL against it. This is inefficient;
Why do you think that? SQL Server will cache and reuse SQL queries sent
using sp_executesql, especially if you use parameter markers in the query.
See
Batch Compilation, Recompilation, and Plan Caching Issues in SQL Server 2005
http://www.microsoft.com/technet/prodtechnol/sql/2005/recomp.mspx
Execution Plan Caching and Reuse
http://msdn2.microsoft.com/en-us/library/aa175244(SQL.80).aspx
> ideally I would like to
> compile the SQL statement (as it will be used multiple times) - but how
> can I do this? I cannot call CREATE PROCEDURE, as that cannot be done
> from inside another statement (it must be done explicitly with a
> hardcoded where statement).
> Is there any wat I can improve on building the statement and calling
> sp_executeSQL every time I need to run it?
>
No. That is really a perfectly fine thing to do. Consider using parameter
markers in sp_executesql to get query plan reuse and reduce compilations.
However if the volume of these dynamic queries is not great, or the cost of
each query to execute is large, then plan reuse may not be important or even
desirable.
David|||Thanks very much for that David.
The queries don't have parameters - they are always exactly the same
every time they are run (the user may change the where clause, but this
will be a very infrequent event). However, there could be up to 255 of
these queries (and where clauses), which could potentially all get
called (in series) every time a row is inserted into a certain key
table. A row is inserted in the key table possibly several times a
second (worst case).|||"neilsolent" <neil@.solenttechnology.co.uk> wrote in message
news:1169495992.357049.50780@.m58g2000cwm.googlegroups.com...
> Thanks very much for that David.
> The queries don't have parameters - they are always exactly the same
> every time they are run (the user may change the where clause, but this
> will be a very infrequent event). However, there could be up to 255 of
> these queries (and where clauses), which could potentially all get
> called (in series) every time a row is inserted into a certain key
> table. A row is inserted in the key table possibly several times a
> second (worst case).
>
Ok, 255 different queries isn't much at all. I would just let SQL Server
cache them.
David

Thursday, March 22, 2012

Dynamic parameters

Good day,
I would like to know if it is possible to do the follwoing.
I have a report that has 3 parameters. What I would like to do is when the
user seects the first parameter the second parameter drop box will be
populated with options available according to what was selected in parameter
1, and then once parameter 2 has been selected parameter 3 drop down box will
be populated with the options available to it based on parameter 1 and 2.
Thanks in advance.try to see this link. the part you are interessted in it is called cascading
parameter
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rscreate/htm/rcr_creating_interactive_v1_50fn.asp
best regards, Mirela
"PLSH" wrote:
> Good day,
> I would like to know if it is possible to do the follwoing.
> I have a report that has 3 parameters. What I would like to do is when the
> user seects the first parameter the second parameter drop box will be
> populated with options available according to what was selected in parameter
> 1, and then once parameter 2 has been selected parameter 3 drop down box will
> be populated with the options available to it based on parameter 1 and 2.
> Thanks in advance.|||At the end of this report is a sample of how to use cascading parameters.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"PLSH" <PLSH@.discussions.microsoft.com> wrote in message
news:181419DA-37DA-469C-8F1E-1B684F1F8F05@.microsoft.com...
> Good day,
> I would like to know if it is possible to do the follwoing.
> I have a report that has 3 parameters. What I would like to do is when the
> user seects the first parameter the second parameter drop box will be
> populated with options available according to what was selected in
parameter
> 1, and then once parameter 2 has been selected parameter 3 drop down box
will
> be populated with the options available to it based on parameter 1 and 2.
> Thanks in advance.
CascadingParameters.rdl
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini
tion"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Table Name="table1">
<Style />
<Header>
<TableRows>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>8</ZIndex>
<rd:DefaultName>textbox1</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>Employee ID</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>7</ZIndex>
<rd:DefaultName>textbox2</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>First Name</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox3">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>6</ZIndex>
<rd:DefaultName>textbox3</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>LastName</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
</Header>
<Details>
<TableRows>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="EmployeeID">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>2</ZIndex>
<rd:DefaultName>EmployeeID</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!EmployeeID.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="FirstName">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>1</ZIndex>
<rd:DefaultName>FirstName</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!FirstName.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="LastName">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<rd:DefaultName>LastName</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!LastName.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
</Details>
<DataSetName>EmpInfo</DataSetName>
<Footer>
<TableRows>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox7">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>5</ZIndex>
<rd:DefaultName>textbox7</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox8">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>4</ZIndex>
<rd:DefaultName>textbox8</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox9">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>3</ZIndex>
<rd:DefaultName>textbox9</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
</Footer>
<TableColumns>
<TableColumn>
<Width>2.16667in</Width>
</TableColumn>
<TableColumn>
<Width>2.16667in</Width>
</TableColumn>
<TableColumn>
<Width>2.16667in</Width>
</TableColumn>
</TableColumns>
</Table>
</ReportItems>
<Style />
<Height>0.75in</Height>
</Body>
<TopMargin>1in</TopMargin>
<DataSources>
<DataSource Name="Northwind">
<rd:DataSourceID>a9041117-655b-4d91-b2ee-0c0326bce962</rd:DataSourceID>
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>data source=localhost;initial
catalog=Northwind</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</DataSource>
</DataSources>
<Width>6.50001in</Width>
<DataSets>
<DataSet Name="EmpCountry">
<Fields>
<Field Name="country">
<DataField>country</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>select Distinct country from employees order by
country</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
</DataSet>
<DataSet Name="EmpCity">
<Fields>
<Field Name="city">
<DataField>City</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>SELECT DISTINCT City
FROM Employees
WHERE (Country = @.Country)
ORDER BY City</CommandText>
<QueryParameters>
<QueryParameter Name="@.Country">
<Value>=Parameters!Country.Value</Value>
</QueryParameter>
</QueryParameters>
</Query>
</DataSet>
<DataSet Name="EmpHireDate">
<Fields>
<Field Name="HireYear">
<DataField>HireYear</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>SELECT DISTINCT DATEPART(year, HireDate) AS HireYear
FROM Employees
ORDER BY DATEPART(year, HireDate)</CommandText>
</Query>
</DataSet>
<DataSet Name="EmpInfo">
<Fields>
<Field Name="EmployeeID">
<DataField>EmployeeID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="LastName">
<DataField>LastName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="FirstName">
<DataField>FirstName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Country">
<DataField>Country</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="City">
<DataField>City</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="HireDate">
<DataField>HireDate</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>SELECT EmployeeID, LastName, FirstName, Country,
City, DATEPART(year, HireDate) AS HireDate
FROM Employees
WHERE (Country = @.Country) AND (City = @.City) AND (DATEPART(year,
HireDate) = @.HireDate)</CommandText>
<QueryParameters>
<QueryParameter Name="@.Country">
<Value>=Parameters!Country.Value</Value>
</QueryParameter>
<QueryParameter Name="@.City">
<Value>=Parameters!City.Value</Value>
</QueryParameter>
<QueryParameter Name="@.HireDate">
<Value>=Parameters!HireDate.Value</Value>
</QueryParameter>
</QueryParameters>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>c15c3bb5-93d3-4dd9-a14b-ebac4a86966a</rd:ReportID>
<BottomMargin>1in</BottomMargin>
<ReportParameters>
<ReportParameter Name="Country">
<DataType>String</DataType>
<Prompt>Country</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>EmpCountry</DataSetName>
<ValueField>country</ValueField>
<LabelField>country</LabelField>
</DataSetReference>
</ValidValues>
</ReportParameter>
<ReportParameter Name="City">
<DataType>String</DataType>
<Prompt>City</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>EmpCity</DataSetName>
<ValueField>city</ValueField>
<LabelField>city</LabelField>
</DataSetReference>
</ValidValues>
</ReportParameter>
<ReportParameter Name="HireDate">
<DataType>String</DataType>
<Prompt>HireDate</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>EmpHireDate</DataSetName>
<ValueField>HireYear</ValueField>
<LabelField>HireYear</LabelField>
</DataSetReference>
</ValidValues>
</ReportParameter>
</ReportParameters>
<Language>en-US</Language>
</Report>sql

Dynamic Parameters

I need to build a report in which every field of the dataset acts as a
Parameter to filter data in the report, so that the user is not binded
only to a fixed set of filters.
Based on the datatype of the filter; the condition should be specified
and the user will only supply the value for which he is looking for.
For Example:
In the report i have about 10 fields
EmpSSN No varchar(20)
Emp FirstName varchar(20)
Emp LastName varchar(20)
Emp Location varchar(20)
Emp MartialStatus char(1)
Emp DOB datetime
Emp Salary numeric(18,2)
Emp Designation varchar(20)
Emp Department varchar(20)
Emp Status varchar(20)
When i choose the filter to be as DOB the condition needs to be
generated as >,>=,<,<=,!= and user can define a specific data for the
filter.
Pls advise.Hi,
I am about to start building the exact same report as you outlined
below. did you get any references or whether or not this can be achieved
using reporting services
--
Ciaran
Software developer
"brinda.shree@.gmail.com" wrote:
> I need to build a report in which every field of the dataset acts as a
> Parameter to filter data in the report, so that the user is not binded
> only to a fixed set of filters.
> Based on the datatype of the filter; the condition should be specified
> and the user will only supply the value for which he is looking for.
> For Example:
> In the report i have about 10 fields
> EmpSSN No varchar(20)
> Emp FirstName varchar(20)
> Emp LastName varchar(20)
> Emp Location varchar(20)
> Emp MartialStatus char(1)
> Emp DOB datetime
> Emp Salary numeric(18,2)
> Emp Designation varchar(20)
> Emp Department varchar(20)
> Emp Status varchar(20)
> When i choose the filter to be as DOB the condition needs to be
> generated as >,>=,<,<=,!= and user can define a specific data for the
> filter.
> Pls advise.
>

Dynamic Parameters

I need to be able to schedule a report with a dynamic parameter.
For example,
The user may select "Start of Last Month" as the date parameter value. I
then need to turn this into something like :
CStr(Month(DateAdd("m", -1, Date))) & "/01/" & CStr(Year(DateAdd("m", -1,
Date)))
When scheduling this report, this parameter should then always be "the Start
of Last Month"
I don't know how to make the parameter look at the code as an expression and
not as a String.
Any help would be appreciated.Try,
=CDATE(CStr(Month(DateAdd("m", -1, Date))) & "/01/" &
CStr(Year(DateAdd("m", -1,
Date))))
If it doesn't work, you may also try to create a default value using the
expression above at report manager.
Regards,
Cem Demircioglu
"Tarik Peterson" <tarikp@.investigo.net> wrote in message
news:utVz7JbHFHA.2132@.TK2MSFTNGP14.phx.gbl...
>I need to be able to schedule a report with a dynamic parameter.
> For example,
> The user may select "Start of Last Month" as the date parameter value. I
> then need to turn this into something like :
> CStr(Month(DateAdd("m", -1, Date))) & "/01/" & CStr(Year(DateAdd("m", -1,
> Date)))
> When scheduling this report, this parameter should then always be "the
> Start of Last Month"
> I don't know how to make the parameter look at the code as an expression
> and not as a String.
> Any help would be appreciated.
>|||Another option if you're using stored procedures is to set the start/end date
within the procedure based on a parameter sent through.
"Tarik Peterson" wrote:
> I need to be able to schedule a report with a dynamic parameter.
> For example,
> The user may select "Start of Last Month" as the date parameter value. I
> then need to turn this into something like :
> CStr(Month(DateAdd("m", -1, Date))) & "/01/" & CStr(Year(DateAdd("m", -1,
> Date)))
> When scheduling this report, this parameter should then always be "the Start
> of Last Month"
> I don't know how to make the parameter look at the code as an expression and
> not as a String.
> Any help would be appreciated.
>
>|||Thanks!
I had actually decided to do it this way prior to reading your post, so it
was good to get some kind of confirmation that this was a good way to do it.
Thanks again.
"Dave Klug" <Dave Klug@.discussions.microsoft.com> wrote in message
news:CB4A4573-EB5B-498C-AF2C-11C6FE5CDE00@.microsoft.com...
> Another option if you're using stored procedures is to set the start/end
> date
> within the procedure based on a parameter sent through.
> "Tarik Peterson" wrote:
>> I need to be able to schedule a report with a dynamic parameter.
>> For example,
>> The user may select "Start of Last Month" as the date parameter value. I
>> then need to turn this into something like :
>> CStr(Month(DateAdd("m", -1, Date))) & "/01/" & CStr(Year(DateAdd("m", -1,
>> Date)))
>> When scheduling this report, this parameter should then always be "the
>> Start
>> of Last Month"
>> I don't know how to make the parameter look at the code as an expression
>> and
>> not as a String.
>> Any help would be appreciated.
>>

Dynamic page break, can we ever do this?

Our reports need to have page breaks based on User's preferences. I
couldn't find a way to achieve this. Can anyone share some ideas?Thanks for your quick response, Teros.
I am sorry I didn't clearly state my problem. What I need is dynamic page
break on groups within a table. Suppose I have 2 groups named 'Location' and
'Category' within an Inventory table. I need enable/disable page break at
the end of each Location or Category based on user settings. I don't see how
this can be done through conditional expression. Is there any workaround?
Thanks.
"Teros" <Teros@.discussions.microsoft.com> wrote in message
news:D4705B9E-EA3E-4B76-AF8D-546118BA9F17@.microsoft.com...
> First off, where are the page breaks? After X rows in a report, or after
individual tables, or what? I'd think you could modify the PageBreakAtEnd
or PageBreakAtStart property of various items with a conditional such as
IIf(Parameters!Break.Value = 1, True, False) or something similar, depending
on where you want the page breaks.
> That spark any ideas?
> - T
> "Audrey See" wrote:
> > Our reports need to have page breaks based on User's preferences. I
> > couldn't find a way to achieve this. Can anyone share some ideas?
> >
> >
> >

Wednesday, March 21, 2012

Dynamic object location

Hi, i would like to know if there's a way to set the objects location/size
based on user input parameters. I try to use expressions in location and size
properties but rs says that is a invalid value for the field.
Thanks
Jorge"Jorge Gonçalves" <JorgeGonalves@.discussions.microsoft.com> wrote in message
news:90CF28CC-066F-46BB-9664-75929DEE8EC3@.microsoft.com...
> Hi, i would like to know if there's a way to set the objects location/size
> based on user input parameters. I try to use expressions in location and
size
> properties but rs says that is a invalid value for the field.
> Thanks
> Jorge|||I am interested in doing this as well. In particular I want to be able to
compute the height of a rectangle control based on data values.
Bill
"Jorge Gonçalves" <JorgeGonalves@.discussions.microsoft.com> wrote in message
news:90CF28CC-066F-46BB-9664-75929DEE8EC3@.microsoft.com...
> Hi, i would like to know if there's a way to set the objects location/size
> based on user input parameters. I try to use expressions in location and
size
> properties but rs says that is a invalid value for the field.
> Thanks
> Jorge

Dynamic Members Security

Hi All,
I have a working solution with user-defined security. When user connects to a cube, a list with allowed members is created(retrieved from table) and returned as set to AS. Everything works fine.

Problem is that members are retrieved only at connection time. When I change my table with allowed members later, I would like to force AS to re-read this information again. Of course I can restart AS service or do full process of cube.

Does anybody have an idea?

Thanks,
Radim

Have you tried just reprocessing the dimension affected? What are the specifics of the solution?

|||That's very correct. Processing is possible solution but since I have many concurent users I didn't want to disrupt them. But yesterday I played with it more and I discovered that it's only necessary to do Process index. That's enough to force re-read of allowed members.

Thanks for contribution.

Radim

dynamic mdx

Hello i'm new user,

i have a calculated member

the function LINREGSLOPE juste calculate the slope ( ie: a) of the equation Y= a *X+b

calculated member Name= Gain

LINREGSLOPE([TIME].[Month].&[2006-02-01T00:00:00]:[TIME].[Month].&[2006-06-01T00:00:00],[Mesures].[NumofCustomer],[TIME].[Month], [TIME].[Rank])

i write

the formula do the job veru well. What i want to do now is to

transform the expression to be dynamic with two parameter

I hope this will help.

I seen in this forum that this is possble. how to extract

this information. How can i concat the parametre!month.value with the

string ?

i see idea of solution here but i dont know how to exploit it

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=443431&SiteID=1

how can i do this please help

thanks

hi,

If I am not mistaken, I think you want to restrict the query based on static value instead of dynamic parameters. Right? If that is the case you can just include a where condition to your query like this:

where [Dimension].[Heirarchy].&[Member1]:[Dimension].[Heirarchy].&[Member2]

Note: Dimesion is your dimension name

Heirarchy is your heirachy name.

Member1 is the start date

Member 2 is the end date

I hope this will help.

Sincerely,

Amde

|||thanks amde,

no it's the opposite from static de dynamique.

if the user change the parametre the query will change too.i want to write my expresion with a parameter.

i want somethink like this:

linregslope([Time].[month].&"param1":[Time].[month].&"param2",[measures].[numberCustomer],[Time].[Month].[MonthNumber]).

if you have others questions feel free to ask me.

visite the link in my first post.

I hope this will help.

any idea is welcome

casagrandi

|||

ok thanks

i found the solution

this isi the code:

WITH

set [RangeMonth] as LastPeriods(STRTOMEMBER (@.FromTIMEMonth,CONSTRAINED),STRTOMEMBER (@.ToTIMEMonth,CONSTRAINED))

MEMBER [Measures].[GAIN PER MONTH] AS 'LINREGSLOPE([RangeMonth],[Measures].[mymeasure],Rank([TIME].[Month], [TIME].[Month].Members))'

,format="percent"

SELECT NON EMPTY {[Measures].[GAIN PER MONTH],[Measures] ..........

sql

Dynamic lookup with periodical (Yearly) data using JOIN

Hi,

I am generating a dynamic SQL query to perform a lookup based on criterias entered by the user. The quey is generated by a C# application and the target database is Sql Server 2005.

Basically I have 2 tables:

--Cie-- (Over 40k companies, 1 rows per companies, total 40k rows)
(
CieId int not null,
Symbol varchar,
CieName varchar
) Primary key(CieId)

--YearlyData-- (Over 40k companies, 20 years of data per companies, total 800k rows)
(
CieId int not null,
Year int not null,
Revenue currency,
NetIncome currency,
[...over 170 columns]
)Primary key(CieId, Year)

//Sample Case:
The user want to get the list of all the compagnies (CieId) where
YearlyData.NetIncome > 25k for YearlyData.Year 2005
and YearlyData.Revenue > 100k for YearlyData.Year 2005
and YearlyData.Revenue > 95k for YearlyData.Year 2004
and YearlyData.Revenue > 90k for YearlyData.Year 2003
and YearlyData.Revenue of YearlyData.Year 2005 > YearlyData.Revenue of YearlyData.Year 2004

Currently, the Sql query that would be generated looks like this:

SELECT Cie.CieId
FROM Cie
JOIN (select CieId, Revenue, NetIncome from YearlyData where Year = 2005) Y2005 ON Y2005.CieId = Cie.CieId
JOIN (select CieId, Revenue, NetIncome from YearlyData where Year = 2004) Y2004 ON Y2004.CieId = Cie.CieId
JOIN (select CieId, Revenue, NetIncome from YearlyData where Year = 2003) Y2003 ON Y2003.CieId = Cie.CieId
WHERE 1=1
AND Y2005.NetIncome > 25000
AND Y2005.Revenue > 100000
AND Y2004.Revenue > 95000
AND Y2003.Revenue > 90000
AND Y2005.Revenue > Y2004.Revenue

I dont feel good about all those JOINs especially since there is up to 20 years of data and the user could use all of them in his query. The request become slower with each new join.

Does anyone see a better way to do this, maybe a PIVOT or something?

Thanks

Math:

I mocked this up establishing 40k cie entries and 800k yearly records. When I ran your query I got the expected execution plan and the expected performance. When the data is not cached it ran in about 15 seconds and with the data cached in ran in zero seconds. I got, of course, 3 table (clustered index) scans as it read in the yearly data. I got the merge join (which I expected).

My view is that (1) this is a report and (2) it doesn't figure to be run often and therefore performance for this is not critical. Now, I did show about 10,000 logical IOs as it scanned the tables. This will roughly amount to a grab of about 80Meg of buffer cache whenever this query runs. For most modern servers used for SQL Server 2005 this should not be a problem. Since (1) this is a report and doesn't figure to run often and (2) it seems to provide very adequate performance for a report I would not take any time to try to upgrade the performance of this; I don't figure you will get a good return on time invested in this report unless you are having some specific problems.

One thing that can be done to provide a marginal performance boost for this particular is to build a "cover index" for the specific columns you are using for this report; however, I don't feel like this is a good investment either. The modest boost received from the cover index does not figure to be a good tradeoff for the cost of the necessary cover index.

Are you having some specific problems? If so, what are they?


Dave

|||

Dave, thank you for the reply.

I dont have any specific problems other than perfomances, I am just trying to see if there is a better way to construct this kind of query (i.e. without 1 join per year). This is not really a report, it is more like a screener, a tools used when looking for companies to invest in. The screener is used frequently so performance is an issue. The data is readonly with only 1 update at the end of each day so we indexed every columns (grouped logicaly).

The query in the OP was only a sample case, the user can really compare:
"columnX of yearX" with "columnX of yearY"
"columnX of yearX" with "columnY of yearY"
"columnX of yearX" with "columnY of yearX"
"columnX of yearX" with a static value (like 250.95)
and more

Do you think the query can be resructured so it perform better (like removing the "join per year")?

Thanks

|||Would partitioning by year be helpful? It seems to be a common filter.|||

You can do below query instead and there is no reason to join with Cie table if you want just CieId values and there is FK relationship between YearlyData & Cie on CieId column.

select y.CieId

from YearlyData as y

where y.Year in (2003, 2004, 2005)

group by y.CieId

having max(case y.Year when 2005 then NetIncome end) > 25000

and max(case y.Year when 2005 then Revenue end) > 100000

and max(case y.Year when 2004 then Reveue end) > 95000

and max(case y.Year when 2003 then Reveue end) > 90000

and max(case y.Year when 2005 then Revenue end) > max(case y.Year when 2004 then Reveue end)

This query will provide best performance if there is an index on Year or (Year, CieId). You seem to have primary key on (CieId, Year) which will not help for this particular query resulting in a table/index scan.

|||

Math:

Both ideas help. When I ran Umachandar's query it reduced the logical IOs from about 10000 to about 3200, reduced alpha read time to about 4600 ms and reduced beta read time to around 420 ms. When I then partitioned the data on year logical IO was further reduced from 3200 to about 500, alpha read time from 4600ms to about 3200ms and beta read time from 420ms to about 380 ms.


Dave

|||

Both idea looks good, I will see if this query structure is compatible with all my test case and keep you inform.

Thank you for your help.

Dynamic Login & User Creation

Hello. I'm trying to create a new login and username inside a trigger using variables.

This code works:

create login testUserName with password = 'testPassword'

The problem comes when I try to use variables for the username and password like this.

create login @.username with password = @.password

Does anybody know how to get around this problem?

BTW, the error message it gives is this, but I really doubt that semicolons have anything to do with it. If I literally type my data in the create login call it works fine, but when I use variables it doesn't.

Msg 102, Level 15, State 1, Line 14

Incorrect syntax near '@.username'.

Msg 319, Level 15, State 1, Line 14

Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

SQL Server doesn't allow you to specify variables in most DDL statements. So the only way is to form the CREATE LOGIN statement as a string and execute it using dynamic SQL. See the EXECUTE topic in Books Online for more details on how to execute SQL statements dynamically.|||


This doesn′t work unless you wrap it in dynamic SQL:

DECLARE @.SQLString VARCHAR(400)
SET @.SQLString = 'CREATE LOGIN ' + @.USERNAME + WITH PASSWORD ' + @.PASSWORD
EXEC(@.SQLSTRING)


HTH, Jens Suessmeyer.


http://www.sqlserver2005.de


|||

Thanks a lot! Just in case anybody else has this problem, here's some code that does what I wanted.

declare @.USERNAME varchar(50);

declare @.PASSWORD varchar(50);

set @.USERNAME = 'testUserName2';

set @.PASSWORD = 'testPassword';

DECLARE @.SQLString VARCHAR(400)

SET @.SQLString = 'CREATE LOGIN ' + @.USERNAME + ' WITH PASSWORD = ' + CHAR(39) + @.PASSWORD + CHAR(39)

EXEC(@.SQLSTRING)

|||

You need to protect the dynamic SQL against SQL injection attacks. So you need to quote the login name which is an identifier otherwise potentially someone could provide a malicious login name which can be used to do attack the database. The password part is hard to protect since it is just a string. So you will have to validate it for certain characters in the front-end.

declare @.USERNAME varchar(50);

declare @.PASSWORD varchar(50);

set @.USERNAME = quotename('testUserName2'); -- Use quotename to form the identifier

set @.PASSWORD = 'testPassword';

DECLARE @.SQLString VARCHAR(400)

SET @.SQLString = 'CREATE LOGIN ' + @.USERNAME + ' WITH PASSWORD = ' + CHAR(39) + @.PASSWORD + CHAR(39)

EXEC(@.SQLSTRING)

|||Thanks for the tip. We're currently protecting against it on the front end but I recently heard there are steps I can take in the database for protection, so I'll have to look into that. Thanks.

Monday, March 19, 2012

Dynamic Hyperlink

I've created a simple report that lists out Invoice numbers and Invoice
Titles. When a user clicks the Title, I want the user to be sent to a page
that gives details for that Title.
The syntax needs to be like:
http://servername/details.aspx?ID=123
The ID parameter needs to dynamically change to match the Invoice number for
that Title. The closest I've gotten is:
http://servername/details.aspx?ID=Fields!Invoice.Value
Which (of course) throws an error in the browser when you click the link.
Any ideas how I can do this? Thanks for your help.
MikeFirst, there are two ways to do this. Jump to Report and Jump to URL. Jump
to Report is the easiest. Click on the field, properties,advanced,
navigation. Pick Jump to Report and then set the parameter mapping for it.
Now, if you are going to a non-report page (which is what it seems you want
to do) then you need to use the jump to URL. This is an expression so you
would put in this:
="http://servername/details.aspx?ID=" & Fields!Invoice.Value
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Wisconsin Mike" <WisconsinMike@.discussions.microsoft.com> wrote in message
news:42BEF1D5-46D3-47C8-ABC3-77297BE21890@.microsoft.com...
> I've created a simple report that lists out Invoice numbers and Invoice
> Titles. When a user clicks the Title, I want the user to be sent to a
page
> that gives details for that Title.
> The syntax needs to be like:
> http://servername/details.aspx?ID=123
> The ID parameter needs to dynamically change to match the Invoice number
for
> that Title. The closest I've gotten is:
> http://servername/details.aspx?ID=Fields!Invoice.Value
> Which (of course) throws an error in the browser when you click the link.
> Any ideas how I can do this? Thanks for your help.
> Mike|||Thanks, Bruce! I was missing the equals sign at the beginning of my
expression and the quotes around the url. Works great.
"Bruce L-C [MVP]" wrote:
> First, there are two ways to do this. Jump to Report and Jump to URL. Jump
> to Report is the easiest. Click on the field, properties,advanced,
> navigation. Pick Jump to Report and then set the parameter mapping for it.
> Now, if you are going to a non-report page (which is what it seems you want
> to do) then you need to use the jump to URL. This is an expression so you
> would put in this:
> ="http://servername/details.aspx?ID=" & Fields!Invoice.Value
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Wisconsin Mike" <WisconsinMike@.discussions.microsoft.com> wrote in message
> news:42BEF1D5-46D3-47C8-ABC3-77297BE21890@.microsoft.com...
> > I've created a simple report that lists out Invoice numbers and Invoice
> > Titles. When a user clicks the Title, I want the user to be sent to a
> page
> > that gives details for that Title.
> >
> > The syntax needs to be like:
> >
> > http://servername/details.aspx?ID=123
> >
> > The ID parameter needs to dynamically change to match the Invoice number
> for
> > that Title. The closest I've gotten is:
> >
> > http://servername/details.aspx?ID=Fields!Invoice.Value
> >
> > Which (of course) throws an error in the browser when you click the link.
> > Any ideas how I can do this? Thanks for your help.
> >
> > Mike
>
>

Dynamic Graphs

I want let the end user decide on which type of graphic(via a report
parameter) is used for displaying the data (Bar, Column, 2D, 3D, etc.) I
couldn't find any option to define the chart type e.g. with the aid of an
expression. Do I have to place any possible chart type in my report layout
and control the appearance by defining an expression for the 'visibility'
property?Niklas,
You can't do it with an expression. Instead, the option I would go for is
building a custom app to get the user selection and update the report RDL.
--
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/
---
"Niklas" <Niklas@.discussions.microsoft.com> wrote in message
news:AAF771C4-37F6-4D94-8C77-21B8792FA6EC@.microsoft.com...
> I want let the end user decide on which type of graphic(via a report
> parameter) is used for displaying the data (Bar, Column, 2D, 3D, etc.) I
> couldn't find any option to define the chart type e.g. with the aid of an
> expression. Do I have to place any possible chart type in my report layout
> and control the appearance by defining an expression for the 'visibility'
> property?|||Thanks Teo,
I often see answers, dealing with generating the RDL dynamically. Please
correct me, if I'm wrong, but I don't think this is a solution in a
multi-user environment. I need fixed RDL files, guaranteeing the same
behaviour. So, I cannot change the RDL, every time a user wants to access the
report?!?!
"Teo Lachev [MVP]" wrote:
> Niklas,
> You can't do it with an expression. Instead, the option I would go for is
> building a custom app to get the user selection and update the report RDL.
> --
> 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/
> ---
> "Niklas" <Niklas@.discussions.microsoft.com> wrote in message
> news:AAF771C4-37F6-4D94-8C77-21B8792FA6EC@.microsoft.com...
> > I want let the end user decide on which type of graphic(via a report
> > parameter) is used for displaying the data (Bar, Column, 2D, 3D, etc.) I
> > couldn't find any option to define the chart type e.g. with the aid of an
> > expression. Do I have to place any possible chart type in my report layout
> > and control the appearance by defining an expression for the 'visibility'
> > property?
>
>|||Niklas,
Not really. You basically need to generated the report RDL and upload it to
the report catalog under an unique name, e.g. the user logon id. The way I
addressed this on a similar occasion in the past was to have the report
template RDL file included in my web application. My web app will load the
template, change it as needed and upload it to the report catalog. Then, it
will render the report. Finally, when the user logs out, the web app will
purge the report.
Does this make sense?
---
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/
---
"Niklas" <Niklas@.discussions.microsoft.com> wrote in message
news:E1B5C271-5C8A-4C15-9C75-615ADFFF1678@.microsoft.com...
> Thanks Teo,
> I often see answers, dealing with generating the RDL dynamically. Please
> correct me, if I'm wrong, but I don't think this is a solution in a
> multi-user environment. I need fixed RDL files, guaranteeing the same
> behaviour. So, I cannot change the RDL, every time a user wants to access
the
> report?!?!
> "Teo Lachev [MVP]" wrote:
> > Niklas,
> >
> > You can't do it with an expression. Instead, the option I would go for
is
> > building a custom app to get the user selection and update the report
RDL.
> >
> > --
> > 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/
> > ---
> >
> > "Niklas" <Niklas@.discussions.microsoft.com> wrote in message
> > news:AAF771C4-37F6-4D94-8C77-21B8792FA6EC@.microsoft.com...
> > > I want let the end user decide on which type of graphic(via a report
> > > parameter) is used for displaying the data (Bar, Column, 2D, 3D, etc.)
I
> > > couldn't find any option to define the chart type e.g. with the aid of
an
> > > expression. Do I have to place any possible chart type in my report
layout
> > > and control the appearance by defining an expression for the
'visibility'
> > > property?
> >
> >
> >