Scott Chang's Q&A profile
Visual Studio Help with Drillthrough and Back Button Error Please
I am using ReportViewer control in remote mode and am getting an error after I drill through reports 3 levels. The 3rd time I drill through it will say The path of the item "(null)" is not valid. The path must be less than 260 characters long and must start with slash. Other restrictions apply. (rsInvalidItemPath) At that point if I hit F5 to refresh the page then it will load the drillthrough report correctly. We have tried everything to fix this and cannot figure it out. Also whenever you hit the back button in the reportviewer you get the error : Back call without drillthrough report Please help if you have any suggestions on what could be causing these errors. Are you using Visual ...Show All
Visual Studio Invalid Cast Exception (InfoObject to Report)
I am trying to run a Crystal Report that is located in Crystal Enterprise 10. I am running a sample application provided by Business Objects. I am trying to run the ViewReportParameter sample project for VB.NET for CE10. I notice that the code posted by Microsoft is very similar and requires casting the InfoObject into a Report. I am getting a 'Specified Cast is not valid' error when I execute the following line of code. ceReport = CType(ceReportObject, Report) I have posted additional code for context ceSession = Session.Item("ceSession") 'Create the infostore object ceEnterpriseService = ceSession.GetService("", "InfoStore") ceInfoStore = New InfoStore(ceEnterpriseService) 'Grab the sample report fro ...Show All
Visual C++ varaible conversion problems
I can't work out how to convert data types to another data type: eg. An int object to a char. Below is my source code: // rand.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <fstream> #include <stdlib.h> #include <stdio.h> #include <time.h> using namespace std; int main( void ) { int i; int x; ofstream ofsout( "c:\\test.txt" , ios::app); /* Seed the random-number generator with current time so that * the numbers will be different every time we run. */ srand( ( unsigned )time( NULL ) ); /* Display 10 numbers. */ for ( i ...Show All
Visual C# Bitmap Save problem
Error is as follows: False System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+. at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) at System.Drawing.Image.Save(String filename, ImageFormat format) at DynamicTextPicture.Watermark.Create() DynamicTextPicture.dll using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; namespace DynamicTextPicture { /**//// <summary> /// WaterMark /// </summary> public class Watermark { private int _width; ...Show All
.NET Development URGENT HELP - LOCAL DATE/MONTH
C# - Windows Applications (VS 2005) ----- Hi, I need some help here. I have a button that onclick, will have a function to check the current month (Local time), eg. if current month equal Nov, open form X else if current month equal Dec, open form Y. Tks. change ToString to ToString() methods in C# must be written correctly and do not have the behavior that VB.NET has which will handle it itself. There could also be a minor improvement in the code. Rather than converting to string then back to an int...do it this way: //string str_mth = DateTime .Now.Month.ToString; // cur_mth = int .Parse(str_mth); switch ( DateTime.Now.Month ) {   ...Show All
Windows Forms Closing forms and controls
Using VS2005, windows forms, c# I have 6 forms, some of them children, some have user controls on them. In the main form I check that a file exists, if not then I want to close the application. Using Application.Exit(); doesn't seem to work. What is the best way to close everything and exit You're calling Application.Exit() in the form constructor; that won't work because the application hasn't started yet. Put the call to fnSetGlobal() in the Load event and it will work. ...Show All
.NET Development Formatting numbers
.net I am building a solution that shows two numbers. VAT on sales and VAT on costs. I can obtain the two values through a SQL query Sum(amount) * 0.175 etc etc however when I want to subtract one from the other I get a single digit number. For example my sql query might return 14,5435.00 and 5,746.00 but the value i get after i try to subtract them is 9. I have tried using format but that just returns a letter "N" in this case. Label35.Text = Format(objDataRow.Item( "totalclientyear" ), "N" ) objDataRow.Item("") return an object. You need to convert the data to a number for the format to work Label35.Text= CDec(ObjDataRow.Item("totalclientyear" ...Show All
.NET Development Persisting Database Updates using an OleDbDataTableAdapter & DataGridView Object
Hi all Getting data using an OledbDataAdapter and an OledbCommand referencing a Stored Procedure in Access, then filling a DataTable and displaying that data in a DataGridView is easy. Changes made in DataGridView then need to be applied to the database as well, that is where my problem occurs. If I use a DataSet then changes can be persisted easily = OledbDataAdapter.Update(Dataset, "tablename"), yet I am not using a DataSet but a DataTable to store the data and populate the grid. Can I update the data without going via a DataSet, via the changes made to the DataGridView / DataTable / OledbDataReader If I only need to populate one DataTable with data then the use of the DatSet seems to be a waste of resources, hen ...Show All
Visual Basic Display Same Object In Different TabControl Page
Currently i have one databasegridview in tab page1, how can i bring this databasegridview to the other tab page Thank you. This first example is for when you add the datagridviews during the designtime. There is a TabControl with 2 pages, DataGridView1 on TabPage1 and DataGridView2 on TabPage2. Notice how the event sub is set to handle events from both datagridviews by listing them after the 'Handles' keyword at the end. If a column's width is changed on DataGridView1 or on DataGridView2, then the event has code to update both datagridviews so the layout will look the same on both datagridviews. ...Show All
SQL Server error 1498
i have a error 1498 when i start mimorring please what is the problem thanks I have got SQL 2005 Developer Edition with Sp2 and I also tried it with trace flag 1400 but still I am facing the same problem. Any quick help will be much appreciated. ...Show All
SQL Server How to populate parameter2 based on parameter1 selection on report
I have two parameters on report both will be populated in dropdownlist boxes. How can i trigger parameter2 based on parameter1 selection. but when i fill parameter2 i also need to pass the selected value of parameter1's data. Please i have done this on aspx form using vb.net but don't know here how to do that. haave difficulty in making a search on google, confused to form right words to search. Thank you all very much, fot the information. Hey, 1. You will need to create two datasets. For example, ParameterOneDataset and ParameterTwoDataSet. 2. Insert the stored procedures (or however you are populating the drop down list) into each dataset. Eg: exec prc_ParameterOneDropDownList. 3. ...Show All
Windows Forms String.Format() problem
Hi Is it possible to fill a remaning area of a string with a specific character For instance: String .Format ("{0,-15}" , "My Text" ) The output is: "My Text " I want the remaning of that string ( " " ), to be "---------" . Is this possible using String .Format() And instead of doing: for ( int i=0; i<10; i++) str += "-" ; Maybe this can be replaced with String .Format() somehow Kind Regards Haven't tried this yet. But you can refer to http://msdn2.microsoft.com/en-us/library/26etazsy.aspx . Hope this helps. ...Show All
Visual Studio Team System An overlapping product in SQL Server???
Hi, I spotted the following job advert: http://members.microsoft.com:80/careers/search/details.aspx JobID=ADA9F7F7-97D2-4B45-B2E1-8919E5525BA0&AllCl=Y&start=1&interval=68&SortCol=DatePosted&SortOrder=DEF Seems to me that the product their talking about has alot of overlap with datadude. What's the deal here -Jamie I cannot comment on any future product plans outside the scope of my team; I can say we are actively working together with the SQL Server team on integration and futures. However our product is not going to be exclusive to SQL Server, we will be supporting different database backends in a future release through a schema provider mechanism. -GertD ...Show All
Visual Studio Express Editions Writing an Excel user-defined function in Visual C# Express
Hi, I've written the class below and compiled it with the 'Register for COM Interop' option set to true and I can see the resulting .dll file. However, I can not successfully pull it into the Add-in list from Excel: Tools > Add-ins > Automation. I tried copying code straight from this official Microsoft link: http://msdn2.microsoft.com/en-us/library/ms173189.aspx I have also tried installing the following patch: http://msdn2.microsoft.com/en-us/library/ms173189.aspx I am using MS Office Professional 2003 with a complete installation of Excel, .NET Framework 2.0 and Microsoft Visual C# Express Edition, and I'd imported the Excel 5.0 Object Library as a project reference. I'd really appreciate some help as am quite stuck. ...Show All
Visual Studio Unable to debug unmanaged C code
Hi, I have a solution in VS2005 that comprises of a main vb.net project and an unmanaged C DLL, the linkage being via dllimport. I have my vb.net project set to allow debugging of unmanaged code and my C project set as mixed, but no matter what try I cannot get the source displayed when I step into the C DLL. Any ideas I don't recall that it said why it failed, however I did manually add in the location that the dll is built to which include the pdb file. What files will it try to load I can't check the screen until tomorrow now infortunately. Given that there is no error, or the error is not obvious what would be the next steps, what sort of file needs to be generated to contain the s ...Show All
