473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

debugging the code(urgent)

2)The developer of Accutech Technology is writing a code in VB.NET. He wants that when he clicks on Button1, the Button1 should display the "SCORMCourseItemMaster" crystal report. In addition, he wants to display predefined string and day of the week in that crystal report. He is specifying the following code on the click of the Button1:



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim ds As New DataSet

Dim da As New SqlDataAdapter("Select * from SCORMCourseItemMaster", SqlConnection1)

Dim cr As New CrystalReport1

da.Fill(ds, "SCORMCourseItemMaster")

Dim ParaM As New CrystalDecisions.Shared.ParameterField

Dim ParaMFields As New CrystalDecisions.Shared.ParameterFields

Dim pararange As New CrystalDecisions.Shared.ParameterDiscreteValue

Dim strVAL As String



strVAL = "Todays Date" & Now.DayOfWeek.ToString

ParaM.ParameterFieldName = "fromdate"

pararange.Value = strVAL

ParaM.CurrentValues = pararange

ParaM.CurrentValues.Add(pararange)

ParaMFields.Add(ParaM)

CrystalReportViewer1.ParameterFieldInfo = ParaMFields

cr.SetDataSource(ds)

CrystalReportViewer1.ReportSource = cr

End Sub

End Class

However, this code is generating the build error. Identify the error and suggest the correct code.
Aug 8 '06 #1
0 1020

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: vijaya | last post by:
I've to invoke a unmanaged dll fucntion in C# which uses a callback fucntion.The unmanaged dll fucntion is as follows **************************************** The Original Fucntion in the dll...
1
by: Rob | last post by:
Hi everyone, I'm having some big JS problems - my function is making my html code vanish, and I need help! Here's the code, try it for yourself. You'll notice that when you click either links...
8
by: gremlinbass | last post by:
I was wondering if I can check to see if a file is open? Specifically, is there any way I can code Access to check to see if a text file (datasource.txt to be specific) is open, returning a true...
1
by: Michael Lev | last post by:
For a class (let's call it Config ) not defined/known in my code, I want create an instance. Specifically, something like: Config config = (Config)serializer.Deserialize(stream); Which...
4
by: gokcemutlu | last post by:
I want to trace a function while it executes and keep its local variables as states. In trace function all the things work well but after all when I print states, they are all the same. I couldn't...
7
by: Hemant Pathak | last post by:
Hi programmers............................... i want to sending fax through vb code it is my client requrement is it possible or not if possible then how can i do? Please tell me it is...
3
by: pradeepm | last post by:
Hii Anybody have source code for JAVA B+ trees.Pls send me.Very urgent.Thanks in advance.
5
by: gopim | last post by:
strSql = "SELECT ISNULL(max(substring(User_ID,2,len(User_ID))) + 1,'100') FROM Users"; sqlCmd.CommandText = strSql; sqlDr = sqlCmd.ExecuteReader(); ...
8
by: ahilar12 | last post by:
Hi experts, I have a form with many textboxes,listboxes in php.I have a edit button to edit the values in the form.once i click the edit button the existing values should be displayed so that...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.