CIS 338: VB.NET Printing Dr. Ralph D. Westfall May, 2011.

Slides:



Advertisements
Similar presentations
Crystal Reports In Depth Session XII. Crystal Reports - In Depth Reports outside of halFILE Selecting an ODBC Datasource Selecting a second table and.
Advertisements

Chapter 10 Database Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Miscellaneous Windows 2000 Desktop Features Windows 2000 Intermediate.
Microsoft Office 2010 Access Chapter 1 Creating and Using a Database.
Chapter 1 Databases and Database Objects: An Introduction
CIS 338: Printing Dr. Ralph D. Westfall February, 2003.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Web Feature Sharing Data among Applications.
Exporting Data and Creating Financial Reports with Excel and Crystal Slide 1 Exporting Data and Creating Financial Reports with Excel and Crystal By Peter.
Stored Procedures Dr. Ralph D. Westfall May, 2009.
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Microsoft Visual Basic 2005 CHAPTER 12 Cell Phone Applications and Web Services.
Chapter 3 Maintaining a Database
CIS 338: Creating ActiveX Controls Dr. Ralph D. Westfall March, 2003.
Working with a Database
ASP.NET Web Application Professor Ralph Westfall May 2011.
Chapter 1 Databases and Database Objects: An Introduction
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Chapter 6 Advanced Report Techniques
Chapter 1 Getting Started with VB.NET and Crystal Reports Debbie St. George Wonder Ranch Publishing DBA/Programmer Covington Visual Studio.Net User Group.
Adding User Interactivity – Lesson 51 Adding User Interactivity Lesson 5.
Microsoft Access Get a green book. Page AC 2 Define Access Define database.
Microsoft Access Lesson 1 Lexington Technology Center February 11, 2003 Bob Herring On the Web at
A First Look At Microsoft Visual Basic Lesson 1. What is Microsoft Visual Basic? Microsoft Visual Basic is a software development tool, which means it.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Project 6 Switchboards, PivotTables, and PivotCharts.
Teacher’s Assessment Assistant Worksheet Builder Starting the Program
Introduction to the Visual Studio.NET IDE (LAB 1 )
Microsoft Office 2007 Access Chapter 6 Using Macros, Switchboards, PivotTables, and PivotCharts.
Microsoft Access You will need a pen/pencil.. What is Microsoft Access? Access is a database management system.  Create a database, add/change delete.
Create Forms Lesson 5. Objectives Software Orientation The Forms group (below) is located on the Create tab in the Ribbon and can be used to create a.
CIS 338: Using Queries in Access as a RecordSource Dr. Ralph D. Westfall May, 2011.
Microsoft Visual Basic 2008 CHAPTER TWELVE Cell Phone Applications and Web Services.
Office Management Tools II Ms Saima Gul. Office Management Tools II Ms Saima Gul.
Microsoft Access 2007 Tutorial (Part II) CIS*1000*DE.
BIT 285: ( Web) Application Programming Lecture 18: Thursday, March 5, 2015 REST Creating a REST API Instructor: Craig Duckett.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Access Project 7 Advanced Report and Form Techniques.
Microsoft Access 2010 Chapter 10 Administering a Database System.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
SAFARI ODBC INSTALLATION Go to the TRECA home WEB page.
Fall 2003Sylnovie Merchant, Ph.D. ACCESS Tutorial Note: The purpose of this tutorial is to provide an introduction to some of the functions of ACCESS in.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
Gold – Crystal Reports Introductory Course Cortex User Group Meeting New Orleans – 2011.
Microsoft Office 2010 is the newest version of Microsoft Office, offering features that provide users with better functionality and easier ways to work.
Microsoft Access – Tutorial 3 Performing Calculations copy the HighWageAmounts query and paste it name it HighWageAmountsWithBonus and open it in Design.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
Introduction to KE EMu Unit objectives: Introduction to Windows Use the keyboard and mouse Use the desktop Open, move and resize a.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
Task #1 Create a relational database on computers in computer classroom 308, using MySQL server and any client. Create the same database, using MS Access.
1 Chapter 10 – Database Management 10.1 An Introduction to Databases 10.2 Editing and Designing Databases.
Introduction to KE EMu Unit objectives: Introduction to Windows Use the keyboard and mouse Use the desktop Open, move and resize a.
FIRST COURSE PowerPoint Tutorial 4 Integrating PowerPoint with Other Programs and Collaborating with Workgroups.
Database EssentialsDatabase Essentials Lesson 1 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft Access.
1 After completing this lesson, you will be able to: Create a form using AutoForm. Create a form using the Form Wizard. Add controls to a form. Modify.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
VB.NET and Databases. ADO.NET VB.Net allows you many ways to connect to a database. The technology used to interact with a database or data source is.
Creating New Forms Projects can appear more professional when using different windows for different types of information. Select Add Windows Form from.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Chapter 7 Creating Templates, Importing Data, and Working with SmartArt, Images, and Screen Shots Microsoft Excel 2013.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 11 Creating Web Applications and Writing Data to a Database.
Dive Into® Visual Basic 2010 Express
Stored Procedures Dr. Ralph D. Westfall May, 2011.
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
Chapter 2 – Introduction to the Visual Studio .NET IDE
Brief description on how to navigate within this presentation (ppt)
Presentation transcript:

CIS 338: VB.NET Printing Dr. Ralph D. Westfall May, 2011

Crystal Reports recognized as leading product for printing and formatting reports better reporting than the earlier versions that came with VB6, VB.NET 2003, 2005 Crystal Reports 10 version is packaged with Visual Studio.NET 2008 May need to download free version that works with VS 2010free version

Installing Crystal Reports if didn't do so originally, need to add Crystal Reports to your Visual Studio.NET installation  might also need to reinstall if you upgrade from VS 2005 to VS 2008? Start>Settings>Control Panel> Add/Remove Programs>Microsoft Visual Studio.NET>Visual Studio.NET>Add or Remove Features>etc.

Get Database and Project download and unzip Proj3Web.zip fileProj3Web.zip create a new folder on your desktop copy and paste the Nations.mdf and.ldf files from the unzipped folder into C:\cis338

Creating a Project start VB.NET should see Crystal Reports icon on startup screen create a new Web (or Windows) project Web>ASP.NET Web Application or File>New Project>Visual Windows Form Application

May Need to Attach Database open SQL Server Management Studio save Server Name from login window Connect>right-click Databases>Attach> Add>select.mdf file in new folder>OK>OK expand Databases and the database you will be using right-click table that you will be using> make sure that table has a primary key> close the deign window

Add a Report Designer Project>Add New Item>Reporting> Crystal Report, rename it>click Add (1 st use) accept the license terms>OK with Using the Report Wizard selected, Standard Report highlighted>OK expand Create New Connection>expand OLE DB (ADO)>select Microsoft OLE DB Provider for SQL Server>Next>

Add Your Database check Integrated Security:>Server: (local)\SQLEXPRESS>Database: C:\cis338\Nations.mdf>Next>Finish select Add Command (in Available Data Sources)>click on angle bracket pointing right>(moves to new window) type in the following SQL query: select ID, Country, Gold, Pop, Currency, Capital from nations2, currencies where nations2.CID=currencies.CID>OK>Next

Identify Outputs and Groups expand the command and use the double angle bracket to send all the fields to the right or select fields and use the single angle bracket to send individual fields>Next add a field to Group By: that isn't unique so it will have more than one item in its groups (such as Gold or Currency)> change sort order if want>Next

More Options could select Sum of command.Pop and then select a summarization in ListBox, such as Sum or Average return other groupings to left>Next could choose to group by Top 5 or Bottom 5 sum of command.Pop could choose a charting option>Next

Even More could filter by values in any field could select database values in ListBox or type in value e.g. Pop >=1.0 >Next review the Report Styles by selecting some and viewing Preview until find one that looks best>Finish

Add a Report Viewer Project>Add New Item>Web>Web Form>Add Find Crystal Reports Viewer on ToolBox in Reporting section and drag onto Form in a Windows project (not ASP), could set Anchor property to link to all four corners of form, so user can resize report

Add Report Viewer - 2 Specify the ReportSource as the report you just created>OK, or double-click form to create start of Form_Load code, and add code: Imports CrystalDecisions.Windows.Forms Dim [instance] As New [report object]() [report viewer].ReportSource = [instance] [report viewer].ShowFirstPage( ) 'Notes

Test Report Viewer run project with web form on screen can use navigation at top to scroll through Windows form report review output for possible design changes note buttons at top Print Report, Search Text, etc. Export Report (various file types/formats) Toggle Group Tree

Modifying Report in report designer, right click on some white space (not an object) in form> Insert>Text Object>move box to where you want it and type text in it select fields to widen them and/or move them to better locations right-click redundant fields>Delete Format Object on pop-up menu

Changing Report Options double click the report icon in Solution Explorer to view designer right click on white section of designer, then click Report various options allow you to modify previous choices Report Options allows you to set NULL values to defaults

Fixing NULL Fields in Database in SQL Server Management Studio, right-click database name>New Query query can be used to get data (slide 8) type 1st query below, click the Execute button, then use 2 nd query to verify: 1. update [table name] set [field] = [replace with] where [field] is null 2. select * from [table name] where [field] is [replace with]

Adding Special Fields Crystal Reports>Field Explorer can drag and drop fields such as Print Date, Print Time, Page Number, etc. onto various areas of screen

Open/Show Multiple Forms Project>Add New item>etc. follow the preceding steps to create a Crystal Report on the new form, or some other form put code in a form to select and show the other form (is or loads from Startup object) Private Sub Button1_Click(ByVal sender etc. Response.Redirect("[report file].aspx") 'ASP Form2.Show() 'Windows End Sub