Help a Rookie... Please!

Visual Basic


  • 1. error for keycodev2. dll not find
    I can view the report on my developing machine .But when I publish to other machine,the report can't be shown.There is a error that the keycodeV2. dll not find.I install the crystal report by visual studio.Please help.Thanks. lyp
  • 2. Pass value to Report Formula Field
    Is that possible to pass value directly to Report Formula Field? We want to do some grouping and sorting and let user to select the grouping and sorting fields. So, we plan to use formula field to do Grouping and assign the correct field name into that Formula Field. Is there any solution? Ivan
  • 3. problem with borders
    I've created a report with visual studio that works fine with my printer. when I installed my app and this report on another pc with a different printer, it was printed badly and footer was cut. how can I do with borders if they are seen in a different way with different printers? thanks bye luca
  • 4. Formatting dates inside a formula
    Does anyone know a quick and easy way to basically drop a timestamp off date in a formula? I'm concatenating text for a grouping label, "amount owed for 01/01/20XX 12:00:00AM" is what I see, i'm cool with everything else, except the timestamp. any help would be greatly appreciated. thanks, Che
  • 5. Using Windows Scripting to update an rpt file
    Hi I have a bunch of rpt files which have data saved in them. Once a month, I'd like to be able to schedule-run a vbs script that will automatically update them with new data from the data source. I would also need to set username/password info for the database within the script to allow it to access the data source. The script does not have to run interactively -- that is, I don't need to see the report open up in front of me when the job is running. Could anyone please tell me if this can be done -- and if so, please provide some sample code. Thanks Hugh

Help a Rookie... Please!

Postby brykerr » Sat, 09 Sep 2006 02:38:34 GMT

I'm in the process of setting up five crystal reports that must be
opened , have parameters changed, run, and then exported to adobe
several hundred times per month.
I believe that VB is the key to automating this task, but I don't
really know where to get started... I would appreciate basic code
samples if anyone is willing to share.


Re: Help a Rookie... Please!

Postby drolaw » Sat, 09 Sep 2006 04:53:54 GMT

    There are a lot of questions you need to answer before you attempt
this. Just off the top of my head:

1. Is this a web based application?
2. What kind of interface (form, etc) do you want the users to see.? Do
they need to see the report output? Or, is it good enough to just
export to a location and look at the PDF file?
3. What version of VB are you using (6, VB.NET 2003, 2005)?

Anyway, I'm going to assume you are using VB.NET. If that is the case,
you would be using the ReportDocument object to load, run and export
the reports. To get this working, you need to reference the following


This code should do what you want. As to how you call it, that's a
decision you will have to make when you create the rest of the

    Private Sub RunReport()
        Dim myRep As New ReportDocument

        'get the report from the drive
        myRep.Load("Report Path Here")

        'log onto the reoport
        myRep.SetDatabaseLogon("UserName", "PassWord")

        'this is optional. If you want to view the report before
exporting it,
        'add a crystal viewer control to your form and call this line.
        CrystalReportViewer1.ReportSource = myRep

        'export the file to disk.


    End Sub

Re: Help a Rookie... Please!

Postby brykerr » Sat, 09 Sep 2006 06:39:13 GMT

Very helpful!!!

Similar Threads:

1.Help for a VBA rookie

I have a work sheet, that is titled "DATA", there are 6 Columns,
consisting of Name, Mon, Tues, Wed, Thurs, Fri..  I have a second
sheet titled "Submit".

I would like a Macro that would match the name from "DATA" and take
the Contents of the cells in that row, and move them to "Submit"

Any suggestions, help, or direction would be appreciated.

2.Rookie VBA'er seeks help!

In order to try and reduce the size of an analytical 
workbook I have,I'm trying to write some VBA to copy and 
paste VLOOKUP equations dependent upon the number of 
cells in another column. For example, I have a column of 
for example, 5000 numbers(there could be as many as 
30,000 numbers) in column E, starting in E2. The 
equations to be copied run in row 2, columns F through M.
The lookup array exists from A2 to D1000.
 The task is this:
1) Determine the base row of data in column E.
2) Copy the equations from F2 through M2
3) Paste the equations from F3 to the base row of column 
M, as determined from Task 1. 

I've been able to get bits and pieces to work, but when I 
jam them together, I'm lost, especially in Task #3. Any 
help would be greatly appreciated. Thanks!

3.Rookie needs help

I have a file "VSSetup.exe" that need to be installed with local admin 
rights.  I want to install through a script, but there is no way I am going 
to give the users elevated rights.  How can I install the (McAfee Antivirus 
Product) with elevated permisions?

Thank you all,

4.Rookie Macro Help


I created a Macro in MS Word that prompts the user via InputBox. That value 
is stored in a variable named State.

I then open certain docs depending on what state it is using a Case 
structure (Select Case).  However, I am wondering if there is an easier way 
to accomplish this?  I am having to to create about 40 cases for each state 
we support, so any other advice/suggestions would be much appreciated!


5.HELP, HELP, HELP Please Connection to remote database

6. help please or any coment please

7. Please, Please help with Grand Totals

8. please, please help - can't access HTTPFileCollection

Return to Visual Basic


Who is online

Users browsing this forum: No registered users and 8 guest