|
I'm working with an MS Excel spreadsheet that contains 2 additional pivottables. When I update this spreadsheet, the 2 pivottables should update as well but currently, they do not.
So my problem is the pivottables do not take into account the possibility that when I update my spreadsheet, there may be more rows than there were before (i.e. if the pivottable was reading the data from the 1st 20 rows of the spreadsheet before, it's still only going to look for the 1st 20 rows after I update the spreadsheet. Even if there are now 50 rows of data). So how do I edit the range of a pivottable?
Does anyone know how to correct this or know of a tutorial?
thanks.
-Goalie35
|
|
|
|
|
Dear Respected programmers
Please convert this command lines into C# Language :-
if IsNull(objRecordSet.Fields("SNO").Value) = Ture then
strYesNo = "Yes"
else
strYesNo = "No"
endif
Thank you very much
|
|
|
|
|
if(IsNull(objRecordSet.Fields("SNO").Value) == true)
strYesNo = "Yes";
else
strYesNo = "No";
or even shorter:
(IsNull(objRecordSet.Fields("SNO").Value)) ? (strYesNo = "Yes") : (strYesNo = "No");
I'm not sure about the first line (never done something with a record set), you might also try objRecordSet["SNO"].Value
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
How about this for shorter:
strYesNo = (objRecordSet.Fields["SNO"].Value == null) ? "Yes" : "No";
Also considering there is:
- No IsNull function in C#
- Indexers use
[] in C#, not () which is VB - The
(comparison) ? trueResult : falseResult you gave will not compile
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Next time I will open up VS and test what I'm actually suggesting to other users
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
That'd be advisable, or just remember how to write C#
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Does IsNull simply check if the value is null? If so:
if(objRecordSet.Fields("SNO").Value == null)
{
strYesNo = "Yes";
}
else
{
strYesNo = "No";
}
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Dumbest. Movie. Title. Evaaar.
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
You'd better go with either my or Judah's post since Greeegs is not valid C#
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Hi,
I want to develope an web application using asp.net 2.0.For validation,whether javascript validation is better or using validation controls is better?
Thanks in advance.
|
|
|
|
|
A lot of this is going to depend on two things; how complicated is your validation? and how good is your java.
The validation controls just generate java script to run on the client, so you are not buying anything by doing it in java unless you have some validation that the controls won't do.
The big advantages of using the validation controls is that you don't have as much code to write or support AND the validation automatically happens on the client AND the server side. If you write your own java script, and want the added security of having the validation run on the server, you'll have to code it there as well.
HTH
WhiteWizard
aka Gandalf
|
|
|
|
|
I`m getting trouble with a rdlc report in VS 2005.
I want keep a group together in such way the pages doesn`t break when the group doesn`t fit exactly in the page. I have searched a lot in the report/group properties but didn`t find anything helpful.
Does anybody know how to solve this? In design time? Programmaticly?
I`m using C# and developing a desktop app.
Thanks in advance ...
|
|
|
|
|
use sub-report instead. use group detail in first report, sending parameter to sub-report.
|
|
|
|
|
How do I get the image width and height of a bitmap image?
tony-yeyo
|
|
|
|
|
Look at here: MSDN
Use Width and Height properties of the Bitmap class.
|
|
|
|
|
Hi,
I have got reportviewer working fine with a simple 5 line report BUT when I click on Print, the Windows Print Dialog box shows and then a variety of situations open up:-
The Page Range details don't show in the radio buttons section viz all pages selected pages.
Click Print and nothing happens.
Change printers back and forth then you get Printing Page 1 and then Page 2 of 2 - there's only one page and nothing gets printed anyhow.
Click Cancel and wait a few seconds and it cancels.
Try to Print the document again (not necessarily after any combination of the above) - works perfectly.
Any ideas?
Glen Harvy
|
|
|
|
|
Hi!
I have created a simple server application and now I'm trying to create
sensible UI for it. The problem is that I don't know how to send log-messages
from other classes(Server,ConnectionProcessor etc) to be printed in a
multiline textbox in the main form(ServerForm, which starts the server-thread and so on).
I have tried some things with delegates but without success. Here's a little
example of what I have tried:
public class Server{
public delegate void printMessage(string message);
public printMessage print;
public void test(){
print = new printMessage(new ServerForm().printMessage);
print("Message printed via delegate");
}
}
public class ServerForm{
//Some code...
public void printMessage(string message){
serverLogTextBox.Text = message;
}
}
Any ideas, suggestions and possible solutions are hugely appreciated.
Thanks in advance.
-K-
|
|
|
|
|
TikkuTakku wrote: print = new printMessage(new ServerForm().printMessage);
This means there's a ServerForm somewhere that will get this message, but it won't be the one you're using. You need to do this in reverse. The main form should set the delegate to a method in itself. Either way, you need to set it to the same instance of the class that you're actually running.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I still don't quite get it. Sorry
I mean, how do I get the other classes to use printMessage-method of that particula instance of ServerForm
-- modified at 8:23 Tuesday 22nd August, 2006
|
|
|
|
|
Either you need to pass this Object of UI to ur server. or create an even in the server class and register it in UI. so whenever server get some message trigger the event, in UI capture the event and print the message using eventarguments.
|
|
|
|
|
When you call new, you create a NEW class instance, and THAT class instance has a delegate attached to it. But it's NOT the instance that is being used by your program. You need to hook the delegate to the instance that is in use. You probably need to read up on what new does and what a class instance is, or at least how they relate to delegates ( a delegate gets hooked to one instance, not to all instances automatically )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi,
How to read a single element in DataGrid ?
Thanks in advance
|
|
|
|
|
try out
datagrid1[rowindex,columnindex].ToString();
rahul
|
|
|
|
|
How do I view a 2 pictures in 2 different windows at the same time?
tony-yeyo
|
|
|
|
|
place a picturebox on each window and use the "Image" property to select your picture.
All the best
Martin
|
|
|
|
|
Make them modeless ( show instead of showdialog ) so they are both responsive. More detailed info than what you've been given in the two responses you have would require more info about your situation.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|