I'm trying to print a form that is displaying a calendar with appointments with a series of textboxes for each day. I also have another textbox for the individual date numbers. This is all working fine except for showing the date numbers on the form when printing. It displays the textboxes with...
I'm not sure about changing the code yet as I spent a little time with your suggestions but didn't get too far. However to the best of my testing I think the problem with my code and updating is in the following section of my code:
if (m_dtContacts.Rows.Count == 0)
{button.Enabled = false;}...
I have the following code on form load that works correctly to create an array of buttons to filter a database by last name for A-Z and #'s and disable any buttons that have no results return for that letter:
private void getAlpha()
{
int locX = 12,
locY = 76,
i = 0;
string sqlText = "";
char[]...
The reason for saving queries to an xml file is to allow the user to also save queries to other tables within the database that are not hardcoded into the program. At this point there are 3 grids I created that go to 3 different tables with queries built based on selections from available...
I thought it had to do with special characters, I'll look into it.
The program allows the user to look at specific SQL tables. But in this case the user can type in there own queries and save them to a file if they use them consistenly. I was only using that query as an example as it contains...
I have a function that works to save in an xml file a query, userID and userPassword that is working correctly. I also have the ability on the form for the user to type in a query to use or save. This also includes the ability with a checkbox to add text for a date range.
When I check this...
I'm not sure what the concern is about my posting. The only thing not there is the full query as it's too long but it is basically as I posted a select * from the table. Everything else is exactly the code I am using.
I use the following to load a datagridview from a SQl database:
SqlConnection cn = new SqlConnection(sConn1);
SqlDataAdapter da = new SqlDataAdapter("Select * from table", cn);
DataSet ds = new DataSet();
da.Fill(ds, "web_trans");
dataGridView1.DataSource = ds.Tables["web_trans"];
cn.Close()...
Thanks for the info, I modified it to the following:
=IIf(Fields!HPhone.Value = "", "", ("(" & Left(Fields!HPhone.Value,3) & ")" & " " & Mid(Fields!HPhone.Value,4,3) & "-" & Right(Fields!HPhone.Value,4)))
But using your code I got the start I needed. I also found the Reporting Service Forum...
I am able using an expression to output a phone number in the (###) ### - #### format and if the field is blank I end up with () -. I would like to using an expression like Crystal Report show nothing if the field is blank. How do I do this?
Also does anyone have a good tutorial on using...
I am using the following code to create an xml file to run on form load if the file is not found:
XElement xml = new XElement("Config",
new XElement("wStatus", ""),
new XElement("wStatus", "1"),
new XElement("wStatus", "2"),
new XElement("wStatus", "3"),
new XElement("wCode", ""),
new...
I figured out what the problem was. In the .designer.cs tab the following was missing from the tabControl1 properties:
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
Thanks.
I don't know if this changes anything but the textbox I am trying to hide is on the main form and not on any of the pages of the tabControl. In my naming convention I hadn't gotten around to changing the name yet. Anyway it still doesn't work, any ideas?
Thanks.
I'm trying to get something similar to below to work to hide or disable a textbox when a particular tab is active or selected. The following code doesn't seem to do anything:
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
if...
As far as I can tell the following is the corrected code that prints correctly:
private void printDoc_PrintPage(Object sender, PrintPageEventArgs e)
{
Font _normalFont;
_normalFont = new System.Drawing.Font("Arial", 12, FontStyle.Regular);
int a = 20;
int b = 20;
y = 80...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.