|
I need to fix an installation problem. I have created a setup programm using MS Windows Installer. My project involves VB6, Crystal Report 9 and SQL server 2000. I have used merged module. Setup is built successfully showing no error. I need to run the setup in user computer using admin previlege. It installs and runs successfully in admin previlege login. But when user(doesn't have admin previlege) logs in the computer and tries to use programm, gets runtime error showing message which says like msdatgrd.ocx or one of its dependencies are not registered correctly. When this user is given admin previlege the software runs nicely. Same thing happens for mscomct2.ocx. I need help in this regard urgently.
|
|
|
|
|
iam doing a project in vb.net (winforms) .I have a timespan variable which has a start time and a frequency.this is saved in the database.the field for time is defined as char(this is a must, i can't use datetime or timestamp for storing a time value)
I have a click event on a button called 'view', where a display form should come in which this start time is shown for 24 hrs, each time the frequency is added to the previous one.
For example if the start time is 06.00 and the frequency is 1 hr, then the display form will show from first 06.00 and then one hour added to it , ie 7.00..like this it is shown for 24 hrs from teh start time.
If the frequency is quarterly then 15 minutes is added to each time starting from the start time.
there is no date associated, only time.
So what should i use for this.
For houlry basis I tried using a timespan variable.but when the adding continues, once it reached 23 hrs then it goes to 1.00:00, 1.01:00, 1.02:00 etc etc..instead of 00:00, 01:00, 02:00 respectively
what should be done.please help.it is very urgent.
thanks
chepps.
Chepps
|
|
|
|
|
Why can't you use a datetime or timestamp?
What is your code for incrementing this value?
Steve
|
|
|
|
|
i have used a timestamp variable only
if temp is that variable
then my code will be
temp = temp.Add(TimeSpan.FromHours(1))
this is in a loop for 24hrs.This is showing correctly till 23:00.
Chepps
|
|
|
|
|
You could try something like this:
Dim duration As System.TimeSpan
duration = New System.TimeSpan(0, 1, 0, 0)
Dim temp As System.DateTime
'Initialise temp here
temp = temp.Add(duration)
or you could just use:
Dim temp As System.DateTime
'Initialise temp here
temp = DateAdd("h",1,temp)
You will have to place the Dim's & methods in the appropriate place for your loop.
Hope that helps...
Steve
|
|
|
|
|
I tried this now.Inbetween i got an error.before going deep into the error, i just tried using temp as datetime variable as you suggested rather than a timestamp variable and tried this
temp = temp.Add(TimeSpan.FromHours(1))
and while displaying i suppressed the date part in temp as;
Dim ShowTime As String
ShowTime = FormatDateTime(temp, DateFormat.ShortTime)
and it worked!!!!Thanks a lot.
thank you for the suggestion. i was held up in this for such a long time, by using a timestamp variable and not trying any other options.
Thank you.
chepps
|
|
|
|
|
Great! Glad I could help.
One thing about the timestamp type is that it has a MinValue and MaxValue property which could have been giving you problems...
Steve
|
|
|
|
|
OK.i have not gone into that property.will go through.
Thanks a lot for ur timely help
Regards,
Chepps
|
|
|
|
|
Hello,
working on an app for a buisness...
Now that it's almost done, I'm going threw it again, fixing "details"...
One of those "details" is causing me major problems: pop ups.
I need pop up windows, which I made with the classic JavaScript window.open,
because it's easy to specify all sorts of properties, like no toolbars, sizing...
How can I make those pop ups WITHOUT JavaScript: it gets blocked by recent OS's like xp sp2...
So, pop up windows without javascript, that won't ever get blocked, and where I can specify similar properties as I could with the evil javascript...
(and it's hard to google a solution to this, because 99% of results are javascripts)
Pleeeease help?
|
|
|
|
|
You simply use target="_blank" on a link. The page opens in a new window, but you can't specify any properties for how the window should look.
---
b { font-weight: normal; }
|
|
|
|
|
It's not just links, it's buttons, images, often inside datagrids...
And, without javascript? To size window, remove menu, etc..?
|
|
|
|
|
Help pls!!
Still stuck at this...
It's IMPOSSIBLE to make a popup without javascript?!?!?!
|
|
|
|
|
ii_noname_ii wrote: It's not just links, it's buttons, images, often inside datagrids...
No, it's not. If you don't want to use Javascript, there are only one way of opening a new window, and there are only two elements that can do it. You use the target property, either on a link or on a form. When you use the link or post the form, the new page will open where you specified with the target property.
ii_noname_ii wrote: And, without javascript? To size window, remove menu, etc..?
As I said, you can't.
---
b { font-weight: normal; }
|
|
|
|
|
The client wants a popup window correctly sized...
He also wants it to work for everyone, which is not the case atm with my javascript window.opens...
So, am I gonna be forced to tell him "I can't do that" for the first time in my life..
In any case, this really seems like a missing functionality in vb.net ...
Why haven't "they" ever thought of getting rid of the javascript, so we can code a window opener without the javascript (I have come to HATE javascript with all my heart and feel sick every time I have to use it...)
What about those nasty crack/serial, or porn pages that manage to open popups in your face, despite your popup blocker?
PM or mail me a solution if anyone has one that should not be spread to evil minds... I'll do anything (lol), I really can't stand the thought of having to tell the client "not possible"..
|
|
|
|
|
ii_noname_ii wrote: The client wants a popup window correctly sized...
He also wants it to work for everyone, which is not the case atm with my javascript window.opens...
That is not possible. To open a window at a specific size you need to use Javascript, but as you can disable Javascript or certain Javascript functions in the browser (or using a popup blocker), that can not work for everyone.
ii_noname_ii wrote: In any case, this really seems like a missing functionality in vb.net ...
It has nothing to do with VB.NET what so ever, as you are opening the popup in the browser.
ii_noname_ii wrote: What about those nasty crack/serial, or porn pages that manage to open popups in your face, despite your popup blocker?
Popup blockers may have settings for what popups it allows. If a site manages to follow these rules, it can use a popup. There is also the possibility that the popup is not a popup at all, but just a part of the page that looks like a popup.
---
b { font-weight: normal; }
|
|
|
|
|
Hi everyone,
Not sure if this is the right place for crystal report posts but here I go.
I have a windows application that has been coded in vb.net, in VS2003. the database is MS Access based. I am working on a quotation system and have completed the forms that the user will utilize for input. The windows apps created are not bound to the database and store a local dataset that holds all of the information/tables/data that the user has came in contact with. I would like to create reports that will be populated based on the local dataset. I was wondering if there is any way to create a crystal report, to be used as the template, without binding the report to the database, and then passing the local dataset data into the report that needs to be printed. I have read online about a push method, but they say that can be really slow in creating a report with lots of tables and data, and all of the other solutions are for vs2005. Thank you for reading this post, I am new to crystal reports and am looking for any tutorials etc that might help with this problem. Thank you.
eatwork
|
|
|
|
|
eatwork wrote: working on a quotation system
eatwork wrote: not bound to the database
Just a question - don't you think it would be nice (from a customer services point of view) to keep track of quotes and use them as follow-ups? e.g. If the quote was not accepted, why not?
Your app, just a suggestion.
eatwork wrote: create a crystal report, to be used as the template, without binding the report to the database, and then passing the local dataset data into the report that needs to be printed.
Sure there is & it's real simple. Build your template report first and pass the dataset to the method that calls the report, e.g.
'declare pre-built report
Public myReport1 = New myCrystalReport
Public Sub BuildMyReport(ByVal ds As DataSet)
myReport1.SetDataSource(ds)
myForm.myReportViewer.ReportSource = myReport1
End Sub
Is that what you're after?
|
|
|
|
|
Thank you for your reply and insight. I currently do store the quotes in a database but do not store the reasons why they might/might not have been accepted. But I will ask the users if that is something they would like in the system.
I tried the code you suggested, but it doesn't seem to be working for me. The form opens, but without a report in the report viewer. This code is in the pop up form after the user clicks on a button and I call the forms showdialog method
my code:
<br />
Private Sub Form_Load()<br />
myReport1.SetDataSource(Me.p_dataset)<br />
Me.CrystalReportViewer1.ReportSource = myReport1<br />
End sub<br />
also tried<br />
Private Sub Form_Load()<br />
myReport1.SetDataSource(Me.p_dataset)<br />
Me.CrystalReportViewer1.ReportSource = myReport1.FilePath.ToString<br />
End sub<br />
Do you know of any place on the internet that might give me a tutorial to create a "template report"? All of the reports I have seen online are databinded to a database or have a database/xsd file that it reads data in from. I can't really use those examples because my dataset is created at runtime. I am fairly new to .net and coding, and have never done a crystal report through the integrated crystal reports in vs2003. Thank you very much
eatwork
|
|
|
|
|
Ok, I did up a small sample app to demonstrate how to get this right. Here's how I did it.
I started off by creating a form with 3 textboxes to input data to the dataset (I chose "Name", "Product" & "Quantity" as fields for the dataset), and 2 buttons for "Add to dataset" & "View report".
I created the dataset (called dsQuote) and declared it at modular level in Form1 (Friend ds1 As New dsQuote )
I created a second form and added a Crystal Report Viewer to it (called "crv")
I added a new Crystal Report to the solution and used the Report Expert wizard to select the dataset i created earlier.
I set the solution start up object to call Sub Main() .
Then I just tied it all together with a bit of code - have a look at the code below.
SubMain
Module modMain
Public WithEvents frm1 As Form1
Public WithEvents frmR As frmReport
Sub Main()
frm1 = New Form1
Application.Run(frm1)
End Sub
End Module
Code on Form1
Friend ds1 As New dsQuote
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Dim dr As DataRow = ds1.tblQuote.NewRow
'add info to dataset
dr.Item("name") = txtName.Text
dr.Item("product") = txtProduct.Text
dr.Item("quantity") = txtQuantity.Text
ds1.tblQuote.Rows.Add(dr)
'clear the textboxes
txtQuantity.Clear()
txtProduct.Clear()
With txtName
.Clear()
.Focus()
End With
End Sub
Private Sub btnReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReport.Click
frmR = New frmReport
frmR.Show()
End Sub
Code on Form2
Public rptQ As Quote
Private Sub frmReport_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
rptQ = New Quote
rptQ.SetDataSource(frm1.ds1)
Me.crv.ReportSource = rptQ
End Sub
That should solve it for you.
EDIT: Sorry for the crappy naming conventions, I was in a bit of a hurry.
-- modified at 3:59 Friday 18th August, 2006
|
|
|
|
|
Hi kulazfuk,
Awesome sample, it works! Not quite what I was expecting, and I guess I need to create a blank xsd for it..but it works and thats all that matters. Thanks a lot for your help
eatwork
|
|
|
|
|
sorry, ignore the last post, starting to confuse myself. Thanks again
eatwork
|
|
|
|
|
Hey I'm very new to this so please forgive me. What I'm trying to do is send text to a text box without having the user click a button. What I want to do is this; I have a very small basic program that takes user input from different text boxes, drop down list, etc and creates a .txt file. I have a button on a separate tab that when clicked will give them a preview of what they have picked in the various locations. What I want to do is an instant send once they click the information in the text boxes, drop down, list boxes, etc... What do I need to do to accomplish this?
|
|
|
|
|
All controls have a collection of events that you can handle.
For example, you could use the TextChanged event for a textbox and SelectedIndexChanged for a combobox.
Steve
|
|
|
|
|
Thanks to reply Kereskowiak,
Actually i want that my project should work like "Trial Versions" does.
If project is installed on one machine then it should expire itself after 10 days of installation.
if someone try to install it again after changing the system date then it should check that, has project been installed on same machine before or not? if yes then it should stop installation.
I want to do such stuff for Piracy point of view of project.
Waiting for solution.
Regards,
Syed Ali Raza Rizvi
|
|
|
|
|
Syed Ali Raza Rizvi wrote: Thanks to reply Kereskowiak,
His name is Dave, and you should respond on the same thread, so he can see it and so it's in context.
Syed Ali Raza Rizvi wrote: Actually i want that my project should work like "Trial Versions" does.
Then you need to store some info somewhere that is hard to find, and that shouldn't be the registry IMO.
The only way to do this so that there is little chance of a determined user to crack it is to do something user hostile, like hide files in the System32 folder to track the dates.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|