Storing Default Parameters As User Preference
Nov 29, 2007
Need some guidelines:
I wanted to create a report with parameters. The users will access the reports via
http://localhost/Reportserver/myReportName
Now, each user will have their own default parameters and would like to be stored(somewhere!!!) as "user preference", so nexttime when they access this report it should display data with the "user preference" parameters.
Can someone give me some advise to implement this.
Many thanks.
View 5 Replies
ADVERTISEMENT
Jul 23, 2005
Hi,I am trying to call a user defined function(UDF) from a stored proc,using a default parameter in the called UDF (e.g. @bid_price_type int= 0 ). However the calling stored proc complains that the UDF isexpecting a 2nd parameter when I only provide the @test parametervalue. Are default parameter values supported in UDF's?I wld really appreciate anybody's help. Thankyou in advance.UDF code:CREATE FUNCTION get_bid_price (@test int, @bid_price_type int = 0)RETURNS decimal(18, 4) ASBEGINdeclare @x decimal(18, 4)if (@bid_price_type = 0)beginselect @x = fieldNamefromtableNameendelsebeginselect @x = fieldName2fromtableName2endreturn @xEND' Calling Stored Proc codeCREATE PROCEDURE testASdeclare @x decimal(18, 4)set @x = dbo.get_bid_price(1)select @xGOthanks,Vic Y
View 2 Replies
View Related
Mar 3, 2008
Cannot open user default database. Login failed.Login failed for user
'NT AUTHORITYNETWORK SERVICE'. Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. Exception Details:
System.Data.SqlClient.SqlException: Cannot open user default database. Login
failed.Login failed for user 'NT AUTHORITYNETWORK SERVICE'. I have This Error When i try to log into My online web site, i have no idea how to fix it,one day it was working and the next it wasnt, is there any way to find out what database the default is and if it's either incorrect or not present change the web.config in a way that will make my system work. i have the NT Authority/Network Service in my Server Properties Permissions, its given the type login and is granted Connect SQL by sa i have 3 colder copies of the web site on my server my question is, how would i use of of these to restore the original site configuration is there a way to restore the original configuration to undo whatever it is i've done to break the system ChrisStressed
View 3 Replies
View Related
Apr 25, 2007
Hi, I'm new to SQL Express 2005.
I found information regarding : "Cannot open user default database. Login failed."on this forum but I think that in my case it's a bit different issue.
I have a website (ASP.NET 2.0) accessing DB, in the mean time Windows Service tries to update some data in the same DB (Service runs as NT AUTHORITYLOCAL SYSTEM). The second connection is rejected: "Cannot open user default database. Login failed.Login failed for user ....".
Problem occurs only when both: service and website are running at the same time. So service and website are running without problems when they are connecting DB exclusively.
My connection string is:
"Data Source=.SQLEXPRESS;AttachDbFilename="|DataDirectory|spider-lab.mdf";Integrated Security=True;User Instance=True"
I would be grateful if you can help me
View 1 Replies
View Related
Jul 21, 2015
Running a report on sqlserver RS 2008 R2 that uses a data source that looks at a database on a sql express 2012 server.
I can run the report in preview mode from bits on the sql 2008 r2 server.
I have tested the connection of the deployed data source on the sql 2008 R2 reporting services web page and connection has been successful.
I can logon to sql express 2012 using management studio and logon as the user and access the database run stored procedures etc.
windows server 2003, sql server 2008 R2 reporting services server.
windows server 2012 sql express 2012 data source database location.
View 13 Replies
View Related
Jan 15, 2004
Hi,
I'm sorry if this is simple, I'm no DBA but have been tasked with solving this problem...
We have a website that connects via ODBC to SQL Server (2k sp1) and at the moment I am getting back about every other time:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open user default database. Login failed.
So this is NOT happening every single time. Now I have seen Microsoft KB - 307864 and I can see that none of the databases are marked as suspect, the database I am trying to connect to does exist and is attached and, I have run the command to switch the database to multi-user mode.
The probable cause of this problem is that a while ago we had a hard-drive failure and I was forced to reattach some old datafiles (mdf,ldf) as the database. This seemed ok and I can view data etc in enterprise manager no problem.
I have checked for orphaned users and the user I am logging in with from the webpage is not listed.
So does anyone have a clue as to why this is happening, and more frustratingly for me, why is it only happening some of the time.
Thanks for your help, appreciated.
James.
View 9 Replies
View Related
Sep 9, 2015
I'm trying to set up a statement that gives me a field called 'BINNO' if the payor = Commercial. But, I have a few customers that don't have Commercial. They have a Payor of Grant or Part D. How would I set up a statement that looks for Commerical 1st...then Grant or Part D. I started with this
case when inscomp.payor = 'COMMERCIAL' then INSCOMP.BINNO
View 9 Replies
View Related
Mar 20, 2008
I want to the T-SQL command for storin user IPaddress. I know host_name() is for Host name.
Any idea about how to store user or host IP address??
Thanks in Advance..
View 2 Replies
View Related
Nov 5, 2013
I am trying to classify a customer's order method preference based on their history. My source table has every order, order method, date, etc.
The logic is:
If only one order method, that is their preference>1 order method, the majority is their preferenceif 50/50 split, the order method with the mose recent order is the preference
I then created a query to group by the customer, order method, and max(date):
[URL]
I am having trouble though, creating a query that applies the above logic and outputs this:[URL]
View 13 Replies
View Related
Nov 2, 2005
I know I can find out what parameters does a stored procedure have via either sp_help or INFORMATION_SCHEMA.PARAMETERS, I can get the types, the lengths or precisions ... what I do not seem to be able to get is which of those parameters are required and which ones have a default value. I mean:
CREATE PROCEDURE dbo.Foo (
@Required Int,
@Optional Int = 0
) AS ...
Is there any way to get this information (preferably together with the default value) short of parsing the output of sp_helptext?
Thanks, Jenda
View 3 Replies
View Related
Sep 28, 2007
I have a requirement like I need to have default values for all my parameters in my report. But Report should not run on the initial load. Is that possible?
View 1 Replies
View Related
Sep 28, 2007
I have a requirement like I need to have default values for all my parameters in my report. But Report should not run until i click the view report button.Currently It will load the data automatically on initial load when all the parameters are provided. Is that possible to restrict load of report data?
View 1 Replies
View Related
Feb 6, 2007
Hi there,
In my report, I have set the default parameters such that it is supposed to automatically render when the page loads. I have set the defaults in Report / Report Parameters and it even works in the preview pane, however, when I deploy the report, the defaults are not set.
This report has subreports, and I've tried setting their defaults. Has anyone come across this?
Thanks, LBD
View 6 Replies
View Related
Jul 20, 2005
I've looked all over but can't find a solid answer. I've got afunction that runs from a View and when the function runs the firsttime it is calculating a Temperature for a group of Formulas. What Iwant to do is calculate this temperature in the UDF on the first passand store it somewhere (table, global variable etc.). On everyexecution after that I'd like to use the value stored so I don't haveto recalculate the value again for the specific group defined.I've looked at storing the data in a table from the UDF but UDF'sdon't support dynamic SQL statements and can't run a stored procedure.The key here is we have a view that calls a UDF (user-definedfunction). Using SQL 2000.Any ideas would be very helpful. Thanks.
View 2 Replies
View Related
Nov 22, 2007
i'm using the Enterpirse library logger to write logs into a database.
When choosing connection string i choose the database i want in the "connection properties" dialog box and
push 'Test connection' button.
everything goes well.
then i open the SQL Server Management studio express and connect to the databse to check some things,
from that point on , when i push the 'Test Connection' button in the Enterprise library i get the error:
"cannot open user default database. Login failed. login failed for user My'server/MyuserName'"
even when i close the sql server manager , it is still stuck - the connection test doesn't work anymore....
it only work when i restart the computer.
why ?
View 3 Replies
View Related
Apr 4, 2008
Hi all,
I have a MDX query that has been put together from a Analysis Services Cube in Reporting Services, as below:
SELECT NON EMPTY { [Measures].[MM Document Count], [Measures].[FI Document Total], [Measures].[MM Document Total], [Measures].[FI Document Count] } ON COLUMNS, NON EMPTY { ([Lookup Company Code].[Company Code].[Company Code].ALLMEMBERS * [Lookup Financial Period].[Financial Year].[Financial Year].ALLMEMBERS * [Lookup Financial Period].[Financial Period].[Financial Period].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( STRTOSET(@LookupCompanyCodeCompanyCode, CONSTRAINED) ) ON COLUMNS FROM [SAP Document Analysis Doc Totals MM FI]) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGSIt has a parameters @LookupCompanyCodeCompanyCode, which creates the following dataset query:
WITH MEMBER [Measures].[ParameterCaption] AS '[Lookup Company Code].[Company Code].CURRENTMEMBER.MEMBER_CAPTION' MEMBER [Measures].[ParameterValue] AS '[Lookup Company Code].[Company Code].CURRENTMEMBER.UNIQUENAME' MEMBER [Measures].[ParameterLevel] AS '[Lookup Company Code].[Company Code].CURRENTMEMBER.LEVEL.ORDINAL' SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , [Lookup Company Code].[Company Code].ALLMEMBERS ON ROWS FROM [SAP Document Analysis Doc Totals MM FI]
Within the Report Parameters it is set with as being a Multi value parameter and default value for return all records: [Lookup Company Code].[Company Code].[All]
This work fine when previewing report & when I build.
Problem is when I drop a report viewer control in VWD 2005 and attach this report, it does not run with the default values when the page loads.
Does anyone have a idea what I might be doing wrong? or/and how would i pass a value from a listbox extbox to the parameter and then run the report?
Thanks in advance
Kevin
View 2 Replies
View Related
Feb 8, 2005
When I call a proc with one input parameter and two output parameters, (all the three parameters having defaults in the proc), I was expecting to see these values defaulted to in the proc. But apparently, this not the case. Could someone tell me what am I doing wrong here? Appreciate your time.
USE Pubs
GO
CREATE PROCEDURE dbo.MyTestProc
(@InputParamVARCHAR(30) = 'Input',
@OutPutParam1VARCHAR(30) = 'OutputParam1' OUTPUT,
@OutPutParam2VARCHAR(30) = 'OuputParam2' OUTPUT)
AS
BEGIN
SELECT @InputParam, @OutPutParam1, @OutPutParam2
END
GO
-- Call to the proc
USE Pubs
GO
DECLARE @I1VARCHAR(30)
DECLARE @P1VARCHAR(30)
DECLARE @P2VARCHAR(30)
SET@I1 = 'PassedInput'
EXECdbo.MyTestProc
@I1,
@P1 OUTPUT,
@P2 OUTPUT
SELECT@I1, @P1, @P2
EXEC dbo.MyTestProc
View 3 Replies
View Related
May 24, 2007
I have 9 parameters which all have defaul values and 1 that does not, 4 of them show the correct default but 5 of them state <Select a Value>.
I have copied the report project to another pc and the same problem occurs.
I have tried deleting 'reports' and 'reportserver' from iis and recreating them, as well as deleting the actual report from http://localhost/Reports/Pages/Folder.aspx [then selecting 'show details' and deleting and redeploying the report].
I have even tried toggling the default values on/off. I am at a loss, I can only think that the report project file(s) need to be manually amended in some way. There is nothing significantly different between the parameters to justify them not defaulting
View 1 Replies
View Related
Mar 5, 2007
I changed the default parameters before deploying to website
but website always display the old value of parameter
any idea about this?
thanks
View 2 Replies
View Related
Jul 23, 2005
Hello, does anyone know how to determine (within the stored procedure)whether a parameter has been passed explicitly to a stored procedure asopposed to a parameter that has taken on the default value.Many thanksPhil
View 4 Replies
View Related
Aug 25, 2006
Hi,
My report has default values for all parameters (ofcourse. which can be modified by user). When I try to view the preview, the report is running with the default values automatically. I want the report to run only when we click "View Report".
View 11 Replies
View Related
Mar 3, 2007
I have 5 cascading parameters. They all have default values. I would like the default value of each of these to be selected when the report opens.
It currently works correctly when I preview the report, however when I deploy the report to the server it does not. In the deployed report, the default value of the first parameter is not selected. However, when I select a value for this one, on postback the rest of these parameters get set to their default value. They're all configured the same. I'm confused as to why the first one doesn't default to its default value while the others do.
Got any ideas?
Here's how I have it configured:
Allow null value CHECKED
Allow blank value CHECKED
The rest are unchecked.
Available values: From query
Default Values: Non-queried with a value supplied that exists in the dataset.
View 1 Replies
View Related
Jul 26, 2006
I think it has been discussed previously that having default parameter values based on expressions, e.g. a default parameter value of =Split("Bug",",") in multiple parameters will cause a postbacl whenever a user selects different values from the list.
Is this by design? Its a bit of an annoying thing. The refreshpostback doesnt happen if you have basic defaults like ="All" but only when an expression of some sort is used in more than 1 parameter. Does RS think they are linked or something, why does it need to psotback
efresh?
View 23 Replies
View Related
Aug 1, 2006
This is regarding Report Services 2005 designing the report in Visual Studio.
Currently I am using a query to populate 2 date selectors in the parameter section at the top of a report. The start and end dates are determined by a query which returns the values based on yet another parameter. If I change the value of the paramter which is supposed to be used by the date selectors they don't seem to feel the need to re-calc themselves. I have 3 other dependent param's in the same report which behave reasonably.
Has anyone seen this before or is there way to somehow force a parameter re-caluclation?
jSiegel
View 1 Replies
View Related
Jun 6, 2007
In general, what is the most appropriate way to specify a "data driven" default for a report parameter. Seems to me like options are:
1. construct an expression which operates on one of the existing report datasets (possibly the same data set used to populate the defaults dropdown)
2. construct a new dataset which returns a single value which is the desired default
what's the "normal" approach?
For example, I have an MDX dataset which contains the list of dates for which data is available. There is generally some data available for today, but normally the user is interested in the most recent day with data prior to today.
So which would be the better option out of the two above (or a third option if I'm missing something!) to tell my parameter to set itself to:
"The most recent day prior to today for which data exists".
View 3 Replies
View Related
Mar 31, 2008
Let's say you had a User table and one of the fields was called Deceased. It's a simple closed-ended question, so a bit value could be used to satisfy the field, if the person is dead or alive. Let's say another field is called EyeColor. A person can have only one eye color and thus one answer should be stored in this value, so this is easy as well.
Now, let's say I want to store all the languages that a specific user can speak. This isn't as easy as the previous examples since it's not a yes or no or a single-value answer. I haven't had much experience with working with databases so I've come up with two possible ways with my crude knowledge hehe.
In terms of inputting the multi-answer values, I suppose I could use a multiple-selection listbox, cascading dropdowns, etc. Now, here are the 2 solutions that came to mind.....
1) Make a field called LanguagesSpoken in the User table. When I process the selections the user makes on the languages he knows, I can then insert into the LanguagesSpoken field a string "English, Spanish, Czech" or IDs corresponding to the languages like "1, 5, 12" (these IDs would be referenced from a separate table I guess). I would use commas so that later on, when I need to display a user's profile and show the user's languages, I can retrieve that long string from the LanguagesSpoken field, and parse the languages with the commas I've used. Using commas would just be a convention I use so I would know how to parse (I could have used "." or "|" or anything else I guess) the data.
2) Forget about the LanguagesSpoken field in the User table altogether, and just make a LanguagesSpoken table. A simple implementation would have 3 fields (primary key, userId, languageId). A row would associate a user with a language. So I would issue a query like "SELECT * FROM LanguagesSpoken WHERE userId=5" (where userId=5 is some user). Using this method would free me from having to store a string with delimited values into the User table and then to parse data when I need them. However, I'm not sure how efficient this method would be if the LanguagesSpoken table grows really large since the userIds would NOT be contiguous, the search might take a long time. I guess I would index the userId field in the LanguagesSpoken table for quicker access?
OR, I may be going about this the wrong way and I'm way out on left field with these 2 solutions. Is there a better way other than those 2 methods?
I haven't work extensively with databases and I'm just familiar with the basics. I'm just trying to find out the best-practice implementation for this type of situation. I'm sure in the real world, situations like this is very common and I wonder how the professionals code this.
Thanks in advance.
View 3 Replies
View Related
Jul 23, 2005
I'm generating a list of parameters needed by stored procedures, and
I'd like to know which ones have default values assigned to them.
To retrieve the parameter information I use:
sp_sproc_columns @Procedure_Name='InsertUser''
However, the column that is supposed to give the default value,
'COLUMN_DEF' always returns as NULL, even when that column has a
default value assigned to it.
i.e.
CREATE PROCEDURE InsertUser@UserID INT = 10,.....
And then if I do a sp_sproc_columns @Procedure_Name='InsertUser'', the COLUMN_DEF value for the @UserID column is still NULL.
Does anyone know what I'm doing wrong and how I can retrieve the default value?
Thanks
View 1 Replies
View Related
Apr 26, 2007
I have created a report, and am setting default values for the parameters. Once the default parameters is set, the report automatically generates. Is there a way to make it not automatically generate the report? We are setting the parameters with values that will get the end user the most recent data, but alot of times, they will want to pull older data as well. We don't want them to have to wait for the report to automatically generate before they can change the parameter values
View 1 Replies
View Related
Nov 10, 2006
If all the parameters for a report have default values, the report runs automatically as soon as you open it. Is there a way to prevent this?
View 9 Replies
View Related
May 12, 2015
I'm trying to have a default or null value in the dropdown list of the parameters on SSRS report. The dataset is bound with the Dynamics-AX 2009 AOT query. In the screen shot below you can see that I need a show All option in the dropdown list.
View 7 Replies
View Related
Feb 28, 2007
I wrote a report in Visual Studio with some parameters that I gave default values to in the report definition. I deployed it out to the report server and when I look at the report Properties, Parameters section to see the default values. Instead of seeing all of the default values, I see a bunch of "Override Default" buttons. When you click the buttons, you get a blank text box in which to enter a new value.
Someone before me created a report with default values and the parameters section of that report has text boxes with the default values in them.
Does anyone know how to have the default values show up rather than those "Override Default" buttons?
Thanks.
View 12 Replies
View Related
Oct 23, 2007
HI,
I am trying to set the following default parameter : datepart("m",now()). The parameter is an integer
If I do this through visual studio 2005 it works just fine.
However I need to change this for a linked report and when I do the same thing in the viewer (using the "Overide Default" key) I get the following error
"The parameter Month contains a value that is not valid. This parameter takes an integer as a value"
Can anyone suggest a way to get arround this ?
View 2 Replies
View Related
Feb 15, 2007
Can someone please explain how i would define a multi-valued default parameter within the report Properties -> Parameters. I have an OLAP based report with multi-value parameters. I do not want to set the default values from within BIDS. Instead, I'd like to do this from the ReportServer (after report deployment). I have no problem when i enter a single value as a 'default value', for example:
ReportParm1 String [Deal Dim].[Shelf].&[AAM]
But, how would i define it with multiple values as a 'default value' ?, for example:
ReportParm1 String [Deal Dim].[Shelf].&[ABC] , [Deal Dim].[Shelf].&[DEF]
NOTE: It appears that you cannot use expressions, such as the 'split' function in the 'default value' space.
Any help would be greatly appreciated.
thank you.
View 1 Replies
View Related