Crystal Report Learning 1

Source: Internet
Author: User

I recently want to prepare a report. I started to read it today and found that all the examples provided on the Internet are scattered, and it is not correct to run them all the time. Otherwise, it cannot run. However, I still found a lot of good materials. For example

Http://v.youku.com/v_playlist/f6068270o1p17.html a Demo Video

Http://wenku.baidu.com/view/0d8e92e0524de518964b7d52.html Crystal Reports Quick Start

Basically, I have two parameters, but I also found some problems, that is, I need to enter the database password when reading the data. Later, we found thatCode.

Use crystalreportsource1.reportdocument. setdatabaselogon ("sa", "sa", @ "192.168.1.111", "autolot.

Example:

Webform1.aspx

<% @ Page Language = "C #" autoeventwireup = "true" codebehind = "webform1.aspx. CS "inherits =" crystalwebapp. webform1 "%> <% @ register Assembly =" crystaldecisions. web, version = 10.5.3700.0, culture = neutral, publickeytoken = 692fbea5521e1304 "namespace =" crystaldecisions. web "tagprefix =" cr "%> <! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <HTML xmlns = "http://www.w3.org/1999/xhtml"> 

Webform. aspx. CS

 
Using system; using system. collections. generic; using system. LINQ; using system. web; using system. web. ui; using system. web. UI. webcontrols; using crystaldecisions. shared; using crystaldecisions. crystalreports. engine; namespace crystalwebapp {public partial class webform1: system. web. UI. page {protected void page_load (Object sender, eventargs e) {crystalreportsource1.reportdocument. setdatabaselogon ("sa", "sa", @ "192.168.1.111", "autolot ");}}}

Running result

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.