HELP NEWBIE Integrating CR into Visual Basic 2010 pro
I am creating reports in CR for ms visual studio(VB) how do I do this I am lost. I do not understand how to have a menu written in vb. A menu with reports that a user can select which report to run. I have been tring to do this for weeks. I am using SQL which is on a MS SBS. Any help would be grateful.
Thanks
Hi William,
Could you provide the version of CR and VS you are using?
Also, have you designed the report? do the report work fine from CR designer?
Designing Crystal reports from designer and viewing them from a .NET application are two different things. For a report to work fine from application, it is important that the report should work fine from designer. It is the CR designer where you could connect to the database and drop the DB fields on the report. Once the report is designed and works fine when refreshed then it can be viewed from a .NET application.
To design a report,
- start a new app in VS
- add a new item as a Crystal Report. It will automatically launch the reportcreation wizard for you.
Select the database and add the fields to the report.
The simplest VB.NET application to view reports is using below procedure.
- Start a new app in vosual studio.
- Drag a Crystalreportviewer from toolbox and drop on the form.
- Assign a reportsocurce as your report to the viewer and run the app.
- reprot will prompt for the DB credentials.
And then you could go on adding code to your app..
See the CR.NET sample applications here: http://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports+for+.NET+SDK+Samples
- Bhushan
Senior Engineer
SAP Active Global Support
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
Getting started and moving ahead with Crystal Reports .NET applications.
Similar Messages
-
Using Crystal Reports in Visual Basic 2010
I am trying to add several Crystal Reports to a new project and having a major problem. Here's the situation. I created a new Visual Basic 2010 project with only one form, In visual Basic I added Crystal Reports. I then imported a form that was created in Crystal Reports 8.5.
There were no errors and the report with valid data was visible. I then tried to run...it wouldn't run and 31 errors appeared.
Obviously I missed something. I have searched for a very simple basic tutorial and either can't find one or didn't recognize one.
Can anyone point me in the right direction.
MiltOk. So, you added the report to the project. Now we have to add the CR assemblies to the project, add the viewer (if need be) and fire it off. Simplest code would be:
Public Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
CrystalReportViewer1.ReportSource = ("path to report")
End Sub
In this case you are using the viewer SDK to runt he report. The report will prompt for any logon parameters - but you can code these also. You can load the report via the engine as bellow. Again, the report will prompt. I prefer to use the engine as it is way more "extensible"...
Public Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
crReportDocument.Load("path to report")
'Bind the report to the viewer
CrystalReportViewer1.ReportSource = crReportDocument
End Sub
If you have a report added to the project (strongly typed) the code would be:
CrystalReportViewer1.ReportSource = New myReport()
For more details, I'd recommend looking at the sample app vbnet_win_simplepreviewreport.zip available from the following location:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
The developer help files are here:
[SAP Crystal Reports .NET SDK Developer Guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_dg_2010_en.zip]
[SAP Crystal Reports .NET API Guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_api_2010_en.zip]
- Ludek -
How to connect to oracle database from visual basic 2010 express edition
I have installed visual basic 2010 express edition on windows xp. But visual basic 2010 express edition supports Microsoft sql server database file,Microsoft sql server compact 3.5, Microsoft access database file. I want to connect to oracle database from visual basic 2010 express edition. So what drivers are required and how to do connectivity?
Hello,
I wasn't clear on what you were using to make the connection. I had a look in Visual Studio 2010 (don't have express to test sorry).
I think you mean the Data Sources available under the menu Data-> Datasources. this seems to match the description you give when I
look at the list of datasource options.
In here you can make ODBC connections via the Microsoft .net Data Provider .
If you select ODBC as a datasource you can see listed the DSN's you created - for example I see 2 which use the Oracle ODBC driver.
This assumes you installed an Oracle Client + the oracle version of the ODBC driver (comes with the oracle client).
Once you created a server connection then you should see it in the server explorer.
You can also download the Oracle Developer Tools for Visual Studio which is an add on for VS.
** I suspect this is only for VS 2010 and I didn't see that Express was supported.
http://www.oracle.com/technetwork/developer-tools/visual-studio/overview/index-097110.html
Let me know if that helps.
John -
How to get BW-BPS variable value into Visual Basic?
Hello,
Scenario:
Time characteristic 0FISCYEAR has a variable ZVFYEAR. In layout this time characteristic is defined as DATA COLUMN. When user changes VFYEAR variables value i want to get the value of variable into Visual Basic and to format header for table in the layout.
How to get BW-BPS variable value into Visual Basic?
Could you help me?
Thanks in advance.
Best Regards,
Arunas StonysHi,
If i understand your requirments correctly ,you need to read the value of the Variable and Put it on the layout. Here is how i would solve this,
Read the value of the variable using an ABAP program.The logic for this would be to read the variable value and post it on the layout on a cell.You can do this by calling the ABAP program on opening the layout.this can be done using LB_EXIT_FM T-code. Now using the SAP delivered SAPAfterDataPut macro, read the cell in which you have placed the variable values and assign it to the necessary values you want to on the layout.All this will be done before the layout opens.
Hope this helps.
regards
Sai Vishnubhatla -
How do I get visual basic 2010 on my macbook pro?
How do I get visual basic 2010 on my macbook pro?
The Mac version is called Real Studio
That is not the same as Visual Basic. It is similar, but not the same. Unless something has changed in the last few years, it will not execute or create Visual Basic code. That may or may not be important to the OP, depending on whether he actually needs VB or just a product that is similar, but is an important point he needs to be aware of. -
I want to know how to set the password encrytacion a database. Accdb from Visual Basic 2010 for a report. Rpl
You have to connect via ODBC, then use code along the lines of what is described here:
http://scn.sap.com/thread/3526924
by me on March 28 and Jan on March 29.
Also see KBA: 1686419 - SAP Crystal Reports designer does not recognize Access *.accdb file
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
Can i use visual basic 2010 console mode or later versions on a macbook?
hello. i want to buy a macbook but i am taking computer classes that require visual basic 2010 console mode or later versions. Can i use this on a macbook or does it work only on windows' laptops?
Sometimes they do work - i've done it before. I have a late 2008 Macbook Uni and used the install dvd of my 2009 Macbook White and it worked.
Why not just clone your hard drive? It'll save you a lot of time doing a clone rather than doing a clean install.
Unless you're having issues with your old set up or your old hard drive is dead.
You can download Carbon Copy Cloner - install your new hard drive in a external usb enclosure (around $10) and clone fromt here then test it before you install it in your Macbook.
Once you've done the swap, you can install your old hard drive in the USB enclosure and use it as a backup drive.
Good luck -
SQL SERVER 2012 and Visual Basic 2010
Can an SQL Server 2012 database function when used with a Visual Basic 2010 Program?
Milt
sirmiltCan an SQL Server 2012 database function when used with a Visual Basic 2010 Program?
Milt
sirmilt
Yes
Basically you can use any T-SQL query that you want, directly or through a Stored Procedure.
Ronen Ariely
[Personal Site] [Blog] [Facebook] -
Can I use a dll created in Visual Basic 2010?
I am reading up on the new extention system for air 3.0.
I have successfully (I think) managed to integrate the Air 3.0 prerelease into Flash CS5.5 (I don't use flex or flash builder)
So now I am trying to read up and learn how to use extentions.
Now, I don't know C/C++. My experience with it has been very limited over the years. But I know visual basic pretty well as I have been using that since VB4. (back in the programming stone age, heh)
Right now, I have Visual Studio 2010 and Flash CS5.5.
I am developing for the iPhone and iPad and up until now I have created a working iOS application that works pretty well.
Can I create a dll in visual basic (A class library) and then use the extention system to load that into my application to run on the iOS mobile device?I thought I'd seen this question asked somewhere before, but I can't find the thread. In theory there should be no problem. However, you'll need to have both the LabVIEW 5.1 and LabVIEW 8.6 run-time engines installed, and I don't know if there are any operating systems on which both of those versions are supported. If the run-time engine is properly installed, then calling a LabVIEW-built DLL is just like calling any other DLL. There might be some special optimization if the calling application and DLL both use the same version of the run-time engine.
-
Visual Basic 2010 Msg Box Help
Hey,
I was working on a maze project yesterday. I removed the solution and all the files that are included away to an external device, not on my Windows 7 PC. However, a message box keeps popping up at random moments and I have to click about 30 times to get
rid of them all. This was a problem in my project, and i realize it must still be running somewhere even though it is not still on the PC. how do I stop this?
ThanksHey,
I was working on a maze project yesterday. I removed the solution and all the files that are included away to an external device, not on my Windows 7 PC. However, a message box keeps popping up at random moments and I have to click about 30 times to get
rid of them all. This was a problem in my project, and i realize it must still be running somewhere even though it is not still on the PC. how do I stop this?
Thanks
Try using Resource Monitor or Task Manager to find the process running and make it exit.
You don't explain what the message box is for or what it says.
And by working on I suppose you mean working on a project in and running it from Visual Studio?
Did the project use threading of some style in which a thread is still running from the project?
Is Visual Studio running?
You don't really provide much information in order to assist you.
La vida loca -
Visual basic 2010 project settings
Hi,
Could any one please tell me how to make my project appearance be a specific color depending on the text that is in a text document?
for example, me.backcolor = text document (C:\Users\MajorE.\Desktop\Setting.text.txt). text -and if the text document text = red then backcolor = red-
And another setting...
let's pretend that label 1 backcolor = yellow
Private
SubLabel1_Click(ByValsender
AsSystem.Object,
ByVale
AsSystem.EventArgs)
HandlesLabel8.Click
textdoucument.text (C:\Users\MajorE.\Desktop\Setting.text.txt)= yellow
endsub
the text in the text document will change when I click on a label to a different color
so that every time I put a color from one of my label then exit the application and open it again the back color will be the same color as I chose last time
I'm really into programing although I'm still new or a noob I'd like to learn more and more.
Thank you for reading
MajorEMajorE,
Sorry but you have posted to a forum that deals exclusively with question/issues about customizing and programming Microsoft Project, a planning and scheduling application. I suggest you delete this post and find a more appropriate forum.
John -
How to connect Oracle database into Visual basic 6.0
Hi. I am using Oracle I Enterprise version 9.2.0.1, I have a problem for connecting oracle database into VB. I use a ODBC to connect oracle database with VB. By testing connection. Message tells me that "connection successfully", but I can not have a record display in VB. It tells me that can not publish a connection with ODBC. Please tell me why
Are you using the Oracle ODBC driver? If so, which version?
Are you writing your own VB application? What API are you using-- ADO? Can you post the code that's making a connection and the exact text of the error message?
Justin -
Can I change the color of a ProgressBar In Visual Basic 2010
Is there a way that I can change the Color/Colour of a ProgressBar, or is it a Color/Colour that I have to put up with?
At the Moment the Color/Colour is green...
Kind Regards Gary
Gary SimpsonHi Saygılarımla, Onur Güzel
Below is the code i have and where would i put your code:
ProgressBar1.Forecolor=Color.red
And I have been to my setting but I cannot find Visual Styles under project properties
Kind Regards
Gary
Public Class Form1
Dim CPU As Integer
Dim Ram As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Enabled = True
Timer2.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
CPU = PerformanceCounter1.NextValue
Ram = PerformanceCounter2.NextValue
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
ProgressBar1.ForeColor = Color.Aqua
If ProgressBar1.Value < CPU Then
ProgressBar1.Value += 1
ElseIf ProgressBar1.Value > CPU Then
ProgressBar1.Value -= 1
End If
If ProgressBar2.Value < Ram Then
ProgressBar2.Value += 1
ElseIf ProgressBar2.Value > Ram Then
End If
Label3.Text = ProgressBar1.Value.ToString + "%"
Label4.Text = ProgressBar2.Value.ToString + "%"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
End Sub
End Class -
Need help with integrating chat into Gui
Hello Guys,
I'm fairly new to Java and I have a quick question regarding a simple chat program in java. My problem is that I have a simple chat program that runs from its own JFrame etc. Most of you are probably familiar with the code below, i got it from one of my java books. In any case, what I'm attempting to do is integrate this chat pane into a gui that i have created. I attempted to call an instace of the Client class from my gui program so that I can use the textfield and textarea contained in my app, but it will not allow me to do it. Would I need to integrate this code into the code for my Gui class. I have a simple program that contains chat and a game. The code for the Client is listed below.
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import javax.swing.*;
public class Client
extends JPanel {
public static void main(String[] args) throws IOException {
String name = args[0];
String host = args[1];
int port = Integer.parseInt(args[2]);
final Socket s = new Socket(host, port);
final Client c = new Client(name, s);
JFrame f = new JFrame("Client : " + name);
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
c.shutDown();
System.exit(0);
f.setSize(300, 300);
f.setLocation(100, 100);
f.setContentPane(c);
f.setVisible(true);
private String mName;
private JTextArea mOutputArea;
private JTextField mInputField;
private PrintWriter mOut;
public Client(final String name, Socket s)
throws IOException {
mName = name;
createUI();
wireNetwork(s);
wireEvents();
public void shutDown() {
mOut.println("");
mOut.close();
protected void createUI() {
setLayout(new BorderLayout());
mOutputArea = new JTextArea();
mOutputArea.setLineWrap(true);
mOutputArea.setEditable(false);
add(new JScrollPane(mOutputArea), BorderLayout.CENTER);
mInputField = new JTextField(20);
JPanel controls = new JPanel();
controls.add(mInputField);
add(controls, BorderLayout.SOUTH);
mInputField.requestFocus();
protected void wireNetwork(Socket s) throws IOException {
mOut = new PrintWriter(s.getOutputStream(), true);
final String eol = System.getProperty("line.separator");
new Listener(s.getInputStream()) {
public void processLine(String line) {
mOutputArea.append(line + eol);
mOutputArea.setCaretPosition(
mOutputArea.getDocument().getLength());
protected void wireEvents() {
mInputField.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
String line = mInputField.getText();
if (line.length() == 0) return;
mOut.println(mName + " : " + line);
mInputField.setText("");I think the easiest way to do it would be to cut an paste most of that code into your program. Then all you have to do is change some names so that it uses your textfield and textarea.
-
How do i use directX in microsoft visual basic studio 2010 express ?
i am writing code to graph stock market prices using microsoft visual basic studio express
i want fast response (i do machine language) using directX
this is my problem
i have never used directX, and i have never used directX in visual basic studio
i followed a tutorial that went like this
Reference: Microsoft.DirectX
Microsoft.DirectX.Direct3D
Microsoft.DirectX.Direct3DX
Imports: Microsoft.DirectX
Microsoft.DirectX.Direct3D
Microsoft.DirectX.Direct3DX
Declare: Private D3Ddev As Device = Nothing
Private D3Dpp As PresentParameters = Nothing
Private DP As DisplayMode = Nothing
i found the reference dll's at C:\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0
when i imported microsoft.directX.direct3DX i got error #1
namespace or type specified in the imports 'microsoft.directX.direct3DX' doesn't contain any public member or cannot be found...
the same error occurs wether i use direct3DX \1.0.2911.0 or \1.0.2902.0
when i built and ran, i got error #2
microsoft visual basic 2010 express is waiting for an operation to complete ...
it hangs and i have to soft reset ctrl-alt-del
error #3
when i reference
Microsoft.DirectX
Microsoft.DirectX.Direct3D and
Microsoft.DirectX.Direct3DX
from C:\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0,
all my declares work:
D3Dpp = New PresentParameters() 'Initialize
some stuff for the Presentation parameters
D3Dpp.BackBufferFormat = DP.Format
D3Dpp.BackBufferWidth = DP.Width
D3Dpp.BackBufferHeight = DP.Height
D3Dpp.SwapEffect = SwapEffect.Discard 'There's flip, copy, and discard. Flip and Discard
are used most often.
D3Dpp.PresentationInterval = PresentInterval.Immediate 'Present the scene immediately
but when i start debugging (f5), i get this error message:
mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information
i dont fully understand the visual studio process, but i think 'mixed mode' means run and debug. two seperate app's
i know this is a long question, but the forums don't answer it properly
i want it answered concisly. i am running windows 7 basic, and this is my question
can somebody give me a dozen lines of directX code that will work with my system, so that i can at least draw a line using directX 2D and 3D ?
thanks everybody :)Hi,
Thank you for your post.
I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
and Visual Studio Editor.
Since your issue is related to DirectX, I suggest you consult on DirectX forum:
http://xboxforums.create.msdn.com/forums/ for better response.
Thanks,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Maybe you are looking for
-
Report for displaying info record scale prices
Hi all, Can any one provide me the sample code for a report displaying info record scale prices. Thanks, Suresh
-
Please confirm wheather the tables changed or obsoleted from 11i to R12.
All, Can you please let me know whether the following tables are replaced/obsoleted and such information from 11i to R12 as part of upgrade.Please let me know if you need any further information. Just want to know ,the following tables are changed fr
-
Data Mining - Pattern identification T Sql
Hi All , I have a table that stores customer complaints on daily basis . Example : The table stores customer Information : Customer Name, Complaint Description , Priority .. i want to group the complaints that share the Nearly the same Complaint Desc
-
Display an icon in a table column
Hi, can i display an icon in a table column ? How do I have to handle that ? Thank you... Claus
-
Splinter Cell Conviction Freezing Issue
We have been notified by the vendor of a freezing issue with Splinter Cell Conviction. Please see the details below. Issue: •Freezing issue occurs on Splinter Cell Conviction after installing the title update from Xbox Live. Solution: •Remove the upd