Crystal report file locked
Hello,
I have an application in Visual Basic 6.0 an use Crystal Reports 8.5 through OCX. Whenever I open a report and close it again, the report file is locked on the computer. I have to shut down my VB6 program in order to be able to delete or overwrite it on my PC. I think I do not close my report properly, so it stays in memory as long as my VB6 application runs.
My code runs as follows:
Load frmBeginEnEinddatumIngeven
frmBeginEnEinddatumIngeven.Show vbModal
If Not frmBeginEnEinddatumIngeven.blnAnnulerenGekozen Then
With crptBRUMUKassasysteem
.Formulas(0) = "Begindatum = '" & Format(frmBeginEnEinddatumIngeven.dtBegindatum, "dddd dd mmmm yyyy") & "'"
.Formulas(1) = "Einddatum = '" & Format(frmBeginEnEinddatumIngeven.dtEinddatum, "dddd dd mmmm yyyy") & "'"
.SelectionFormula = ""
.ReportFileName = gsRapportenpad & "Ticket\rptTicketPeriodeVerkoop.rpt"
.SelectionFormula = "{tblA_Musea.MU_Museum_id} = " & glVerkooplocatie_id & " And {tblTV_Sessies.TVSE_Begintijd} >= #" & Format(frmBeginEnEinddatumIngeven.dtBegindatum, "mm/dd/yyyy") & "# And {tblTV_Sessies.TVSE_Begintijd} < #" & Format(frmBeginEnEinddatumIngeven.dtEinddatum + 1, "mm/dd/yyyy") & "#"
.Action = 1
.ReportFileName = gsRapportenpad & "Ticket\rptTicketPeriodeBezoekersstatistiek.rpt"
.SelectionFormula = "{tblA_Musea.MU_Museum_id} = " & glVerkooplocatie_id & " And {tblTV_Sessies.TVSE_Begintijd} >= #" & Format(frmBeginEnEinddatumIngeven.dtBegindatum, "mm/dd/yyyy") & "# And {tblTV_Sessies.TVSE_Begintijd} < #" & Format(frmBeginEnEinddatumIngeven.dtEinddatum + 1, "mm/dd/yyyy") & "#"
.Action = 1
.Formulas(0) = ""
.Formulas(1) = ""
.SelectionFormula = ""
End With
End If
Can anyone help me to solve this problem?
Many thanks and greetings,
Michel
Hi,
Did you try running one report first if still the problem persist? Or try running other report with one condition only, Let say try to run this first,
If Not frmBeginEnEinddatumIngeven.blnAnnulerenGekozen Then
With crptBRUMUKassasysteem
.Formulas(0) = "Begindatum = '" & Format(frmBeginEnEinddatumIngeven.dtBegindatum, "dddd dd mmmm yyyy") & "'"
.Formulas(1) = "Einddatum = '" & Format(frmBeginEnEinddatumIngeven.dtEinddatum, "dddd dd mmmm yyyy") & "'"
.SelectionFormula = ""
.ReportFileName = gsRapportenpad & "Ticket\rptTicketPeriodeVerkoop.rpt"
.SelectionFormula = "{tblA_Musea.MU_Museum_id} = " & glVerkooplocatie_id & " And {tblTV_Sessies.TVSE_Begintijd} >= #" & Format(frmBeginEnEinddatumIngeven.dtBegindatum, "mm/dd/yyyy") & "# And {tblTV_Sessies.TVSE_Begintijd} < #" & Format(frmBeginEnEinddatumIngeven.dtEinddatum + 1, "mm/dd/yyyy") & "#"
.Action = 1
Regards,
Clint
Similar Messages
-
Help required in embedding flash file object into Crystal Report file.
Hello,
I use the default version of Crystal Report (i.e.'Crystal Report Basic For Visual Studio 2008 - version 10.5' ) which is the part of 'Visual Studio 2008', to create and display the Report. Further, as a requirement, I have to show 'Event Video' into the Report. But, as this default version of Crystal Report does not support Flash File, I uninstalled it and downloaded and installed the 30 days trial version of the Crystal Report (i.e. Crystal Report 2008 - version 12.0).
Then, I created a new Crystal Report File using 'Crystal Report 2008 Designer', embedded the video as a Flash File(i.e. SWF file) into it. Now, when I add this newly created Crystal Report File into my sample application, which is created using VS 2008, it does not shows the embedded video.
So, can anybody please tell me, how can I embed the Flash File into Crystal Report, so that it will be visible in the sample application?
I would like to appreciate your help and support.
Thanks,
-Yogesh.Symptom :
When embedding a pdf document into a Crystal Report, only the one page shows.
Reproducing the Issue
Environment:
Crystal Reports OLE object
Cause
An OLE object only displays the first page.
Resolution
Embed multiple objects, one for each page
Or
Use a hyperlink to the object instead
Hope this helps!
Regards,
Vinay -
RE: What's database field are used in crystal report file?
Hi all
Please help me a C# code that using Crystall Report API (Crystal Report XI- Develop license) to get the list of database fieldname that using in crystal Report file. (What's database field using in header section ,group section , detail section of report.....)
We looking forward to hearing from you
Thanks
SonHello Son,
please use this code below to get a list of used database fields in a report :
//File Name: CS_Get_report_data_out_inproc.sln
//Created: April 11, 2008
//Author ID: FLI
//Purpose: This C# .NET sample Windows application demonstrates
// how to retrieve report data and put the into a XML file
// using unmanaged RAS.
// Note this is available without a dedicated RAS with SP2 for XI R2
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportAppServer.ClientDoc;
using CrystalDecisions.ReportAppServer.Controllers;
using CrystalDecisions.ReportAppServer.DataDefModel;
namespace CS_Get_report_data_out_inproc
public partial class Form1 : Form
// CR Declarations
ReportDocument boReportDocument;
ISCDReportClientDocument boReportClientDocument;
public Form1()
InitializeComponent();
//Create a new ReportDocument
boReportDocument = new ReportDocument();
// load the RPT file
boReportDocument.Load("..
ReportData.rpt");
// show in reportviewer
crystalReportViewer1.ReportSource = boReportDocument;
private void button1_Click(object sender, EventArgs e)
//Access the ReportClientDocument in the ReportDocument (EROM bridge)
boReportClientDocument = boReportDocument.ReportClientDocument;
// Retrieve the Rowset Controller
RowsetController boRowsetController = boReportClientDocument.RowsetController;
// Retrieve the metadata (column headers) - this allows you to only retrieve the data that is on the report.
RowsetMetaData boRowsetMetaData = new RowsetMetaData();
Fields boFields = boReportClientDocument.DataDefinition.ResultFields;
boRowsetMetaData.DataFields = boFields;
// Now print out the data in XML file
//(Note: This will print out the results of formulas too)
StreamWriter sw = new StreamWriter("C:
ReportData.xml", false);
sw.WriteLine("<?xml version='1.0' encoding='utf-8'?>");
sw.WriteLine("<ReportData>");
sw.WriteLine("<Reportheader>");
// Print out the titles
for (int i = 0; i < boFields.Count; i++)
String boFieldName = boFields<i>.Name;
sw.WriteLine("<ReportheaderDetail>" + boFieldName + "</ReportheaderDetail>");
sw.WriteLine("</Reportheader>");
//Create the cursor which lets us loop through the data
RowsetCursor boRowsetCursor = boRowsetController.CreateCursor(null, boRowsetMetaData, 1);
Record boRecord;
while (boRowsetCursor.IsEOF == false)
sw.WriteLine("<Customer>");
boRecord = boRowsetCursor.CurrentRecord;
for (int j = 0; j < boFields.Count; j++)
try
sw.WriteLine("<Detail>" + (String)boRecord[j].ToString() + "</Detail>");
catch (Exception err)
sw.WriteLine("<Error>" + err.Message + "</Error>");
sw.WriteLine("</Customer>");
boRowsetCursor.MoveNext();
sw.WriteLine("</ReportData>");
// CLose the file
sw.Close();
MessageBox.Show("XML File 'ReportData.xml' successfully created on C:"); -
Overwrite crystal report file name with new version but keep history
I am writing a Crystal Reports .NET SDK in C# code to upload a crystal report files from its destination to CMC folder on BO XI R2 Platform.
On "Upload Button" click_event, validate the two check boxes controls named "Keep History", and "Remove History". Once "Keep History" check box is selected, check If the SAME report file name exists in the same destination CMC folder, if Yes, overwrite it BUT Keep the History and all its associated objects like "recurring objects". If "Remove History" is selected, then remove the existing report and upload the new report file name.
Please provide me some codes on how to do this task. This is definitely a "WIN" - "WIN" effort and contribution to my Team Goals.
P.S. This is a similar scenario when you are uploading report on BO Enterprise R2 CMC.
When Uploading a new report to a folder but same report file name exists, the BO System will promt message "Report File Name" already exists. Do you want to Overwrite it?" If Yes, then system will overwrite the file but it will keep the history and recurring objects.
Any help would be greatly appreciated.
Thanks,
BienSuggest looking at [this|https://wiki.sdn.sap.com/wiki/display/BOBJ/NETBusinessObjectsEnterpriseSDKSamples] wiki for links to pertinent samples. Also, check out the [Developer Help File|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/WS_SDK/wssdk_server/default.htm]. Searching these forums for similar queries may also prove to be fruitful
Ludek -
Creating crystal report file dynamically.
Post Author: malcomstewart115
CA Forum: General
Hi, everybody.
I have one problem.
How to create crystal report file(*.rpt) in php dynamically.
I mean, I want to create the "*.rpt" file with php code.
Please help me. thanks everybody.Post Author: PWilkens
CA Forum: General
It sounds like you're defeating the power and purpose of Crystal Reports, or replace it with pure PHP (which I suppose could be done... but why?)
What exactly are you trying to do?
If you're trying to make certain parts of the report hide or reveal or change depending on variables settings in the PHP file, that's easy enough to accomplish by sending parameters with your PHP values into the report. But the dynamic actions really need to be done within the report itself, accomplished through ample use of the section and field settings provided within the Report Designer. -
Create crystal report file using JAVA
Can someone tell me how to a Create crystal report file using JAVA Programming
I want a very simple examplePlease help me. It's urgent.[http://catb.org/~esr/faqs/smart-questions.html#urgent]
Be back in an hour or two... -
View Crystal Report File from SDK
Hello All,
I want to View Crystal Report File (.rpt file) from SDK (using VB 6 )
I have already try following code on my Add On :
Public Sub RunCrystalReport()
Dim crlApp As New CRAXDDRT.Application
Dim crlRep As CRAXDDRT.Report
Set crlRep = crlApp.OpenReport("D:\ReportTest.rpt")
Dim CRAX2 As CrystalActiveXReportViewerLib12Ctl.CrystalActiveXReportViewer
Set CRAX2 = Form2.CRAX
CRAX2.ReportSource = crlRep
CRAX2.ViewReport
End Sub
But, nothing happen
Could some one help one for this ?
Thanks a lot
Regards,
Arie
SDK BeginnerAmazing Sir !!...
I could run my report through B1 SDK right now...
Many thanks to you Sir..
Just one more thing, The Horisontal and Vertivcal Scroll control wasn't appear. Do I have to add scroll object or someting like that
Many thanks again to you Mr. Porcelli
Arie -
Crystal report files created, but why not all?
I am using several (total 19) Crystal report files (*.rpt) in my project as report or subreport. When I delete these rpt files under my "...\bin\Debug" folder and run the application I see that some (exactly 14) of them are automatically retrieved back into the "...\bin\Debug" folder.
But there are several other reports (remaining 5 of them) I also want them to be created at the application start. I have debugged the application from tha main entrance and saw that the rpt files are generated even the first line of code is executed. Also checked my "App.config" file (where I hold the paths for these report originals) and added the most recently created report that is not retrieved into the file, but the file is not retrieved.
I have also checked the contents of "XXXXX.exe" (XML Configuration file), "XXXXX.vshost.exe" (XML Configuration file) under "...\bin\Debug" folder and "XXXXX" (Microsoft Visual Studio Solution), "XXXXX" (Microsoft Visual Studio Project file), "XXXXX.csproj" (Visual Studio Project User Options file), "XXXXX" (XML Configuration file) under the project folder but I still can not figure out how the Visual Studio determines which ones to retrieve and leave others
Any help would be appreciated.
Regards.This could be related to the Build Action property for the .rpt file. Compare the settings for this property to see if the files that are not copied have a different setting.
-MJ -
Error when upload Crystal report files to CMC
hi All,
i having an error when trying to upload a Crystal report files to CMC, the msg appears below :
Unable to find servers in CMS obt-sg-a1mgr.obtechglobal.com:6400 and cluster @obt-sg-a1mgr:6400 with kind fileserver and service FileStoreV2. All such servers could be down or disabled by the administrator. (FWM 01014)
any help would be appreciated, thanks.
Regards
HariyonoHi
can you please go to the CMC under Servers and check the status of your file repository servers? Are they enabled and in status running ?
Regards,
Stratos -
Having trouble opening Crystal Report files from a document library
I am trying to open Crystal Report .rpt files from a document library in either the native, client Crystal Reports software or in Crystal Reports Viewer. When I add the Crystal Report files to a document library and attempt to open them SharePoint displays
a prompt asking me to save the file locally instead of opening the file. I have done a lot of research online and found several sites discussing similar scenarios, however, I have not been able to get these solutions to work. Here is a short list of sites
I have referenced for possible solutions:
http://naadydev.blogspot.com/2013/03/crystal-report-viewer-sharepoint-2010.html?showComment=1383339860122
http://social.technet.microsoft.com/Forums/sharepoint/en-US/52aabf2d-10dc-424c-bd50-124fc972a9b9/crystal-report-viewer-integration-with-sharepoint-2010?forum=sharepointgeneralprevious
http://www.codeproject.com/Articles/42731/Crystal-Reports-WebPart-for-SharePoint
Here are the steps I have done to try to get the .rpt files to open:
Added the Crystal Report extension .rpt as a MIME type
Installed the Visual Studio 2012 Crystal Reports Viewer toolbar
Installed the 64-bit Crystal Reports runtime
I have also created a solution file based off the Code Project site which partially works, but not quite right. In this project I have created a document library called "Crystal Reports rpt Files" and deployed the solution file to a site. When
I open the Web Part Maintenance Toolbar I can see the selected .rpt file in the drop-down, but no Crystal Report file is displayed on the page itself.
I am not sure what I am doing wrong. Does anyone have experience working with Crystal Reports and SharePoint 2013 (or earlier versions) that could lend some advice?
Thank you,
AlexWe are having the exact same issue, has anyone resolved this yet?
-
How to publish non-Crystal Report files in BO XI R2?
Development Environment: Visual Studio 2005, C#
I'm working on a project where I need to publish non-Crystal Report files - specifically Excel and Text files - to a specified folder in BusinessObjects XI R2. However, I'm having a very hard time finding any samples for how to do that. I know how to publish Crystal Report files, so I figure I'll need to instantiate a PluginManager object of the correct type, but I'm not sure how to load the file from there.
Can anyone provide some sample code or point me in the right direction so that I can figure this one out? Thanks!
-DellA code snippet for Text:
txtPath = @"C:\mytext.txt";
ceSession = (new SessionMgr()).Logon(username, password, cmsname, authtype);
InfoStore infoStore = new InfoStore(ceSession.GetService("InfoStore"));
int folderID = ((InfoObject) infoStore.Query("Select TOP 1 SI_ID From CI_INFOOBJECTS "
+ " Where SI_KIND='Folder' "
+ " And SI_NAME='" + folderName + "'")[1]).ID;
InfoObjects txts = infoStore.NewInfoObjectCollection();
Txt txt = (Txt) txts.AddEx("Txt");
txt.Title = "Test Text";
txt.Files.Add(txtPath);
txt.ParentID = folderID;
infoStore.Commit(txts);
Ted Ueda -
How to retrieve Statistics info from Crystal Report file
In Crystal Reports designer, if you go to File|Summary Info that dialog has two tabs. The second tab is called "Statistics" which contains the following:
Last Saved By
Revision number
Total Editing Time
Last Printed
Created
Last Saved
How can I retrieve this information via either the .NET SDK or the RAS SDK?Hi David,
Actually I did understood your question. I did say that some of that info is available from the hard drive file system.
Use the Object Browser and find this source:
public System.DateTime CreationTime { set; get; }
Member of System.IO.FileSystemInfo
Looking at the properties you'll see all the info you are looking for is there. As I said, some of the info is available from the Summary API's and some are available from the file system. The file system is not CR but basic Microsoft API's. Search their help for more info on how to use them.
Thank you
Don -
How to read Crystal Report file Design version programmatically
Hi,
I am working on a project where I need the read Crystal file header and extract information that which designer was used to create the (Crystal) report. This will help me do some specific task if the version of the crystal used is very old (say older than 7.0), relatively new (say between 7.0 and 11.0) and the latest (11.0 or later).
I have downloaded the SDK and all the dlls, but I just couldn't find any API or function using which I can get this info.
Could you please let me know if there is any way to read this information programmatically from a crystal file?
(I know this info can be seen in Crystal designer, but I need to do it at runtime).
Thanks.
Edited by: addi2011 on Mar 14, 2011 2:02 PMUnfortunately, not enough info...
if you are using CR for Eclipse, please post your query here:
SAP Crystal Reports, version for Eclipse
Before you do, I'd highly recommend having a quick peek at this:
What do I need to do to get the fastest issue resolution?
If you are using BI, post your query here:
Java SDK Application Development
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
Pass along Crystal Report file name on export to Excel
Hello, I am using Crystal Reports 10 and create numerous Crystal reports, all of which end up being exported out to Excel. Is there a way to export the name of the Report or its file name out to Excel as well? I work with so many reports that I can't always trace back the Excel version of the report back to its Crystal report roots.
Thank you.Hi
In field explorer Use Special Field called File Path and Name drag and place it in Report Header
If you want just the report Name then use Report Title.
Cheers
Rahul -
Importing a Crystal Report file in SAP B1
Hi All,
I am using Crystal Report Basic 2008 and was able to create a rpt file and connect to the SAP B1 (through import option in Admin-> Setup -> General -> Report and Layout Manager) Purchase order screen,But i am not getting a series wise records.
i.e. i have 2 series in PO screen as Primary and PO and both starts from DocNum 1 (have diff period indicator) but when i use it in CR as Parameter is ask series as input every time. So pls guide me with proper method.
hope u all will do the needful
Thank u,Hi,
i have a data as below (OPOR table)
DocKey DocNum Series and other details.........
1 1 Primary(i.e any numeric value)
2 2 Primary(i.e any numeric value)
so on..................
3 1 User Defined(i.e any numeric value)
4 2 User Defined(i.e any numeric value)
so on.................
Now both the series have different period indicator (i.e primary is of default(sap one) and User defined is of 2010-11).
and now whenever i want to show the report for PO No 1 from any of the series it takes both the records!!!
i hope its clear for u all!
Thanks and Regards,
Edited by: Shraddha P on Sep 24, 2010 3:42 PM
Maybe you are looking for
-
I am working with reports of 2.5 version and i got a requirement for adding an option to save the report in pdf format. Can anybody please help me on this asap Thanks & Regards
-
Can we pass the HashMap object to Stored procedure using toplink
Can we send the java.util.Map object as input to the stored procedures. Can any one please tell how we can do this using toplink. I tried to do that by doing following steps 1. Crated the -- Column Name - Value Pair CREATE TYPE col_data_pair IS OBJEC
-
Why does my printe say "used supply in use" 1217nfw
Why does my printe say "used supply in use" model m1217nfw
-
HDMI Constantly Auto-Switching
Hi, I've had one of the newer style BT Youview boxes since around June, just recently when the box is in standby it constantly causes the TV to automatically switch to the HDMI input. It does this every few minutes and gets very annoying! Is anyone e
-
Use BDLS in BI for re-mapping of source system
Hello, Is it possible to use tr code BDLS in BI in order to automatically change source system assignment in source system related BI objects (such as info sources, info packages..)? We have created a new ECC QA client and would like to load data fr