|
I do google and somebody said that it is a bug of Crystal Report XI, but the topic was two years ago, and I already update my program to release 4 or the latest. But I still facing the same problem.
|
|
|
|
|
instead of creating new objects reference the ones in the report file, i.e.
ParameterField pfPurchaseDate = rpt.ParameterFields[0];
pfPurchaseDate.Name = "INVOICE_DATE";
pfPurchaseDate.HasCurrentValue = true;
ParameterDiscreteValue pdvPurchaseDate = new ParameterDiscreteValue();
pdvPurchaseDate.Value = purchaseDate;
pfPurchaseDate.CurrentValues.Add(pdvPurchaseDate);
crystalReportViewerSaleByDate.ReportSource = rpt;
crystalReportViewerSaleByDate.Refresh();
thats what you have to use in CR 2008, they keep removing setable properties in each version. Remember just because they release a new version doesnt mean they actually fixed any one perticular problem. There are quite a few people on the net complaining about things that dont work with CR, that were found a while ago that still havent been resolved.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I am having problems implmenting PCX files in my Image Converter application. I am a rookie programmer and I see that .Net does not support it.. Help would be greatly apprecited.
|
|
|
|
|
A simple search for "C# PCX" revealed Viewing PCX files in C#[^].
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
Thanks but I think that's CPP...
|
|
|
|
|
Yes, that's true, but really you can do the same thing in C#. Look at http://courses.ece.uiuc.edu/ece390/books/labmanual/graphics-pcx.html[^] if you need help with the format. Basically, it comes down to creating a Bitmap object and filling it with data from the PCX.
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
SO I put this information into the DLL file?
|
|
|
|
|
Hello,
I am trying to add 'more' Labels in my C# application using a button.
So, when I click the button, a new label needs to be created on my form on pos x,y
I managed to do one. But how do I add more?
I think this is done using a List<>, But I have no idea how that works.
Current source:
private void CreateTextButton(string text)
{
int StartLocationX = 212;
int SpaceBetweenButtons = 5;
int NewPosition;
if (LastPosition != 0)
{
NewPosition = LastPosition + SpaceBetweenButtons;
}
else
{
NewPosition = StartLocationX;
}
this.NPCTextButton = new System.Windows.Forms.Label();
this.NPCTextButton.AutoSize = true;
this.NPCTextButton.BackColor = System.Drawing.Color.Transparent;
this.NPCTextButton.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.NPCTextButton.Location = new System.Drawing.Point(NewPosition, 191);
this.NPCTextButton.Name = text;
this.NPCTextButton.Size = new System.Drawing.Size(32, 16);
this.NPCTextButton.TabIndex = 4;
this.NPCTextButton.Text = text;
this.NPCTextButton.Click += new System.EventHandler(this.label1_Click);
this.pictureBox1.Controls.Add(NPCTextButton);
this.NPCTextButton.BackColor = Color.FromArgb(0, NPCTextButton.BackColor);
LastPosition = NewPosition;
}
private void button1_Click(object sender, EventArgs e)
{
CreateTextButton(newNPCTextButtonText.Text);
}
Thanks in advance.
|
|
|
|
|
Hi,
your code looks fine, except maybe for the value of SpaceBetweenButtons; try a larger value,
such as 300 (or calculate it based on the actual width of the previous button).
|
|
|
|
|
OH lol
it does work
I forgot to add the width of the previous button..
stupid me.
Thanks
okay, now that this works.
I need to make the buttons clickable and change the contents of a textbox.
How is this done?
modified on Tuesday, June 17, 2008 1:13 PM
|
|
|
|
|
Hi,
How do I get a list of sql server 2005 machines from the network please?
Thanks
|
|
|
|
|
EnumAvailableSqlServers () will retrieve all SQL 2005 instances.
|
|
|
|
|
Please try this:
DataTable dtSQLServers = SmoApplication.EnumAvailableSqlServers(false);
foreach (DataRow drServer in dtSQLServers.Rows)
{
String ServerName;
ServerName = drServer["Server"].ToString();
if (drServer["Instance"] != null &&
drServer["Instance"].ToString().Length > 0)
ServerName += @"\" + drServer["Instance"].ToString();
if (comboBoxServer.Items.IndexOf(ServerName) < 0)
comboBoxServer.Items.Add(ServerName);
}
Find URL for more references:
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.smoapplication.enumavailablesqlservers.aspx[^]
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
Hello,
i have a class which needs to write some measurement data to a memory stream. The measurement data can be of multiple (value) types, e.g. float, int, short, etc.
Therefore i wanted my class to be generic.
public void save(T[] data)
{
for (int i = 0; i < data.Length; ++i) ms_.Write(data[0]);
}
whereas ms_ is the aforementioned MemoryStream. This gives me a compiler error and i have no idea how to solve it. Adding where T : struct to the class declaration doesn't help.
Ideas anyone?
Cheers
Jan
|
|
|
|
|
Not to do with your current question, but when you read back the data how do you know if it's an int or a float? Or any other type?
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
The MemoryStream is actually just a buffer which is used to serialize the data to a file. The file has a header so i can derive the data types from there.
Besides, i solved the problem by using Convert.ToByte(data[i]) . Seems to work fine
Cheers
Jan
|
|
|
|
|
It would be nice to see the compiler error, although I suspect it complains about having no overloaded version of write that takes your type.
Try to use a StreamWriter. Like in the following:
public void save(T[] data)
{
StreamWriter sw = new StreamWriter(ms_);
for (int i = 0; i < data.Length; ++i) sw.Write(data[i]);
}
Even better, since there is no guarantee that T is one of the types for which StreamWriter.Write has an overload, you could do this instead:
public void save(T[] data)
{
StreamWriter sw = new StreamWriter(ms_);
for (int i = 0; i < data.Length; ++i) sw.Write(data[i].ToString());
}
|
|
|
|
|
Hi,
How can I access a database from the server when installing my application on the client PC.
thanks
|
|
|
|
|
Can you mention here which Database you are using ?
By the way: You can access via the
(1) Remote Server IP
(2) Valid User Name/Password
(3) Database Name
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
I will use SQL2005 database
|
|
|
|
|
I think Vista might be the culprit....
Anyway, could anyone share with me how to send some data over UDP and recieve it?
Now it's not working, and I have no clue if it's the sending or recieving or both which fails....
Anyway I have simple code like that:
public void Send(byte[] data, IPEndPoint to)<br />
{<br />
using (Socket sock = new Socket(to.AddressFamily, SocketType.Dgram, ProtocolType.Udp))<br />
sock.SendTo(data, SocketFlags.None, to);<br />
}<br />
<br />
<br />
public void Receiving()<br />
{<br />
byte[] rbuf = new byte[1 << 14];<br />
using (Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp))<br />
{<br />
sock.Bind(new IPEndPoint(IPAddress.Any, aPort));<br />
while (true)<br />
{<br />
EndPoint rep = new IPEndPoint(IPAddress.Any, 0);<br />
int read = sock.ReceiveFrom(rbuf, ref rep);<br />
Recieved(rbuf, read, rep);<br />
}<br />
}<br />
}<br />
void Recieved(byte[] buf, int nRead, EndPoint where)<br />
{<br />
Console.WriteLine("Recieved {0} byte(s) from {1}", nRead, where);<br />
}
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
modified on Tuesday, June 17, 2008 10:58 AM
|
|
|
|
|
Can you post here Error message which you are getting ?
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
Thanks for replying!
Anyway I figured it out (see my other post).
In answer to your question, however, it didn't thrown any error at all!
That is, until I thought of trying to run the server as an Administrator.
Then I got a SocketException which told me to use sock.Bind() first.
As to why it fails silently when I run as a normal user, it's a mystery...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Never mind,I found it!
I should also (in the listenin code)
sock.Bind(new IPEndPoint(IPAddress.Any, aPort))
Pay attention to 'aPort' I should use the same port for target IPEndPoint when sending data
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Hi,
Has any one worked with the entity framework? Is it worth while using? I am looking for a solution for code generation, I have tried out Codesmith Tools but the support lacks.
Can I please hear comments on the entity framework. Where can I currently get it for download? I know that the full solution is available in SP1 for Visual Studio. I wonder when this will be released?
Thanks
Brendan
|
|
|
|