Display array values in Crystal Report - crystal-reports

I am generating and display crystal report from my asp.net application. In the code, i have a array of numbers that I want to be able to display in the report. so if in my code I have int[] {1,4,5,6,8,10 } I want to somehow pass this array to crystal report so that we have 6 rows in the details section of the report where each row is showing one value from the array..so we will have a report like:
1
4
5
6
8
10
is this possible..how..please help

If you are doing this from .Net, you should be able to achieve this by creating a custom dataset and data table, filling the values in the data table as you require, and then provide the datatable as source to your Crystal report.
Have a look at some of these articles, they should help you in the direction you need
Ignore the section where the database corrections are mad.
Focus on the section where it sets the datasource
// Setting data source of our report object
objRpt.SetDataSource(Ds);
Crystal Report with DataSet and
DataTable using C#
Creating Crystal Reports using C#
with Datasets

Related

Prevent grouping column header in JasperReports

i want to make an Crosstab Template for my data.
For each value there is a timestamp, a location and the name of the device from which i get the value. So i am giving a list of values via Java and a JRBeanCollectionDataSource to my report, for the example below this would be 9 values while each of them has 3 additional parameters to place it on the right column/place in the crosstab.
When i give this sort of data to my Jasper Report with a Crosstab (Crosstab is needed cause i don't know how many rows and columns my report will have) in it, Jasper orders/groups the columns and the output looks like this:
But what i want is to show the data in the sequence i give them to my report, for example:
I am using Java to fill my report with a JRBeanCollectionDataSource and a self defined DataSource (this works perfect, i am working with this method for months).
Is there any way this kind of column grouping could be prevented? (i have a working crosstab template but i am not able to find the propertie with the help of i can solve my problem)
Hope you people can help me.
Have you tried to tell the crosstab that your data ir already sorted?
http://jasperreports.sourceforge.net/schema.reference.html#crosstabDataset
Click the crosstab element, in the Dataset Tab, mark "Data Pre Sorted".

Create section dynamically within a crystal report

I have a requirement where i need to create a section on crystal report multiple times based on a value coming from an XML. I am not using Java or C#. i need to do this within Crystal report.
Version = Crystal Report 2016
If the maximum number of labels is not too high, you could
prepare as much detail sections as will be needed at max,
and control the visibility of each detail section according to your value in "NumberOfLabels"
as shown for MaxRowCount in this answer.

Crystal Reports Data Formatting Issue

I inherited a report where when you run it, the data will be divided into two columns and four rows on one page. I am wanting to change the format so it displays like a basic report where it's just rows listed straight down on the page. The report is below. I am using Crystal Reports 2008 version 12.3.
Report Design:
Report Preview:
Right click in the gutter of the Details section and choose Section Expert...
Clear the Format with Multiple Columns checkbox

How to create Table in Crystal Report

Create Table in Crystal Report
I am newbie to Crystal Report, and i am using Crystal Report 2008. I want to know, do we have table object in Crystal Report.. so that i can draw a table with specific rows and columns, and drag and drop the items to each and every table cell as per the requirement.
The problem i am facing without using table object is that, i have to align each and every element either it is text field or database field from the field explorer, so that it looks like a table and it is too much time taking.
If it can be done in Higher versions of Crystal Reports, then please give details.
you have to draw tables mannually in CR, using the line and box items from the designer,
alignment is also available, you can use gridlines and alignment options of crystal reports, its not hard at all..
Goto Insert - Ole Object - Microsoft Office Excel
It will add a excel file in your report. By dragging vertical reduce the excel object to one row and and horizontally to your required no. of Columns.
That will create a table with one row and many columns and can grow automatically in Detail section.

Crystal Reports Subreport - Selecting data based on column clicked

I have a number of reports with current and ytd columns(summary totals by salesman). I want to be able to select the sub-report based on the column clicked. I have one sql procedure that selects current and one that selects ytd. I want to use the same report format (without having to copy and modify it) for current and ytd. Is there anyway of identifying what column is clicked?
Crystal Reports is pretty much just a reporting tool; it's not very interactive.
I'm more familiar with older versions of Crystal Reports, but as far as I know there aren't any onClick methods for columns that can be trapped using pure Crystal Reports.
Depending on how many columns you have, you can create a subreport for each column, but that may be prohibitively slow if you have a large number of columns you want to create subreports for.
If you're using C# or VB.NET to generate the report, you may have more options, but since the question isn't tagged with any programming languages, I'm going to assume this is pure Crystal Reports.