Crystal Report Formula field function on OLAP SAP BI/BW Cube
Dear All
We create OLAP Cube Report in Crystal Report 2008 (BO) base SAP ( DB2) BI/BW Cube, Grid report coming correctly. Crystal Report Formula Field functionalities are not avilabel or suporting. If any one explain or some kind of documentation available pl. help me.
Thanks, in advance.
Alfred.M
Hi,
you are using the OLAP Grid which will only have limited functionality. You can use the BW MDX Driver and then connect to a BEx query and you will have the complete functionality in CR
Ingo
Similar Messages
-
SAP Crystal reports formula fields
hi,
how to use formula fields in crystal report.
thanks & regards,vinothHi Vinoth,
That's a very vague question.
You can create formulae via the Field Explorer > Formula option.
After you save and close the formula editor, you need to drag and drop the formula on the report for it to execute.
If you need help with a formula, please post the requirement.
-Abhilash -
Crystal Report formula with datediff not working as expected
We need a Crystal Report formula to display the number of seconds the oldest arriving call has been waiting. Across multiple resources that can each have an "oldest call". The database stores a datetime value for the time the oldest call arrived. If there are no waiting calls, then this field is NULL. (MSSQL database). It seemed reasonable to implement this in a formula that 1) discovers the minimum of "oldest call" timestamps in the selected records, and 2) to use "datediff" to produce the difference (in seconds) between the "oldest call" timestamp and current time.
The first attempt at this relied on "implied" iteration that could be done within a formula. Something like:
data: OLDESTARRIVALTIME
null
'2014-06-14 08:08:08.000'
null
'2014-06-14 08:07:55.000'
null
whilereadingrecords;
datetimevar minArrival;
if isNull({SVCCLASSMEASURES_VW.OLDESTARRIVALTIME}) = False
and minArrival < {SVCCLASSMEASURES_VW.OLDESTARRIVALTIME} then
minArrival := {SVCCLASSMEASURES_VW.OLDESTARRIVALTIME};
DateDiff("s", minArrival, {SVCCLASSMEASURES_VW.UTCDATE})
We tried storing the values of OLDESTARRIVALTIME in an array. We could see it iterating, but the values in the array only contained
the column value from the first record.
This was to solve the problem of screening null values and producing the minimum of the set.
Since that didn't work (and the web articles seemed to imply this would iterate over all the records, we tried another approach. This
time we set NULL timestamps in the table to a timestamp far in the future, so that we could directly apply "minimum" to produce
the correct "begin" for datediff.
data: OLDESTARRIVALTIME
'2030-01-01 00:00:00.000'
'2014-06-14 08:08:08.000'
'2030-01-01 00:00:00.000'
'2014-06-14 08:07:55.000'
'2030-01-01 00:00:00.000'
datetimevar minArrival = minimum({SVCCLASSMEASURES_VW.OLDESTARRIVALTIME});
datetimevar minUTC = minimum({SVCCLASSMEASURES_VW.UTCDATE});
if minArrival < minUTC then
DateDiff("s", minArrival, minUTC)
else
0
(minUTC would be current time in UTC)
So, to start things off, the last formula produces negative numbers! They hover in negative seconds within a negative minute (-33, -45, etc.).
That's inconceivable, considering the test for minArrival < minUTC. Both of the fields are "datetime".
As it turns out, in the near term, it's most important to get the second formula working. And, of course, insights into getting the first
formula to work are welcome as well!
Have we run into some weird behavior of the "DateDiff" function?
Thanks!If DateDiff is always returning a negative number you could try swapping the dates around in the call to DateDiff - it should look like this:
DateDiff("s", minUTC, minArrival)
Or you could use the Absolute Value of the calculation:
Abs(DateDiff("s", minUTC, minArrival) )
As for your first formula, you need to initialize the variable to a value prior to using it in the comparison. If you don't, its value is null and comparing it against a value won't work. (See What is Null and Why is it Important for Crystal Reports | SAP BI BLOG for a blog that I wrote about working with nulls in Crystal.)
You should change your existing formula to something like this:
whilereadingrecords;
datetimevar minArrival;
if OnFirstRecord then minArrival := DateTime(2013, 1, 1, 0, 0, 0);
if not isNull({SVCCLASSMEASURES_VW.OLDESTARRIVALTIME})
and minArrival > {SVCCLASSMEASURES_VW.OLDESTARRIVALTIME} then
minArrival := {SVCCLASSMEASURES_VW.OLDESTARRIVALTIME};
Note how I changed the If statement. Also, you want to replace minArrival with the field value if the field is less than the current value of minArrival - so you need to use ">" instead of "<" in the comparison. Place this formula in the details section. It will now show anything because of the semi-colon on the end. This will ensure that it gets evaluated for every record.
Now, create a second formula that looks like this:
whileReadingRecords;
datetimevar minArrival;
DateDiff("s", minArrival, {SVCCLASSMEASURES_VW.UTCDATE})
Place this formula in a footer section - it will not work in a header section. If you need it in a header section you might be able to take the "whilereadingrecords" off of both formulas and use the "Maximum()" summary function to get the correct value.
-Dell -
SAP Crystal Reports data source connection problem using sap business one
Hi,
I m facing a problem regarding: SAP Crystal Reports data source connection problem using sap business one
I am trying to create a Crystal report but when I try to configure a new connection it does not work.
I select Sap Business One data source and try to complete the information required to connection but it does not list my companies databases, what is the problem?
Our Current SAP related software details are as follows:
OS: Windows Server 2008
SAP B1 Version: SAP B1 9 (902001) Patch 9
SAP Crystal Report Version: 14.0.4.738 RTM
Database: MS SQL Server 2008 R2
I have also added some screenshots of the issues.
Please have a look and let me know if you have any questions or any further clarifications.
I m eagerly waiting for a quick and positive reply.Hi,
There is problem with SAP Business One date source.
I had faced same problem, I used OLEDB Data-source, and it worked fine for me.
So, try to use OLEDB.
Regards,
Amrut Sabnis. -
Problem in using Nested IF-ELSE in Crystal Report formula
Hi Experts ,
I am having some problem using Nested IF-ELSE in Crystal Report formula ,
there is no error in the formula but only one condition is working. other condition is not working
i am using this concept in formula workshop :-
' if{EXCISE_INVOICE;1.Basic Excise Duty BED@10 %}<>0 and{EXCISE_INVOICE;1.Education Cess @2%}<>0 and {EXCISE_INVOICE;1.Secondary Education Cess @1%}<>0 and {EXCISE_INVOICE;1.Central Sales Tax(CST)@2%}<>0
then
Sum ({EXCISE_INVOICE;1.Amount}) + {EXCISE_INVOICE;1.BedAmount@10%} + {EXCISE_INVOICE;1.EcessAmount@2%} + {EXCISE_INVOICE;1.SecCessAmount@1%} + {EXCISE_INVOICE;1.CSTAmount@2%}
else
if {EXCISE_INVOICE;1.Basic Excise Duty BED@10 %}<>0 and {EXCISE_INVOICE;1.Education Cess @2%}<>0 and {EXCISE_INVOICE;1.Secondary Education Cess @1%}<>0 and {EXCISE_INVOICE;1.Input VAT@5%}<>0 and {EXCISE_INVOICE;1.Addtional Tax@1%}<>0
then
Sum ({EXCISE_INVOICE;1.Amount}) + {EXCISE_INVOICE;1.BedAmount@10%} + {EXCISE_INVOICE;1.EcessAmount@2%}+{EXCISE_INVOICE;1.SecCessAmount@1% } + {EXCISE_INVOICE;1.VATAmount@5%} +{EXCISE_INVOICE;1.AddTaxAmount@1%(for VAT@4)}
I want that all conditions should work and the condition which is applicable there according to formula it display the result, if i add another condition then it should also work.
kindly tell me the solution of this problem
Regards
RahulTry this logic:
if{EXCISE_INVOICE;1.Basic Excise Duty BED@10 %}!=0 and{EXCISE_INVOICE;1.Education Cess @2%} !=0 and {EXCISE_INVOICE;1.Secondary Education Cess @1%} !=0
then
Sum ({EXCISE_INVOICE;1.Amount}) + {EXCISE_INVOICE;1.BedAmount@10%} + {EXCISE_INVOICE;1.EcessAmount@2%} + {EXCISE_INVOICE;1.SecCessAmount@1%}
else
0
+
IF {EXCISE_INVOICE;1.Central Sales Tax(CST)@2%} !=0
then
{EXCISE_INVOICE;1.CSTAmount@2%}
else
IF {EXCISE_INVOICE;1.Central Sales Tax(CST)@5%} !=0
then
{EXCISE_INVOICE;1.CSTAmount@5%}
+
if {EXCISE_INVOICE;1.Addtional Tax@1%} !=0
then
EXCISE_INVOICE;1.AddTaxAmount@1%(for VAT@4)}
else
0
If not work, try SQL command.
Thanks,
Gordon -
Crystal Report Formula to select Record of only MAX Value
hi Everyone,
i need a simple crystal report formula to select one department whose recived quantity Maximum.
for example:
itemcode dscription departmen op recived issue
1 a ab 2 2 2
1 a bb 0 2 2
1 a bc 4 8 2
1 a cc 2 2 2
i group by item the item show just once but i want a formula to show one department who's recived quantity is maximum.i suppress the detail section.and just show the group footer/
itemcode dscription departmen op recived issue
1 a bc 8 14 8Thanks
Re: Crystal Report Formula to select Record of only MAX Value
Abhilash Kumar -
Crystal Reports for VS2010 using a custom SAP ABAP function module data source
I recently worked with Crystal Reports 2011 and was able to connect and retrieve data from our R/3 system via an ABAP function module. While researching other features, I found this version that can be installed into Visual Studio 2010. The parameters are not very user friendly in Crystal Reports so I was hoping to create a custom dialog to collect my report parameters.
Does anyone know if I were to install Crystal Reports for Visual Studio 2010, would I be able to design a front-end selection screen in a Visual Basic form and then pass the input to through the Crystal Reports connection to my ABAP function module to retrieve the data filtered on the back-end by the selection screen parameters and return the results to be reported in the Crystal Reports output?
I am using Visual Studio 2010 Professional Visual Basic with the .NET Framework 4.0 on 32-bit Windows 7. I was able to connect to our R/3 system in Crystal Reports 2011, so if I were to install Crystal Reports for VS2010, would there be a similar way of connecting to SAP?
Any assistance or direction would be greatly appreciated.
Thanks,
BryanHello Bryan
I don't know for sure, but I doubt this will work in CRVS2010. Only hope is that the utility available for download in this KBA will point you in the right direction.
- Ludek
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
Share Your Knowledge in SCN Topic Spaces -
SAP Crystal Report - Formula in Cross Tab Report
I have a below requirement in a cross tab report,
Category Name Valu1 Value2 %ge
A Car 40 50 80
A Bike 30 60 50
Total 70 110 63.6
%ge is a formula field and is calculated as value1/value2 * 100
Consider the Total section as a group footer.
In the cross tab report how do I put the formula field for %ge in Total section.Vishujain
Crosstabs are very structured and you are limited in what you can do with them. You can do a percentage summary in Crosstabs, but only as a percentage of the row total or the percentage of the column total. You cannot put a formula in the crosstab to do a percentage of a values in seperate rows. Any time I need to perform a function not available in a crosstab, I do a manual cross tab. Look at: [Manual Crosstab Explaination|Re: Formulas : Help for coding]
Debi
Edited by: Debi Herbert on Nov 3, 2011 11:51 AM -
Crystal report formulas to view revenue for current & Previous Year
Hi all,
We have a requirement to create a formula in crystal reports to display the current month revenue and previous month revenue along with few dimensions and also current fiscal year revenue and previous year.
For ex on SAp ecc table CE11000.
Please provide the syntax for above requirement.
Quick response is appreciated.
Thanks.
DJHI AlunJD,
Thanks for your quick turnaround.
Here's the structure of table i have fields like Currency type,Document Number,Fiscal year , Company code,country, Countrygrp,Document type, Sales quantity & Revenue.
My requirement is to display Revenue for current Fiscal Year and Previous Fiscal year and aswell as Current Month And previous month in the same report.
Is there any functions to create a formula to display data on above mentioned logic.
Thanks.
DJ. -
Databases that Crystal Reports 9 can function with
Hi,
We are going to purchase Crystal Reports for the use with a new financial program that we will be purchasing. The financial program that we will purchase allows report customization within the program if using the Crystal Reports 9 engine. For that reason we are going to purchase Crystal Reports 9. Otherwise we would have to create custom reports outside of this program if using a more recent version of Crystal like 2008.
However we need to make sure Crystal Reports will work with our SQL Server 2005 database. I tried to research a bit on Crystal Reports 9 (of which currently I know nothing about) and came across this document when doing a search https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202ff507-281f-2b10-78b6-b6bce2668d6b.
We also need Crystal 9.0 to work with Paradox and BDE databases. It looks like BDE 5.1 and Paradox 8 & 9 are listed as supported platforms. I also see SQL Server 2000 but do not see SQL Server 2005. Will Crystal Reports 9.0 work with a SQL Server 2005 database and also what are the plans for Crystal Reports 9.0 working with future versions of SQL like 2008?
thanks,
JWAccording to the supported platforms document for CR9:
(You should be able to search and fine this document via https://www.sdn.sap.com/ - you may have to create an account and login)
Database Connectivity
Clients:
u2022 DB2 6.1
u2022 DB2 7.1
u2022 Holos 8.0
u2022 Holos 8.5
u2022 Informix 2000
u2022 Lotus Notes 4.6
u2022 Lotus Domino R5
u2022 Microsoft SQL Server 7.0 SP3
u2022 Microsoft SQL Server 7.0 OLAP Services (SP1)
u2022 Microsoft SQL Server 2000 Analysis Services (SP2)
u2022 Microsoft SQL Server 2000
u2022 Oracle 8i
u2022 Oracle 8.06
u2022 Oracle 9i
u2022 Sybase 12.5
u2022 Sybase 12.0
Servers:
u2022 DB2 UDB 7.1 (Intel)
u2022 DB2 (OLAP) 1.1, 7.1 (Fixpac 0)
u2022 Essbase 5.02 (Patch 13a)
u2022 Essbase 6.0, 6.1 (Patch 2)
u2022 Essbase 6.5 (Only available with the updated
u2022 driver, Essbhapi_650.dll.)
u2022 Holos 8.0
u2022 Holos 8.5
u2022 Informix 9.14 (Intel)
u2022 Informix 2000 (Intel)
u2022 Lotus Domino R5 (Intel)
u2022 Microsoft SQL Server 7.0.699 (Intel)
u2022 Microsoft SQL Server 2000
u2022 Oracle Server 8.0.6
u2022 Oracle Server 9i
u2022 Sybase Adaptive Server 12.0 7/20/2004 4:59 PM Copyright © 2004 Business Objects. All rights reserved.
u2022 Sybase Adaptive Server 12.5
u2022 SAP BW 2.0/Oracle Server 8.0.5 back end
u2022 SAP BW 3.0/Microsoft SQL Server 2000 back end
Other:
u2022 ACT! 4.02 and ACT! 2000
u2022 BDE 5.1
u2022 Btrieve Pervasive SQL 7
u2022 Btrieve Pervasive SQL 2000
u2022 Microsoft Access 97
u2022 Microsoft Access 2000
u2022 Paradox 8
u2022 Paradox 9
u2022 Microsoft Outlook 98
u2022 Microsoft Outlook 2000
u2022 Microsoft Exchange 5.5 -
Crystal report parameter problem while uploading in sap business one
Hi
All
I designed a crystal report using
stored procedure
and
Routemas user defined table
in sql server with three parameter
routname,from date,to date
these parameters are from storedprocedure only but not created in report
i set the parameter routename as dynamic and i assigned the routename field from routemas table
when i run the report in the parameter window it displays the list of routenames
upto this is k but
when i upload this report in sap business one 8.81 PL-05 and
run this report in sap environment First it asks parameters there
it didnt display the list of routnames
when the parameter routname is set as static and assign some routenames manually
then it shows the list in sap environment
Can any suggest the answer
Edited by: madhu ganga raju on Oct 17, 2011 7:06 AMHi Rhaul,
i don't exactly know why this is a problem, but if your not on latest (881 p10) then upgrade and try again.
Or as a workaround,
try saveing from CR to SAP with the CR add-on. That usualy works better then the import.
Regards,
D -
How to change crystal report data field at runtime ?
Hello everyone,
I have a Crystal Report file ,which i am using to generate report for my windows form project .
In that report i have a filed called as Quantity which data type is set as decimal, the requirement is like that the number of value those comes after decimal point that should be set according to the value which is given by the user at the run time .
For eg: If user gives 1 at the run time then the report Qty field value set one value after decimal point. Like 12.1
if user gives 2 then Qty field the value is 12.22 like tat but user can give from zero to any number.. and if it is zero it should not show decimal
Note: The main idea hear is how to change the filed in Crystal Report decimal point value by using code(or we say writing code we need to set manually as user input it will change)
Can any body help me how to solve this issue .
S.K NayakI think you could probably make the field you see a formula field and take a parameter as the number of decimal places.
totext converts a number to a string.
totext({decimalField}, 2)
That's 2 decimal places.
You could probably substitute a {parameter} for that 2.
If not then you could substitute an entire formula.
To explore formulas:
foreach (FormulaFieldDefinition f in rpt.DataDefinition.FormulaFields)
MessageBox.Show(f.Name);
// f.Text = your new formula
Where rpt is an instantiated report.
Or add another string field which you display in the column and do the calculation with the original decimal.
Hope that helps.
Recent Technet articles:
Property List Editing;
Dynamic XAML -
Unable to create a crystal report 2013 on the top of SAP BW 7.00
Hello Team,
We are trying to connect SAP Crystal Reports 2013 to SAP BW 7.00 SP26. This crystal report is being developed on the top of a BEx query accessing through OLAP.
1. We are getting an error- 'Internal Error: The reports applicatiton server failed'.
2. Also, when we try to upload the same report from CMC, we get an error."...................Failed to read data from the report. Reason: Unable to open the OLAP Cube......."
Please advise.
Thanks.BI Platform
-Abhilash -
Crystal Report Connectivity to Function module
Hi,
I have a crystal report which is connected to a Function module in ECC(dev). After the function module moved to Quality I could repoint the crystal database to Quality. Later, some changes were made in the function module fields (eg: change in field length etc) by the field names were kept same. now when i try to repoint the database it says field not found and the report canvas becomes blank. but I can see the fields in the field explorer.
is there a way to correct the error?
Thanks, ArkaHi Arka,
When you open the report then log into the DB and then click on Database, Verify Database. This should update the database info and changes in the report. CR keeps track of the DB it's connecting to so if you make s changes you must Verify the database to update the info in the RPT file also. Be sure to save the report.
Don -
Mapping Arrays indexing in Crystal Reports formulas and indexes
<span style="font-size: 10pt; font-family: 'Times New Roman'"><p style="margin: 0in 0in 0pt" class="MsoNormal">I just took a Crystal Reports Designer class today and I presented the Array Mapping technique to the instructor. Since he was very interested I decided to post it here, so more people can benefit from it.</p> <p style="margin: 0in 0in 0pt" class="MsoNormal">This is an idea used a lot in C++. I designed a formula using two symmetric arrays. One to hold values to be used to test a condition, and a second one to hold values to be outputted when the condition is found. Since the index in the test values array for a given value to be tested matches the index of return values array of the correspondent output value, this methodology is called index mapping.</p> <p style="margin: 0in 0in 0pt" class="MsoNormal">Here follows the code:</p> <p style="margin: 0in 0in 0pt" class="MsoNormal">//testValues array store values to be tested in the formula</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Local StringVar Array testValues :=<span> </span>MakeArray ( "S",<span> </span>"M",<span> </span><span> </span>"L",<span> </span>"XL");</p> <p style="margin: 0in 0in 0pt" class="MsoNormal">//returnValues array store values to be returned by the test formula</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Local StringVar Array returnValues :=<span> </span>MakeArray ( "Small",<span> </span>"Medial",<span> </span>"Large",<span> </span>"Extra Large", </p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span> </span>"App Type not Found");</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Local NumberVar i := 1;</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Local Numbervar returnIndex := -1;</p> <p style="margin: 0in 0in 0pt" class="MsoNormal">//Loop through the entire array for each values of the field</p><p style="margin: 0in 0in 0pt" class="MsoNormal">While<span> </span>i <= Ubound(testValues) AND returnIndex = -1 Do(</p><p style="margin: 0in 0in 0pt" class="MsoNormal">//Actual test of the values and return bellow</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span> </span>If ToText({CUSTOMER.SIZE}, 0) = testValues<i> Then( </p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span> </span>returnIndex := i;);</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span> </span><span> </span>i := i + 1;</p><p style="margin: 0in 0in 0pt" class="MsoNormal">);</p> <p style="margin: 0in 0in 0pt" class="MsoNormal">//If any value found return it, else return last value in the return value array</p><p style="margin: 0in 0in 0pt" class="MsoNormal">If returnIndex = -1 Then</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span> </span>returnValues[Ubound(testValues) + 1]</p><p style="margin: 0in 0in 0pt" class="MsoNormal">Else</p><p style="margin: 0in 0in 0pt" class="MsoNormal"><span> </span>returnValues[returnIndex]</p> <p style="margin: 0in 0in 0pt" class="MsoNormal">Fell free to email me if you have questions and enjoy the code...</p></span>
Can you help with the below?
Group on Client/Location, Brokerage Rate, Product
Read all records for a particular group and store each different currency in an array
On change of group display contents of the stored array.
e.g.
Record 1 ABN AM FUTURE RATE AGREEMENT 0.012500% DKK
Record 2 ABN AM FUTURE RATE AGREEMENT 0.012500% EUR
Record 3 ABN AM FUTURE RATE AGREEMENT 0.012500% GBP
Record 4 ABN AM FUTURE RATE AGREEMENT 0.012500% USD
On change of group I would like to display the following
ABN AM FUTURE RATE AGREEMENT 0.012500% DKK EUR GBP USD
Maybe you are looking for
-
Error message when calling a Business Connector RFC destination from SRM
Hello all, We are facing one problem with data Purchase Order transmission between SRM 5.0 (SRM_SERVER 5.5, extended classic scenario) and Business Connector 4.7. We made needed customizing in order to have "XML / XI" output medium available in tab '
-
K8N DIamond Plus- 4 sticks of memory problem
I have a new Opteron 180 with a K8N Diamond plus mb. I am thinking about getting another 2g of memory to run with my current 2g of 3200 memory to speed up Vista even more. I thought the new chips could run 4 sticks of memory at 400 with a command ra
-
I can't activate Acrobat Pro license
Hello after the inconveniences and the impossibility to connect and sync my documents with Creative Cloud Connection, now it is the turn of Acrobat Pro to giving me trouble. I can't activate Acrobat Pro license, so I can't use it. After launching Acr
-
Trying to simply access and download the Media Encoder application:
Please help. I have looked all over the Adobe CC site as a member, and the links seem to go in a circle that never leads to the actual application, which I need to download and use. Even the trial option does not lead to an acutal access link.
-
How do I transcode Canon 5D Mark II media into Final Cut X?
Hi, I recently purchased Final Cut X. I will be editing Canon 5D Mark II media. How do I transcode the 5D media? Do I need the compressor app to do it? Is there a demo video out there that anyone reccomends. thanks, Tom