|
Hello,
I have created a new report via the reportviewer control, with the data coming from a object. When I print the report either to the printer or pdf the text body only appears on odd pages, with only the header and footer appearing on even pages. This turns a 2 page report into a 4 page report.
Evidently I am doing something wrong, but after two days of hunting I'm at a loss to know where. Any ideas would be much appreciated?
Thanks in advance
|
|
|
|
|
Hello..
I'm doing Reimer's tutorial http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series4/Moving_water.php[^], and now I'm trying to run the code in the xbox. I used refer to other tutorials but still I can't do it. I really hope that somebody can solve my problem.
This is the code I want to change using the controller:
float x = 0.5f;<br />
float y = 1.0f;<br />
<br />
private void ProcessInput(float amountOfMovement)<br />
{<br />
Vector3 moveVector = new Vector3();<br />
<br />
KeyboardState keys = Keyboard.GetState();<br />
if (keys.IsKeyDown(Keys.Right))<br />
moveVector.X += amountOfMovement;<br />
if (keys.IsKeyDown(Keys.Left))<br />
moveVector.X -= amountOfMovement;<br />
if (keys.IsKeyDown(Keys.Down))<br />
moveVector.Y -= amountOfMovement;<br />
if (keys.IsKeyDown(Keys.Up))<br />
moveVector.Y += amountOfMovement;<br />
<br />
if (keys.IsKeyDown(Keys.Add))<br />
x += 0.1f;<br />
y += 0.1f;<br />
if (keys.IsKeyDown(Keys.Subtract))<br />
x -= 0.1f;<br />
y -= 0.1f;<br />
<br />
Matrix cameraRotation = Matrix.CreateRotationX(cameraAngles.X) * Matrix.CreateRotationZ(cameraAngles.Z);<br />
cameraPosition += Vector3.Transform(moveVector, cameraRotation);<br />
<br />
MouseState currentMouseState = Mouse.GetState();<br />
if (currentMouseState.X != p_mouseState.X)<br />
cameraAngles.Z -= amountOfMovement / 80.0f * (currentMouseState.X - p_mouseState.X);<br />
if (currentMouseState.Y != p_mouseState.Y)<br />
cameraAngles.X -= amountOfMovement / 80.0f * (currentMouseState.Y - p_mouseState.Y);<br />
Mouse.SetPosition(Window.ClientBounds.Width / 2, Window.ClientBounds.Height / 2);<br />
}<br />
|
|
|
|
|
All you need to do is use the GamePad class instead of the Keyboard and Mouse classes.
There is an abundance of examples of how to do this on the XNA creators website.
|
|
|
|
|
Hello all,
In my software every user has to be signed in with an ID and password. After that I will show them some user specific data in texts, graphs and pictures- all these data will be extracted from a local database.
I am thinking about Crystal Report for this. But one experienced programmer advised me that as far as the execution speed is concerned , I should not use the crystal reports in this case. Actually I can design it in a simple form with photos and charts.
Plz clarify me whether I should use crystal report in this case. Will it be inefficient to use crystal report here taking the execution time under consideration?
Please help me to solve this out
Thanks in advance
Faysal,
email: faysal_002299@yahoo.com
|
|
|
|
|
If you're not publishing large reports, then extract the data and put it on your UI components manually. Crystal Reports are slow, the ReportViewer is slow. I've used both and they're just not worth it if you're just putting up a photo and some user data. I'm in a situation at the moment where I may have to remove ReportViewer from my project because of customer complaints about speed. There are a number of alternatives.
Scott
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
Hi,
I want to learn about Key Board hooks in C#. If any one expert in that area or have recommend resources or sample code, please send me!
I want to get fully access on my keyboard in my project not even windows.
Your corporate is appreciated!
|
|
|
|
|
|
Hi guys i am wondering how can i post an image here so I can show you in an image format rather than typing text here. Thanks
|
|
|
|
|
You can't; it's been disabled because people started abusing it. You will have to upload your pic on another site and link to it.
|
|
|
|
|
hi all,
i get error in my application .plz help to recover the error
i add time in the database .before adding in database it
check this time is already exit or not .if exits it don't allow
me to add the same time again
i have two comobox one for hour and second for minute and it contain
int value.i get value from comobox and concatenate both value
and send to database
on running application it give me system error message
private void btnAdd_Click(object sender, System.EventArgs e)
{
//cbxHr.Text hour combo box
//cbxMin.Text min combo box
SaveTiming(cbxHr.Text,cbxMin.Text);
}
private void SaveTiming(string hr, string std_min)
{
bool flag = false;
string connectionString = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Testing;Data Source=(local)";
string test = hr+""+ std_min;
string isExist = "SELECT * FROM timing WHERE s_time=" + test + "";
string sqlInst = "Insert into timing(s_test)Values(" + test + ")";
using (SqlConnection connection = new SqlConnection(connectionString))
{
SqlCommand command = new SqlCommand(isExist, connection);
connection.Open();
SqlDataReader reader = command.ExecuteReader();
if (reader.HasRows)
{
MessageBox.Show("Timing already has been assigned");
flag = true;
}
reader.Close();
if (!flag)
{
SqlCommand cmd = new SqlCommand(sqlInst, connection);
cmd.ExecuteNonQuery();
}
}
}
okey
|
|
|
|
|
Hi,
Why did you not put the error you are getting?
Anyhow, how are you storing the time in database--what is the type? If it is string then problem is in your sqlQuery:
string isExist = "SELECT * FROM timing WHERE s_time=" + test + "";
string sqlInst = "Insert into timing(s_test)Values(" + test + ")";
Both will not work as strings need single quotes around them. Here is the correct version:
string isExist = "SELECT * FROM timing WHERE s_time= '" + test + "'";
string sqlInst = "Insert into timing(s_test)Values('" + test + "')";
Hope it solves the issue. You should put your code in a try catch block when executing commands on database.
|
|
|
|
|
tittly wrote: string sqlInst = "Insert into timing(s_test)Values(" + test + ")";
try: Insert into timing(s_test)Values('" + test + "')
A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty I am a Optimist
|
|
|
|
|
i use string type in data base
when i run my application it stop on this statement
SqlDataReader reader = command.ExecuteReader();
and show system error message
okey
|
|
|
|
|
to know what is the error;
use:
try
{
...
}
catch()
{
...
}
finally()
{
}
******************************
The best things in life are free
******************************
modified on Friday, April 4, 2008 3:14 AM
|
|
|
|
|
I am trying to make a calculator out of C# and the last thing I am doing now is for interaction to the calculator using a keyboad. So what I did was to create a keypress event for the main form that whenever a key is pressed, the event method will be triggered. I dont know what i'm doing wrong but whenever I press a key on the keyboard, the value of the key doesn't show... do you have any example on how to do this?
|
|
|
|
|
Hi Silvyster,
Hard to help you as I can not see your code. Anyways, I am assuming you have a User Interface for users to interact with the calculator. Do you have buttons for each number of the calculator? If you do each button has a Click, KeyPress, KeyUp, KeyDown event. You need to handle these events by simply setting the display to the value of the key pressed. Remember you have to filter the input as users can not enter characters such as &, @, h etc.
If you can explain what your UI looks like then I can help you.
Let me know if you have any additional questions.
|
|
|
|
|
Thanks for the reply... yeah i've been thinking about the button interface too but what if i dont have any buttons? can't I just place the ONKEYPRESS on the FORM itself?? I did try but it doesnt show the numbers I pressed
|
|
|
|
|
Hi,
When the form has focus and the user presses keys, you can handle the KeyPress, and KeyUp event. Where do you want to show the number? A text box, a label? For example if you are using a textbox then within the handler you will write:
YourTextBox.Text = number
|
|
|
|
|
In your form's Load event, add
this.KeyPreview = true;
|
|
|
|
|
How do I publish / distribute either on a CD or for an eMail an XNA Windows game?
I've tried things but they don't work... Like MSDN. I DO know that you can't use the regualr IDE options, but that's it. Please help.
- I love D-flat!
- Need. More. Code.
modified on Thursday, April 3, 2008 8:58 PM
|
|
|
|
|
Hi,
I have the following:
namespace Server.Layer1
{
public class BaseClass : MarshallByRefObject
{
public enum SomeEnum
{
Zero = 0,
One = 1
}
abstract public IMyInterface CreateImplmentor(SomeEnum anEnum);
}
}
Here is IMyInterface
namespace Server.Layer2
{
public interface IMyInterface
{
bool Save(Student aStudent);
event AnEventHandler SomethingHappened;
}
public delegate void SomethingHappened(object sender, EventInfo e);
}
I have registered the class which implements the BaseClass functionality and register it using a
console application host. Compiles fine.
I have a client but when it connects to BaseClass, exception is thrown at this line:
BaseClass classReceived = (BaseClass ) RemotingServices.Connect(typeof(BaseClass),
"http://localhost:65100/RemoteClass");
Exception is: "Trying to create a proxy to an unbound type."
Student is Serializable. BaseClass is MarshalByRefObject and so is the class which implements the IMyInterface. I am not sure what the problem could be. If a class inherits from MarshalByRefObject and has delegates or events, do they need any special attributes?
Please help,
Thanks
|
|
|
|
|
I'm trying to make an application that will be run and will not need it's exe anymore (it will be on a removable device so you run application, remove the device and the app should be still running).
Have questions? try my e-mail l.holota[.at - sign.]hotmail.com
|
|
|
|
|
Lukas Holota wrote: I'm trying to make an application that will be run and will not need it's exe anymore
Sounds interesting, thanks for telling us.
led mike
|
|
|
|
|
|
You could also have a third exe on your flash drive that, when loaded, copies the "real" exe to your temp directory on the local computer, then instantiates that executable. This coupled with the idea presented by a previous poster (the person who suggested a small loader program on your hard drive to load the other into memory) should minimize temp filespace, prevent the actual executable from being saved on the HD, AND prevent the user from needing to manually copy the executable from the flash drive to the HD. Hope this helps,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|