|
hi
i want to pass my parameters to CrystalReports in VC# 2005,but how to do?
please give me an tested example for this topic.
very thanks
|
|
|
|
|
Hello Again,
I have been succsseful in get my previous error working thanks to you you all.
Now I have another query that is baffling me.
I have the pop up window coming up now, so what I need is the window to be centered.
I need two variables that I have in Javascript to be added to the script that loads the windw to centre the window.
This is Java script - not sure how to incorporate into C#.
var left_var = (window.screen.width-1000)/2;
var top_var = (window.screen.height-700)/2;
This is then added to the window.open() as an argument.
window.open(left='+left_var+', top='+top_var)
I just need the left_var and top_var varibles in C#
Thanks in advance.
|
|
|
|
|
If you want to popup a window in center screen,C# allows it right at the begining.You can set the property of the form "StartPosition" as ScreenCenter.
If You want to use the code try to get the cordinates of the parent form and give corresponding cordinates to the child form
My small attempt...
|
|
|
|
|
Hello Every one,
I am tryin to write a pop up report for a call logging web site, I have gotten to the stage where I cannot get the code I have written to work, no complie errors just no output.
The code I am using is below.
protected void open_popup_click(object sender, EventArgs e)
{
string Call = Request.QueryString["Call"];
string popurl = "http://localhost/CrystalReportsWebSite/Popup_report.aspx?call=" + Call;
string popupScript = "window.open('" + popurl + "', 'CustomPopUp', 'width=1000, height=700, menubar=yes, resizable=no')";
Page.RegisterStartupScript("PopupScript", popupScript);
}
This is associated to a button on a ASPX page, as I mentioned before the code runs but no output is produced.
|
|
|
|
|
window.open('" + popurl + "', 'CustomPopUp', 'width=1000, height=700, menubar=yes, resizable=no')
one bug is it does not have a semi-colon after window.open('');
|
|
|
|
|
Thank you!
All fixed now
|
|
|
|
|
indianet wrote: one bug is it does not have a semi-colon after window.open('');
That is not a bug. In Javascript semicolons are used to separate the statements, not end them. As there is only one statement, there is no need for anything to separate... ehm... it.
---
b { font-weight: normal; }
|
|
|
|
|
Do you have a server form on the page, where the method can add the script?
---
b { font-weight: normal; }
|
|
|
|
|
For some reason the Environment.GetEnvironmentVariable("PATH") isn't reflecting the changes I've made in the control panel. If I restart, they return correctly. For example, if I add c:\testpath to my environment variables in window xp control panel, and then write a sample c# app to show the path (Console.WriteLine(Environment.GetEnvironmentVariable("PATH"));), the c:\testpath doesn't show up. anybody know how to fix this or if there is a way to update my environment variables?
|
|
|
|
|
First processes environment variables are derived from its parent process. Second, once the environment variables are changed outside the application it will not effect running processes.
If you change an environment variables while your application is running you won’t see it.
If you change an environment variables while the parent process of your application is running you won’t see the change when your application runs.
The later applies when you run your application in debug mode from the Visual Studio. If you run your application from the explorer (double click on it) it will get the correct environment variable.
I know that when an environment variable is changed, Windows send a broadcast Windows’ message that it happened.
Ami
|
|
|
|
|
Ami,
Thanks, that makes a lot of sense. The problem I was having is that my application stays open the entire time and won't register the new path until it's restarted. Is there any way to programatically update the enviornment variables?
|
|
|
|
|
If you have WinForm application you can override the WndProc method:
public class Form1 : Form
{
private const int WM_SETTINGCHANGE = 0x001A;
public Form1()
{
InitializeComponent();
}
protected override void WndProc(ref Message m)
{
if (WM_SETTINGCHANGE == m.Msg)
{
if (m.LParam != IntPtr.Zero)
{
string whatChanged = System.Runtime.InteropServices.Marshal.PtrToStringAuto(m.LParam);
if (null != whatChanged && "Environment" == whatChanged)
{
MessageBox.Show("Environment variable changed");
}
}
}
base.WndProc(ref m);
}
}
Ami
|
|
|
|
|
How to take a screen shot in C# and save it into some folder ??
|
|
|
|
|
|
I got this somewhere:
Rectangle rec = Screen.PrimaryScreen.Bounds;
Bitmap screenCap = new Bitmap(rec.Width, rec.Height, PixelFormat.Format64bppArgb);
Graphics myScreen = Graphics.FromImage(screenCap);
myScreen.CopyFromScreen(rec.X, rec.Y, 0, 0, rec.Size, CopyPixelOperation.SourceCopy);
screenCap.Save("D:\\Temp\\MyScreen.Jpeg", ImageFormat.Jpeg);
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
How to get the list of shared folders for a system with a particular IP address over a local area network.
Thanks.
Amit Dey
|
|
|
|
|
|
1. Try to write a subject line that is not totally useless. It surely is not urgent enough to mention in the subject line, and to say that you need help conveys no useful information at all.
2. You forgot to mention that it's homework that you need help with. This is very important for how people will regard your request for help.
gr8est_chic wrote: how do you get the list to subtract the 1st value from the 2nd and so on...
You can't get the list to do that, you have to do it yourself.
Furthermore you haven't supplied enough information for anyone to give you any useful help on how to loop the list. What does "and so on" mean? Do you want to subtract the third value from the result of the first subtraction, do you want to subtract the third value from the fourth and then add all the results, or what?
Are you really sure that you want to subtract the first value from the second? I would think that the opposite would be more logical.
---
b { font-weight: normal; }
|
|
|
|
|
You should have listened in class. It doesnt get much easier than that.
|
|
|
|
|
my dear student chic,
this is Professor Ulhas from university.
When I was told of your cheating on my homework assignment, I unplugged my bowels and let loose an unholy noise so loud, the whole school grounds shook with mighty force. I would have cried had I not already torn my eyes out of their sockets at the sad news that you have cheated on my homework assignment.
I have no choice but to give you a blackened charcoal song of hades for your university grade. Its now failure for you until shiva wreaks desstruction on your cheating soul eternal and ever.
Sincelery yours, Computer Information conSciences Professor and grader, Sharada Ulhas
|
|
|
|
|
1. Try to write a subject line that is not totally useless. It surely is not urgent enough to mention in the subject line, and to say that you need help conveys no useful information at all.
2. You forgot to mention that it's homework that you need help with. This is very important for how people will regard your request for help.
gr8est_chic wrote: Any tips on how to code it?
First determine the data flow in the application. Where does the coordinates for the persons come from? How are they stored / how will you handle them? Where will the output go?
---
b { font-weight: normal; }
|
|
|
|
|
|
gr8est_chic wrote: d=sqrt[(x2 - x1)^2 + (y2 - y1)^2 +(z2 -z1)^2]
OK - so you have the maths, where is the problem ? The Math class has static members for sqrt, etc.
|
|
|
|
|
OK, so you have a homework problem and the math needed to solve it. What's your question?
I (and many others) have said similar things to this before, but if you're having problems with your homework, at least make an attempt at it before coming here and asking us to do it for you. I'll still say no, but I'll be more likely to offer you advice on the right direction to take.
Go back, consider the problem, break it down, and if you put some work into it and get stuck, come back and ask specific questions to help get you through your issues, I'm almost positive people will be willing to help you then.
|
|
|
|
|
You are totally missing the point I don't want you to do the work for me I am only asking you to help me with a problem that I am having, and that is getting an arraylist to get the first two values form the list and to perform a calculation.......
The only reason i posted the question is because someone suggested that they needed more info as to what I was working on....
Anyways thanks for your input......
Stay blessed
|
|
|
|