crystal-reports-2008

How to display data in crystal report using 2 sql request and 2 datatables in dataset?

99封情书 提交于 2019-12-02 14:17:46
问题 I have a dataset with 2 datatable aand I need to use 2 sql request to display data in crystal report. So I create 2 datatable in my dataset (DataTable1 and dataTable2) I tried this code but it always execute the second sql request!! con.ConnectionString = @"connection"; string sql = "MyRequest1"; string sql1 = "MyRequest2"; DataSet1 ds = new DataSet1(); SqlDataAdapter dad = new SqlDataAdapter(sql, con); SqlDataAdapter dad1 = new SqlDataAdapter(sql1, con); dad.Fill(ds.Tables["DataTable1"]);

For each crosstab column, highlight maximum value

匆匆过客 提交于 2019-12-02 14:08:44
问题 I'm trying to highlight the maximum value in a Crystal Reports crosstab column, per column, i.e. show the best performing salesman in each month. It seems like a fairly basic requirement, but I can't figure it out! The Highlighting Expert would seem to be the obvious answer, but it only works if you have defined criteria (e.g. Gross Sales > 120,000), and I'm not interested in highlighting the Totals at the end of the columns/rows....I just want the highest value row per column. 回答1: This is

How to display data in crystal report using 2 sql request and 2 datatables in dataset?

半城伤御伤魂 提交于 2019-12-02 11:00:34
I have a dataset with 2 datatable aand I need to use 2 sql request to display data in crystal report. So I create 2 datatable in my dataset (DataTable1 and dataTable2) I tried this code but it always execute the second sql request!! con.ConnectionString = @"connection"; string sql = "MyRequest1"; string sql1 = "MyRequest2"; DataSet1 ds = new DataSet1(); SqlDataAdapter dad = new SqlDataAdapter(sql, con); SqlDataAdapter dad1 = new SqlDataAdapter(sql1, con); dad.Fill(ds.Tables["DataTable1"]); dad1.Fill(ds.Tables["DataTable2"]); CrystalReport1 report = new CrystalReport1(); report.SetDataSource(ds

Crystal Report: Display 0.00 for duplicate values

橙三吉。 提交于 2019-12-02 09:39:27
I am making a crystal report which displays values from database. Now the values from db contains duplicate values. I need that duplicate values should be suppressed and should display 0.00 For Ex. Value 250.00 250.00 250.00 Should display 250.00 0.00 0.00 I have applied "Suppress Duplicate" to the column but don't know how to display 0.00 there. Thanks much! Do not check Suppress if Duplicated. . You need to write formula for Display String . For example, if PreviousIsNull ({object.field}) then cstr({object.field}) else if CurrentFieldValue=previous({object.field}) then '0.00' else cstr(

For each crosstab column, highlight maximum value

不问归期 提交于 2019-12-02 04:16:28
I'm trying to highlight the maximum value in a Crystal Reports crosstab column, per column, i.e. show the best performing salesman in each month. It seems like a fairly basic requirement, but I can't figure it out! The Highlighting Expert would seem to be the obvious answer, but it only works if you have defined criteria (e.g. Gross Sales > 120,000), and I'm not interested in highlighting the Totals at the end of the columns/rows....I just want the highest value row per column. This is much more difficult than it needs to be... Add this text to the summary field's "Tool Tip Text" conditional

Use .net object as data source in Crystal Report 2008

浪尽此生 提交于 2019-12-02 03:04:38
问题 HI all, I created a .net object (ex: A ) which contain data have been collected from tables. Next, i create a List<A>() and pass to SetDataSource() method of ReportDocument object. When i run then an Exception have been throwed : "CrystalDecisions.CrystalReports.Engine.DataSourceException: The data source object is invalid" I don't know the Exception above, Error message isn't clear. Can anybody explain for me? ex: the .net object must inherit from ISerializable..... 回答1: I had this same

Crystal Report always asks for database login

偶尔善良 提交于 2019-12-02 01:29:30
I need your help. I'm writing code for a shop program and I am using vb.net 2008 with Crystal Report version 10.5.37xxxx The problem is when I'm trying to install my program on the client computer, everything works but not in my Crystal Report. It always asks for the database login and I did not code my program to ask for the database login. I just wrote it in simple code like this: Public Class Form16 Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim view As New CrystalReport4 view.SetParameterValue("p_1", Form5.no_faktur_tb_immanuel)

Use .net object as data source in Crystal Report 2008

给你一囗甜甜゛ 提交于 2019-12-02 01:11:11
HI all, I created a .net object (ex: A ) which contain data have been collected from tables. Next, i create a List<A>() and pass to SetDataSource() method of ReportDocument object. When i run then an Exception have been throwed : "CrystalDecisions.CrystalReports.Engine.DataSourceException: The data source object is invalid" I don't know the Exception above, Error message isn't clear. Can anybody explain for me? ex: the .net object must inherit from ISerializable..... I had this same error, but encountered it when using an object as the data source for the report. I had the following code: var

Add “Total” per row and column in Crystal Reports without CrossTab

﹥>﹥吖頭↗ 提交于 2019-12-01 08:35:40
问题 I have a simple question. Suppose I have a Stored Proceudre that returns a table with the following columns: (Item, GreenColour, RedColour), corresponding to all the possible Items and how many of them are "Green" or "Red". i.e, a possible output could be {(Apple, 4, 2), (Chair, 1, 2)}. What I want to do in the report is the following: In the header section, write four columns: "Item", "Green", "Red" and "Total"; where "Total" corresponds to the total per row. Then in the "Details" section

Crystal Reports - Count Formula

一世执手 提交于 2019-12-01 04:32:23
I am developing a report in Crystal and I need to do a count on a particular field that has several different statuses. For example, I have a "StatusType" field in my report that contains values that are "In Process", "Rejected", "On Hold", or "Submitted" . I want to be able to do a count on the "StatusType" field as to how many values are "Rejected" and "Submitted" in one formula. The report is grouped by "StatusType" . I'm new to writing formulas in Crystal Reports so would appreciate some guidance with getting a formula that will count those two values in the field. Please let me know what