How to set Default DateTime values in Crystal Reports 2008
Hi All,
I'm using Crystal Reports 2008. I have two fields FromDate and ToDate in reports. While running report, FromDate field should be displayed with CurrentDate + 00:00:00 in the UI and for ToDate it should be displayed with CurrentDate + 23:59:59 format.
I have tried the below things, But still I want to set CurrentDate + 00:00:00 time in DateTime field.
"In CR 2008 you would set the time portion to 00:00:00 in this way:
1) Edit the date/time parameter and look for the 'Default Value' option; it would be blank
2) Set this to 00:00:00
This would default the calendar to 12/30/1899 00:00:00. The only worry here is, when you click on the calendar icon you would be presented with the calendar for the year 1899 and it is painstaking to scroll all the way to the current year."
I found one solution in SAP forum and I have added the below lines in Record Selection formula,
{@FromDate} = date(@CurrentDate)+time(00,00,00)
{@ToDate} = date(@CurrentDate)+time(23,59,59)
When I run the report, I still getting the empty values in the input parameters screen.
Am I missing anything? Kindly help
Thanks,
Ramesh Kumar G.
See the following for samples:
Java (Crystal Reports for Eclipse) SDK - Business Intelligence (BusinessObjects) - SCN Wiki
BusinessObjects Enterprise / SAP BusinessObjects Business Intelligence Platform 4.x Java SDK Applications
Business Objects / BI Unmanaged Java RAS SDK Sample Applications
Developer Help Files:
Crystal Reports SDK
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
Similar Messages
-
How to set default export format in Crystal Reports Viewer
When Viewing Crystal Reports, the top left button can choose export file format, how to set it default to Excel?
If we can only go with hidden the button, and create a new button, any one can kindly provide how to?
The BOE version is XI R2 SP2.
Thanks in advance!
Jenniehi all , i have same problem like i want only 1 report to be generated like for ex:only PDF should be generated n all others has to be disabled. my jsp is as follows:
<%@page import="com.abc.def.crystalReports.JRCHelper,
com.crystaldecisions.reports.reportengineinterface.*,
com.crystaldecisions.report.web.viewer.CrystalReportPartsViewer,
com.crystaldecisions.report.web.viewer.CrystalReportViewer,
com.crystaldecisions.reports.sdk.ReportClientDocument,
com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,
com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase,
com.crystaldecisions.sdk.occa.report.reportsource.IReportSource,
com.crystaldecisions.report.web.viewer.*,
com.crystaldecisions.sdk.occa.report.exportoptions.*,
java.sql.Connection,
java.sql.DriverManager,
java.sql.ResultSet,
java.sql.SQLException,
java.sql.Statement,
java.util.ResourceBundle"%><%
// This sample code calls methods from the JRCHelperSample class, which
// contains examples of how to use the BusinessObjects APIs. You are free to
// modify and distribute the source code contained in the JRCHelperSample class.
try {
ResourceBundle messageBundle = ResourceBundle.getBundle("resources.ApplicationResources");
String reportName = messageBundle.getString("report.path");
ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
if (clientDoc == null) {
// Report can be opened from the relative location specified in the CRConfig.xml, or the report location
// tag can be removed to open the reports as Java resources or using an absolute path
// (absolute path not recommended for Web applications).
clientDoc = new ReportClientDocument();
// Open report
clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
// ****** BEGIN CHANGE DATASOURCE SNIPPET ****************
String connectString = "jdbc:oracle:thin:@****:db;
String driverName = "oracle.jdbc.driver.OracleDriver";
String JNDIName = "";
String userName = "root"; // TODO: Fill in database user
String password = "root"; // TODO: Fill in password
// Switch all tables on the main report and sub reports
JRCHelper.changeDataSource(clientDoc, userName, password, connectString, driverName, JNDIName);
// ****** END CHANGE DATASOURCE SNIPPET ****************
// Store the report document in session
session.setAttribute(reportName, clientDoc);
// ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
// Create the CrystalReportViewer object
CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
ReportExportControl exporter = new ReportExportControl();
// set the reportsource property of the viewer
JPEReportSourceFactory rptSrcFactory = new JPEReportSourceFactory();
IReportSource reportSource = (IReportSource)rptSrcFactory.createReportSource(reportName,request.getLocale());
Boolean b1 = new Boolean(messageBundle.getString("Toggle.Group.TreeButton"));
Boolean b2 = new Boolean(messageBundle.getString("Has.ExportButton"));
Boolean b3 = new Boolean(messageBundle.getString("Has.SearchButton"));
Boolean b4 = new Boolean(messageBundle.getString("Display.GroupTree"));
Boolean b5 = new Boolean(messageBundle.getString("Has.Logo"));
Boolean b6 = new Boolean(messageBundle.getString("Display.Toolbar"));
crystalReportPageViewer.setHasToggleGroupTreeButton(true);
crystalReportPageViewer.setHasExportButton(true);
crystalReportPageViewer.setHasSearchButton(false);
crystalReportPageViewer.setDisplayGroupTree(false);
crystalReportPageViewer.setHasLogo(false);
crystalReportPageViewer.setOwnPage(true);
crystalReportPageViewer.setOwnForm(true);
crystalReportPageViewer.setReportSource(reportSource);
crystalReportPageViewer.processHttpRequest(request, response, application, null);
IReportSource reportSource = (IReportSource)rptSrcFactory.createReportSource(reportName,request.getLocale());
//CharacterSeparatedValuesExportFormatOptions csvOptions = new CharacterSeparatedValuesExportFormatOptions();
ExportOptions exportOptions = new ExportOptions();
//exportOptions.setExportFormatType(ReportExportFormat.characterSeparatedValues);
//exportOptions.setExportFormatType(ReportExportFormat.PDF);
exportOptions.setExportFormatType(ReportExportFormat.characterSeparatedValues);
exporter.setReportSource(reportSource);
exporter.setExportOptions(exportOptions);
//exporter.setExportAsAttachment(true);
exporter.processHttpRequest(request, response, application, null);
// ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
} catch (ReportSDKExceptionBase e) {
out.println(e);
%>
if i want to add custom button where to add -
How to set default date value to a field on screen
How to set default date value to a field on screen and allow users to modify it ....
Hello,
In the PAI module, you need to save the changes to the database using the command MODIFY.
Follow an example:
Create or change a message in database table T100. If there is no message with the number 100 in the MYMSGCLASS message class in English, it will be created. Otherwise only the text is changed.
DATA message_wa TYPE t100.
message_wa-sprsl = 'EN'.
message_wa-arbgb = 'MYMSGCLASS'.
message_wa-msgnr = '100'.
message_wa-text = 'Some new message ...'.
MODIFY t100 FROM message_wa.
Regards. -
How to set default print orientation in oracle reports 6i?
Can anyone please help how to set default print orientation of Oracle Reports 6i? Currently document is printed in Portrait orientation, but I need to print it in Landscape orientation. Is this possible?
It is solved now. Go to Layout Model -> Main Section, Press F4. In the property pallet select the Orientation that is required to be selected when print is taken for that report.
-
How to set currency symbol correctly in crystal report
Hi all,
I am using the Crystal Report 2008, I have one issue regarding the currency symbol in the crystal report.
it seems the CrystalReport use the System Default currency symbol. e.g.
ProductA Cost: $1000
It displays,
ProductA Cost: £1000
in euro locale and $ in english locale
It doesn't make sense in business. The question is how do we set the currency symbol "$" to the report? I google some websites, the SetLocaleInfo may be one option, I would like to know the detail and if there are more solutions.
Thanks for your helpBefore in our legacy application, we used Crystal Report 9 & VB
'Crystal Report Designer Components (RDC).
Set CrxApp As New CRAXDRT.Application
I can set the crxapp to nothing and recreate this design component.
Set CrxApp = nothing
After SetLocaleInfo, if we set the CrxApp to nothing, it will create the RDC and the currency symbol will be updated.
Now we are using Crystal Report 2008 and C#, the RDC is not supported in 2008
What can I do?
Any input is greatly appreciated.
Edited by: Dennis Zheng on Feb 17, 2009 3:57 PM -
How to assign a variable value to crystal report viewer formula with CR2008
Hi ,
I am using crystal reports 2008 and i am not able to find how to assign variable value to crystal report viewer formula.
In CR 8.5 , i used to have crystalreport1.Formulas(0) = variable1
crystalreport1.Formulas(1) = variable2
but, i don't find similar kind in crystal reports 2008.
How can i achieve the same functionality using crystal reports 2008.
Thanks in Advance
Regards,
RamnathHi,
Can i anyone help me out with this.
I am generating crystal reports in vb6 using CR 8.5 and vb6 and below is the code snippet for the same
CrystalReport1.Formulas(0) = "PrintTitle= '" & strMyTitle & "'"
CrystalReport1.Formulas(1) = "FromDate= '" & MskFromDate.Text & "'"
CrystalReport1.Formulas(2) = "ToDate= '" & MskToDate.Text & "'"
Please let me know how the same functionality can be achieved in VB.Net using Crsytal reports 2008
Any code snippet would be of great Help.
Thanks in Adnvance.
Ramnath -
How to set default field values in customer master data.
hi,
I want to set default values in customer master data (account group wise).
but
I don't know how to set it .
please help me.
(I don't want to change field status in account group rather than I want to set default values for field. )
thank you.hi,
this is to inform you that,
in SAP there is no such a provision.
but
in LSMW there is an option of CONSTANT VALUES.
check in SHD0 - also
please check and confirm
balajis\a -
How to set defalt parameter(s) for Crystal Report in CRS
Hi everybody,
I am new to Crystal Report designing and Crystal Report Server. My problem is; I had created one Crystal Report with sub-reports and some parameters. I had given default value for those parameters. These parameters are there in main report and linked with sub-reports. After that I deployed it in the Crystal Report Server.
Now i want to schedule the report. while scheduling the report, I want to run the report using default parameter(s). If I Clicked on Schedule button, it is giving "report failed" error. And in parameter list it is showing "No parameters". Why this is happening? Is this default behaviour of Crystal Report Server? Can anybody please suggest me how can I give default values for a report automatically?(using Crystal Report Server)
Thanks in Advance.
JitheshNot sure if I understand the question correctly or not. It sounds like you have a main report, with a sub-report and a value is being passed from the main to the sub-report.
When you say you created some parameters, are those parameters in the sub-report or main report?
If it were me I would create a parameter in the main report, and a parameter in the sub report. Have the two reports link on the two parameters.
When you go to schedule the job, set the default value in the cmc under process/parameters.
Let me know if this answers your question. I tend to not fully understand the problem often times.
Good luck!
Rody -
How to set default sync calender category in Entourage 2008
I am using Entourage 2008. Syncing it with ical then sync with iphone (as iphone cannot sync directly with Entourage). Everything works fine right now except that i cannot set default calender event category on Entourage.
now, whenever i make a calender event on ical or iphone even enotourage. it default category as "none", how do i make it default to be "work" category? Now i have to go in every time to chage it, which makes a lot of trouble.
Please help~!!!!
Jason
Message was edited by: jskyHi,
Try this procedures.
1. Dont open your SBO program.
2. Goto C:\Program Files\SAP\SAP Business One\Conf\ folder
3. Delete file b1-local-machine.xml
4. Log to SBO program.
5. Apply all necessary authentication then select SQL_2008 then log.
6. After logging exit to SBO program.
7. Re-log again if SQL_2008 is already in default.
Thanks.
Clint -
How to set 32-bit ODBC to crystal report in 64-bit OS
hello,
Previously, I have asked for the CR export question after OS change from WINXP 32 bit to WIN2003 64 bit, and I configurate the 32 bit ODBC administrator at the server and tried to run program to generate simple report, just use CR's own datasource Xtreme Sample Database 11.5. Unfortunately, the program pop up the error message below.
IM002:[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Error in File C:\DOCUME1\Temp\LOCALS1\Temp\1\CrystalReport1 {20D21A9C-A4AD-4175-81A4-3A25E2D463A0}.rpt:
Unable to connect: incorrect log on parameters.
So I assume, the program will look up for the default ODBC 64 bit for use only. please advise how to set the program to get the 32 bit ODBC to generate report.
Thanks.
Edited by: bigban on Jun 18, 2009 11:32 AMSee [this|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bip/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] and [this|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bip/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] note.
[This|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10d5fa88-2013-2c10-c9a5-f11963607d4e] article may also be of use.
Also ensure you have the correct 32 bit database client installed.
And, what version of CR are you using? What version of .NET are you using?
Ludek -
How to set default company logo in bex report(analyzer)?
hi,
i have a requirement that i need to create default template for my queries in bex analyzer. whenever i execute my query in analyzer the company logo should be on top of the query. i know how to do it in workbook but could you explain me how to set the default company logo in bex reports?
thanks
vadlamudiSee the following document on creating a workbook template with an image: [http://www.researchsummary.ca/bw/Sample_Ch10.pdf]
In BW, there is a table that stores the default workbook. The following snippet of code allows you to identify a custom workbook template as the default template for all end users.
*& Report Z_SET_BEX_USER_TEMPLATE *
*& Program to update all user's default template *
REPORT Z_SET_BEX_USER_TEMPLATE.
TABLES: rsrwbtemplate,
usr01.
PARAMETER: wbid LIKE rsrwbindex-workbookid.
SELECT
FROM
usr01.
MOVE: usr01-bname TO rsrwbtemplate-templateuser,
wbid TO rsrwbtemplate-workbookid = wbid.
UPDATE
rsrwbtemplate.
IF sy-subrc 0.
INSERT
rsrwbtemplate.
ENDIF.
ENDSELECT. -
How to set database location in the crystal report X1 from the Source code.
Dear All,
I am using Crystal report X1 for report generation.Now I am setting the database location manually in the crystal report. How can I Set the database location from the Source code.
Awaiting for your reply.
Thanks in advance.
Regards,
Rahaneef THere's a routine that also searches for subreports to set the log on info. Simply remove that aprt to set the main report logon info:
IDatabaseTablePtr pTable;
//get first table
pTable = m_Report->Database->Tables->GetItem(1) ;
long lTableCount = m_Report->Database->Tables->Count;
for( long lTable=1; lTable<=lTableCount; lTable++ )
pTable = m_Report->Database->Tables->GetItem(lTable);
pTable->ConnectionProperties->DeleteAll();
pTable->ConnectionProperties->Add("DSN", "Name of your DSN");
pTable->ConnectionProperties->Add("Database", "Demo");
pTable->ConnectionProperties->Add("Password", "sa");
pTable->ConnectionProperties->Add("User ID", "1Oem2000");
// Log on the tables of the subreports.
long lSectionCount = m_Report->Sections->Count;
for( long lSection=1; lSection<=lSectionCount; lSection++ )
ISectionPtr pSection = m_Report->Sections->Item[lSection];
long lSubreportCount = pSection->ReportObjects->Count;
for( long lSubreport=1; lSubreport<=lSubreportCount; lSubreport++ )
IReportObjectPtr pSubreportObject = pSection->ReportObjects->Item[lSubreport];
CRObjectKind crObjectKind;
pSubreportObject->get_Kind(&crObjectKind);
if( crObjectKind == crSubreportObject )
ISubreportObjectPtr SubReportPtr = pSubreportObject;
IReportPtr pSubReport = SubReportPtr->OpenSubreport();
long lTableCount = pSubReport->Database->Tables->Count;
for( long lTable=1; lTable<=lTableCount; lTable++ )
pTable = m_Report->Database->Tables->GetItem(lTable);
pTable->ConnectionProperties->DeleteAll();
//pTable->ConnectionProperties->Add("DSN", "dwcb12003");
pTable->ConnectionProperties->Add("Database", "CrystalEport_DB");
pTable->ConnectionProperties->Add("Password", "sa");
pTable->ConnectionProperties->Add("User ID", "1Oem2000");
If that doesn't work you need to tell us what is the error you are getting and paste in the code you are using. -
Post Author: Manjula
CA Forum: JAVA
Hi,
Trying to schedule a report using Crystal Reports Server Java SDK. Want to pass DBConnections from API, though passing DBConnections, the report is not being scheduled and says "Failed to retrieve data from the database.Details:[Database Vendor Code:6550].
Would be thankful if someone could answer my point as applicable.
Here is the code attached.
ISDKList dbLogons = oReport.getReportLogons();int dbLogonSize = dbLogons.size();
for(int i=0; i<dbLogonSize; ++i) {
IReportLogon dbLogon = (IReportLogon)dbLogons.get(i);
dbLogon.setDatabaseName("DBname");
dbLogon.setUserName("usrname");
dbLogon.setPassword("pwd");
Thanks in advance.Post Author: Manjula
CA Forum: JAVA
Ted,
Thank you for your valuable information.
First, tried scheduling on Central Management Console and then with the java code.It worked fine, but here is another question for you.
On the Console, a report exists with ServerName and UserName harcoded and when trying to set ServerName and UserName from the java code, its throwing exception. Where as Password is not set on Console, am able to set password from java.
And DatabaseName is not set on Console (non editable), unable to set the same from java too. Why is it so?
So, my question is - though ServerName,DatabaseName,UserName,Password exists on the Console report, can't I override those parameters from java?
Would be greatful if you answer my question and provide me some guidance.
Thanks in advance. -
Print Multiple Parameter Value in Crystal Report 2008
Hello and Hi
i want to select multiple warehouse in a pramater , i select and report working but parameter print only first parameter value on report.how can print all selected values on reportHi
I am assuming you select warehouses WH1,WH2,WH3,.......
You have to create a formula in Crystal
It should look like this
Join({?YourParamaterName},",")
Place the formula on your report.
The last Part of the formula is the "notation break" between every parameter returned. In this case a > , <
Return would be WH1,WH2,WH3,.......
Join({?YourParamaterName},"#") would return WH1#WH2#WH3#.......
Hope you get the idea
If this solution helps, please rate me.
Regards
Burger -
How do I log a bug in Crystal Reports 2008 ?
I cant find any links at all.
Can anyone help please?
Thanks
RichardHi,
Below are the answers to your queries:
Login to SAP and Business Objects portal
For getting the Login Id and Password fro SAP and BusinessObjects Portal you have to contact to our Customer Interaction Center (CIC)
Below are the contact number of CIC:
+49-6227-744969 (available worldwide)
Contact information for Business Objects # new support telephone number available 24 hours 7 days a week
We can not make our involvement because it involves lots of documentation and we are not well versed with that so CIC is the right place to deal with this and they will help you further for getting your credentials for SAP and CO portal.
Or
If you do not have SAP credentials then :
You will get the further details regarding the creation of new case or logging for a bug from CIC (customer Service), for this you need to create a new incidetn with the BusinessObjects SAP support.
CIC (Customer Interaction Center) Numbers
You can use Customer Interaction Center to submit support requests and service requests for problem messages and remote service postings.
Use the Customer Message Wizard to enter problem messages on SAP Service Marketplace. If you do not have online access, the relevant Support Center can create a message on your behalf.
Call the following number:
+49-6227-744969 (available worldwide)
Business Objects customers:
Contact information for Business Objects # new support telephone numbers, all numbers available 24 hours 7 days a week
More information:
- Business Objects Knowledgebase Central
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_ossnotes&query=&adv=true
It will ask you for a guest account and you can create it there itself.
- Software downloads (Crystal Designer fix packs)
http://resources.businessobjects.com/support/additional_downloads/
- Documentation on Crystal Designer XI and Developer
you can get the documentations on CR and BO on below link:
Http: //help.sap.com/
Click on tab BusinessObjects and then you can give the search criteria for the documents.
Useful links related to Crystal Reports Designer and Java API
https://boc.sdn.sap.com/developer/library
Hope this helps.
Regards,
Deepti Bajpai
Maybe you are looking for
-
I can no longer bring up my mail?
My iMail is suddenly not opening so I used the Mail Connection Doctor. It is forcing me to sign in to my old gmail account which I haven't used in over a year. I could not remember my password for gmail & had to reset it, well now it doesn't match wh
-
Important conceptual question about Application Module, Maximum Pool Size
Hello everyone, We have a critical question about the Application Module default settings (taking the DB connections from a DataSource) I know that on the Web it is generally suggested that each request must end with either a commit or rollback when
-
Low Quality When Viewed In Full Screen
So when I try to view my movie in full screen it's all pixely. Is there something I'm doing wrong, or is setting I need to change? Any help would be great!
-
Drivers for printers I don't have
I seem to be having a different problem than most. My printer works fine and has the current driver. Unfortunately I also have about a dozen drivers installed on my computer for printers I don't own and never have. I can manually uninstall all the dr
-
Hi there Could anyone please help me by telling me how to use a flash file in dreamweaver as a cursor thank you! shayne pooley