|
Klaus, I appreciate that you are new to asking/answering questions here on Code Project, and that you aren't aware of the forum etiquette so I'll try and point you in the right direction.
First of all, if you have a question about the way the site operates, you need to post in the Site Bugs/Suggestions[^] forum.
When you ask a question in the forums, as long as you have "E-mail me if someone replies to this message" checked, you will be sent a reply whenever anyone actually posts a response.
When I checked your profile, it showed that you had only allowed 12 minutes from posting your question to posting this question. Be patient.
Speaking of profile[^], that's where you find links to your activity; so if you want to get back to your question, just follow the appropriate[^] link.
I hope that this is enough to get you started with Code Project.
|
|
|
|
|
how can i generate password protracted PDFs by crystal report
|
|
|
|
|
Dunno.
Doesn't CR come with a large manual?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Since you're asking this question in the C# forum, I'm assuming that you're referring to Crystal Reports that is shipped with Visual Studio and that you're using CrystalReportViewer control to export your report to PDF. If that is the case, the plain asnwer is that CrystalReportViewer control does not support password protecting PDF while exporting.
|
|
|
|
|
how can i generate password protracted PDFs by crystal report??/
|
|
|
|
|
I would like to know how to accomplish the following goals in C#:
1. In an existing C# 2008 application, I would like to create two separate log files.
a. The first log file would write out data in a fixed file format prferably to a text file. A new C# 2010 desktop and/or console application would be written to read this file and do furher processing.
b. The second log file would be written to display any messages generated by the console application and/or messages that are generated by a web service the console application calls.
Can you show me how to create these two log files?
2. A new C# 2010 desktop and/or console application will be written to process the information contained with the log file produced in a fixed file format in step 1a. listed above.
Can you show me how to read the log file that is in a text file fixed format?
Can you tell if the log file generated in a fixed file format should be generated in another format besides text? If so, what format should be used and can you tell me how to read the data in this alternative file format?
|
|
|
|
|
sc steinhayse wrote: Can you tell if the log file generated in a fixed file format should be generated in another format besides text?
No, plain old text format will be sufficient.
sc steinhayse wrote: Can you show me how to read the log file that is in a text file fixed format?
A google search on basic file I/O in C# would be a good starting place.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
You can use Log4Net to generate a log for an application. Go through their documentation to figure out how to use it.
|
|
|
|
|
Hello everyone,
I need to write a method in C# that can be called from VBA using COM. The primitive types can be directly passed to the method and returned from it, but what about the complex types? For instance, the C# List<> will have to be converted in a VB Collection.
Thanks, in advance,
Mark
|
|
|
|
|
mark4 wrote: The primitive types can be directly passed to the method and returned from it, but what about the complex types? For instance, the C# List<> will have to be converted in a VB Collection.
Have you considered switching from VBA to PowerShell? That way you'd be able to use the complex types from the script.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I can't, I have to use C#.
|
|
|
|
|
To replace the VBA part, not the C#-part; it's got a bit better support for .NET.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I can't either. lol I'm struggling to find a simple tutorial on how to make a COM class to exchange bewteen applications. I'm not familiar at all with COM.
|
|
|
|
|
If I remember correctly, the List and List<t> types are not COM-visible. You cannot use them from VBScript and use them as return values to VBScript. You would have to replace them with Array equivelents.
You would have to convert all of your comlex return values/types down to simpler types that VBScript is familiar with.
|
|
|
|
|
First, I'm not using VBScript but VBA. Second, it's not so easy, my C# method must return a binary tree. So it can't be represented with primitive types.
|
|
|
|
|
mark4 wrote: First, I'm not using VBScript but VBA
Does not matter. You have the same limitations.
mark4 wrote: Second, it's not so easy, my C# method must return a binary tree.
OK, so you're going to have to represent your binary tree in a format that's more portable acrossed COM.
|
|
|
|
|
That's right, so my question is: how to do it? I've gone thru several tutorials but I find them very difficult and they are too specific to an example. Do I need to create an interface? How do I generate GUIDs? Well, I have many questions... If you know a good and simple tutorial, if would help me.
|
|
|
|
|
I don't know of any "simple" tutorials on this.
One design I would look at is a class in C# that manages the view of the tree that your VBA code sees. Basically giving the VBA code methods it can use to nagivate the tree and return the values contained in a specific node in the tree. Returning the entire tree is just silly.
|
|
|
|
|
Hi.
I am getting the following error:
Object reference not set to an instance of an object.
here is my code:
private StringBuilder data_changed = new StringBuilder();
.....
.....
if (full_name != txtFullName.Text) data_changed.Append(String.Format(" - name: {0} -> {1}", full_name, txtFullName.Text)).AppendLine();
|
|
|
|
|
Put a break point on your if statement and examine the data you're working with when it's hit.
My guess is full_name is probably null...
|
|
|
|
|
|
This error occurs when you try and access a property of an object that is already null.
Debug and figure out which of the values is throwing this error.
|
|
|
|
|
This is probably the easiest of all .Net exceptions to debug. One of the things you're trying to reference is null. On that line you have only txtFullName and data_changed being dereferenced, so it must be one of those. Work out which one it is and either change the calling context or null-protect this code.
|
|
|
|
|
i found the problem. there was a:
data_changed = null;
I removed it and code is working fine.
Thanks everyone
|
|
|
|
|
I have a question about how to obtain the results from a web service
Basically I have received a C# console application code that calls a remote webservice and consumes the results. The console application runs by giving it commands to know what method in the web service to call.
Now I am going to write a C# 2010 service application that will call the C# 2008 console and run the commands in a specificed order.
Basically the steps would be:
1. write the new .net app to make callls in a sequential order to a console app progrm.
2. The console application calls the web service and obtains the results,
3. The new .net app obtains the results of the web service from the console application it called.
Let me know how I can accomplish my goal with code and/or references.
|
|
|
|