|
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
|
|
|
|
|
The Registry is always the first place people look in when trying to "break" your program.
To protect your programs, You could have a look at my article here :
http://www.codeguru.com/vb/gen/vb_general/ideincludingvisualstudionet/article.php/c11817/[^]
In there (the second page) I create a Trial Application ,storing a counter variable in a "system" file. Then, when the counter reaches a certain number, the person cannot continue.
Hope that helps!
H T G
|
|
|
|
|
I'm trying to use the WebClient.DownloadData method running on two threads at the same time. This sometimes produces an interrupt if both threads try to run it at the same time (the method can only run on one thread at a time). How can I best synchronize, for instance by getting one of the threads to wait until the other is finished downloading?
thanks!
|
|
|
|
|
You could use thread polling, Thread.Join or Wait handles.
Search your help file for one of the above.
Steve
|
|
|
|
|
I think I wasn't real clear... I have the 2nd thread in a backgroundworker. Can I use those techniques in this case? Do I need to determine the thread name of the backgroundworker?
Thanks
|
|
|
|
|
They are competing with the same resource?
Link them both to the same 'Wait handler', then one will wait for the other to complete.
Steve
|
|
|
|
|
Hi again.
Can you give me an example of the "wait handler" code? I'm trying to sort this out.... but I'm not too good at it!
I have my primary thread running.
Then I call a secondary thread (backupworker)
They both keep running continuously, and they both need to call
WebClient.DownloadData() at random intervals.
I put the webclient call in a function (Myfunction), so that both threads call the same function. Is this OK?
It looks to me like what I want are:
System.Threading.Monitor.Enter(Myfunction)
System.Threading.Monitor.Exit(Myfunction)
But I don't know exactly where to put them, or if this is right.
Thanks so much for your help!
chuck
|
|
|
|
|