Thanks again. I agree with you that it exists somewhere :) . I am betting that it creates an XML file or something like that. If I figure it out, I will come back and post the solution.
David_41
Posts
-
VS 2013 Pro - Print / Export Git Commit History -
VS 2013 Pro - Print / Export Git Commit HistoryThank you for your reply. Unfortunately, we are not using Team Foundation Server. We each have our own local repositories and we all connect directly to a common remote repository which is located in a shared folder on our LAN. I guess we are very limited in what we can do. It works great for us except for this one issue I guess where we cannot export our commit history. :sigh:
-
VS 2013 Pro - Print / Export Git Commit HistoryHello all. Several programmers access a remote repository on our LAN. I can go into the Team Explorer tab in VS and in either Unsynced Commits or Changes, I can click the little down arrow next to Actions and then click on View History ...to view the Commit History. I would like to be able to export that as a Word Document, PDF, Excel file, XML file, or even a Text file if possible, but I do not see a way to do that, which is surprising. Does anyone know how I can do that? Maybe there is an extension? Maybe the History page exists as a temporary file somewhere. FYI, due to IT restrictions, I cannot issue Git commands from Powershell or the CMD window, so that is not an option for me. Thanks, David
-
Visual Studio 2015 Pro 32 bit or 64 bitThanks to you both. I guess that makes our decision easier. I downloaded an ISO from our MSDN Subscriber website. The name of the ISO was mu_visual_studio_2015_update_3_x86_x64_dvd_8923065.iso I haven't attempted to install it yet. But the name of the file makes it look like you could install as x86 or x64. But maybe what it really means is that it will install to an x86 or x64 machine.
-
Visual Studio 2015 Pro 32 bit or 64 bitOur company is currently using Visual Studio 2013 Pro 32 bit on Windows 7 Enterprise machines. At some point early next year we are moving to Windows 10. We are going to upgrade to VS 2015 Pro. We compile some of our projects with x86, some with x64, and some with Any CPU. Some of our developers that are in a different state are using 64 bit Visual Studio. So I think we should get the 32 bit Visual Studio 2015 since that is what we are using now and everything works great. But some people are suggesting that we move to 64 bit. Does it really make a difference one way or another? Is there any reason that we should stick with 32 bit or move to 64 bit? Most of our programming is Winforms applications an we interact with SQL Server, Microsoft Access, and Excel. Some of our users use 32 bit Office and others use 64 bit Office Can 64 bit Visual Studio still compile 32 bit applications? Looking forward to your feedback. David
-
SQL Server Reporting Services Query to Get Stored Procedure Name for Shared DatasetThank you for your reply. All of our shared datasets point to stored procedures. I think I just figured out a solution. I have done this before. I don't know why I didn't think of it before. I am going to have my program download the shared dataset as an .rds file and then look at the xml tag CommandText in the rds file.
-
SQL Server Reporting Services Query to Get Stored Procedure Name for Shared DatasetHello all. I am writing a C# program. The program downloads an rdl report and then examines the SharedDataSetReference tag of the XML. From this information, I can get the server path to the shared dataset. What I need to do is to use the shared dataset name to get the name of the stored procedure that the dataset gets it's information from. I assume that I would query the Report Server Database. The dataset uses a shared datasource as well. I have been trying to figure out how to do this for a while now, and I cannot. I am not giving up though. If I figure it out, I will come back and post the solution, but I would appreciate any help I can get. Thanks, David
-
Winforms Designer - Adding Controls Beyond my Screen EdgesThank you. I did figure it out and edited my original post with the solution. I just needed to set my forms AutoScroll property to TRUE and that gave me scroll bars to use to navigate around my form.
-
Winforms Designer - Adding Controls Beyond my Screen EdgesI have a form that I need to add a lot of controls too. I am using a split container with panel 1 on the left and panel 2 on the right. Panel 1 will use a vertical scroll bar to allow the user to scroll up and down. I am running into a problem with the Visual Studio Winforms Designer GUI. I am dragging the bottom edge of my form down as far as I can so that I can add more controls under existing controls and the screen jumps back up making it impossible to add more controls. Is there anything I can do to make this easier for me? Maybe there is a setting or something? Thanks. Edit: I figured it out. All I had to do was set the AutoScroll property of the form to TRUE. Once I did that, the form scrollbars showed up in my designer and now I can scroll all over the form to layout my controls.
-
SQL Server Stored Procedure - Wait for a Table to be CreatedHello all. I have the following Stored Procedure:
ALTER PROCEDURE [EventPortion].[24Start]
ASIF object_id('[IntegratedTest1].[EventPortion].[244Q1]') is not null
DROP TABLE [IntegratedTest1].[EventPortion].[244Q1]IF object_id('[IntegratedTest1].[EventPortion].[244Q2]') is not null
DROP TABLE [IntegratedTest1].[EventPortion].[244Q2]IF object_id('[IntegratedTest1].[EventPortion].[244Q3]') is not null
DROP TABLE [IntegratedTest1].[EventPortion].[244Q3]SELECT * Into [IntegratedTest1].[EventPortion].[244Q1] FROM IntegratedTest1.Event.MOE_2_4_DE_4_Q1
While (object_id('[IntegratedTest1].[EventPortion].[244Q1]') is null)
Begin
WAITFOR DELAY '00:00:00.001';
EndBegin
WAITFOR DELAY '00:00:01.000';
EndSELECT * Into [IntegratedTest1].[EventPortion].[244Q2] FROM IntegratedTest1.Event.MOE_2_4_DE_4_Q2
While (object_id('[IntegratedTest1].[EventPortion].[244Q2]') is null)
Begin
WAITFOR DELAY '00:00:00.001';
End
SELECT * Into [IntegratedTest1].[EventPortion].[244Q3] FROM IntegratedTest1.Event.MOE_2_4_DE_4_Q3I want this code to drop the 3 tables if they exist. This works. Then run the first Select Into. IntegratedTest1.Event.MOE_2_4_DE_4_Q2 depends on (Selects from) 244Q1. The problem that I am having is that the second Select Into is being executed and I am getting a binding error that 244Q1 doesn't exist. So, the While Is Null Wait For loops are not working. If I just execute the Wait For 1 second delay, that does take 1 second to execute. If I just run the first select into and the 1 second delay, it takes about 1 second to execute. But if I run the first and second select into with the delays in between, there is no delay. I immediately get the binding error. Is there anything I can do about this seemingly odd behavior? Thanks, David Edit: I figured out a solution and wanted to post it. I modified the stored procedure to:
ALTER PROCEDURE [EventPortion].[24Start]
AS
DROP TABLE [IntegratedTest1].[EventPortion].[244Q1]
DROP TABLE [IntegratedTest1].[EventPortion].[244Q2]
DROP TABLE [IntegratedTest1].[EventPortion].[244Q3]
SELECT * Into [IntegratedTest1].[EventPortion].[244Q1] FROM IntegratedTest1.Event.MOE_2_4_DE_4_Q1
SELECT * Into [IntegratedTest1].[EventPortion].[244Q2] FROM IntegratedTest1.Event.MOE_2_4_DE_4_Q2
SELECT * Into [IntegratedTest1].[EventPortion].[244Q3] FROM IntegratedTest1.Event.MOE_2_4_DE_4_Q3
DROP TABLE [IntegratedTest1].[EventPortion].[245Q1]
DROP TABLE [IntegratedTest1].[EventPortio -
SSRS Loop Through Report Datasets and Modify at RuntimeThanks Gerry. Yes, I am still tweaking things a bit, but it initially looks good and is working. Take Care, David
-
SSRS Loop Through Report Datasets and Modify at RuntimeThanks. Here is the code which handles modifying the Embeded Dataset to point to a different stored procedure. This code requires that you add a web reference to ReportingService2010. What this code does not show is the following: Earlier in the code we read the SQL from a stored procedure and allow the user to pick some criteria and add a WHERE clause to the query. The new sql is then saved to a new stored procedure which includes the name of the original stored procedure plus _New. So the goal here is to get the report to use the _New stored procedures. The datasets are embedded and must be repointed to the _New stored procedures. The following code runs everything. At this time, the user has selected the report that they want to view.
string LocalPath = "";
if (DownloadReport(reportViewer1.ServerReport.ReportPath, out LocalPath)) { string newPath = ""; if (LoopThroughDatasetsXML(LocalPath, out newPath)) { CreateReports(cbMOE.Text + "\_New", newPath, reportViewer1.ServerReport.ReportPath); } }
private bool DownloadReport(string reportPath, out string LocalFolder)
{
bool ret = true;
ReportingService2010.ReportingService2010 rs = new ReportingService2010.ReportingService2010();
rs.Url = "http://" + m_dbSettings.serverName + "/" + m_dbSettings.reportDbName + "/ReportService2010.asmx";
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;byte\[\] reportDefinition = null; XmlDocument doc = new XmlDocument(); try { reportDefinition = rs.GetItemDefinition(reportPath); // Get the report from the server MemoryStream stream = new MemoryStream(reportDefinition); //start building the path to save the report to the users computer reportPath = reportPath.Replace(@"/", @"\\"); LocalFolder = Directory.GetCurrentDirectory(); LocalFolder = LocalFolder + @"\\TrialData\\DataAccess\\Reports" + reportPath + ".rdl"; string Folder = Path.GetDirectoryName(LocalFolder); //if the folder doesn't exist, create it if (!Directory.Exists(Folder)) { Directory.CreateDirectory(Folder); }
-
SSRS Loop Through Report Datasets and Modify at RuntimeHi Gerry. Thanks for your feedback. I have actually come to a decision as to how to handle this. I have started the work on this, but I haven't finished it yet. I will come back and post my solution once it is finished. Basically my plan is to: download the report as an rdl (XML file) to local computer in folder under .exe. (This works). Modify the XML with the _NEW stored procedures. (Working on this) Save the rdl as OriginalName_New.rdl Upload OriginalName_New.rdl to server. (This works) Render OriginalName_New in the report viewer control. Once the user closes the form, delete OriginalName_New from server (This works) Delete all of the _New datasets from report server that were used by the report. (This works) Delete rdl file. Thanks.
-
SSRS Loop Through Report Datasets and Modify at RuntimeHi Gerry. Thanks for your reply. That is good news. I figured that there had to be a way, but I am still a little confused about how to set the values. Our reports can have multiple Embedded datasets. Using SQL Server Management Studio, I have browsed the tables and System Views and cannot find anything that would give me a clue about what Embedded datasets are defined in each report. So I guess in C# I need to get a reference to a report on the server and then it would be really nice if I could create a foreach loop and loop through each of the datasets that are Embedded in the report and change the stored procedure or SQL as you stated. Can you help me figure out how to get a reference to the report and loop through its Embedded datasets? Thanks!
-
SSRS Loop Through Report Datasets and Modify at RuntimeHello all. I have a C# Winforms application. A form has a report viewer control. The Reports and Stored Procedures exist on the report server. Right now we can run the application and display the reports just fine. Everything is working. But now we have a new requirement. The reports display several tablix controls and each tablix is connected to an embedded dataset, which in turn gets is data from a stored procedure. The new requirement is to point the dataset to another stored procedure. The C# application already has the following capability. It reads the SQL from an existing SP. It adds a WHERE clause to the query and then saves the modified query as the same stored procedure name with _modified at the end of the name. For example, an original stored procedure is called SP1. The new stored procedure is SP1_modified. The modified SP has a where clause in it. So, I want to change the embedded dataset (SP1) to point to SP1_modified. The dataset names are the same as the stored procedure names. After the report is rendered in the reportviewer control, I want to change the datasets back to point to SP1, for example. The _modified stored procedures will be deleted from the server. We can already do most of this. The only thing I have not figured out is how to point the embedded dataset to a different stored procedure. Thanks for your help.
-
Need to cancel BackgroundWorkerOk Gerry, I apologize. I misunderstood you. In our environment, our SQL Server is on a non-Internet connected machine. And the data is Analysis data. More and more data is added on a regular basis. We have many millions of rows of data in several databases. Our data analysts run queries. Sometimes they create a query incorrectly (or inefficient) . We have had cases where a user will start a query before they go home for the day, and then when they come in the next morning, it is still running. Some of our queries consist of many views joined together and some of them use scalar functions and table valued functions which get used repeatedly. This can of course slow the query down significantly. Anyway, previously the only way to cancel a query was to End Task on the program, now the user can just click the cancel button. It works very well. Thanks, David
-
Need to cancel BackgroundWorkerAlso, just to be safe, we have an algorithm that validates their query and looks for those action query keywords such as DROP, DELETE, INSERT, CREATE, UPDATE, etc. It will not allow anyone to run queries with those keywords. We also have the user pick the tables that they want to run their query against from a combo box. The algorithm that loads the combo box only lists certain tables. David
-
Need to cancel BackgroundWorkerHi Gerry. They do not have free unlimited access to everything. We use User Roles to control what they have access to. They cannot run Action Queries or DROP or CREATE queries. If the application needs to do that, then we use an Application Role with elevated permissions. We have covered our bases I think. Thanks, David
-
Need to cancel BackgroundWorkerHi Gerry, These are user created queries, so there is no tuning the query. Yes, I guess you are correct. The query is being run by the database server engine, so I guess there is no canceling the query. All I can really do is force my program to stop waiting for the query results. I guess since the query is running in a transaction, I could try rolling back the transaction. The query returns a set. The query is created by the user through a query designer that we wrote in C#. It only allows the user to execute SELECT queries against tables or Views in the database. It returns a dataset with the results displayed in a datagrid. The results can then be exported to a CSV or XLSX file. Thanks or your input.
-
Need to cancel BackgroundWorkerThank you Peter. I actually worked on this over my long weekend. Sorry for not getting back to you sooner. I got it working by partly using your suggestion to abort the thread. This works because the only types of queries that will be run here are SELECT queries. So no records are actually being modified. So, no need to worry about rolling back transactions. I am no longer using a background worker. I am just creating my own thread. I want to show my code below. Class Level Code:
CloseCancelForm(); //This form contains the Cancel Button
Cancel Form
public partial class FormCancelQuery : Form
{
DialogResult result = DialogResult.OK;
public FormCancelQuery()
{
InitializeComponent();
}private void btnCancel\_Click(object sender, EventArgs e) { result = DialogResult.Cancel; this.Close(); } }
Main UI Form
private void qbTestQueryBtn_Click(object sender, EventArgs e)
{
frmCancel = new FormCancelQuery();
RunQueryThread = new Thread(new ThreadStart(RunQuery));
RunQueryThread.Start();
DialogResult dr = frmCancel.ShowDialog(this);
if (dr == DialogResult.Cancel)
{
frmCancel.DialogResult = DialogResult.OK;
RunQueryThread.Abort();
}
}private void RunQuery()
{
if (ValidQuery())
{
string queryTestString = GlobalStr.previewQueryString;
// Check the query for the where fill flag, and if it contains it, branch off to the filling routine
string fillFlag = "'mandafillflag'";
if (queryTestString.ToLower().Contains(fillFlag))
{
MessageBox.Show("This query requires completing the fields. Click OK to begin procedure.");
QueryFiller qf = new QueryFiller();
queryTestString = qf.FillQuery(queryTestString.ToLower(), fillFlag);
}GlobalStr.previewQueryString = queryTestString; //selectTB.Text = GlobalStr.previewQueryString; selectTB.Invoke(new MethodInvoker(delegate { selectTB.Text = GlobalStr.previewQueryString; })); //whereTB.Clear(); whereTB.Invoke(new MethodInvoker(delegate { whereTB.