Previous Year Data in Crystal Reports
Hi Experts,
I need to generate crystal report with current year sales data, and previous year sales data.
How to get previous year sales data in crystal reports (Here am Using BEX Query as a Data source).
Please do need ful
Moved to BEX forum
Similar Messages
-
Find no of week in a month of particular date in crystal report
dear sir
i have to find out the *no of week in a particular month against the particular date in crystal report* . i am trying this formula but
it will give me a no of week from january .but i want the week no of that date only in my report.pls assumes week ends on sunday .wheather month start from any day.below formula get me record :- no of week "6"
but according to my query right result will be ,no of week is:-"2".
datediff("ww" , date("01"&right(cstr(date(#15/02/2011#)),8)),#15/02/2011#,crsunday)
if you have any solution to my problem .please respond me sir as soon as possible.
thanks sir
with warm regards:Anand Azad Sharma.you are on right derection but i cannot find the solution from this formula because i already try this technique. but now i
found the result by own: the exact result of my proble is this:
dateVar myDate := cdate(#01/31/2010#); //replace with your date field
numberVar DayNum := Day(myDate);
numberVar Week1Saturday := (7 - DayofWeek(Date(Year(myDate), Month(myDate), 1))) + 1;
stringVar WeekNum;
if DayNum IN [1 to Week1Saturday] then
WeekNum := "1"
else if DayNum IN [(Week1Saturday + 1) to (Week1Saturday + 7)] then
WeekNum := "2"
else if DayNum IN [(Week1Saturday + 8) to (Week1Saturday + 14)] then
WeekNum := "3"
else if DayNum IN [(Week1Saturday + 15) to (Week1Saturday + 21)] then
WeekNum := "4"
else if DayNum IN [(Week1Saturday + 22) to (Week1Saturday + 28)] then
WeekNum := "5"
else
WeekNum := "6";
" Week " + WeekNum
thanks for your immediate response sir
with warm regards :Anand Azad Sharma -
Previous month data in WebI Report
Hi All,
I have a universe created on a Bex Query. I don't have any variables created in the Bex Query. I have to create a WebI report with Calendar Year/Month as selection and depending on what user enters, i have to display Cost for the month entered by the user and cost for (month -1 ). For eg. if the user enters Feb 2009, then the report should display Cost for Jan 2009 and Feb 2009. I have created a filter for Calendar Year/Month. How do i bring previous month data in the report ? I don't have to modify the Bex Query. I have to achieve it on the BO side. Can you guys help on this problem.
Thanks,
SaachiHi,
There is a restriction in BO when you use it with SAP.
When the user filters the data for FEB 2009, you will not be able to get data for JAN 2009 as it does
not go again to the Bex query to fetch this data.
The only workaround as of now to this is to bring all the data using Bex query by having a filter
at the BO Query level where you say Cal year/month key = (From prompt) or
Cal year/month key <> #.
This is because it considers Cal year/month as string and so even at the universe level we will not
be able to create a previous month formula.
I hope this helps.
Thanks,
Kartik -
Date data from Crystal Report one day less than Date from Source
Hi,
I am creating a Crystal Report 4.0 for Enterprise Users (Client Version only) based on a BEx query. I have a field called 'Date' that I am bringing over from the BEx query. It has a format of MM/DD/YYYY. When I view the 'Date' in Crystal Reports, it is displaying as 1 day less from the actual data. For example, in the BEx Query, 'Date' = 11/01/2011. In Crystal Reports, it is showing up as 10/31/2011, which is one day behind. I'm not sure what's going on.
Please help!Well, this is as weird as it gets!
Here are the observations on SP02:
1) The Date Characteristic is a day off in the report while the 'Key' shows correct date
2) It displays in the '30.01.2011' (DD.MM.YYYY)format
3) When you right-click this field to change the date format, the date option is missing
4) You create a formula to see if this is a date and it returns True. The formula you can try is :
isdate(). It returns False for any other function like isnumeric() etc
5) So, this is a date filed, or CR4E thinks this is a date field, however doesn't let us change the format
6) You cannot use this field with date functions like cdate(); weird!
7) The only way you can show it the way you want is to write this formula:
*mid(,4,2)&"/"&left(,2)&"/"&Right(,4)*
This is still a string field, however displays as MM/DD/YYYY.
In Crystal Reports 2011, however, the following formula on the same date field returns a date value, meaning you can further right-click this formula field to change the date format like a normal date field:
cdate(tonumber(Right(,4)),tonumber(mid(,4,2)),tonumber(left(,2)))*
The same formula, however, throws a 'String is non-numeric error in CR4E and I found that it doesn't like this:
*tonumber(Right(,4)) ; same error
I've tried a lot of combinations to make this a date field in CR4E, however none works!
So, the only option is to use the formula that I mentioned above.
P.S: If you install Patch 2.10, you'll notice that the Characteristic value shows the correct date. For some reason though, it is in the same format as the 'Key' and if we wish to change the date format, the only possible workaround is to extract the numbers and join like I suggested above.
Hope this helps!
-Abhilash -
Stored Procedure for displaying data in Crystal Reports
Hi I am new to Oracle & Crystal Reports,so can any one please give me sample stored procedure to display data in Crystal report from Oracle by passing rwo input values.
from site:-
Crystal Reports will only support the return of a single refcursor from Oracle. Even the latest and greatest version 10 doesn't allow you to return more than one recordset at a time. You could add one more step to your procedure that would join up the output of the multiple refcursors into a PL/SQL table and then fetch the result set out through a single refcursor. That way you are using temporary space that will be cleaned up as soon as the connection is terminated and will only be returning a single refcursor -
Step- by- Step on How to Load Excel data into Crystal Reports?
Hi Friends,
Can anyone send me a Step- by- Step on How to Load Excel data into Crystal Reports? Pls help me. Thanks in Advance.
VijayIt's also important to 'prep' the excel file prior to connecting to it.
Give the data tab a meaningful name
Make sure the column headers are unique and that every column has a header
Delete any blank tabs
If you have trouble with Excel changing the data type of a field (say, a social security number you want to be a string value rather than a number so you don't lose leading zero) an alternative would be to save the spreadsheet file as a CSV, create a schema.ini to specify the data types for each column (example below) and use the same steps to connect except instead of choosing Excel 8.0, scroll to the bottom and choose Text. You have to make sure the CSV file is in the same folder as the schema.ini file that defines the columns.
Schema.ini example:
200912PUSD.csv
ColNameHeader=True
Format=CSVDelimited
MaxScanRows=25
CharacterSet=OEM
Col1=SSN Char Width 9
Col2=LAST_NM Char Width 25
Col3=FIRST_NM Char Width 25
Col4=DOB Date
Col5=STDNT_ID Char Width 10
Col6=SORTKEY Char Width 10
Col7=SCHOOL_NM Char Width 30
Col8=OTHER_ID Integer
Col9=GRADE Char Width 2
The filename in the first line needs to have the [] brackets around it, but I couldn't get it to display in this forum correctly.
Edited by: Eric Petersen on Jan 27, 2010 9:40 AM -
Hi ,
I've the data something like this :
Fiscal Year Fiscal Period Metric Inventory
2001 January Auto 3160561.67
2001 February Auto 2962785.92
2001 March Auto 3451301.7
2002 May Auto 3319819.79
2002 June Auto 3972317.49
2002 July Auto 3743610.69
2002 August Auto 3772486.83
I've a combo for fiscal year and based upon the year selection its data is displayed in a Pie chart
and when I select a particular fiscal year its previous year data and selected year data should be displayed in a pie chart.
How to capture previous year data?
Thanks
RamRam,
I will share the sample xlf file, you can contact me through my profile.
-Anil -
Printing the datas through Crystal Report from Java
How can I Print the datas through Crystal Report from java?
How can I Print the datas through Crystal Report from
java?
What the hell are "the datas"?
Jesus, I can understand this is a shrinking planet, Global community, and all that happy horse pucky. Typos or small grammar errors are no big deal, I make them all the time. But when I have to spend more time interpretting the question than figuring out the answer, it drives me crazy. -
Updating the previously updated records in Crystal Reports
Hi All,
Well I am currently working on Crystal report 11. The issue that I am facing is in regard to the already updated row's record.
In one of my reports I am fetching data from the database which is received by the Crystal Report's one by one as in the normal cases it is being done. For each record some manipulation is done and then it is printed for the user's viewing.
The problem that I am facing can be better be explained while taking an example.
Lets suppose, I have 100 rows of records in the database table which I have to show to the user after modifying any row of record if necessary. And in each row of record there are suppose 10 columns. Now in the data in the 10th column of the row is dependent on the any xth row of record which is a variable value which can be 5th row, 19th row or even 100th row.
Now when I receive 1st row I manipulate it if required and print it, then I receive 2nd row and print in the same fashion, n so on. Now in the 15th row I receive some data by which I have to modify the 10th column of the 2nd row which I had previously modified and printed. This dependency could be for any row depending upon the kind of data the record brings.
Is there any way to handle these kind of cases at the Crystal Report end side. If you need any further clarification in regard to this or any more information then please do let me know.To be honest, I'm not really following the logic you need to implement. However, if you base your report on an SQL Command, you can do all of the logic there. (It is functionally equivalent to a database Stored Procedure.) You can use a temporary table if you don't have a permanent one to store the modified data. At the end of the command, return the already-modified data from the temp table.
One other possibility might be to read the data into arrays, perform the logic on the array data, then print. You may run into array size issues (among other things), though...
HTH,
Carl -
Can not retrieve data in Crystal Report
Hi,
I have a problem to load data from <i><b>Crystal Report</b></i> in an SBO form with the ActiveX DI object : the Crystal Report Viewer message display : <b><i>'Failed to retrieve data from the database. Details [Database Vendor Code:208]'</i></b>
It seems do not change the name of database in SQL Crystal Report query : My SQL query in Crystal Report file is a generic query : it must run with all custom database with the same datatable ; so the database name in FROM clause must be change with the SetLogonInfo : but it do not run !
Have you an idea ?
Francis
Here my code :
Public Class frm_CRViewer
' Adding References of project : CRAXDRT and CrystalActiveXReportViewerLib11
Private WithEvents MRO_CRV As
CrystalActiveXReportViewerLib11.CrystalActiveXReportViewer
Public Sub New()
Dim msa_Form As SAPbouiCOM.Form
Dim dsa_ActiveX As SAPbouiCOM.ActiveX ' Item <ActiveX> from form XML
dsa_ActiveX = msa_Form.Items.Item("axCRV").Specific()
dsa_ActiveX.ClassID = "CrystalReports11.ActiveXReportViewer.1"
MRO_CRV = dsa_ActiveX.Object
' Create the crystal application
Dim dob_ReportApp As New CRAXDRT.Application
' Open the report
Dim dob_Report As New CRAXDRT.Report
dob_Report = dob_ReportApp.OpenReport("c:MyTest.rpt")
' Defined to log on to the data source, and change the database name in FROM clause
Dim dob_Table As CRAXDRT.DatabaseTable
For Each dob_Table In dob_Report.Database.Tables
dob_Table.SetLogOnInfo("192.168.2.10", "AeroOneDemo", "sa", "45dfrfg5")
Next
' The report have a parameter in the sql query
dob_Report.ParameterFields.Item(1).DiscreteOrRangeKind = CRAXDRT.CRDiscreteOrRangeKind.crDiscreteValue
dob_Report.ParameterFields.Item(1).AddCurrentValue("15")
' Display the report in SBO form
Title = pst_ReportName
MRO_CRV.ReportSource = dob_Report
MRO_CRV.ViewReport()
End Sub
End ClassTry these ...
<a href="http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2002650&sliceId=&dialogID=7002531&stateId=1%200%207004328">http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2002650&sliceId=&dialogID=7002531&stateId=1%200%207004328</a>
or
<a href="http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2000957&sliceId=&dialogID=7002728&stateId=1%200%207004460">http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2000957&sliceId=&dialogID=7002728&stateId=1%200%207004460</a>
or
<a href="http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2001075&sliceId=&dialogID=7002728&stateId=1%200%207004460">http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2001075&sliceId=&dialogID=7002728&stateId=1%200%207004460</a>
or
[url=http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2003637&sliceId=&dialogID=7002728&stateId=1%200%207004460]http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2003637&sliceId=&dialogID=7002728&stateId=1%200%207004460[/url] -
No data in Crystal report from SProc
Hi,
I have a SProc with 10 temporary tables.
The first temp table has a @StartDate and @EndDate as parameters. The data from each table flows to the next table and so on of the single SProc.
The 10th table has the data which are required on Crystal Report (CR).
I have chosen the SProc as the only data source on CR. When I refresh the CR, the CR is blank. However, when I execute the SProc in SQL with the parameters, I get all the rows in the results correctly.
[SProc] '20101001', '20101031'
What should I do to get the result data in CR too?
Thanks,
Ajay AudichAjay,
The only way I can see this working is to have the final SP populate a "Global" temp table, so that it's available to other processes.
You could then write a Command that looks something like this...
EXEC FirstSP ('{?BeginDate}', '{?EndDate}');
SELECT * FROM ##Temp;
This is just a theory, but it may be worth testing.
To create a global temp table in SQL Server, simply use two #'s instead of 1 (CREATE TABLE ##Temp).
If you aren't using SQL Server, a little Google searching should find you the equivalent for your database.
Greg's idea will also work... If you are allowed to add an actual table to your database. If not the Global should work.
HTH,
Jason
Edited by: Jason Long on Nov 22, 2010 9:37 AM -
No data in Crystal report created on SAP BW BEx Query
Hi Experts,
I am trying to create a Crystal report on top of a BW query. I am able to login to the BW system and open the BEx query and the objects are coming into the crystal report.
But when I drag and drop some objects into the details area and try to preview sample - it does not show any data (it shows accessing database but doesnt bring any data)
I copied the generated SQL query in to the section in the BW system in transaction code 'MDXTEST' and it runs correctly and shows me the result below there.
Just to try - I unchecked 'Use MDX..' check box by following the path SAP->Settings to check if that could bring back data ... and YES that worked which means data is not coming from the BW query with MDX connection but when MDX seems to be fine and retrieve result when I run the sql statement in tcode MDXTEST.
Also when I do preview samples - I can see in SM50 in BW system that it is trying to run the report just that I am not able to see any data in my crystal report.
Any help in this regards would be greatly appreciated.
Thanks in advance.
Regards,
SunnyHello
The order of display of attributes in Webi and Crystal report would be different.
Collapse the infoobject and skim through the attributes, you should be able to find them.
Vishal -
How to compare dates in Crystal Reports 2008
Hello,
I cannot figure out how to compare the dates in the Crystal reports.
I need all dates that are in the future to be displayed with the green font.
So in the formula for the font for this texbox I've tried to use different
formulas like:
If DateDiff("d", CurrentDate, {DevelopmentTracking_SELECT.Anticipated}) > 1
Then
crGreen
or
If {DevelopmentTracking_SELECT.Anticipated} > CurrentDate Then
crGreen
(where DevelopmentTracking_SELECT is the stored procedure, and Anticipated
is a date field).
None of them worked. All dates are treated like they were in the past
comparing to the CurrentDate. If I reverse these formulas like:
If {DevelopmentTracking_SELECT.Anticipated} < CurrentDate Then
crGreen
then all dates turn to green, otherwise they always stay black.
What could be a problem here?
I would appreciate your help.
Thank you.OK, got it, thank you. It worked.
However, I also need to use another field value which is not on the report, like this:
If CurrentFieldValue < CurrentDate And {DevelopmentTracking_SELECT.Completed} = False Then
crRed
DevelopmentTracking_SELECT.Completed is not on the report.
Is it possible to use it with the cross-tab? -
How to feed data into crystal reporte with "SQLQuery" method in c#?
Hi there,
I've an old app that was written in VB with some crystal reports from Crystal Report 7.
Now I need to upgrade this old app into c# with newer version of Crystal Report, so we decide to go for VS2010.
I can open the report template in the VS2010 without any problems.
But I'm running into some issue here:
the old report has multiple tables from a SQL db as the connection. Each table has a PK to each other.
and the VB code feed the data like below:
MainForm.CrystalReport(1).SQLQuery = SQLString
I couldn't find any reference for "SQLQuery" method in the C#, is there such command exist?
Thank you in advanced,Thank you Ludek. Looking into the info you provided.
-
Problem in Fetching value from Employee Master Date in Crystal Report
Hi All,
I am using the SAP Standard report for Sales Quotation and now my client needs a new requirement.
That is, for certain sales employee they need a manger and the manager name, email, mobile no from employee master data should be fetched.
I tried this way,
Assigned the Manager name in the OSLP, memo field and tried to equate the employee name in the OHEM table by using a parameter and tried to fetch the fields but i am not able to view any of the fields from the OHEM table.
How to fetch the fields from the OHEM table?
Help me solving this issue.
Regards,
Jananisuba Shi.
Janani..
Fetching means what .
i am not able to understood...
linking you are not able to understood or any other.
in crystal report are u getting the problem.
First in sql it slef are u able to get the problem..what just explain...
Maybe you are looking for
-
Hi, I am using Acrobat XI standard, on Windows 7, When I print to Acrobat pages are sometimes missed. It is an intermittent fault. Anyone got any ideas what is causing this. Your help would be gratefully appreciated.
-
Project planning estimate for OID installation?
Will someone please help me estimate resource hours required to install OID for a customer website with 100k registered users and peak of 100 concurrent users? We're not sure if we'll go with an active-active or active-passive design, so estimates fo
-
Just wondering, if I connect my iPod (Mac formatted) to my PC (no iTunes), will it be seen as an external drive? If so, that would allow me to copy all the files, would it not? It's an old 20 gig model, if that makes any difference. I'd try it, but I
-
i am loading songs that has crystal as a software instrument AU. as the songs contents loads it stops at crystal a warning alert sounds and it stops loading. crashes GB it used to work fine what happened 10.5.4 please help me!!
-
I ues ipad1, ios 4.3.1, wifi+3g. I have one trouble that: in the event tab of the photos not still taken date, and now its show as 101imprt and the imported photo not in date order. Its come after upgrated to ios 4.3.1. How repair its fault now? Thks