crystal-reports,crystal-reports-2008,crystal-reports-2010,crystal-reports-xi , Crystal Report's 3 Way Formula is not working with a Two-Page Report

Crystal Report's 3 Way Formula is not working with a Two-Page Report


Tag: crystal-reports,crystal-reports-2008,crystal-reports-2010,crystal-reports-xi

I am using this 3 way formula below to get record/s from details section and display in group footer for each group in a report. It is working pretty well BUT NOT WITH A GROUP REPORT CONTAINING OR EXTENDING WITH more than 1 page.

Formula 1: In Group Header (Initialise)

stringvar strtitle := "";

Formula 2: In details Section, (create a condition)


    stringvar strtitle;
    numbervar var;

    if ({@CurrentMonthNew}) = "CLOSED" and ({@PreviousMonthNew}) <> "CLOSED"
    strtitle := strtitle   + ChrW(13) + cstr((var := var+1;),0) + ". "  +    {spMSR;} + " ceased its operation on " + cstr({@LastDate})

   else if ({@CurrentMonthNew}) <> "CLOSED" and ({@PreviousMonthNew}) = "Not    yet operational"
   strtitle := strtitle   + ChrW(13) + cstr((var := var+1;),0) + ". "  + {spMSR;} + " started its operation on " + cstr({@FirstDate})

Formula 3: In Group Footer, display the final output

stringvar strtitle;

Why is not working with a two or more page report and how to solve this problem? Any help will be highly appreciated.


I have tried to uncheck the "Repeart Group Report on Each Page" and it worked, but the group header was lost. How can we have both?


Modify formula in your group header:

If Not InRepeatedGroupHeader Then stringvar strtitle := "";


SQL Server query - Fill Missing Dates In a Date-Sequenced in SQL using Tally Table

I have a table in database with numbers of tenants, each tenant lists a record of their sales per date. There are instance where in a tenant has NO SALES in particular date/s, therefore the date with no sales has NO RECORD in the table breaking a proper date sequence....

Crystal Reports extracting text within delimiters

The software we use is limited to only allowing one manufactures code per product, and this causes problems when we have multiple suppliers for one product. What I'm trying to do is have all the codes in one field and separate them with Crystal Reports on purchase orders. The field...

Crystal Formula field - Splitting a string array of numbers, summing them, and returning the total returns a boolean instead of a number

This is in Crystal reports 2008, all service packs installed. I'm trying to use a formula field to take a string field of space delimited numbers, sum them and return the total. Code below. Always displays true on the report in preview and printed. Not entirely sure if I'm formatting...

Reduce SQL query execution time

I have a situation where our web application generates a Crystal Report based on the query result which takes almost 1 hr to execute. I know this is crazy but, can anyone suggest any optimization or changes in the following giant query. Thanks. Note: I have shorten some of the...

published reports don't work - Database logon failed Error

I am developing a simple web app that has 3 reports created on VS 2013, for some reason those reports run fine from developer mode, but when I publish the website they give me "Database logon failed" Error. What could be causing this? VS is installed on the same server...

Crystal Reports and Null fields

I'm using formula by grouping records in my report like this: field1 + field2 + field3 But when a field inside the formula is null (for example field2) Crystal Reports not groups records properly; So I have to insert in the formula a condition like: field1 + (if isnull(field2) then...

Year and month in a crystal report

I have designed student ID Card using crystal report version 13_0_9 for visual studio 2013. There 2 fields on student ID card that reflect year and month. For the field year I need to show it as 2015 - 2016. And for month it need show as June To May....

Crystal report - Group Towns by Countries

I have two tables With this query i got the results select,,,Towns.TownName from Countries left outer join Towns on = towns.countryID Now i want to group results by country to get something like this on my CrystalReport. Is it even possible to make it ? ...

Crystal Reports not selecting any records when I add a parameter to the report

I'm using Crystal Reports inside of Visual Studio 2010 with ASP.NET. I've got a DataSet that pulls data from a database, and it seems to load into the report just fine. When I view the report in my browser, all records load correctly. I have to add a parameter for...

Crystal Report formula if-else statement Date condition

I would like to ask about how to use if-else statement in the crystal report formula. I want something like If Date = "01/01/1900" Then //Display "-" Else //Display Date But i always faced that the field is require number, currency and date error. I am still new with crystal...

Crystal Reports - Compounding Total in For Loop - Unexpected Results

I've been coding for 15 years, know many languages, C#, C++, PHP, PAWN, SMALL, ETC ETC. Crystal syntax is probably the most inconsistent and nonsensical I have ever seen. Anyhow, I am trying to do something simple here. I have a string formatted like this in my db: "1-DESC, 2-OTHER,...

PercentOfSum(fld, condfld) SSRS Equivalent

Crystal Reports has a built-in function PercentOfSum(fld, condfld) (documentation here). How can I achieve the same functionality in SSRS?

Creating frequency interval in Crystal Report

I am trying to create a dataset of frequency interval in crystal report something like below. First column is rowid, second is start interval , third column is end interval and fourth column is interval name. 1 0 29 0 - 29 2 30 59 30 - 59 3 60...

Export from to PDF throws Internal Error: The export doesn't support one of the functionalities in this report,pdf,crystal-reports,crystal-reports-xi
I'm trying to export a report into a pdf file with but i get an "Internal exception: The export select doesn't supports one of the functionalities used on the report:" I'm using a very simple code: cr.ExportToDisk(ExportFormatType.PortableDocFormat, stringPath) I've already check if the path exists and permissions of the...

store the value on crystal report c#

I am Facing an issue with crystal report. i have generated a custom formula to calculate total attendance hours. the formula code is : if({Atendances.Status} = "OUT") then DateDiff("h",Previous({Atendances.Time}),{Atendances.Time}); and result i am getting 1/5/2015 ___________________________ Time || Status 1/5/2015 11:06:00AM || IN 1/5/2015 3:06:00PM || OUT 1/5/2015 4:06:00PM ||...

Crystal Reports - Changing Table Locations No working

I have an application developed in VB6 which I am migrating to .Net Framework 4.0. There is a report that works correctly in the original application but the migrated application does not work on the original application. As a special feature, this report changed at runtime attribute "location" in two...

Crystal Formula to display the latest

A table has workout columns starting from workout1 till workout7. I want to create formula to check the latest workout (higher) and display it in crystal report. For example, check if workout7 have value then display it before any other workout columns else check workout6, If it value, display it...

how to deploy crystal report on client machine, in,crystal-reports,report
I am working on project with Crystal report. My problem is that, on the client's machine Crystal report forms are failing with the following error; Error-> "Either the crystal report registry key permissions are insufficient,or the crystal reports run time is not installed correctly" Any idea how to solve...

Add Number for Every X line

I've a stupid issue but I can't solve it. I need to add number beside every x records as the following: 1 123123 material1 1 123543 material2 2 123332 material3 2 123432 material4 as you see the first column is a number for every two rows.. I need to do...

What is a unit of PrintOptions.PageContentHeight in CrystalDecisions.CrystalReports.Engine

What is a unit of PrintOptions.PageContentHeight? I thought that it is hundredths of an inch but it seems that it is not. Following figure shows my page setup: But following code return different result: ReportDocument rp = new ReportDocument(); rp.Load(path_to_my_report_file); Console.WriteLine(rp.PrintOptions.PageContentHeight); Console.WriteLine(rp.PrintOptions.PageContentWidth); Output: 8392 5670 where ReportDocument is from CrystalDecisions.CrystalReports.Engine...

crystal report how to display date in boxes of Bank Check Book

I want to print check from SAP Business one. I do all setting except the bank check Date have issue. in bank check the date is in boxes and having spacing. can any one help me to how can i do it? ...

Crystal Reports 2013 Referencing multi-value parameter in command

I have a multi-value parameter called Category, listing out all the different procedure categories that can be queried. How does one reference this parameter in the command. The following code does not appear to work 1. and (i.PROC_CAT_ID in ({?Category})) 2. and (i.PROC_CAT_ID = ({?Category})) Any suggestions for making this...

How to retrieve Crystal page setting programmatically in C#?

I created a Crystal report (.rpt file) in Crystal Designer. I configured Page Setup. I want to retrieve e.g. page orientation, page width, page high programmatically in C#. How to do it? Note that I want to retrieve page settings, no print settings. I don't want to edit page settings,...

how to create sorting using hyperlink header text in crystal report?

i have a report, when clicked on the header text will automatically sort by Asc, when I click on it again it will automatically sort by desc. how to make it in crystal report?

crystal report formula to filter between dates for bar chart

I get an error when I try to add parameters to filter between dates in a crystal report selection record formula. This is the formula I used: if {} >= {?dateFrom} and {} <= {?dateTo} then true Error: A string is Required Here ...

Using Subreport in Crystal Report and ASP.NET C#

My main Report and SubReport is very similar to each other, using same parameters and formula the only difference is their order in the derails section. Now When I load the subreport in the report and run it, ASP.NET keeps on asking to enter values for the parameters used. I...

Suppress on condition on crystal reports

Good day I have little understanding of crystal reports so please bare with me. I have multiple Images on my reports(image1, image2...), but I want to show image1 when I am doing report 1a. All other data on the report remains the same, it is just the image that needs...

Crystal Report's 3 Way Formula is not working with a Two-Page Report

I am using this 3 way formula below to get record/s from details section and display in group footer for each group in a report. It is working pretty well BUT NOT WITH A GROUP REPORT CONTAINING OR EXTENDING WITH more than 1 page. Formula 1: In Group Header (Initialise)...

Convert numeric value field in Crystal Reports 2008

I have an Accno field containing the following Numeric Value: 1,147,852,963,369,258.00 But I would like to convert it to: 114785296369258 How can I do that via Formula Fields in Crystal Reports 2008?...

Crystal Reports GetAttributes

I've been asked to go through over 1000 Crystal Reports to find the Store Procedures and/or Table names used in each report. I would like to do this programmatically, but I don't see much in the way of reading such values from the CR object model. There is a GetAttributes...

Dynamic sort group in crystal reports

I have a sales report grouped by city and country. I need to change the order, some times the groups will be sorted by the total of sales and another times will be sorted by name (alphabetic). How can I do it? I'm using VS2013 C# and the tools of...

Adding 2 additional pages to the end of a crystal Report

I have a report for orders and i would like to add 2 pages at the end of the order. My order is most of the time 1 page, sometimes it will be 2 pages. So I want to add my terms & conditions to the end of it. This...

Trying to convert total minutes from a datediff to days, remaining hours, & minutes in Crystal Reports

I am using Crystal Reports 2013 SP5 on Windows 7 Pro pulling from an Oracle db. I am trying to write a formula(s) in crystal reports that returns the total number of days the remaining hours if less than 24, and the remaining minutes if less than 60 from a...

right to left string in crystal report

Consider Below Query in SQL Server below picture is result of this query in Crystal Reports. as you can see the right part is exactly same as query result in sql server and left part is converted by a locked function to meet right to left property of Persian language....

Extracting XML field in SQL Server

I have fldxml column in a MIWOD table that contains multiple type of data. How can I display [fldxml] column value as shown below? Routing Drawing 1 C:\Users\XXX\Documents\LETTUCE_WHEEL.pdf Here is how [fldxml] looks like <fields> <field1>1</field1> <field2>C:\Users\XXX\Documents\LETTUCE_WHEEL.pdf</field2> </fields> I want get something like this Routing Drawing: 1 C:\Users\XXX\Documents\LETTUCE_WHEEL.pdf I tried...

How to sum filed based on day type in crystal report

The table has two columns named dayType and total, total column already has value and only want to sum records that have the same dayType. I coded this if{EB_Tam_DailyMv.dmv_daytype}= "R" then sum({EB_Tam_DailyMv.dmv_totalot}) else if {EB_Tam_DailyMv.dmv_daytype} = "P" then sum ({EB_Tam_DailyMv.dmv_totalot}) it suppose to print the total of R days but...

Attempting to connect to SQL Server through Crystal Reports

I am attempting to connect Crystal reports to a SQL Server database. Here is what I have done so far. File > Log On or Off Server Create New Connection > OLE DB (ADO) Under provider I selected Microsoft OLE DB Provider for SQL Server and click next. I select...

how to print textbox value in crystal report header section using,crystal-reports,ms-access-2007
i am having crystal report! on that i want to print entered value of textbox in crystal report my code is, Dim report As New CrystalDecisions.CrystalReports.Engine.ReportDocument Dim xs As String xs = salfdte2.Text Dim cmd1 As OleDbCommand = New OleDbCommand("SELECT * from product",con) myDA = New OleDbDataAdapter(cmd1) myDataSet = New...

Crystal Reports only shows the last column,datagridview,crystal-reports
since i am new to crystal report i have search for 3 hours still couldn't find the right answer to my problem. please check my code. Dim rptsumrep As CrystalDecisions.CrystalReports.Engine.ReportDocument Dim sda As New MySqlDataAdapter Dim bsource As New BindingSource Dim dtincom As New DataTable dtincom.Clear() conn.Open() Dim queryIncom As...

Individual Character Boxing Crystal Reports

I am pulling a string from a database (SQL) and it is being put into a Crystal Report, C# is handling the connection strings. I need get each character of the string (between 6 and 16) in it's own box. Similar to those of Direct Debit forms where they show...

How to add a word file content to a crystal report?

I am working on a web application project in visual studio Ultimate 2013. In this project, I am using crystal report templates where I need to design a template for a long word file (15 pages long). My question is: (Is there any possible way to add the word file...

How can I export a query result from MySQL to PowerPoint through my Java aplication? [closed]

I have built a GUI in Java so that the users from my office can search through our database, and the users need to be able to print reports in PowerPoint slides (one slide per register of the database), is there a good library I can use to make the...

Insert Line Split after the first group in Crystal Reports

I need to display line separator above the group headers but not on the first groupheader for eg. Name Course DateJoined SummerCamp Class A 1 2 3 _____________________________________________________________ Class B 1 2 3 ____________________________________________________________ Class C ...

Dashboard Design : Should go for Crystal Reports or Charts in WPF

I am developing an dashboard application which will give insights of the data of an organisation. I am confused as to what will be the best approach in developing the Dashboard: a. Should i go for Crystal Reports b. Should i Use WPF Charts and display Data Any suggestions please...