i have database that connect to crystal report.
i have only one field.
how i can print this field in 2 column
ex:
col1 ---- clo2
1 --------- 4
2 --------- 5
3 --------- 6
thank's in advance
if the value of the column is int you can do it with select from database like this
SELECT
case WHEN value / 2 = 0 THEN value ELSE null END AS col1,
case WHEN value / 2 = 1 THEN value ELSE null END AS col2
FROM table
If i haven't understand the problem please explain more. Also you can bind crystal reports to ADO .Net dataset then you can do this split in you code using a loop.
Best Regards,
Iordan
To create a multiple-column report:
1.Open the report you want to format with multiple columns.
2.On the Report menu, click Section Expert.
3.In the Section Expert, highlight Details, and then select Format with Multiple Columns.
A Layout tab is added to the Section Expert.
4.Click the Layout tab and set the Width you want your column to be.
Keep in mind the width of your paper when deciding your column width. For example, if you have three fields in your Details section, and they take up four inches of space, limit the width of the column to under four and a half inches so that all the field information can be seen.
5.Set the Horizontal and/or Vertical gap you want to maintain between each record in your column.
6.In the Printing Direction area, choose a direction.
7.If the report you're formatting contains grouping, select Format Groups with multiple column.
8.Click OK.
When you preview the report, you'll see that the field headers appear only for the first column. To have field headers for the second column, insert a text object.
Related
Good morning colleagues, I approach you with the purpose that you can help me, I need to create a report like this. It is currently in Excel. My main question is that if the detail that would be the product part numbers can grow horizontally / right as shown in the image.
layout excel
example
The detail example
Column Header
Column Header
Column Header
1 value
4 value
7 value
2 value
5 value
8 value
3 value
6 value
9 value
Thank you in advance for your help!
Greetings!
I've created a datatable dtAllStudentMarksDetail in C# which has 5 columns
Student Name | Maths Marks | Physics Marks | Chemistry Marks | Total Marks
and added a row at the last of the table which have total no of students in student name's column, total aggregate marks of Maths in Math marks' column and so on. Now i have set the crystal report's datasource dtAllStudentMarksDetail table. Now i want to make that last row which contains the total numbers font in bold and also want to add a line object above that row.
Is this possible using any sort of formula or i have to remove the last row from datatable and add an extra in the footer section and use formula fields to show the last field?
To get total summary of all student's entry, you did not add row in data-table, right, because crystal report have facility to give summary of your records.
Here you need to some step.
Remove summary row from your datatable.
In design mode of crystal report, set fields in detail section.
To get summary, add summary fields in report footer section or
group footer section. The footer section is used to show summarize view of your detail section, no need to do any thing for summary.
Check this link - http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-summary-field.htm
Second approach is add formula with sum of field(s), and set in footer, http://www.tek-tips.com/viewthread.cfm?qid=680307
Updated
Based on your comment, this is you need. you can bold it via simple property of each field and also in property popup you can bold based on your condition like if field value(Student's Marks) is 80% then bold.
Make textobject bold based on condition in crystal report
I am trying to create two column report for labeling purposes, I followed instructions on the following link: blogs.wrox.com/article/creating-mailing-labels-in-sql-server-reporting-services
But the data keeps appearing on one column and not on both columns, I changed all sizes and tried tables and lists same results, it just won't populate the second column.
When I added a second field, column 2 shifted to the right, changing the the size of the report.
|Field 1 | -- |Field 1 Copy| -----> Column 2 (shifted)
I continued anyway and it shows two of the same values side by side, but in reality they are on the same column, which means I have two fields on the same column, if I hide one, the second will shift and show on the lift side, I have changed the font style to distinguish them from the attached photo.
| Customer1 | -- | Customer1 |
| Customer2 |
The multiple column options in RDLC cause the second column to be treated like a second page and the data only flows into the second column once the first is populated. If you want to force someting to the second column try setting it to have new page before the field and list them. Or don't use the multiple column layout and just put a two column table on the report.
Check your width of report viewer, It seems from image that expr1 and expr2 having more width and also delete second expr2
i have a question: is there any way to show a single row of a table in two rows? The problem is that my table has too many fields and is too wide. So, I think that maybe you can split each row in the table to make it in a row. For example (my idea in Excel, just for example):
Complete table
...and my idea
I hope for your help!
You can:
add a Tablix with 4 columns and without header
add a Rectangle in every detail cell
add 4 TextBox for every Rectangle: use 2 TextBox as labels and two TextBox as values
increase Rectangle height in order to put spaces between every rows
Once you perform this operation for value 1 and 5, you can copy and paste Rectangle in the other 3 cells and simply change label and value.
Please Help!
I asked my Q in many Forums but i did'nt recieve any clear answer.
This is my Q:
I created a table in a Details Section and I have a Title Col and Point Col in this table how can I write code to find Title of max point in my table???
this is my .rpt overview:
(source: googlepages.com)
you see i have 3 cols in Details Section. Point,BitParagonTitle,Alphabet.
I want to show BitParagonTitle to user according to Maximum of point in footer of report.
How can I perform this in Crystal report? please Help me!!!
So I want to:
Find Maximum Value of point Column.
Find title of Max Point.
I created a collection of Data Object in an ArrayList as report DataSource.
Please Help me to write some crystal report scripts to find Title of Max Point and show it in Group Footer.
This is Important that I dont use SQL DB Procedures or tables as data source and I Collected Data manually as I said.
I am not sure of all of your requirements, but if you don't mind the Details being sorted the easiest way is to group by the Point column and then if the points are sorted ascending you can simply put the field title and point fields in the Point group footer. This will only display the last row of the Point column which in turn will be the maximum since it is sorted asc.
This will give you the maximum row so if you didn't care to see the other rows you can simply suppress the details section. Hope this makes sense and helps.
You'll need to use a pair of global Crystal variables in a formula that is evaluated in the Details section, as well as two other formulas referring to those variables.
The two variables are to store the max of point, and the title associated with that (so presumably a NumberVar and a StringVar, say called MaxPoint and MaxPointTitle).
One formula goes in the Report Header, and simply initialises the two variables to zero and empty string.
The second goes in the Details section. It evaluates if the current Point value is higher than that stored in the MaxPoint variable. If so, it stores the new value in MaxPoint and the current title in MaxPointTitle.
In the Report footer, a third formula is used to display the title and/or value.
If you want group max values rather than overall ones, move the formula in the Report header to the Group header, and from the Report footer to the Group footer, and it should work.