Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Setting Dynamic Default Parameter In Dropdown Based On MDX Query


I have a parameter list that is built using an MDX query. I would like to set the default value to the current month. Here is the MDX used.

 




Code Snippet

WITH

MEMBER [Measures].[ParameterCaption] AS '[Time].[Month].CURRENTMEMBER.MEMBER_CAPTION'

MEMBER [Measures].[ParameterValue] AS '[Time].[Month].CURRENTMEMBER.UNIQUENAME'

MEMBER [Measures].[ParameterLevel] AS '[Time].[Month].CURRENTMEMBER.LEVEL.ORDINAL'

SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , [Time].[Month].ALLMEMBERS ON ROWS FROM ( SELECT ( STRTOSET(@TimeYear, CONSTRAINED) ) ON COLUMNS FROM [Pink Flag])

 



 

 Any help would be appreciated. I have tried to set an expression to build a string that matches the result.

 

Thanks

Jason




View Complete Forum Thread with Replies

Related Forum Messages:
Setting Parameter Value Based On Matrix Column
Hello all.

I am on the verge of being able to do exactly what I want, but just can't seem to find the right combination of things to do it.  I'm sure all of you wonderful folks will be able to point it out to me immediately, but I've been looking at it too long or something....


I have a record of individual sales with the state, and quarter of the sale.

sale_id   state   quarter
001         NY   2005Q1
003         WI   2006Q2
etc.


I create a report with a matrix to show count(sale_id) with Quarter as the column group and State as the row group.  This works fine.

Now what I want to do is to get percentages based on quarterly sales.  In other words, what percent of sales for 2005Q1 in NY vs. all sales in 2005Q1.  So I create a second dataset (called total) with an SQL query like so:

SELECT count(sale_id)
FROM data_table
WHERE quarter = @QueryQuarter

Now, back in the matrix I want to use the column that we're in (2005Q1, 2005Q2, etc.) as the value that is passed to this query.

This is a simple concept, but I can't seem to figure out the correct call to pass the column group to the query as the parameter.

Thank you for any pointers you might be able to give.  As I said, I'm right on the verge and just can't quite get it.

  cmk

View Replies !
Setting Default Value Of A Report Parameter Dynamically
Hi all,

Does sombody have experience on dynamically set or change the default value of a report parameter?

Assuming: report parameters p1, p2, p3, p4 have been set up(and have their default value 'all') with the creation of the report1; report browseing is through reportviewer that embedded in the web application; datasource is datacube

What I want to do: based on the login user of the my web application, set default value of p1 as the user's username.

What I did is:

Microsoft.Reporting.WebForms.ReportParameter reportParam = new Microsoft.Reporting.WebForms.ReportParameter("P1","Mary");

ReportViewer1.ServerReport.SetParameters(new Microsoft.Reporting.WebForms.ReportParameter []{ reportParam });

what I got when reveiw the report:

P1 has no default value, and p2, p3, p4 greyed and could not choose value from them.

Any idea and suggestion will be pre-appreciated!

Jone

 

View Replies !
Setting Select Parameter Based On Config File
Hi everybody,
Is there a way to set SelectParameter for SQLDataSource in ASPX file using System.Configuration.ConfigurationManager.AppSettings["SiteID"]) ?
Thanks a lot in advance. 

View Replies !
Setting The Default To &&<Select All&&> In Multivalue Parameter List
How can I set the multivalue parameter list's default option to <Select All> ?

View Replies !
Dynamic Default Value For Parameter In OLAP Report
I'm trying to set up a parameter report from a OLAP cube. I need 3 dynamic parameters(ThisYear, ThisMonth, YESTERDAY).

 

THISYEAR:       =CStr(DatePart("yyyy",Today()))

THISWEEK:     =CSTR(DATEPART("ww",Today()))

YESTERDAY:  =CSTR(Datepart("d", Today().AddDays(-1)))

 

So far so good. I want to send this report by email everyday, so I need to set these parameters as a default value. This is where I run into problems.

When I add any of these parameters I get the following error "The restrictions by the CONSTRAINED flag in the STRTOSET function were violated".  This problem occur when I choose NON-queried under Report->Report Parameters, and set a default value for THISYEAR under DEFAULT VALUES

=CStr(DatePart("yyyy",Today()))

 

Hope someone found a way around this problem.

 

Thanks in advance!

View Replies !
Dynamic Default Value For Parameter In OLAP Report
I have a basic SSRS report against an SSAS database with a "start date" parameter.  I want to set the default value of that date parameter to Today's date.  What is the easiest way to do this?  I have no problem doing it against a relational source, just haven't done it against an OLAP source.

Thanks for any ideas.

 -Josh R.

View Replies !
How To Populate A Dropdown Box Based On SQL Data?
How can I populate options in a dropdown (combo?) box based on data pulled from a SQL database compared against certain paramaters (if it is not equal to x, equal to y, etc)?

Thanks.

View Replies !
Declare Cursor Based On Dynamic Query
Hi,

I am declaring the cursor based on a query which is generated dynamically. but it is not working

 

Declare @tempSQL varchar(1000)

--- This query will be generated based on my other conditon and will be stored in a variable

set @tempsql = 'select * from orders'

declare cursor test for @tempsql

open test

 

This code is not working.

 

please suggest

 

Nitin

View Replies !
Building Dynamic Query Based On Dropdownlist Contents
Thanks in advance for taking the tiemt o read this post:
 
I am workingon an application in vb.net 2008 and I have 5 drop down lists on my page.
I have code that worked in .net 2005 for my databind but would like to use new features in 08 to do this same thing.
Here is my 05 code how would I do this same things in 08?
 Dim db As New DataIDataContext
Dim GlobalSQLstr As String
GlobalSQLstr = "select Orig_City, ecckt, typeflag, StrippedEcckt, CleanEcckt, ManualEcckt, Switch, Vendor, FP_ID, order_class, Line_type, id from goode2 where 1=1"
If (ddlOrigCity.SelectedValue <> "") Then
GlobalSQLstr &= "and Orig_City = '" & ddlOrigCity.SelectedValue & "'"
End If
If (ddlSwitch.SelectedValue <> "") Then
GlobalSQLstr &= "and switch = '" & ddlSwitch.SelectedValue & "'"
End If
If (ddlType.SelectedValue <> "") Then
GlobalSQLstr &= "and Order_Class = '" & ddlType.SelectedValue & "'"
End If
If (ddlFormatType.SelectedValue <> "9") Then
GlobalSQLstr &= "and typeflag = '" & ddlFormatType.SelectedValue & "'"
End If
If (ddlVendor.SelectedValue <> "") Then
GlobalSQLstr &= "and Vendor = '" & ddlVendor.SelectedValue & "'"
End IfDim AllSearch = From A In db.GoodEcckts2s
If (ddlErrorType.SelectedValue <> "0") Then
GlobalSQLstr &= "and ErrorType = '" & ddlErrorType.SelectedValue & "'"
End IfDim cmd As New SqlClient.SqlCommand
Dim rdr As SqlClient.SqlDataReaderWith cmd.Connection = New SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString1").ConnectionString)
.CommandType = Data.CommandType.Text
.CommandText = GlobalSQLstr
.Connection.Open()
rdr = .ExecuteReaderMe.gvResults.DataSource = rdrMe.gvResults.DataBind()
.Connection.Close()
.Dispose()End With
 
 
 

View Replies !
Changing The MDX Query Based On A I/P Parameter. Is This Possible?
Hi

 

I am generating report with my datasource to an OLAP Cube. I have scenario that there are 2 dimension tables pointing to a single fact table. According to a user input, i have to use one dimension table and not the other and vice versa. I tried using IIF statement in the MDX query designer., but was facing errors.

First of all i want to know if this is possible and if yes, how?

Also , Is it possible to open a window form on clicking any report data

(Similar to assigning hyperlink, but i want to open a window form instead!!!)

 

 

regard

 

Sai

View Replies !
Query Parameter Based On Columnna,e...
good day dudes! here's my 2nd questione for ye'all...

my databases:

workshift
- shiftid
- shiftname
- timestart
- timeend
- flexwindow
- status

employeeplottedsched
- employeeid
- month
- year
- day1shiftid
- day2shiftid
- day3shiftid
...
...
...
- day29shiftid
- day30shiftid
- day31shiftid

how can I query the plotted shift sched of employees for a particular day? like I would like to know what shift the employees were scheduled
from day1 to 15 of May 2008? the days that I would like to query would be dynamic so it can be day1 to 15 or day3 to day5 or just day20...

any of you guys nice enough to enlighten me?


U + U + D + D + L + R + L + R + Sel + Start...

View Replies !
Using Prompt Parameter Into SSRS Report Based On Sql Query
Hi All,

I have a question regarding how to use report prompts in SSRS reports that are based on SQL queries.
When I added the prompt into the query for use as a filter value, it says that there is an error.
It does not recognise the '!' inside the parameter prompt string. Example is parameter!month_prompt.Value, which the ! is not recognised.

Your help is much appreciated.

Thanks & Regards,
Mohd Fadzli

View Replies !
Dynamic MDX Query With MultiValue Parameter
 

Hi,
     I have a query like
 

SELECT

{[Measures].Members} on 0,

FILTER([Uri].[Uri].MEMBERS,

VBA!INSTR(1, Uri.CURRENTMEMBER.NAME, "/startersite/test.aspx") > 0

)

ON 1

FROM [Page Usage]

WHERE ([Is Request].[All IsRequest].[1])

 
This query returns me the Rows and The HitCount over the rows which starts with URL's like "/startersite/test.aspx"
 
Now, i want to use the same query for the Reporting services, i have this URL {"/startersite/test.aspx"}, as a multivalue parameter
that means i would like to know the Hitcount for URL SetCount like {"/startersite/test.aspx","/startersite/home.aspx"}
 
i tried writing this
 
="SELECT {[Measures].Members} on 0, FILTER([Uri].[Uri].MEMBERS, VBA!INSTR(1, Uri.CURRENTMEMBER.NAME, SELECT ( STRTOSET ( '{"
& Join(Parameters!pPageUri.Value,",") &
 "}', CONSTRAINED) ) > 0 ) ON 1 FROM [Page Usage] WHERE ([Is Request].[All IsRequest].[1])"

 
but it didn't wokred....
 
Also, if the parameter has the "/" in it, an error comes like
Parser : The syntax for '/' is inCorrect.
 
Regards
 
Brij

View Replies !
How To Limit The Select Query Result Based On Start And End Parameter
I am a newbie to SQL Server.
I have a problem, in filtering the records returned by a query.
I have a table which contains 1 million records, it has a user defined primary key which is of character type.
The problem is i need to filter the output of a select query on the table based on two parameters i send to that query.
The first parameter will be the starting row number and the second one is the ending row number.
I need a procedure to do this.

For Eg:
MyProc_GetRowsFromBigTable(startRowNo,endRowNo) should get me only the rows in the specified range.

Thanks in advance,
Raghavan.S

View Replies !
Binding Report/Field 'language' Setting To Query/Parameter Result.
Hello,
 
I have a report which displays a customers invoice, in both the companys local currency, and the customers local currency.
 
The report language is "English (United Kingdom)"
The fields showing customers currency language setting is set to something else, i.e. "France (French)" to display the Euro currency.
 
The application handles 34 currencies, the query returns the language string, ("France (French)"), to allow the report to bind its language setting to the querys output.
 
However, it doesn't work, a normal textbox will display the correct country name string, but Reporting Services cannot bind the language setting to a query result.  So I also tried setting it as a report parameter, but no joy either (all currencys revert to USD).
 
I'm using =First(Fields!curFormat.Value, "myDataSet") to bind the 'language' setting, the result of this expression returns "France (French)", which is a valid option for this language setting, as it's in the drop down list.
 
Rather than create 34 seperate reports for each currency, are there any suggestions on how to bind a fields language setting to a query result?

View Replies !
Parameter DropDown List Grayed-out
 

I am building a report with several search parameters; three of which are dropdown boxes each populated by a data set. I wanted something more user-friendly than the default "(Null)" in the dropdown, so for each data set, it returns a result set UNIONed with " N/A" to show up first as the default.
 
For some reason, when the report loads, the first dropdown populates just fine and does indeed have the default value " N/A" but the other two dropdowns are grayed-out. Until you change the first dropdown (to anything, apparently it doesn't matter what you change it to) the other two stay grayed-out. When the first is changed, the other two are populated and default to the desired " N/A" default value.
 
Why would it do this, when it didn't do it before; i.e. when the default for all of them was simply null. The dropdowns are not dependent on each other; they don't depend on other parameters for their values. Any help would be appreciated.

View Replies !
Adjusting Parameter Dropdown Width
Hi there,
May be a kind of dumb question, but I have a multi-value parameter that I would like to give users the ability to select from in a SSRS 2005 Report and I was wondering if there was a way to adjust the width of the drop down so the user wouldn't have to scroll horizontally to see a full parameter item.  It looks like it cuts off after about 30 characters.

Any help here would be appreciated.

Thanks!
Rich

View Replies !
Dynamic Query: Using Parameter As A Part Of Table Name (possible?)
 
I have 2 tables (table1KKK, table2KKK), and want to run the same query on them by using parameter with the value "1" or "2".
Is it possible to use that parameter as a part of the queried table name?
Something like (only for demonstration €“ doesn€™t work):
Select *
From table +myParameter + kkk
Thanks in advance!

View Replies !
Without Checkbox Leftside Of The Dropdown Value List Of The Parameter
Hi,

I believe somebody know the reason. Please help me on it!

I plan to pass a multivalued parameter from my web application to the server report, and let user select the value(s) from the value set. But when I run the report, there's no checkbox leftside of the values, that means user has no choice on this parameter.

Is there any way to do it?

Thanks,

Jone

View Replies !
Report Viewer Parameter Dropdown Width
Does anyone know how to control the width of the parameter dropdownlist?  If you select "Multi-value" for the parameter (non-sp1 version) the parameter list is in a dropdownlist that is manageable in size.  If you do not use the multi-value parameter, it looks like the width of the dropdownlist is determined by the width of the longest text of the returned parameters.

Is there any way to control the width of the dropdown?

Thanks

Rob

View Replies !
Removing &&<Select A Value&&> Item From The Singlevalued Parameter Dropdown
Hello All,

 

I am developing reports using SQL Reporting Services 2005. These reports have some single valued parameters and these parameters will be provided in report viewer itself. These parameters should have "All" as default.
"Select All" comes by default in Multivalue report parameter. But for single value parameter it always shows "<Select a value>"  and if the user does not select a value,it prompts for one.I need to remove <Select Value> and show "All" as default thereby user does not have to select a value.

 

I can include "All" as a part of the select query in the parameter's datasource so that it can be shown in the parameter dropdown . However, I am not sure how I can remove "<Select a value>" from the dropdown.


Does anyone have any pointers? Thanks in advance.

 







Ashish

View Replies !
Multi-value Parameter Dropdown Horizontal Scrollbar Problem
Hi,

I wonder if anyone ecountered (and successfully solved) the following problem:

I have a query-based multi-valued parameter (let's call it "A"). When query that populates the parameter returns only one value and that value is a long text, then it's almost impossible to select this value through the Report Manager UI. It's because the horizontal scrollbar covers the value.

For now I have found two workarounds to this problem:

1. Cut the lenght of the Parameter Label value (Instead of 'Large Power Transformer", I show "Large Power Tran...")

2. Make the label in the multi-value dropdown smaller by using custom style sheets for report manager. I added a "LABEL { font-size: 7pt; }" section to the Htmlviewer.css and modified the RSReportServer.config file to point to the Htmlviewer.css (for info on how to do this please see: http://msdn2.microsoft.com/en-us/library/ms345247.aspx)

So far I am using the No 2. workaround. Any other suggestions on final solution to that matter would be highly appreciated.

View Replies !
Expanding The Multi-Valued Parameter Dropdown Menu
Hello Everyone,
I am trying to expand the multi-valued parameter menu object so I can display the selection list in a more user-friendly format since the text is fairly long. If left at the default setting then I have to scroll to the right to see the complete string(s). For a single-select parameter I can just CAST the string to CHAR(100) and the menu object will expand. However, it seems that this approach is not working for multi-valued parameter menu objects.
Is this a bug in SSRS, and is there another way to accomplish this. Please let me know.
 
Thank You!!!
 

View Replies !
Multivalue Parameter Dropdown Not Working In Aspx Page
 

Hi All
i have created one report using SSRS 2005, in this report one parameter is multivalue parameter, this report preview working fine and user able to select multivalues. but the problem is i deployed this report in server and opened in client system (reports shown to user using report viewer in aspx pages), i am able to access the report but multivalue parameter dropdown is not working.
when i clicked on multivalue parameter dropdown report refreshing and remaining parameters default vaues coming up..
i am unable to find the solution
please anyone help me
 
thanks
 

View Replies !
If All Values Of Dropdown Parameter Are Selected - Show ALL In Report Header
Hi,
I have dropdown parameter with multi-values allowed.
In my report headed I want to show all the dropdown values that were checked by the user to run the report. But since there could be a couple of hundred values I want to show ALL when all the values are selected instead of listing them one by one.
How can I do that?
Thanks,

Igor

View Replies !
DateTime Parameter, Calendar Control Turn Into A Combo Dropdown Selection
I have a very strange behaviour with a DateTime parameter in Reporting Services.

I can type "=today()" as the default value in the report parameters and the calendar shows up as expected when I select preview.

If I type either "=today()" in available values for my datetime parameter or connect a dataset that return only one record the calendar disappears and a combo dropdown appears.

Are there any solutions to connect a dataset at still show the calendar control with a datetime parameter?

Hope anybody can help me.

View Replies !
Firefox In Mac Fails To Render Scrollbar In The Multi-value Parameter Dropdown List Generated By ReportViewer.
Our clients working with the Firefox browser on a Mac are unable to use the Multi-Value parameter drop down lists that the Report Viewer control generates.  Of course I realize that the multi-select dropdown lists are not really dropdown option lists using the standard HTML select tag, but are rather tables within div tags with cells that contain spans, inputs, and labels.
 
Originally the report viewer displayed these lists in the wrong position within Firefox on any platform (Mac or PC).  Furthermore, there were other visibility problems with those lists that made it virtually impossible to select a checkbox within the list.  Fortunately, Microsoft fixed this problem with the latest version of Report Viewer, which we downloaded from the following link:
http://207.46.19.190/downloads/details.aspx?FamilyID=cc96c246-61e5-4d9e-bb5f-416d75a1b9ef&displaylang=en
 
So currently we have SQL Reporting Services Report Viewer 9.0.21022.8 installed on our web server.  And the dropdown lists do appear as expected, and they work properly in Firefox on a PC.
 
But, when the control is rendered in Firefox on a Mac, the list is not scrollable.  The scroll bar that should appear on the right-hand side of the dropdown list, which would enable users to select values toward the bottom of the list, does not appear.  That scrollbar is missing in Firefox.

This is likely related to a Firefox rendering issue with the overflow:auto style.  There are numerous entries on the web that indicate Firefox for Mac has a problem with overflow:auto.  For example:
http://www.webdeveloper.com/forum/archive/index.php/t-96958.html
http://www.daniweb.com/forums/thread44144.html
http://iamthewalr.us/blog/2007/04/20/firefox-on-the-mac/#comment-2321
http://www.errorforum.com/mozilla-firefox-error/3503-will-float-mac-firefox-scrollbars-floating-pop-up-windows.html
https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=187435

 
That being the case, it seems that there should be some workaround to address this, either via a style or through some alternate control.  Or perhaps there is a property that we can apply to the ReportViewer control that I'm unaware of which addresses this.
 
If you know of a workaround, or can suggest an alternate approach that we could implement quickly, please respond. Thanks.

View Replies !
Two Parameters Question? Second Parameter Should Get Data Based On First Parameter Selection.
I have two parameters both are related to each other.

second parameter should get filled based on the selection of the first one which is project.

the first paramater is project, once the project is selected it should bring the all the contracts related to that project.

Please is it possible...

 

Thank you very much for all the helpful info.

View Replies !
OLAP Datasource: Second Parameter List To Be Filtered Based On The First Parameter
Does anyone know if this is possible right out of the box in SSRS 2005 against an OLAP data source?
 

I have several parameters. My second parameter is to be filtered based on the first parameter (kinda like cascading), but how do I do this against an OLAP data source? Lets say I have param1 and param2 in a dataset. I want Param2 to show the locations only based on what I select in Param1.
Same but a little different: I have Parameter1 and then my second parameter (Param2) is a boolean (True/False). I want to show Parameter 3/Paramater 4 based on selection of Param2 (So, if true, show Param3, if false, show Param 4) and remember we are doing this in a sequence.
 Can you do this thru SSRS? Any help would be great.
Thanks for your time in advance.
Kent

View Replies !
SSRS Toggle Parameter Between Multi-Value And Single Value Based On Another Parameter
 

I would like to be able to adjust the multi-value property of a parameter based on the value of another parameter in my report. The controlling paramter would be binary with two options for Single or Multiple selection. I would like my parameter to default to multi-value, which I can do on the screen selection. I have tried to add an IIF statement to the XML code, with no success. Any ideas would be helpful.
 
Thanks

View Replies !
Is It Possible To Dynamically Populate A Parameter List With Values Based On Another Parameter Value?
Is it possible to fill a parameter list with values based on another parameter value?
Here's what I have so far (which hasn't worked)...
I'd like to generate a report listing information for a student.  The report viewer would first select a school from the first drop-down menu, and then the second drop-down menu would populate with the list of students at that school.
I have a dataset that calls a sp which returns a list of schools (SchoolID and SchoolName fields from the database table).
I have another dataset that calls a sp (with SchoolID as the parameter) which returns a list of students for that school.
Both datasets return the appropriate data when tested individually, but when I set up the Report Parameters and build the report, these errors come up...
The value expression for the query parameter '@SchoolID' refers to a non-existing report parameter 'SchoolID'.
The report parameter 'Student' has a DefaultValue or a ValidValue that depends on the report parameter "SchoolID".  Forward dependencies are not valid.
...Is it possible for the reoprt to generate a list of available parameter values based on the value selected for another parameter?
Any help you can give me would be great!!  Thank you

View Replies !
How To Use Default Parameter Values With A Date Parameter From A Cube/Reducing Parameters
 

Hi,
 
I have parameters in my report. The user can choose the year, month and date (3 parameters).
Now I want to set default vaules for the parameters , so that the user sees the report for example for the current day without selecting the parameters. I tried to set the type of the parameters to DateTime and the default value for example for the year to "=Today().Year" . But when I execute the report an error occures . Something like : no validValue for this parameter.
 
My Attributes for the year month and date are from an Analyis Services Cube from a Server Time dimension .
Does somebody know how to make it possible to set default values for this parameters?

 
 
Other question :
 
Does somebody know how I can reduce the values for a parameter. For Example I have a parameter "year" from a server time dimension from a cube. The values which are available are "Year 2004", "Year 2005", "Year 2006", "Year 2007".
But I want that the user only can choose "Year 2006" or "Year 2007" ant not every Year or "All".
Or Other Example: The User should only choose a Date that is int the past or Today but not a Date in the future.
 
 
Thanks !
 
JF

View Replies !
Default Parameter Value Is No Longer Part Of Cascading Parameter In SSRS 2005?
Hi,

I need "conditional" cascading parameters: In Report Manager when one changes parameter 1, parameter 2 get changed based on parameter 1.  Optionally, one can also enter values to parameter 2 directly.

I was able to achieve this in SSRS 2000 (SP2) with the following setups.  SSRS 2005 and SP1 no longer works - Parameter 2 always shows its default value regardless whether one select a value in Parameter 1 or not.

Parameter 1
  available values: from query
  default values: non query (specify a value "<None>")
Parameter 2
  available values: Non query (no value specified)
  default values: from query (based on Parameter 1)

It seems to me that the default value in SSRS 2000 is considered as cascading parameter.  But it is no longer the case in SSRS 2005.

Is this a SSRS 2005 bug?  is there any other work arounds or suggestions?

Thanks.

Kong

View Replies !
&&"Select All&&" As Default For A Multi-value Parameter Which Source Is Non-query
Hi, I have report parameter and its values are static lik (ABC, DEF, GHI ) etc.  I want to select all as a default for this parameter. How I can do this?

View Replies !
In 2000 Is It Possible To List Second Parameter Based On The First Parameter Selection
Hi

In 2000 is it possible to list second parameter based on selection

in the first parameter list

Cheers

View Replies !
T-SQL Setting Default Value
I have the following to create a new table....
CREATE TABLE dbo.test (Id varchar(20) NOT NULL PRIMARY KEY,    Name varchar(256) NOT NULL,    visible bit NOT NULL                                          )
 
I need to set the default value of the bit visible to 1.
How can this be done using a T-SQL statement?
Thanks,
Zath

View Replies !
Setting Default
Hi all:

How can I change the Default value of a column in a table using sql?
for instance I have a table called Phone and I have a field called AreaCode and the default now is '123' . I would like to change it to '456'.

Thanks,
Nisha

View Replies !
Setting Default Value
hi

i have to add a column of date datatype and i want to set the default value to getdate(). how to do this using sql script.

thanks

suji

View Replies !
Report Based On Filtered Query OR Based On Custom Query
adp on SLQ7

What would be wise to do.

I'm creating a report based on two inner joined tables and i've got a total sum field for each line in the report. (Price * Ordered)

This results in the following sql statement:

Code:


sqlStr = "SELECT *, [Table1].Ordered * [Table1].Price AS LineTotal FROM [Table1] INNER JOIN [Table2] ON [Table1].RecieptNumber = [Table2].Number WHERE ([Table1].RecieptNumber = " & varNumber & ")"



I think I have a few options now.

1. Leave the varNumber out of the query, and save it as a regular query. And now filter the report on varNumber.

2. Write the constructed query with createquerydef to eg. "TmpQueryForReport" And set the reports recordsource fixed to TmpQueryForReport.

3. Set the recordsource of the report to constructed sqlStr on Report_open()

---------------------

Option 1, I got this working but when the database grows (and it will) this might get awfully slow.

Option 2
I had this working before i switched to using MSSQL server 7.00
After the switch i thought, this might be a problem with giving db access rights cause the users might need write rights to the db.

Option 3. Fast and easy???

Option 4 Stored procedures???

View Replies !
Subreports: Parameter Value Dropdown Shows Sum And Count Fields But Not The Actual Data Fields.
 
I have just started using SQL Server reporting services and am stuck with creating subreports.
 
I have a added a sub report to the main report. When I right click on the sub report, go to properties -> Parameters, and click on the dropdown for Parameter Value, I see all Sum and Count fields but not the data fields.
 
For example, In the dropdownlist for the Parameter value, I see Sum(Fields!TASK_ID.Value, "AppTest"), Count(Fields!TASK_NAME.Value, "CammpTest") but not Fields!TASK_NAME.Value, Fields!TASK_ID.Value which are the fields retrieved from the dataset assigned to the subreport.
 
When I manually change the parameter value to Fields!TASK_ID.Value, and try to preview the report, I get Error: Subreport could not be shown. I have no idea what the underlying issue is but am guessing that it's because the field - Fields!TASK_ID.Value is not in the dropdown but am trying to link the main report and sub report with this field.
 
Am I missing something here? Any help is appreciated.
 
Thanks,
Sirisha

View Replies !
DBs Not Appearing In Query Analyer Dropdown
A couple of databases on one of our SQL Servers is missing in the dbdropdown in query analyzer.Does anyone know what I need to update to sync this with the actualdatabases?Thanks,Burt

View Replies !
SQL Default Language Setting
Hi there,

Can someone help me with to change my default language to British English with date format DMY. Now, I ran this command:

exec sp_configure 'default language',23
reconfigure

And I got this message:

DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Configuration option 'default language' changed from 0 to 23. Run the RECONFIGURE statement to install.

Then I ran this command:

RECONFIGURE
EXEC sp_configure

But when I check the properties of my server, it still displays my language setting as English (United States) with dateformat MDY - although my language setting in system tables show British.

Thanx

View Replies !
SQL DSN Losing Default DB Setting?
This isn't really DB related, except for the connection, but I was wondering if any of you guys had run into this before.

I have a ODBC System DSN Setup for a connection to my MSSQL2K Server. My users will occasionally lose the Default Database setting (Drop-down during DSN Setup), forcing me to go in and reset it. It's getting to be a pain in the ass and I was wonder if any of you guys had run into this before.

Thanks!
Ed

View Replies !
How To Modify Default Setting?
Hi,

I have few question:

1)Is it any methot to modify lock_timeout default value? (Default value is -1, if i want to modify default value for example 1, i try [SET lock_timeout 1;] but it only work during that session / connection)

2)Is it any method to modifyTransaction Isolation Level default value? (Default value is READ COMMITTED, if i want to modify default value for example READ UNCOMMITTED, I try [SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;], but it only work during that session / connection)

Thank you!~

View Replies !
Setting Default Values
Pardon the newbie question...but I'm trying to load a dimension table in a small data mart that has columns in it that are unique to the dimension and not sourced from any source table.  Two of those columns are date columns that I want to default to the system date and the other column I want to load with a default value.  I can't figure out how to do this within a data flow task.  The source columns flow from the input db source into a scd transform but I can't seem to edit the columns in the target table table if they don't actually come from a data source.  There doesn't seem to be a data transform object to handle this. 

Thanks.

View Replies !
Setting A Default Image
I have created an employee directory that displays a picture from a folder based on a consistent naming scheme. I need to set a default value for the picture for when a photo by that name does not exist in the folder. I've tried using both the ISNULL and ISNOTHING commands. Does anyone know how to do this?

View Replies !
Setting Default Transaction Level
is there any way I can setup the default transactional level at the Database level instead.

Such as I don't want to write the transaction isolation level at every SQL statement.

View Replies !
Restore Default Setting For MSDE
How can I restore the default setting for MSDE to have only Windows
Autentication and not mixed mode? And to have my sa account without
password? Please help me! Thanks, Nibbles

View Replies !
Setting Default Code Page
I've been reading some forums and I'm not able to get this to work. Basically I'm using an Oracle DB source and trying to import data into SQL server 2005. I guess the best connections to use are OLE DB.
 
Here are my current connections:
Source: Native OLE DBOracle Provide for OLE DB
Destination: Native OLE DBSQL Native Client
 
I'm running SP2 of SQL 2005.
 
Now, the issue is I'm not getting the code page stuff correct. In the data flow I'm just doing a OLE DB Source to SQl Server Destination. I'm not doing any transformations (I'm hoping to avoid doing that).
 
I'm getting an error:

 
[OLE DB Source [1]] Warning: Cannot retrieve the column code page info from the OLE DB provider.  If the component supports the "DefaultCodePage" property, the code page from that property will be used.  Change the value of the property if the current string code page values are incorrect.  If the component does not support the property, the code page from the component's locale ID will be used.
 
 
I'm looking at how to set the DefaultCodePage property in various forums, but nowhere does it say exactly how to do this. I've tried changing the "Extended Properties" and added AlwaysUseDefaultCodePage=TRUE in there, but that doesn't work. I've tried changing the Locale Identifier to 1252 that doesn't work. I've tried a combination of the two, doesn't work. Can somebody tell me two things:
 
1. what's the best/fastest/industry used method to get data from Oracle into SQL server via SSIS (please include the type of connections).
2. How the hell do you set the DefaultCodePage property. I would love a screenshot on this one as well.
 
 
Thanks,
Phil

View Replies !
Setting Paper Size To Be Default A4
Hi,

I have been trying to configure the Paper Size to be default "A4" instead of "Letter".
My Report is configured to 21cm x 29,7cm and margins 1,5cm.
The Body is configured to 18cm x 26,7cm.

Everything looks fine in the Preview but the Size is always "Letter". The printers are all configured for A4 printing.

Is there a way to set these default values in the Page Setup Toolbar or is it supposed to figure it out?

Thanks,
steinar

View Replies !
Setting Default While Creating Table
Hi,
 
I am having 2 tables Groups and GroupMembers table . the following are the structures for the above two tables
 
Group
---------
 
GroupID
GroupName
CashassignmentType
 
 
Groupmembers
----------------------
 
MemberID
memberName
GroupID
Payment
 
 
Group table is referenced by groupmembers table through Group ID Column
Here while i am inserting a row (member) into a Groupmembers tables i want to crosscheck with CashAssinmenttype column of Group table. if cashassignment type i want to set the payment with 0 other wise the payment specified should be inserted
 
Groupmembers.Payment                  <---> If Group.CashassignmentType=0






Then 0
Else Payment
 
 
 

I want to set this Condition while creating tables itself
 
Please let me know what could be the best option to proceed here
 
Thank you

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved