Saturday, January 31, 2015

logic implementation in sql

Hi Dre,


Does Patrick's sample query helpful for you on this issue? If the issue persists, please post the detail information about your issue, so that we can make further analysis.


Regards,




Charlie Liao

TechNet Community Support



RSReportServerNotActivated error



Dilip Patil..


Master thesis on sharepoint ( Technical )

I suggest you development of nursing system

Array ListBox


Hi All,I need some help.Original coding from crazypenny about 2 dimension array.Can Understand but difficult to manipulate.This code only count 0 to 9 not to the next step 9 again.I try to ....read items in listbox every 9 item and having smallest , bigger and same digits.


Array ListBox

A simple step, have you ever been able to get the first 9 items from that listbox or array?




remember make the reply as answer and vote the reply as helpful if it helps.


I want a Column after fix space

You are using true type font for the Output, you will never get them align in one string. You have to use a fixed width font.




Olaf Helper


[ Blog] [ Xing] [ MVP]

I want a Column after fix space

Hi Olaf Sir, can you tell me how to give fix width font in SQL , Its heading me lots of problem, I am working on this issue since yesterday, I tried to solve with different SQL Query, But i could not fix this issue.


Kindly tell me how to fix width font in SQL SERVER, Can we do so in SQL..?


I want a Column after fix space

It's not part of SQL Server to Format/Display the output, it's always the frontend. In SSMS you could change the font for the grid, or you change the result output from "Grid" to text (right click in query Editor => Result to)



; WITH cte AS
(SELECT 1 AS ID, 'Hello World' AS Comment
UNION ALL
SELECT 1000 AS ID, 'Second Line' AS Comment)
SELECT CONVERT(char(10), ID) + Comment
FROM cte;






Olaf Helper


[ Blog] [ Xing] [ MVP]

Ordering Columns in SSRS Report Builder for SQL Server 2012

Not very clear to what you want to do. Can you post some sample data from your data set and tell us what you want to display?


A Fan of SSIS, SSRS and SSAS


Ordering Columns in SSRS Report Builder for SQL Server 2012

You've sorting properties inside group. Specify order column inside sorting properties. For grouping use the actual column itself as you've now.


Please Mark This As Answer if it solved your issue

Please Vote This As Helpful if it helps to solve your issue

Visakh

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

My Wiki User Page

My MSDN Page

My Personal Blog

My Facebook Page


Frequent and immediate Local updates of Badges in windows 8.1

You're best asking such questions in a windows store apps forum where there will be more developers specialising in such things.


http://ift.tt/1zitytF




Please don't forget to upvote posts which you like and mark those which answer your question.

My latest Technet article - Dynamic XAML


Truncate Vs Delete

usually we make use of partitioning for easier deletion of data from large tables. That would be fastest and easiest method.


Wherever that is not possible we can create an index on appropriate field(s) and put a logic to do deletion within loop in small chunks.




Please Mark This As Answer if it solved your issue

Please Vote This As Helpful if it helps to solve your issue

Visakh

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

My Wiki User Page

My MSDN Page

My Personal Blog

My Facebook Page


selecting colums from different table

Hi, I have to say that you are using a strange (to me) logic.


However, I can suggest to use a CASE..WHEN (http://ift.tt/1yYchHu):



SELECT
firstname,
coursetitle,
CASE
WHEN coursecompleted=1 THEN 1
ELSE NULL
END AS pass,
CASE
WHEN coursecompleted=0 THEN 1
ELSE NULL
END AS fail
FROM test




selecting colums from different table

case totally skipped my mind. thanks

input string was not in correct format

If you want to use COUNT it should be this



=COUNT(IIF(Fields!failedcolumn.Value=0,Fields!failedcolumn.Value,Nothing))





Please Mark This As Answer if it solved your issue

Please Vote This As Helpful if it helps to solve your issue

Visakh

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

My Wiki User Page

My MSDN Page

My Personal Blog

My Facebook Page


Archive the unnecessary sites in moss !!

Hi,


I want archive the unnecessary sites in moss.


can any share power shell script.


Thank you in advance.


selecting colums from different table

Hi, let me say that you are using a strange (to me) logic.


However, I can suggest to use an CASE..WHEN (http://ift.tt/1yYchHu):



SELECT
firstname,
coursetitle,
CASE
WHEN coursecompleted=1 THEN 1
ELSE NULL
END AS pass,
CASE
WHEN coursecompleted=0 THEN 1
ELSE NULL
END AS fail
FROM test




Conflicting values for resource 'Microsoft.WindowsAzure.MobileServices.Resources/Push_NotSupportedXMLFormatAsBodyTemplateWin8

Hi Michael,


I will temporary close the question, if you still have problem with this issue, please unmark the answer with some explanation. Thanks for your understanding.


--James




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.


Conflicting values for resource 'Microsoft.WindowsAzure.MobileServices.Resources/Push_NotSupportedXMLFormatAsBodyTemplateWin8

Unfortunately, deleting the bin and obj folders didn't solve the issue. I'm going to try creating a blank app and migrating the components over to it.


Michael DiLeo


Cannot install/uninstall/debug my app

Hi,


when I was trying to install my app from Store yesterday, WP8.1 Silverlight app on Lumia 1520 with 8.1 Dev Preview, the installation got stucked and I had to restart my phone. After the restart I can no longer install this app from Store, it always ends with the same error. I cannot even install this app from Visual Studio.




Error 6Installation of the application failed. The application is already installed, or update or uninstall is running.


Note I can install and uninstall other apps from Store, another phone restart and Soft Reset has not fixed this. The app is also not listed in the installed app list.


I know that changing the app identity in manifest should work for deploying from Visual Studio, but the problem is here installation of the app from Store. I need to test the functionality of the actually published and that's not possible right now.


Is there anything I can do, is there maybe some installation cleanup utility or tool to use? Hard Reset is really not an option here since it's my primary device for daily use.


Thanks


Cannot install/uninstall/debug my app

How about a soft reset? Hold the lock button and volume down button at the same time for 5-10 seconds.


Matt Small - Microsoft Escalation Engineer - Forum Moderator

If my reply answers your question, please mark this post as answered.



NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.


Cannot install/uninstall/debug my app

Thanks for the idea, but it did not help, just like turning the phone off and on again.


Here are the screenshots, how it looks now.


Note "maybe" the Denim update for the AT&T Lumia 1520 should fix this once it's released, but right now there is nothing I can do.






input string was not in correct format


=SUM(IIF(Fields!failedcolumn.Value="0",1,0))





-Vaibhav Chaudhari


input string was not in correct format

THANKS

Issue with parameter/filter - trying to display null rows

Hello Alan,


NULL will not work in "IN" clause because SQL engine will evaluate NULL as unknown and that is the reason its not returning any null records.


There is excellent thread on StackOverflow to explain this.




Regards,

Vishal Patel

Blog: http://vspatel.co.uk

Site: http://lehrity.com


Issue with parameter/filter - trying to display null rows

SSRS will not allow you to include NULL in multi-value parameter.


Regards, RSingh


Archive the unnecessary sites in moss !!

Hi,


I want archive the unnecessary sites in moss.


can any share power shell script.


Thank you in advance.


Struggling to migrate sharepoint sites developed on dev or qa over to production

I would argue that user1 shouldn't have needed to use the dev environment at all.


also, if you look around at best practices, dev environments should be created FOR EACH DEVELOPER to avoid these types of issues. SharePoint does NOT make a happy multiple concurrent developer environment




Scott Brickey

MCTS, MCPD, MCITP

www.sbrickey.com

Strategic Data Systems - for all your SharePoint needs


Need JavaScript for Sharepoint Designer 2010, to show a Pop-up to all the users between date range and the redirect the site

Hi


check this solution


http://ift.tt/1Lvmi4l





Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.


how to display excel sheet in asp.net

Hello,


Suggest me some solution to display excel sheet in asp.net web form using c#.


thanks


Truncate Vs Delete

The fast way to delete a lot of data, but not all is to have a partitioned table or a partitioned view. But if you did not set up for that in advance, it is not going to help you know.


Deleting in batch as Stefan suggested is a good, provided that there is an index to support the condition for the deletion.


Yet an alternative is to create a new table and copy over the data you want to keep. This is a more advanced alternative, as it requires you to keep track of indexes, triggers, foreign keys and whatnots that also need to be copied.





Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Truncate Vs Delete

Hi


I have a data for year 2013, 2014 and billions of records are there. I want to delete data for 2014. If I do truncate it is going to be faster but it will delete entire data for 2013 as well which I don't want however I just wanted to know is there any alternate solution for making delete faster.




Aniruddha http://ift.tt/1y9OHsc


Sql Server 2008 R2 keeps disconnecting after a few minutes -- how can I prevent this?

Power management default is it will go sleep mode after 5 minutes if system is idle, this needs to be changed.


Thanks to see that issue is resolved.




Regards, Pradyothana DP. Please Mark This As Answer if it solved your issue. Please Mark This As Helpful if it helps to solve your issue. ========================================================== http://ift.tt/1sEFSlq


Restricted property value to list

If you want to be able to set the value of your property to only a set of predefined values at compile-time you could specify the type of the property as an enum:



public enum MyType
{
ValidValueOne,
ValidValueTwo
}

public class YourClass
{
public MyType MyProperty { get; set; }
}





If you want to restrict the values at run-time you could implement some logic in the setter of the property, e.g:



public class YourClass
{

private string _s;
public string MyProperty
{
get { return _s; }
set
{
if (value != "validvalue1" && value != "valuedvalue2")
throw new InvalidOperationException("invalid value");

_s = value;
}
}
}



Please remember to mark helpful posts as answer and/or helpful.

forward slash in regex expression

Hello all


i need a regex expression in which

1. block multiple occurrence in continuous of / (forward slash)

2. not start and end with /





i have created it is working for second point but not for first one



^[^/]([a-z0-9,-?:().'+"](?:/[a-z,-?:().'+"]+)*)*[^/]$


Restricted property value to list

How can I create a property in C# whose value can be selected only from list of predefined value?


like dir attribute in asp.net which can be selected from rtl, ltr, auto.


Join Tables to Create the Summary View

Hi All,


I'm trying to join three tables to present a summary view on the Rent Received, Payment to Supplier and Repair Cost for a property. I have attached a sample data and the view I'm trying to achieve here: http://ift.tt/1BDWhYz


I have suppliercode, prop code, month and year as common columns in the tables. When I join the tables, for some months the amounts do not appear and in certain cases the amount aggregate.


Thanks


Jag



Join Tables to Create the Summary View

Try PIVOT or Dynamic PIVOT and UNION the 3 result set. Below is an example of using PIVOT to display summary of payment to supplier.



SELECT * FROM (
SELECT [Year]
,[Month]
,[PROP_CODE]
,[SupplierCode]
,isnull(TotalPayment,0) as [TotalPayment]
,[ControlGroup]
,'Supplier Payment' as [Supplier Payment]
FROM [SQL2012EELearning].[dbo].[SupplierPayment]
) X
PIVOT
( SUM(TotalPayment) FOR [Month] IN (January,February,March,April,May,June,July,August,September,November,December)) pvt

You can append year and month to form a column. i.e FOR [Month] IN (January_2014,February_2014.....)




Regards, RSingh




Join Tables to Create the Summary View

You can try this one. The format will not be exactly same as when you create in Excel.



DECLARE @YEAR INT = 2014
;WITH CTESupplier AS (
SELECT
[Month]
,[PROP_CODE]
,isnull(TotalPayment,0) as [TotalPayment]
,'Supplier Payment' as [Fee Type]
FROM [SQL2012EELearning].[dbo].[SupplierPayment] WHERE YEAR = @YEAR
), CTESupplier_Result AS (
SELECT * FROM CTESupplier
PIVOT
(SUM(TotalPayment) FOR [Month] IN (January,February,March,April,May,June,July,August,September,November,December)) pvt
), CTERepairCost AS (
SELECT [Month]
,[PROP_CODE]
,'Repair Cost' as [Fee Type]
,isnull([AMOUNT],0) as [AMOUNT]
FROM [SQL2012EELearning].[dbo].[RepairCost] WHERE YEAR = @YEAR
), CTERepairCost_Result AS (
SELECT * FROM CTERepairCost
PIVOT
(SUM([AMOUNT]) FOR [Month] IN (January,February,March,April,May,June,July,August,September,November,December)) pvt
), CTERentReceived AS (
SELECT
[Prop Code]
,isnull([TotalPayment],0) as [TotalPayment]
,[Month]
,'Rent Received' as [Fee Type]
FROM [SQL2012EELearning].[dbo].[CustomerPayment] WHERE YEAR = @YEAR
), CTERentReceived_Result AS (
SELECT * FROM CTERentReceived
PIVOT
(SUM([TotalPayment]) FOR [Month] IN (January,February,March,April,May,June,July,August,September,November,December)) pvt
) , CTEFinal AS (
SELECT * FROM CTESupplier_Result
UNION ALL
SELECT * FROM CTERepairCost_Result
UNION ALL
SELECT * FROM CTERentReceived_Result
)
SELECT * FROM CTEFinal ORDER BY PROP_CODE







Regards, RSingh


Join Tables to Create the Summary View

Well In that case you need to manipulate in excel by creating PIVOT. If you are good in Excel you can go for it.




Regards, RSingh


Join Tables to Create the Summary View

You need to UNION in the below way. Please note the number of Select columns in each query.



SELECT [SupplierCode]
,[Prop Code]
,'Rent Received' AS [FEE TYPE]
,[TotalPayment] AS [AMOUNT]
,[Year]
,[Month]
FROM [SQL2012EELearning].[dbo].[CustomerPayment]

UNION ALL

SELECT (SELECT TOP 1 [SupplierCode] FROM [SQL2012EELearning].[dbo].[CustomerPayment] A WHERE A.[PROP CODE]=B.[PROP_CODE]) AS [SupplierCode]
,[PROP_CODE] as [Prop Code]
,'Repair Cost' AS [FEE TYPE]
,[AMOUNT]
,[Year]
,[Month]
FROM [SQL2012EELearning].[dbo].[RepairCost] B

UNION ALL

SELECT [SupplierCode]
,[PROP_CODE] as [Prop Code]
,'Supplier Payment' as [FEE TYPE]
,[TotalPayment]
,[Year]
,[Month]
FROM [SQL2012EELearning].[dbo].[SupplierPayment]





Regards, RSingh


@reference0 must be defined error message when creating parameters in for loop before SQL insert query

This is the error message I am getting:



@reference0 must be defined error message when creating parameters in for loop before SQL insert query

Have you looked at the string it produces?


There's no ; on the end of each insert.


First thing I would suggest you try is adding that on:



query +=
@"INSERT INTO waypoint
(booking_id, sequence, address, lat, lng, reference)
VALUES
((select id FROM booking WHERE reference=@reference" + i + @"),
@sequence" + i + @",
@address" + i + @",
@lat" + i + @",
@lng" + i + @",
@reference" + i + ");";

Note the ; added to the last line there.



Please don't forget to upvote posts which you like and mark those which answer your question.

My latest Technet article - Dynamic XAML


The ConnectionString property has not been initialized random error

Hi,


Can someone please help me?


I randomly get an error when running my website:


The ConnectionString property has not been initialized.


First time I run the web page it works. Second time it fails. Is this got anything to do with static methods?


This is my code in DAL layer:


ConStrings.cs



public class ConStrings
{

/// </summary>
public static string PizzaDeliveryConnectionString
{
get
{

{
// get from PL web.config
string myconnectionString = ConfigurationManager.ConnectionStrings["PizzaDeliveryConnectionString"].ConnectionString;
return myconnectionString;

}

}

}

public static SqlConnection GetPizzaDeliveryConnection()
{
return new SqlConnection(PizzaDeliveryConnectionString);
}

DLCustomer.cs



public class DLCustomer
{

static SqlConnection connString = DL.ConStrings.GetPizzaDeliveryConnection();

public static DataSet GetCustomerByPhoneNumber(string phonenumber)//static is good for returing data from db
{
DataSet ds = null;
ds = new DataSet();
try
{
using (var connection = connString)//using doesn't require connection closed
{

connection.Open();

using (SqlCommand cmd = new SqlCommand("GetCustomerByPhoneNumber", connection))
{

cmd.Connection = connection;

cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@phonenumber", phonenumber);

using (SqlDataAdapter da = new SqlDataAdapter(cmd))
{

da.Fill(ds, "CustomersTable");
}
}

return ds;

}
}

catch (SqlException ex)
{
return ds;
}

}

BUSINESS LAYER


Customer.cs



public class Customer
{

private string phonenumber;
private DL.DLCustomer customerData;
public int CustomerId { get; set; }
public string CustomerName { get; set; }


public String PhoneNumber
{
get
{
return this.phonenumber;
}
set
{
this.phonenumber = value;
if (this.PhoneNumber == "")
{
throw new Exception("Please provide Tel ...");
}

}
}

public Customer () // Default Constructor
{
//An instance of the Data access layer!
customerData = new DL.DLCustomer();
}
/// Function Find customer. Calls the
/// function in Data layer.
/// It returns the details of the customer using
/// customer ID via a Dataset to GUI tier.
/// </SUMMARY>

public static DataSet GetCustomerByPhoneNumber(Customer customer)
{
if (customer.phonenumber == "")
throw new Exception("Please provide phonenumber to search");

DataSet data = null;

data = DL.DLCustomer.GetCustomerByPhoneNumber(customer.phonenumber);

return data;
}
}

Presentation layer



protected void btnOrder_Click(object sender, EventArgs e)
{
Customer customer = new Customer();

//string dt = Request.Form[txtDate.UniqueID];
customer.PhoneNumber = txtPhoneNumber.Text;
// ClassLibrary1.DbFunc1.GetCustomerByPhoneNumber(customer) ;

rptCustomers.DataSource = Customer.GetCustomerByPhoneNumber(customer);
rptCustomers.DataBind();
}

web.config



<configuration>
<connectionStrings>
<add name="PizzaDeliveryConnectionString" connectionString="Data Source=mycomp;Initial Catalog=PizzaDelivery;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>





Issue with parameter/filter - trying to display null rows

Hello Alan,


NULL will not work in "IN" clause because SQL engine will evaluate NULL as unknown and that is the reason its not returning any null records.


There is excellent thread on StackOverflow to explain this.




Regards,

Vishal Patel

Blog: http://vspatel.co.uk

Site: http://lehrity.com


Issue with parameter/filter - trying to display null rows

SSRS will not allow you to include NULL in multi-value parameter.


Regards, RSingh


@reference0 must be defined error message when creating parameters in for loop before SQL insert query

I need to parameterise the query in the for loop, but VS2013 keeps telling me that @reference0 must be defined.



Any reason why this keeps happening?



var dbConnect = new DbConnect();
var cmd = new MySqlCommand();
dbConnect.OpenConnection();

var query =
"INSERT INTO booking (operator_id, plot_id, postcode, datetime, stops, " +
"mileage, price, passengers, name, note, phone, status, reference) " +
"VALUES (@operator_id, @plot_id, @postcode, @datetime, @stops, " +
"@mileage, @price, @passengers, @name, @note, @phone, @status, @reference);";

for (var i = 0; i < _waypointList.Count; i++)
{
query +=
@"INSERT INTO waypoint
(booking_id, sequence, address, lat, lng, reference)
VALUES
((select id FROM booking WHERE reference=@reference" + i + @"),
@sequence" + i + @",
@address" + i + @",
@lat" + i + @",
@lng" + i + @",
@reference" + i + ")";
cmd.Parameters.AddWithValue(("@reference" + i), _reference);
cmd.Parameters.AddWithValue(("@sequence" + i), i);
cmd.Parameters.AddWithValue(("@address" + i), _waypointList[i]);
cmd.Parameters.AddWithValue(("@lat" + i), _lat);
cmd.Parameters.AddWithValue(("@lng" + i), _lng);
}

Console.WriteLine(query);
cmd = new MySqlCommand(query, DbConnect.Connection);
cmd.Parameters.AddWithValue(("@operator_id"), _operatorId);
cmd.Parameters.AddWithValue(("@plot_id"), _plotId);
cmd.Parameters.AddWithValue(("@postcode"), _postcode);
cmd.Parameters.AddWithValue(("@datetime"), _datetime);
cmd.Parameters.AddWithValue(("@stops"), _stops);
cmd.Parameters.AddWithValue(("@mileage"), _mileage);
cmd.Parameters.AddWithValue(("@price"), _price);
cmd.Parameters.AddWithValue(("@passengers"), _passengers);
cmd.Parameters.AddWithValue(("@name"), _name);
cmd.Parameters.AddWithValue(("@note"), _note);
cmd.Parameters.AddWithValue(("@phone"), _phone);
cmd.Parameters.AddWithValue(("@status"), Status);
cmd.Parameters.AddWithValue(("@reference"), _reference);

cmd.ExecuteNonQuery();
dbConnect.CloseConnection();

Archive the unnecessary sites in moss !!

Hi,


I want archive the unnecessary sites in moss.


can any share power shell script.


Thank you in advance.


Struggling to migrate sharepoint sites developed on dev or qa over to production

I would argue that user1 shouldn't have needed to use the dev environment at all.


also, if you look around at best practices, dev environments should be created FOR EACH DEVELOPER to avoid these types of issues. SharePoint does NOT make a happy multiple concurrent developer environment




Scott Brickey

MCTS, MCPD, MCITP

www.sbrickey.com

Strategic Data Systems - for all your SharePoint needs


SP 2010 Redirect

hi


isn't quite the same. for chapter, you are redirecting internally, for the other one, you are redirecting outside in internet, and back to your farm


Check if DNS is configured ok and it's resolving http://ift.tt/1uLFlgi




Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.


Friday, January 30, 2015

Help Needed in Relational logic

Given the database schema and requirements you have, the code you have seems fine to me.


Tom


Join Tables to Create the Summary View

Could you help me how would UNION All work here please.


Regards,

Jag


Join Tables to Create the Summary View

Also in your query above how can I pass Month Paramater to all user to see data based on From Month and To Month. Example: if user wants to see payment from October to December.


Thanks. You are a star mate.


Is it possible to prevent OneDrive from uploading some specified files to its server?

If you don't want files uploaded to OneDrive from your app then don't save them to the OneDrive folder. The app doesn't have any knowledge or control over what happens once they've been saved.


Is it possible to prevent OneDrive from uploading some specified files to its server?

For help with user control over OneDrive check out http://ift.tt/w2JN7g or ask on the IT Pro forums on TechNet.


The way SqlLite is implemented it can only open databases in the app's install or app data directories. It cannot access a database in the document folders. Windows Store apps cannot directly share a SQLite database.


For enterprise purposes you could expose the SqlLite database through a web service or external component. See the Enterprise docs for information on enterprise specific capabilities which can help with this.


Thursday, January 29, 2015

How to format 2 Category groups in Report Builder 3

Anyone?

How to format 2 Category groups in Report Builder 3

Hi Agenteusa,


According to your description, when creating a chart with two category groups, the label for the parent category group can’t display completely.


In your scenario, the issue could cause by the length of detail category labels are short while the corresponding parent category group label is too long. One way to make parent category group labels display completely is stretching the chart to an appropriate width manually.




Also you can apply dynamic width by give parameters, please refer to the link below:


Charts with Dynamic Height or Width based on Categories/Data


If you have any question, please feel free to ask.


Best regards,

Qiuyun Yu




Qiuyun Yu

TechNet Community Support




Pivot in SSRS

You can use matrix for doing pivot in ssrs


Add a column group in matrix and add field inside it based on which you need to do the PIVOT




Please Mark This As Answer if it solved your issue

Please Vote This As Helpful if it helps to solve your issue

Visakh

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

My Wiki User Page

My MSDN Page

My Personal Blog

My Facebook Page


Power View with SharePoint 2010 SQL Server 2008 R2

hi


i want to use power view feature to generate reports.


i've following installed.


sharepoint 2010 with sp1


office professional plus 2010


sql server 2008 r2 with sp2


now please tell me what i do to use power view.


can power view be used in sharepoint 2010 with sql server 2008 r2 sp2 or i need to install sql server 2012 with sp1 if sql server 2012 needs to be installed can i directly install it will if effect my sql server 2008 r2 or sharepoint??


how to count item in listbox

Sorry,


can you give me more details


Now i am using one listbox (list of item) (listbox1)generated from bindingsource.


at the bottom of the listbox I put 2 boxes.one for count for 'ayam' (textbox1) and one for 'itik'(textbox2).


may you show me how to connect these three things on textchanged. (textbox3)


Needing help making a random number, random question math Quiz

Hi,


According to your description, this issue is more related to the requirement of math arithmetical with C# or VB code. I assume you are using C#, since there are more C# experts in the C# forum, I will move this thread to C# form. Thanks for your understanding.


Regards


Starain




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.


mssql 2008 r2: backup and restore tsql. Need to switch database to master on a restore

Hi,


Why cant you run entire script in MASTER database itself.




Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker

Praveen Dsa | MCITP - Database Administrator 2008 | My Blog | My Page


Detect bluetooth status

Hi, you've referred me to Win32 API example in C++, but I need to do it in Windows Store App with C#

Report server error

Looks like a syntax error in the query used for dataset. Are you using en expression based connection string by any chance?


If not check the query included with the version of report in the server.




Please Mark This As Answer if it solved your issue

Please Vote This As Helpful if it helps to solve your issue

Visakh

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

My Wiki User Page

My MSDN Page

My Personal Blog

My Facebook Page


While preview the report in the reporting server it will show me the password expired?

HI i am working on BIDS 2008R2,


I have deployed my Report soluction in the reporting server,but while i preview the report in my reportig server ,


it will show me the below error ,pls find the scrrenshoot it show the below error


Tell me one thing here i dnt have permisions to view the reports or what,


but while am using windows credntials alos not able to see the reports,


so can you pls help me out for this problem.its urgent basis




While preview the report in the reporting server it will show me the password expired?

Hi Ychinnari,


Reporting Services provides a special account that is used for unattended report processing and for sending connection requests across the network. The account is used in the following ways:



  • Send connection requests over the network for reports that use database authentication, or connect to external report data sources that do not require or use authentication.

  • Retrieve external image files that are used in report. If you want to use an image file and the file cannot be accessed through Anonymous access, you can configure the unattended report processing account and grant the account permission to access the file.


According to the error message, password of unattended execution account has expired. To troubleshoot the problem, please refer to the following steps:



  1. Start the Reporting Services Configuration tool and connect to the report server instance you want to configure.

  2. On the Execution Account page, select Specify an execution account.

  3. Type the account and password, retype the password, and then click Apply.

  4. If credentials are passed in the connection string, you need to modify password of the connection string.


For more information about Configuring the Unattended Execution Account, please refer to the following document:

http://ift.tt/1wGRDWY


If you have any more questions, please feel free to ask.


Thanks,

Wendy Fu




Wendy Fu

TechNet Community Support




object reference not set to an instance of an object in sharepoint 2013 in code

Hi all,


We facing the issue "object reference not set to an instance of an object " in user controls.


we are try to debug the code it is not hitting. This is sometimes for Postback.


Regards


VeerendraNadh


Help with detecting if a key is pressed.

There are a swag of problems with that method, beginning with the fact that you are using a hashtable that isn't filled in with anything.


But before tackling that, may I ask why you are using what appears to be a timer instead of subscribing to the form's KeyPress event? I'm not exactly sure what your goal is.


Modify a method while in Runtime

What's wrong with something like this...



private int A(int x, int y)
{
return x + y;
}



Then pass in the appropriate x and y at runtime?

How do you save a transformed image?

Hello Rob,


Since this issue is related with windowss store app, i move it to the window store app forum there store app exeprts will help you.


Regards.




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.


Sharepoint 2010 Webpart debugging - Writing to the console

The WebParts as the name suggest is made up for webpages,not for console application,thats why the command Console.Writeline doesn't exist for that and its not working.

Having trouble calling variables

I think you are confused about what happens when one class inherits from another. HomeScreen inherits from KylesRpgGame, but this does not mean that an instance of HomeScreen will get all its data (or any data) from a completely different instance of KylesRpgGame.


So when you do this...



HomeScreen next = new HomeScreen();

...you get a new instance, which knows nothing about the instance of KylesRpgGame where it was created.


The usual way to deal with this kind of situation is to pass the instance of the first form to the second in the constructor. Something like so;



public partial class HomeScreen : Form // Just inherit from Form.
{
// Give the parent class scope, to make it easy to access anywhere in the class.
KylesRpgGame parent;

public HomeScreen(KylesRpgGame game)
{
InitializeComponent();

// Set the class-level variable.
parent = game;
MessageBox.Show(parent.Strength.ToString());
}
}


// In the first form, pass "this" to HomeScreen's constructor.

HomeScreen next = new HomeScreen(this);


Detect bluetooth status

Is there any way how to detect if bluetooh is on/off in Windows (phone) 8.1 store apps?

Detect bluetooth status

Try referring to this page. http://ift.tt/1DmivRt

UnauthorizedAccessException on new ControlChannelTrigger on Windows 10 9926

Hi,

Since I upgrade to Windows 10 build 9926 I'm experiencing some trouble with my application.


When I try to register a ControlChannelTrigger I get HRESULT: 0x80070005 (E_ACCESSDENIED).


On Windows 8.1 It was functioning as expected, is the ControlChannelTrigger to be deprecated in Win10?


What kind of verification can I do (some on Package.appxmanifest)?


Thanks, best regards.



Datagridview with summary

try this:



Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'put this as your last line in Form_Load
fillTextBoxes()
End Sub

Private Sub DataGridView1_CellValidated(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellValidated
fillTextBoxes()
End Sub

Private Sub fillTextBoxes()
'rename textboxes and column names appropriately
txtCity.Text = DataGridView1.Rows.Cast(Of DataGridViewRow).Count(Function(r) r.Cells("Area").Value IsNot Nothing AndAlso r.Cells("Area").Value.ToString = "city").ToString
txtCountry.Text = DataGridView1.Rows.Cast(Of DataGridViewRow).Count(Function(r) r.Cells("Area").Value IsNot Nothing AndAlso r.Cells("Area").Value.ToString = "country").ToString
txtOnline.Text = DataGridView1.Rows.Cast(Of DataGridViewRow).Count(Function(r) r.Cells("Status").Value IsNot Nothing AndAlso r.Cells("Status").Value.ToString = "online").ToString
txtOffline.Text = DataGridView1.Rows.Cast(Of DataGridViewRow).Count(Function(r) r.Cells("Status").Value IsNot Nothing AndAlso r.Cells("Status").Value.ToString = "offline").ToString
txtTerrace.Text = DataGridView1.Rows.Cast(Of DataGridViewRow).Count(Function(r) r.Cells("HouseType").Value IsNot Nothing AndAlso r.Cells("HouseType").Value.ToString = "terrace").ToString
txtBungalow.Text = DataGridView1.Rows.Cast(Of DataGridViewRow).Count(Function(r) r.Cells("HouseType").Value IsNot Nothing AndAlso r.Cells("HouseType").Value.ToString = "bungalow").ToString
txtMale.Text = DataGridView1.Rows.Cast(Of DataGridViewRow).Count(Function(r) r.Cells("Gender").Value IsNot Nothing AndAlso r.Cells("Gender").Value.ToString = "male").ToString
txtFemale.Text = DataGridView1.Rows.Cast(Of DataGridViewRow).Count(Function(r) r.Cells("Gender").Value IsNot Nothing AndAlso r.Cells("Gender").Value.ToString = "female").ToString
txtSingle.Text = DataGridView1.Rows.Cast(Of DataGridViewRow).Count(Function(r) r.Cells("MaritalStatus").Value IsNot Nothing AndAlso r.Cells("MaritalStatus").Value.ToString = "single").ToString
txtMarried.Text = DataGridView1.Rows.Cast(Of DataGridViewRow).Count(Function(r) r.Cells("MaritalStatus").Value IsNot Nothing AndAlso r.Cells("MaritalStatus").Value.ToString = "married").ToString
End Sub

End Class





thanks for any help


Having trouble calling variables

Right now I am trying to create an rpg c# word game with windows forms to get familiar with the language. I have been stuck on this issue for a couple days now and cannot seem to get it working. I have a character creation form, which gets all the information (name, gender, skill points etc.). I have a reference class called "Player" which gets and sets all of the player variables and sets them to 0. I also have a second form which is going to be my main form that is bigger, will hold equipment, stats and other features, but when I have a test on form2, trying to set a label to a variable we took from form1, it returns 0. I have tried everything that I know and cannot seem to find the answer. I will attach all of the code that I have now.


Form 1 is KylesRpgGame


Form 2 is HomeScreen


Player entity is Player



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using Engine;

namespace KylesRpgGame
{

public partial class KylesRpgGame : Form
{
Int32 remainingPoints { get; set; }
public Player player1;


public KylesRpgGame()
{
InitializeComponent();
//Variables
remainingPoints = 15;
player1 = new Player();
//
//Attributes -> Lables
lblStrengthPoints.Text = player1.Strength.ToString();
lblAgilityPoints.Text = player1.Agility.ToString();
lblIntelligencePoints.Text = player1.Intelligence.ToString();
lblStaminaPoints.Text = player1.Stamina.ToString();
lblPointsRemaining.Text = remainingPoints.ToString();
//
}
private void btnStrInc_Click(object sender, EventArgs e)
{
if (remainingPoints > 0)
{
player1.Strength++;
remainingPoints--;
lblStrengthPoints.Text = player1.Strength.ToString();
lblPointsRemaining.Text = remainingPoints.ToString();
}
}

private void btnStrDec_Click(object sender, EventArgs e)
{
if (player1.Strength > 0)
{
player1.Strength--;
remainingPoints++;
lblStrengthPoints.Text = player1.Strength.ToString();
lblPointsRemaining.Text = remainingPoints.ToString();
}
}

private void btnAgiInc_Click(object sender, EventArgs e)
{
if (remainingPoints > 0)
{
player1.Agility++;
remainingPoints--;
lblAgilityPoints.Text = player1.Agility.ToString();
lblPointsRemaining.Text = remainingPoints.ToString();
}
}

private void btnAgiDec_Click(object sender, EventArgs e)
{
if (player1.Agility > 0)
{
player1.Agility--;
remainingPoints++;
lblAgilityPoints.Text = player1.Agility.ToString();
lblPointsRemaining.Text = remainingPoints.ToString();
}
}

private void btnIntInc_Click(object sender, EventArgs e)
{
if (remainingPoints > 0)
{
player1.Intelligence++;
remainingPoints--;
lblIntelligencePoints.Text = player1.Intelligence.ToString();
lblPointsRemaining.Text = remainingPoints.ToString();
}
}

private void btnIntDec_Click(object sender, EventArgs e)
{
if (player1.Intelligence > 0)
{
player1.Intelligence--;
remainingPoints++;
lblIntelligencePoints.Text = player1.Intelligence.ToString();
lblPointsRemaining.Text = remainingPoints.ToString();
}
}

private void btnStaInc_Click(object sender, EventArgs e)
{
if (remainingPoints > 0)
{
player1.Stamina++;
remainingPoints--;
lblStaminaPoints.Text = player1.Stamina.ToString();
lblPointsRemaining.Text = remainingPoints.ToString();
}

}

private void btnStaDec_Click(object sender, EventArgs e)
{
if (player1.Stamina > 0)
{
player1.Stamina--;
remainingPoints++;
lblStaminaPoints.Text = player1.Stamina.ToString();
lblPointsRemaining.Text = remainingPoints.ToString();
}
}
private void btnTest_Click(object sender, EventArgs e)
{
//player.var = textbox
player1.CharacterName = txtCharacterName.Text;
//Get Gender
if (rdoMale.Checked)
player1.Gender = "Male";
else
player1.Gender = "Female";
//Class
player1.Class = cboClass.Text;

//If name is blank or begin with spaces, return
if(String.IsNullOrEmpty(txtCharacterName.Text) || txtCharacterName.Text[0] ==' ')
{
MessageBox.Show("You must insert a correct name. Names cannot begin with spaces.");
return;
}
//if male or female is checked, return. If not
if(rdoMale.Checked == false && rdoFemale.Checked == false)
{
MessageBox.Show("You must select a gender.");
return;
}

//Get class
if (cboClass.Text != "Warrior")
{
if (cboClass.Text != "Hunter")
{
if (cboClass.Text != "Priest")
{
MessageBox.Show("Choose a class.");
return;
}
}
}
//Make them use all points
if (remainingPoints > 0)
{
MessageBox.Show("You must use all your points.");
return;
}
//Comfirmation Message Box
MessageBox.Show("Your name is " + player1.CharacterName + "\n" + "Your Gender is "
+ player1.Gender + "." + "\n" + "Your Strength is " + player1.Strength + "\n"
+ "Your Agility is " + player1.Agility + "\n" + "Your Intelligence is "
+ player1.Intelligence + "\n" + "Your Stamina is " + player1.Stamina);




HomeScreen next = new HomeScreen();
next.Show();
this.Hide();
}
}
}


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using Engine;

namespace KylesRpgGame
{
public partial class HomeScreen : KylesRpgGame
{
public HomeScreen()
:base()
{
InitializeComponent();
MessageBox.Show(player1.Strength.ToString());
}
}
}




using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Engine
{
public class Player
{
public string CharacterName { get; set; }
public Int32 Strength { get; set; }
public Int32 Agility { get; set; }
public Int32 Intelligence { get; set; }
public Int32 Stamina { get; set; }
public Int32 StrengthModifier { get; set; }
public Int32 AgilityModifier { get; set; }
public Int32 IntelligenceModifier { get; set; }
public Int32 StaminaModifier { get; set; }
public string Gender { get; set; }
public string Class { get; set; }


public Player()
{
Strength = 0;
Agility = 0;
Intelligence = 0;
Stamina = 0;
StrengthModifier = 0;
AgilityModifier = 0;
IntelligenceModifier = 0;
StaminaModifier = 0;
CharacterName = "";
Gender = "";
Class = "";

Strength = Strength + StrengthModifier;
Agility = Agility + AgilityModifier;
Intelligence = Intelligence + IntelligenceModifier;
Stamina = Stamina + StaminaModifier;

}
}
}




Powershell script to replace a section of url in a particular field of an item in sharepoint List

Hi,


I have a sharepoint list with column named URL and the field type is hyperlink and it has the value as http://abc.com/xyz=123 and i need to replace this column value as http://test.com/abc=123 . I have to modify around 1000 list items. How do i replace the url in the Sharepoint list using powershell.


Any help is much appreciated. Thank u




Smile Always


Powershell script to replace a section of url in a particular field of an item in sharepoint List

try the following command:


Add-PSSnapin Microsoft.SharePoint.PowerShell



#Variables that we are going to use for list editing


$webURL = <a href="http://ift.tt/162wJMV; http://ift.tt/1JRLLmL </a>



#Get the SPWeb object and save it to a variable


$web = Get-SPWeb $webURL



#Get the SPList object to retrieve the "Demo List"


$list = $web.Lists[$listName]



#Get all items in this list and save them to a variable


$items = $list.items


#Go through all items


foreach($item in $items)


{


if($item["UrlColumn"] -eq "http://ift.tt/162wK3d;)


{


#Change the value of the "Title" column


$item["UrlColumn "] = " http://test.com/abc=123 "


#Update the item


$item.Update()


}



}
In case of issues check
http://ift.tt/1JRLLmN





Please Mark it as answer if this reply helps you in resolving the issue,It will help other users facing similar problem


Datagridview with summary


can anyone help me to make this form ? i would like to make form with datagridview and summary below the datagridview.


how to count every single item in the column and put it to the textbox.your helps is much appreciated .




SmokeyGun


SQLite with Password

Hi Aman,


I don't know if SQLite support setting password for Windows Store App and Windows Phone development. Probably not, I've never heard about this.


However we can use some encryption APIs to encrypt the database file in the local folder. See this for more information: Using the data protection API


--James




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.



How to change selected item color and the selected area size of listview

Hi Dileepa,


It is possible by customize the control by its template, see this for more information: ListViewItem styles and templates.


By changing the selected visual state, you can change the color of the ListView item background, also the size of the selected item.


--James




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.


Steps moving reports from SSRS 2005 to SSRS2008

You've two options


1. Upgrade all reports to 2008. In this case you wont be able to deploy the reports to a 2005 server anymore. For this open the rdls inside reporting services project in 2008 BIDS and they will get auto upgraded


2. Just deploy the 2005 rdls as is to 2008 report server. For this use rs.exe or just manually upload the rdl files to 2008 reportserver without opening them in BIDS 2008




Please Mark This As Answer if it solved your issue

Please Vote This As Helpful if it helps to solve your issue

Visakh

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

My Wiki User Page

My MSDN Page

My Personal Blog

My Facebook Page


SSRS How to pass subtotal value in matrix into another table just for display?

Hi all,


I have two matrix with subtotal for two grouping. I need to pass the value of this two group subtotal into another matrix table to display and perform simple calculation to get the differences.


How can I pass the subtotal amount into the other matrix?


In Crystal report I can define two variable where i can set the total to the value and call the two variable anywhere in the same report. But how can I do it in SSRS?


Appreciate can help


Thank you


SSRS How to pass subtotal value in matrix into another table just for display?

Sorry whats the purpose of using grouping total values from one matrix to another matrix? is it that other matrix is also based on the same grouping?


Please elaborate




Please Mark This As Answer if it solved your issue

Please Vote This As Helpful if it helps to solve your issue

Visakh

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

My Wiki User Page

My MSDN Page

My Personal Blog

My Facebook Page


modified by column the user name is not updated

Hello,


It seems that your code is running by system account that's why it is showing system name. You may try to update "modified by" column in code while uploading file. Just use "Editor" (internal name of this column) in code. Here is one FAQ for your ref:


http://ift.tt/1Bmz8tr


Hope it could help




Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help


modified by column the user name is not updated

Hi,


As the question is more related to another issue, I suggest you can create a new thread and it will easier for others focus on one thread one question.


You will get helpful information from the new thread.


Thanks for your understanding.


Best Regards




Jerry Guo

TechNet Community Support



How do I write a proper if statement like so..

Something like:



if (string.Compare(t2g1.SelectedItem.Substring(0,1), "A", true) == 0)
{
}



Presuming that t2g1.SelectedItem returns a string


It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.


How do I write a proper if statement like so..

Firstly, in c# you can't use English-style syntax like "if something equals A or B". You have to explicitly spell out each comparison, as in "if something equals A or something equals B".


Secondly, to specify a string literal, you must enclose it in quotes.


So, if t2g1.SelectedItem is a string in a ComboBox, the statement should read something like the following



if((t2g1.SelectedItem.ToString() == "A") || (t2g1.SelectedItem.ToString() == "A+"))
{
// etc.
}

Note that even though SelectedItem is already a string, the ToString is required because it is returned from the ComboBox as an object.

Set style for Control in UserControl

I have a issue with set style for Control in UserControl.


1 - I create a UserControl wrapper PasswordBox(need to override some method for PasswordBox) :



<UserControl
x:Class="Test.WrapperPasswordBox"
xmlns="http://ift.tt/w9rHWX;
xmlns:x="http://ift.tt/zZkFEV;
xmlns:local="using:Test"
xmlns:d="http://ift.tt/PuXO1J;
xmlns:mc="http://ift.tt/R4RR6u;
mc:Ignorable="d">

<Grid>
<PasswordBox x:Name="PasswordBox" />
</Grid>
</UserControl>



2 - I create a Style in App.xaml:



<Style TargetType="PasswordBox"
x:Key="GlobalPasswordBox">
<Setter Property="FontSize"
Value="30" />
<Setter Property="Height"
Value="50" />
</Style>



3 - I replace PasswordBox with WrapperPasswordBox in MainPage.xaml :



<PasswordBox Style="{StaticResource GlobalPasswordBox}">

==>

<WrapperPasswordBox Style="{StaticResource GlobalPasswordBox}">



My issue is : When i run to MainPage.xaml, application will crash.


I know : can't set style of PasswordBox for UserControl. But i can't move Style in MainPage.xaml to PasswordBox of UserControl because i have another style for PasswordBox in another Page.




Do you have any suggestion for this issue ?


Prevent Ctrl + C Ctrl + V for TextBox ?

How to prevent Ctrl + C, Ctrl + V for TextBox ?


I use Keydown event



void TextBox_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
{
e.Handled = true;
}



But it don't work.


If can prevent Ctrl + C, Ctrl + V for entire control in my application.


Thanks for your help.


Prevent Ctrl + C Ctrl + V for TextBox ?

I know Paste event.


I don't want clear Clipboard because before i can clear Clipboard, third application can catch data with Clipboard.ContentChanged().


Do you have any suggestion for prevent Ctrl + C, and Ctrl + V ?



Prevent Ctrl + C Ctrl + V for TextBox ?

Just clear the clipboard for key down events. Then nothing is in the clipboard for pasting.



Clipboard.Clear();





La vida loca


mssql 2008 r2: backup and restore tsql. Need to switch database to master on a restore

You got to have SP to restore the DB in the master DB. Also put the use master; outside the exec

ALTER DATABASE [mydbPLD] SET SINGLE_USER WITH ROLLBACK IMMEDIATE

use [master]; EXEC ('RESTORE DATABASE mydbPLD
FROM DISK = ' + '''' + @backupFileName + '''' + '
WITH REPLACE,MOVE ''mydbPLD'' TO ''e:\sql\data\MDF\mydbpld.mdf'',
MOVE ''mydbPLD_log'' TO ''E:\SQL\DATA\LDF\mydb_log_pld.ldf'''
);

ALTER DATABASE [mydbPLD] SET MULTI_USER





Satish Kartan www.sqlfood.com


Migrating from SSRS 2008 to 2012: using System.TimeZoneInfo - can't find System.Core

I have exactly the same problem and am very anxious to find a solution.

How do I write a proper if statement like so..

Hello,


I am writing this if statement for comparing grades and I have to use A+ as a grade while comparing how can I implement it into and if statement for c#?


i.e.


if ((t2g1.SelectedItem) == A+ || A)


{


Do blah blah blah;


}


Thanks in advance! :)


Combobox in c#


The values in the combobox are in string form and I have no idea on how to find the sum of these values.



Look up these .NET methods in the help:



Parse



TryParse



Convert



Choose one and convert each string to an appropriate numeric variable.



Add up these variables.



Convert the sum to a string again to display the result.



- Wayne



Combobox in c#

I get this error:


Operator '+' cannot be applied to operands of type 'System.Windows.Forms.ComboBox' and 'System.Windows.Forms.ComboBox'

Combobox in c#


I get this error:


Operator '+' cannot be applied to operands of type 'System.Windows.Forms.ComboBox' and 'System.Windows.Forms.ComboBox'

Well, that's no surprise. You can't add two ComboBoxes together.



- Wayne


Combobox in c#

Oh alrighty. Thanks for the help :)

Prevent Ctrl + C Ctrl + V for TextBox ?

How to prevent Ctrl + C, Ctrl + V for TextBox ?


I use Keydown event



void TextBox_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
{
e.Handled = true;
}



But it don't work.


If can prevent Ctrl + C, Ctrl + V for entire control in my application.


Thanks for your help.


Prevent Ctrl + C Ctrl + V for TextBox ?

I know Paste event.


I don't want clear Clipboard because before i can clear Clipboard, third application can catch data with Clipboard.ContentChanged().


Do you have any suggestion for prevent Ctrl + C, and Ctrl + V ?



Steps moving reports from SSRS 2005 to SSRS2008

Hi MSnivek,


As per my understanding, you installed SQL Server 2008 on another server, now you want to move SSRS 2005 reports, subscriptions and reportserver database to the server. If that is the case, please refer to the following steps:



  1. Back up database, application, and configuration files.

  2. Back up the encryption key.

  3. Move the report server database and other application files from your SQL Server 2005 installation to your new SQL Server 2008 installation.

  4. Move any custom application files to the new installation.

  5. Configure the report server.

  6. Edit RSReportServer.config to include any custom settings from your previous installation.

  7. Optionally, configure custom Access Control Lists (ACLs) for the new Reporting Services Windows service group.

  8. Test your installation.

  9. Remove unused applications and tools after you have confirmed that the new instance is fully operational.


For detail information about migrating a Reporting Services Installation, please refer to the following documents:

http://ift.tt/1lgeBkz

http://ift.tt/15ZlNhW


If you want to update SSRS 2005 projects to SSRS 2008, we can copy project files from report server 2005 to report server 2008, the reports are automatically upgraded on first use. After you upgrade a report, you might notice additional errors, warnings, and messages. This is the result of changes to the internal report object model and processing components, which cause messages to appear when underlying problems in the report are detected.


For detail information about upgrading Reports, please refer to the following document:

http://ift.tt/15ZlP9H


If you have any more questions, please feel free to ask.


Thanks,

Wendy Fu




Wendy Fu

TechNet Community Support




Issues with invalid OCSP location in PKIview

Hello


Im seeing an issue in PKI view for one of our customers


The OCSP locations are incorrect, they are not in the AIA extensions of the CA either


Is there somewhere else that these locations can be managed from?


Welcome.ascx control, remove link

Hi,


According to your description, my understanding is that you want to display the welcome menu as the normal text.


We can apply some custom style into your master page like below:



<style type="text/css">
.ms-welcome-hove
{
background-color:#F3F3F3;
cursor:default;
border:none;
}
.ms-welcome-root
{
background-color:#F3F3F3;
cursor:default;
border:none;
}
</style>





Thanks


Best Regards




Jerry Guo

TechNet Community Support



Wednesday, January 28, 2015

print preference

I just found out my window exceeds the width of my monitor. the accept query is below the window and I cannot get a bite on the window to raise it up to where I have access to it. trying to minimize it hasn't worked. I need to find out where I can adjust my window size so that the displays and responses are all available. boy, do I feel dumb but I did try to lift this before. It was not until I spoke with a tech at Brother that I became aware that this data was there, it was just out of sight and unaccessable. dumb and dumber

print preference

Hi james,


I am wondering what the type of you project is.


>> I want to assign greyscale to my print. when I click preference then advance, I can assign greyscale but there is no way to make the assignment, it has 'default' and goes back to color.


What did you mean with “click preference then advance”, it would be helpful if you could share a screenshot of your issue.


>> the accept query is below the window and I cannot get a bite on the window to raise it up to where I have access to it.


What did you mean by “the accept query”.


It would be helpful if you could share us some more information about your issue.


Best Regards,


Tony




Help each other


How to get location using SIM in Windows 8 App in C#?

Hi,


I want to know how to get the location from SIM card in Windows 8 Store App in C#. I know Geolocation Geoposition gets the location from GPS and Wifi hotspots, but if I need to get the location from SIM service provider, how do I do it?


Please help!


Thanks in advance.


Regards,


Shivapriya


Night shift

I'm sorry, but I don't understand your question at all. The old sample data is in December, and now you have a new table with a date in June? And how does that shift id come into play? And what does those gracetimein/out mean?





Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

SSRS How to pass subtotal value in matrix into another table just for display?

Hi all,


I have two matrix with subtotal for two grouping. I need to pass the value of this two group subtotal into another matrix table to display and perform simple calculation to get the differences.


How can I pass the subtotal amount into the other matrix?


In Crystal report I can define two variable where i can set the total to the value and call the two variable anywhere in the same report. But how can I do it in SSRS?


Appreciate can help


Thank you


SQL2008R2 Reporting Services: Subscribing Report to multiple email list from table

Hello Wendy,


This solution requires Enterprise or Business Intelligence. We have got Standard Edition @Production server.


How do we handle this situation in our case. Could you please guide us.


Does not show receiver id when mail sent using BCC field

Hi Varunasok


In my option, it might be impossible to achieve what you want. I am wondering why you want to achieve it. If you achieve what you want, the result is that, user1 and user2 get the same email and they did not know that others get the email. I think you could send email to everyone. You could foreach the “address list” and call the method sending email.


Best Regards,


Edward




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.



Does not show receiver id when mail sent using BCC field

If you are not sure if the email client is the same in your Lotus notes test and your program test, then your comparison is meaningless. It might be that different client software is displaying emails in different ways - one showing the BCC name and the other not.


You simply need to send the emails to your own email account. One email from Lotus and one email (with same bcc list etc) from your own software. Then see if both emails look the same when viewed with the same client.


Union of multiple CTE'S

Hello,


I have a piece of code which goes like this ---


A]


with cte1 AS (


), cte2 as (


),


select a,b,c


B]


with cte3 AS (


), cte4 as (


),


select x,y,z.


I need a way to union these 2 result sets. I can't write all 4 concurrently and then select as I would need to uniquely identify elements in each SET A and SET B. One approach i see is to put result set of each in a temp table and then finally do union all with temp tables. Would like suggestions or any other better way. As i have aboout 8 of such similar individual sets.


Thanks


Union of multiple CTE'S

One method is to insert the result of both into a table.... and then perform select statement.


Best Regards,Uri Dimant SQL Server MVP, http://ift.tt/1iQ9JkR



MS SQL optimization: MS SQL Development and Optimization

MS SQL Consulting: Large scale of database and data cleansing

Remote DBA Services: Improves MS SQL Database Performance

SQL Server Integration Services: Business Intelligence


Union of multiple CTE'S

Since you can't write all 4 concurrently then try to union directly to your queries as below,



Select a, b, c
From
(
[Query From cte1] join [Query From cte2)
)

Union

Select x, y, z
From
(
[Query From cte3] join [Query From cte4)
)

XML Values for SSRS Parameter

I have a report with XML Web service as data source. The output of XML Web service will be used to fill a multi-value parameter(Drop-down parameter) with values. As Mutli-value parameter does not allow null values, if the XML web service does not return anything, will it be possible to have some dummy value added in the XML query so that when the XML web service does not return any data, this dummy value can be used to fill the drop-down parameter. Kindly provide your inputs on this.

SSRS LYTD Calculations

I don't think I understand. Year to Date for a year that is completed will be the total for that year (12 months). What are you expecting in that case?


"You will find a fortune, though it will not be the one you seek." - Blind Seer, O Brother Where Art Thou

Please Mark posts as answers or helpful so that others may find the fortune they seek.


SSRS LYTD Calculations

Let's call it "Last Year to date"


Say, for Parameters!date.Value='1/27/15' I'd expect to see LYTD sales up to 1/31 of the respective years : 1/31/2013,1/31/2014,.. .


I was wondering if I could filter somehow on report level and yes - the expression worked for group detail. but it does not work for group total/footer.


Sum(iif(Fields!month_date.Value>DatePart(DateInterval.Month,Parameters!date.Value),0, (Fields!Prev12MonthStuff.Value))))


Can I Save and Saveas an excel running into a webbrowser (C#)? Permissions problems?

try this?


webBrowser1.Focus();

SendKeys.Send("F12");


C# I need help With the code for class.

Hi banditblue63,


As far as I know, one mile is equal with 5280 feet. If you want to convert 4.5 miles to feet, you could use the statement “4.5*5280” instead of “4.5/5280”. The type of mile could be double and the type of feet could be int. you could try the code below



private void Form0129_Load(object sender, EventArgs e)
{
int a = MilesToFeet(4.5);
}
public int MilesToFeet(double Miles)
{
return Convert.ToInt32(Miles*5280);
}

If you have any further questions, please feel free to post in this forum.


Best Regards,


Edward




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.



ISO 11179-5 and table names

I've seen Joe Celko and others point to ISO 11179, part 5 in particular, in support of naming tables by collective names. However, I've been poring over it and am unable to find the applicable reference! Anyone be so kind as to guide me?


For the record, I fully agree, I just need to prove it to someone. :)


Since my new account won't allow me to link: http://ift.tt/18wAF9A


ISO 11179-5 and table names

Hi dthtvwls,



Example of ISO/IEC 11179 naming in relational databases


ISO/IEC 11179 is applicable when naming tables and columns within a relational database.


Tables are Collections of Entities, and follow Collection naming guidelines. Ideally, a collective name is used: e.g., Personnel. Plural is also correct: Employees. Incorrect names include: Employee, tblEmployee, and EmployeeTable.


See http://ift.tt/1y7Psxe



If you have any question, feel free to let me know.




Eric Zhang

TechNet Community Support




ISO 11179-5 and table names

I don't think posting a link to Wikipedia is very helpful, especially when the relevant section contains a [citation needed] tag

ISO 11179-5 and table names

Hi dthtvwls,



Example of ISO/IEC 11179 naming in relational databases


ISO/IEC 11179 is applicable when naming tables and columns within a relational database.


Tables are Collections of Entities, and follow Collection naming guidelines. Ideally, a collective name is used: e.g., Personnel. Plural is also correct: Employees. Incorrect names include: Employee, tblEmployee, and EmployeeTable.





Yes, this is exactly not what I was looking for, because I already googled Wikipedia, but when I actually read the text of the standard, I'm unable to find an explicit reference to back this up.

How to use PIVOT for varchar field


select name, [1] as PersonType,[2] as PersonType2,[3] as PersonType3,[4] as PersonType4,[5] as PersonType5
from (select *, row_number() Over(Partition by name Order by PersonType) rn from @MyTable) src Pivot (max(PersonType) for rn in ([1],[2],[3],[4],[5])) pvt


How to use PIVOT for varchar field


select

LastName,[1] as ContactType1,[2] as ContactType2,[3] as ContactType3,[4] as ContactType4,[5] as ContactType5


from

(select Cast(LastName as varchar(50)) as lastname,Cast(UserText10 as varchar(max)) as UserText10, row_number()Over(Partition by LastName Order by LastName) rn
from Contact) src
Pivot(max(UserText10) for rn in([1],[2],[3],[4],[5]))pvt


How to use PIVOT for varchar field

Works, thank you very much...


Mijecarr


How to use PIVOT for varchar field

Hi Mijecarr,



Add the alias VesselName in the top select list, see below.




select CompanyCode,FirstName, LastName, eMail, VesselName,
[1] as ContactType1, [2] as ContactType2, [3] as ContactType3, [4] as ContactType4, [5] as ContactType5,
[6] as ContactType6, [7] as ContactType7, [8] as ContactType8, [9] as ContactType9, [10] as ContactType10,
[11] as ContactType11, [12] as ContactType12, [13] as ContactType13, [14] as ContactType14, [15] as ContactType15
from
(select c.CompanyCode, a.Name as VesselName, c.eMail, c.FirstName, c.LastName,
Cast(C.UserText10 as varchar(max)) as UserText10,
row_number()Over(Partition by c.eMail Order by eMail) rn
from Contact c left outer join Address a on cast (a.AddressID as varchar (50)) = C.UserText9
where c.active = 1 and c.UserText10 <> 'DID') src
Pivot(max(UserText10) for rn in([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12],[13],[14],[15]))pvt



If you have any question, feel free to let me know.





Eric Zhang

TechNet Community Support




How to create an unsigned appxbundle file for windows store app?

You mean this?

http://ift.tt/18wAHhJ




Matt Small - Microsoft Escalation Engineer - Forum Moderator

If my reply answers your question, please mark this post as answered.



NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.


ScrollViewer and ChangeView - ZoomToFactor

I have a ScrollVviewer and inside it a FlipVview



Using ZoomMode to enabled you can Zoom the content




I want to add a DoubleTap so the Image inside FlipView goes to Zoom = 0. Then same when change the view to another Image


This is very easy, but..


1- Works on the SelectionChange


2- Didn't work on DoubleTapped


3- Works with ZoomtoFactor but is almost deprecatd



private void scrollV_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
{
scrollV.ChangeView(null, null, 1); // didn't works

//scrollV.ZoomToFactor(1); // works but deprecated
}

private void FlipV_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
scrollV.ChangeView(null, null, 1); // works
}



ScrollViewer and ChangeView - ZoomToFactor

Hi SuNcO,


Sounds like the gesture is ate by FlipView, ScrollView cannot get the DoubleTapped event.


Here Rob has a blog: http://ift.tt/1yaXkOq


--James




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey.