|
|
|
How can I access a report at runtime and also can I do filtering at runtime. Or do I have to make different reports.
|
|
|
|
|
Anonymous wrote:
How can I access a report at runtime
I simply #include <crpe.h> (Crystal Reports Print Engine API) for this.
Anonymous wrote:
can I do filtering at runtime
Yes you can. Just go through the help files included with Crystal Reports. You'll find lots of information on how to use it. Giving all that API information here is not a good idea.
Anonymous wrote:
do I have to make different reports
Not at all.
BTW, what version are we talking about here?
Gurmeet S. Kochar If you believe in God, it's because of the Devil
My CodeProject Articles: HTML Reader C++ Class Library, Numeric Edit Control
|
|
|
|
|
hi all
im creating a console project in VC++.
i dont want the console window to be shown.
please help me out in this.
i dont want to use Win32 App Project
thanx a lot in advance.
regards
|
|
|
|
|
#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
place this at the top of your 'main' source file.
Er zit een korstje op mijn aars.
|
|
|
|
|
I wrote a Service prog and create a window in this service to receive a remote Service(WM_user+2330) message.but everything is fine except the window cann't receive message.
anyway,my servicetype is SERVICE_INTERACTIVE_PROCESS,why?
and i read the topic 308403 in msdn,here is a part of it :
"When you are designing the client and service applications, a final consideration is the sharing of named kernel objects (for example, events, mutexes, semaphores, file mapping objects, and other objects). By default, a kernel object is accessible only in the session where the object was created. This is named the local session namespace. If the client application and the service application must both access the same kernel object, you must create the object in the global namespace. To create an object in the global namespace, prefix the object name with "Global\". Global objects are accessible across Terminal Services sessions. "
what's meaning of this?what should i do to follow this?
Appreciate any help!!
|
|
|
|
|
All the kernal objects you creating is in local session namespace, eventhough the object will be there, you can't access them from any other context, instead of that if you create those kernal objects in global namespace, you can access frm different contexts.
I want to change ..Can u help me?
|
|
|
|
|
Hello,
I am creating a simple application that gets two long 's from a server when one long is sent to it. I can receive the first long, but when I try to get the second it times out. I get the first using recv() and assumed I could get the second by using another recv() right after the first, but I'm guessing this isn't how it's done, though I can't seem to find any simple tutorials that explain how to do this.
Any help would be appreciated,
- Steve L.
|
|
|
|
|
I think you neet to show your source code;
are you using blocking or non-blocking socket?
I'm novice too.
I want to help you as much as I can because I am also interested in socket.
aasdf
|
|
|
|
|
be careful when you send numbers throw sockets.
You should do some htonl() and/or htons() calls to make sure the bytes are in correct order (the bytes order is not always the same between your computer and on the network). these function so abstract this from you.
Me, i should even have done this :
<font style="color:blue;">#define</font> BUFFER_SIZE 32 <font style="color:green;">// 32 for example</font>
<font style="color:green;">
<font style="color:blue;">long</font> MyFirstLong, MySecondLong; <font style="color:green;">
<font style="color:blue;">char</font> strBuffer[BUFFER_SIZE];
<font style="color:blue;">int</font> sockfd;
<font style="color:green;">
recv(sockfd, strBuffer, BUFFER_SIZE, 0); <font style="color:green;">
sscanf(strBuffer, "%l%l", &MyFirstLong, &MySecondLong);
Is that correct for you Mr L. ?
TOXCCT >>> GEII power
|
|
|
|
|
Thanks, but it doesn't seem to be working.
When I output the strBuffer , it does change, and it should, but when using sscanf() the values of firstLong and secondLong are both what they were initialized to.
So, do I use htonl/htons on the values I send/receive. I currently use it when I set the value of the port. Could that be the problem?
Thanks,
- Steve
|
|
|
|
|
yes
in fact, the names of these functions means :
htons() -> host to network short
htonl() -> host to network long
ntohs() -> network to host short
ntohl() -> network to host long
when you send) datas to the network, use htonX(), and when you recv(), use ntohX().
i hope that's clear enought...
sorry for my bad example, but perhaps there's a mistake in your code.... who knows...
see you later
TOXCCT >>> GEII power
|
|
|
|
|
Are you using UDP? If so then you will probably find that both 'longs' were returned in the same message and that since you haven't read the whole message the remainder has been discarded.
Byte order is a matter for the client and server to agree upon, in this case it's a secondary issue since you aren't able to see the right data, byte reversed or not.
I would expect you to have to do something like,
long lReq ;
lReq = htonl ( 123456 ) ;
sendto ( s, &lReq, sizeof ( lReq ), ... ) ;
...
long Response [ 2 ] ;
recv ( s, Response, sizeof ( resp ), 0 ) ;
long lR1 = ntohl ( Response [ 0 ]) ;
long lR2 = ntohl ( Response [ 1 ]) ;
If you're using connected TCP sockets then ignore this...
Paul
|
|
|
|
|
Hello,
I am writing a application in Visual C++ .NET 7.0. I'd like to keep my classes in seperate files to keep things organized, but I am having difficulty accessing classes from another file. Can someone help me find a solution accessing between files? I would rather not have multiple classes in a single file. What am I doing wrong?
Here is a simplified version:
Class1.h
#ifndef __Class1H__
#define __Class1H__
#include "Class2.h"
class Class1
{
public:
Class1();
~Class1();
//This doesn't work because it is in a different file!
Class1(Class2* object);
//This doesn't work because it is in a different file!
Class2 obj;
};
#endif // __Class1H__
Class2.h
#ifndef __Class2H__
#define __Class2H__
class Class2
{
public:
Class2();
~Class2();
};
#endif // __Class2H__
Class1.cpp
#include "Class1.h"
Class1::Class1()
{
}
Class1::~Class1()
{
}
Class2.cpp
#include "Class2.h"
Class2::Class2()
{
}
Class2::~Class2()
{
}
|
|
|
|
|
I don't see any problem. VC++ 7 is quite happy with those four files.
Maxwell Chen
|
|
|
|
|
Oops, well it appears that my simplified sample compiles. I was able to make the problem I was having go away, by declaring the class at the top of the Class1.h file:
include...
class Class2;
class Class1;
Even though it works for my simplified version, is there a better or correct way to do this?
|
|
|
|
|
Well, I encourage you to read Chapter 9 : "Source Files and Programs" of the book "The C++ Programming Language, 3rd Edition" by Stroustrup.
Maxwell Chen
|
|
|
|
|
Good advice,
I will get the book. thanks
|
|
|
|
|
Hello,
I figured out the problem I was having, but I still don't know a good solution.
If you take the code posted above... and add the following line to Class2.h:
#include "Class1.h"
So there seems to be a problem at the posted comments when I add this include. Why can't I link in this way, and what suggestions can anybody give me to avoid this sort of thing.
Thank You
|
|
|
|
|
Originally Class2 has been included by Class1 in file "Class1.H". Now you added #include "Class1.h" in file Class2.h, you got cross inclusion! ... like your bowels getting knotted.
#include "some_file" means to embed the entire texts of the file "some_file" into where the #include directive being invoked.
Foe example, "MyHeader.H":
class Foo { };
And another file, FooBar.h, includes MyHeader:
#include "MyHeader.h"
class Bar {
public:
Bar() { }
};
You can now imagine file "FooBar.h" as the below:
class Foo { };
class Bar {
public:
Bar() { }
};
And to the view of compiler, it is!
Maxwell Chen
|
|
|
|
|
Thanks,
No more cross-inclusion.
|
|
|
|
|
I want to write a voice chat program in LAN using Visual C++, but don't know where to begin. Please give me some hints and documentations . Thanks.!
|
|
|
|
|
You could use Microsoft Speech (if both comptuers will be using XP (and NT/2000?), or DirectX DirectPlay (I think, or DirectSound) for the voice part.
I would get the DirectX and/or Speech SDK from microsoft and look around there.
Speech: http://www.microsoft.com/speech/download/sdk51/
DirectX: http://www.microsoft.com/downloads/details.aspx?FamilyId=124552FF-8363-47FD-8F3B-36C226E04C85&displaylang=en
wWw.KruncherInc.cOm - My cool programs
|
|
|
|
|