Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Thursday, March 22, 2012

Create a graghicapl calendar using VFP 9.0

I'm working on a project where a user wants to show there scheduled events on a calendar.

The way they want to show it is, displaying a bar across the days that the event takes place.

They want this on a web page and in Word. I'm using VFP 9.0 and I know it has web tools, but I've never used them. Could someone please point me in the right direction of how to do all of this?

Thank!

Hi Bob,

YOu would do better by posting this in one of the Web related forums.

Create a custom webpage to edit/update a table in a SQL database.

Hi everyone, this is is my first post, so please replyStick out tongue and help.

I'm working on a project right now that uses asp 2.0 and SQL server 2005 express edition. This is a general idea of the project. In our company some of us receive ECO notifications (engineering change orders) for our products and we need to implement these to the test scripts that are on the production floor. So the project is about entering the new ECO into a database which will send an automatic notification to our test team. When they receive the notification they will have to sign in to the website and introduce their login and password to sign off the ECO (Following some checkpoints already defined by me, for example, Area ready, Test script modification necessary, new firmware introduction, comments, etc...) but I also need to record WHO and WHEN sign that ECO. We have 3 different test areas in our factory: Electrical, Functional and Systems, so all THREE areas must be signed off in order to the ECO go to a IMPLEMENTED state (at this point i need to send a new email saying that the eco has been implemented in all three areas).

So far I've completed the following things:

-users validation (logins, areas)

-New custom entry form for the ECOs and automatic email notification (part of what I did is described below).

Dim ECODataSourceAsNew SqlDataSource()ECODataSource.ConnectionString = ConfigurationManager.ConnectionStrings("ECO_ICSConnectionString1").ToString()

ECODataSource.InsertCommandType = SqlDataSourceCommandType.StoredProcedure

ECODataSource.InsertCommand ="EcoNew"

ECODataSource.InsertParameters.Add("EcoNumber", EcoNumberTextBox.Text)

ECODataSource.InsertParameters.Add("EcoDescription", EcoDescriptionTextBox.Text)

ECODataSource.InsertParameters.Add("EcoMandatory", EcoMandatoryDropDownList.Text)

-Depending on which test area is the the engineering from, I can filter the ECOs and just shows the ones that their test area is pending. (using GridView)

But I'm stuck right now when the engineers have to sign the ECO for their test areas. I was able to use the Gridview and DetailsView to EDIT most of the things that I need. But there are somethings that I don't like:

1. When using the EDIT option on Gridview or Detailsview, all fields can be edited including ECO number, description and mandatory, which I don't want them to change. If I set those columns to read only, when editing that row again. It gives me an error that says that the ECOnumber can't be NULL, but if I remove these 3 columns the Engineer will not know which ECO they have sign. They are only going to be able to see the EcoId, which doesn't say much.

2. Also I saw that I wasn't able to do is to enter the USER login and CURRENT system date and time automatically. I don't want them to manually enter the date and their login manually.

3. Finally, when the last area signs the ECO, I want to update that record and set a flag that tells me that the ECO has been completed.

So what I really want is to create some sort of form (textboxes, labels, checkboxes, etc.) that will UPDATE the selected ECO from the gridview for instance. So when I select the row from the GridView, It will show the data (Econumber, description and mandatory as READ ONLY) and use the rest of the things as INPUT for the engineer to complete. At the end an "update button" and when I click it, It will enter/update the data on that specific row, but including the time and user login as well.

Also to check if the other 2 areas have signed and if so, change the ECOReadiness flag to 1 and send the email.

Is there a code like the one I used above to do this ? Or if you think there a better way to do this, I'll be very glad to hear it.

I'm new using sql and asp, so If i'm asking some dumb questions please forgive me.Smile.

Here's my table definition for your reference:

EcoId - primary key.

EcoNumber

EcoDescription

EcoMandatory

EcoReadiness <- Flag for the entire ECO, when ALL 3 areas have signed, this will be 1.

ATE < - Flag for Electrical area.

ATEscripts < - Just a Yes/no input.

ATEengineer <- user login

ATEdatetimestamp <- Date.Now()

FAT < - Flag for functional.

FATscripts

FATengineer

FATdatetimestamp

SYSTEMS < - Flag for systems.

SYSTEMSscripts

SYSTEMSengineer

SYSTEMSdatetimestamp

THANKS IN ADVANCE,

Regards,

Jesus

dearjaguerrero, ur query#01 have been confusing me.. if possible send ur page.aspx and page.aspx.cs(code file) file...

Query#2:

USER LOGIN

if r u using ASP.NET built-in authentication feature than

In the Page_Load event handler, add the following line of code:

string  UserIdValue ;
UserIdValue = Membership.GetUser().ProviderUserKey.ToString()


CURRENT system date and time

at database set ATEdatetimestamp 's default value - getdate()

Query#3:

//after updating each area signing - write these code :
string strSQL = "";
string strCon = ConfigurationManager.ConnectionStrings["ConnectionStringNAME"].ConnectionString; //"Data Source=.;Initial Catalog=NorthWind;User ID=sa";
SqlConnection con = new SqlConnection(strCon);
con.Open();
strSQL = "Select ATE, FAT, SYSTEMS From tableName Where EcoNumber = 'E001'"; //insert all selecting conditions
SqlDataAdapter sda = new SqlDataAdapter(strSQL, con);
DataTable dt = new DataTable();
sda.Fill(dt);
//i guess ur ATE, FAT, SYSTEMS and EcoReadiness - fields are bit field
if (dt.Rows[0]["ATE"].ToString() == "True" && dt.Rows[0]["FAT"].ToString() == "True" && dt.Rows[0]["SYSTEMS"].ToString() == "True")
//if all three flags are true then final flag is set to true.. so EcoReadiness flag tells u that the ECO has been completed
{
strSQL = "Update tableName Set EcoReadiness = 1 Where EcoNumber = 'E001'"; //
SqlCommand cmdUpdate = new SqlCommand(strSQL, con);
cmdUpdate.ExecuteNonQuery();
cmdUpdate.Dispose();
}

con.Close();
con.Dispose();

|||

Hello Patuary! Thank you for your reply !...

I've checked your ideas.. but is your code c# ?.. because I've got a lot of errors.. I forgot to tell that I was using Visual Basic... I tried to change some of the parts but I keep getting errors when running the app... There are a couple of questions I have regarding your code...

For the user login.. I changed a little bit your code..

Monday, March 19, 2012

CR8.5 and VB6 - I dont want it to create the form!

Every time I add a new Crystal Report to my VB6 project it used to ask if I wanted to add a form with the viewer control on it automatically (it also asked something else, but I can't remember what). I got sick of hitting "No" then "OK" so I checked the "don't ask me this question again" style box.

Now, every time I add a report it also adds a form to my project with the viewer control. I don't want it to do this, as it's annoying removing the useless form and it is screwing with my source control. And it does it even though when i checked the "don't ask me... " i told it not to create the form.

So I've checked all the settings I can find and I can't find anything to stop it happening. Does anyone have a quick fix to this before I go trawling through the registry to find a solution?update - i trawled the registry, found some likely candidates, but none of them worked. It's real frustrating, so any help will be appreciated, but I can live with it (I've lived with worse)

Sunday, March 11, 2012

CR viewer:: "Physical database not found"

Hi all,
I had a problem with CR viewer control, help me please!
When i try to open report from my VB project the warning "Physical database not found" display and all things really stop. How can i fix this problem.
Thanks.Crystal reports Version?
Database?
Connection via native or ODBC?
Are you running the VB on the same PC you developed the reports, or a different PC?
Which layer are you using in your VB app - CRPE, CRAXDRT, etc??

Need to know all this before can narrow down the cause of your problem, as Crystal has very coarse error handling and doesn't give very specific error messages.

Dave|||Hi, Goto Database->Verify Database. Now map your database with the report and save it

Madhivanan

CR problem: error when open a project in VB

Hi,

When I open a VB-Access project (using CR in it) in VB, I got a error message "can't load crystl32.ocx". So the project cannot run.

This project was written by my friend, and her computer has already installed CR, but my comp doesn't. Although I've copy a crystl32.ocx to that folder, I still got that error.

So can I load this project without installing CR?Is crystl32.ocx registered properly? It may also need dependency files that are on your friend's system but not yours. Maybe your friend can create a setup file that includes all the files that are needed. You can run the setup file, then you should have no problem running the project in VB.

Or, if you don't need to use Crystal for what you need the project for, you can have your friend give you a copy of the project without the ocx component checked. Doing it this way would allow you to have access to the code, but you may not be able to run the program and you probably won't be able to compile it.

CR Parameter field Question

Ok, so here's the thing:

I have a VB(6.0) project and a CR report in it. The report draws it's data from a stored procedure. Now, one of the fileds appearing on the report is called Code1, and in this particular case it has values 010, 100, 110 and 230. These numbers represent the item codes my company uses for something not important to us right now ... On the report, Code1 is located in the details section.

What I can't seem 2 figure out is this:

I made a parameter field called Selection. The value type I want to work with is a String. Code1 field also has the same value type. On the " Set default values" tab I entered earlier mentioned values ( 010, 100, 110, 230 ) and assigned description to them.

Now, when I use my parameter field " Selection " with the Select Expert, the formula looks like this: {spProSastavnicePrintQuery.Code1} = {?@.Selection}

The thing that troubles me is when I call upon my report, the entire Details section is EMPTY. BUT! When I use Select Expert and manualy enter

{spProSastavnicePrintQuery.Code1} = 100 for example, the report comes up the

way it's supposed to .. in the Details Section it generates only the data with the
Code1 containing the value of 100. What is the problem ?

Hope this post isn't too confusing .. Thnx in advance ..is it like this
{spProSastavnicePrintQuery.Code1} = {?@.Selection}

or

{spProSastavnicePrintQuery.Code1} = {?Selection}

?Parameter represent parameter and @.Parameter represent formula