Alex Levin's Q&A profile
Visual Studio How to disable the Parameter prompt for Crystal Report using VB.Net
I'm having a problem whereby I can't disable the parameter prompting in VB.Net with the following codes:- Dim crPDV As ParameterDiscreteValue Dim crPFD As ParameterFieldDefinitions Dim crPFL As ParameterFieldDefinition Dim crPV As ParameterValues crPFD = CR.DataDefinition.ParameterFields crPFL = crPFD.Item("paramterName") crPV = crPFL.CurrentValues crPDV = New CrystalDecisions.Shared.ParameterDiscreteValue crPDV.Value = valueToPass crPV.Add(crPDV) crPFL.ApplyCurrentValues(crPV) CrystalReportViewer1.ReportSource = Application.StartupPath & "\TheReport.rpt" CrystalReportViewer1.Show() Any error with the above codes OR do i need to add any additional code(s) that able for me to pass the parameter value direc ...Show All
Visual Studio Conditional Sum
Hi, I would like to know if it's possible to have a conditional sum in a group header section I've got something like : Sum({tblInvoiceDetail.Amount}, {tblAccounts.Number}) which performs the sum of amounts grouped by account number. I would like to tell crystal reports to perform this sum only on fields which are of type A. On another report, I have a field name Amount in the details section, with this formula : WhileReadingRecords; IF {tblInvoiceDetail.Type} = "A" Then {tblInvoiceDetail.Amount} Else 0 Then I perform the sum in the group footer section : Sum ({@Amount}, {tblAccounts.Number}) In this case, I would like to avoid displaying details, so I can't use this method. Any idea I've ...Show All
Internet Explorer Development Please a very simple sample for BHO using Visual studio 2005 in C#
Hi, please help a newbie here. I have searched the internet for samples for BHO in C#, I find it's hard to compile those code. If I start a new project under VS 2005, what kind of project should I start with a console, or control library If it is possible, please post a very simple sample here. I don't complain all the documentation at MSDN, but I will really appreciate anyone give me a hand here. thanks Misa The snk key is all about strong-naming your assembly. This means that only you know the private key used for signing. So if your object was "hello.HelloWorldBHO", and someone else replaces that assembly with their own containing the exact same namespace and classes, they wouldn't be able to fake it sinc ...Show All
SQL Server Installing/Configuration
Hi, I'm pretty new to this reporting services thing. I've installed it on my PC and it runs fine. However, other PCs on my LAN can't access the reports through their browser. I think there is an issue with IIS also involved because they cannot even browse to the default website on my PC. There may also be some security related issues as well (with IIS, Reporting Services and my SQL Server 2005 database). Is there any step by step guide on how to configure all these three things properly for remote access available that anyone can recommend Or can anyone give me advice Thanks, Frank Does the URL use the IP addy or machine name when they try to access the default website If uses the machine name, try the IP address. Are y ...Show All
Windows Forms User and password in code
Hi If i use this code: My .Computer.FileSystem.CopyDirectory(mappe, "//kursist/kursister$/" & combotype.SelectedItem & taltekst & "/" & mappe2, True ) Can i then send a username, password with this code Regards alvin With some PInvoke you could try if impersonating the current thread with that user does help. See here: http://support.microsoft.com/kb/319615/ But your first goal should be to give the user access to its resources (share and directory in this case) who runs the application, to benefit from windows integrated security. -- SvenC ...Show All
SQL Server PDF Table Footers
I have been experiencing an issue with a report that will be used as a subreport and rendered in PDF, where there are three grouping levels on top of the details level. The footer of the table is meant to repeat on each page, but a parameter may cause two of the static notes in it to be hidden. When I go to actually export the report to PDF, the footer may or not appear at the bottom of each page, and it usually seems to be missing when the page ends with a group footer. It also shows the last table footer about half a page away from the last values shown in the table. I've tried a number of things to get this to work, so if anybody has any ideas on what might cause this, please help. The report has the following properties: Page si ...Show All
SQL Server Problem for Calling A Stored Procedure, Please help.
I am writing a Stored Procedure for other server (using C++ to receive the output values) as below, where @Total , @balance, @A are output values create proc [MaxTime] @number varchar(30), @numbera varchar(30), @numberb varchar(30) as begin declare @balancefloat declare @table varchar(20) declare @freetotal varchar(20) declare @SQL nvarchar(4000) declare @A float declare @Total float select @balance = balance, @table = table, @freetotal = freetotal from info where number = @number SELECT @SQL = 'select @A = A FROM' + @table + ' WHERE LEFT(code, 1) = ' + LEFT(@incomingcode, 1) + ' AND CHARINDEX(LTRIM(RTRIM(code)), ' + @incomingcode+ ') = 1' + ' ORDER BY LEN(code) DESC' exec sp_executesql ...Show All
Audio and Video Development Maximum number of output nodes
Is there an undocumented maximum number of output nodes supported in Vista because I am having issues using more than 8 devices. I have developed an application using a tee node where I am creating a topology that contain sseveral output nodes. I have a total of 16 usb audio devices (Turtle Beach) using the standard usbaudio driver that I am testing with. Now, with up to 8 output nodes, everything works fine but as soon as I want to use a 9th device as output node, the application crashes. What is even more weird is that I can reuse the same first 8 devices as output node in other streams. But if I add a stream with a 9th device as output node and or create a new stream with the 9th device as the only output node, it crashes. ...Show All
SQL Server Which one is better?
I have 2 tables A - having 118040500 records B(its temporary table) - having 1500 records. When I say select * from A where a.id in (Select b.id from B) A.ID is unique it takes almost 2 minutes to return data. How can I optimize this. Should I remove in with join Will it help Please suggest incase you have any other suggestion thanks in advance You should just experiment with it-try all alternatives and chose the best one. Generally, the server is having more alternatives choosing a plan when executing a join than a correlated subquery, so you might try this: Select A.* from A join B on A.fID=B.fID. I guess this join will work best when you have Clustered index on both A.fID and B.fI ...Show All
Visual C# how to convert int to float
Hi all, I have two variable, count and totalcount, both are integer My result is declared as float, When I perform result = count/totalcount; it did not return a float as it should be. Instead, it return 0 (eg 5/25) How can I convert it to float Thanks int count, totalCount; count = 5; totalCount = 25; float result = Convert.ToSingle(totalCount /count ); I hope this will help. Best Regards, Rizwan aka RizwanSharp ...Show All
SQL Server Error: Subreport could not be shown
I am a new one in using ReportViewer in VS 2005. I try to use Main and Sub report to show data from my dataset. It doesn't matter if I use main report only, but the problem is when I use subreport intergrated with the main report. When I run it in browser, it shows: Error: Subreport could not be shown The main report is ok.Is there any solution to the problem Thank for your help!!!! Hello, Are you able to view the subreport if you navigate to it directly If so, you probably havean issue with the subreport reference in the parent report. ...Show All
Windows Forms Form question
ok, I have a button in form1 that opens form 2 once form2 is open can I make it so the button can't be pressed while form2 is open Then how do I get a button that is in form2 close the form2 Thanks You can do this by creating a couple of properties and methods on the two forms, like the following: public class Form1 { public void Form2Done() { OpenForm2Button.Enabled = true; } private void OpenForm2Button_Click(object sender, EventArgs e) { OpenForm2Button.Enabled = false; Form2 form = new Form2(); form.OpeningForm = this; form.Show(); } } public class Form2 { public Form1 OpeningForm; private void Form2_OnClosing(object sender, EventArgs e) { if (OpeningForm != nul ...Show All
.NET Development Help sending Emails from within C# code
Hi, I need to automatically send Emails from within my C# code. Code written on my development machine works well and allows me to set my SmtpClient to be my own Mail server. However my live web site is hosted by a web hosting company based in docklands. When I try the same code here I get a ' Mailbox unavailable.The server response was: relay not permitted' message. I have even tried setting Network credentials (ie Username and Password) but get the same message. Changing the SmtpClient to local host makes no difference. The live web server has Mail Enable installed which says POP3, Smtp etc are all O.K and running. Finally I tried setting up Outlook Express, again though I could receive O.K I could not send. I ha ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Timer based movement
Hi, Previously I've had to take into account the time it takes (ms) to complete a game loop and multiply player movement etc. by that factor - I guess this is something one doesn't have to worry about in XNA e.g. if I dev a windows game it'll play ok across other (lower/higher) spec machines automatically (will just be more jerky (but not slower as such)) if a machine is slower, but remain smooth (i.e. not speed up the game play) if its quicker than my machine Also I'm wondering how to ensure the speed I play at on my machine in debug is the same speed I'll get when its played on a 360. Sorry for all the questions! Cheers :) Yes, the default settings for the game template locks the Update routine in at ...Show All
SQL Server text file stored in a column
does sql server 2005 standard store blob or text file in MS WORD format in a hirarchical manner (like how xml is stored) or does it store it as a long and single line of text in a column. Thanks!! I'm afraid I'm confused then. When I save plain text, such as a notepad document, in MS Access, it displays it correctly when I pull it up in any other tool, including notepad. However, if I save the same text into a field in SQL Server, regardless of the type of field, text, binary, varchar(max), it returns as one long string, which makes it impossible to read or modify without manually reinserting carriage returns. I would have to take this stream of text to another application to get it to put in line feeds. I ...Show All
