Quantcast
Channel: SCN : Unanswered Discussions - SAP Crystal Reports, version for Visual Studio
Viewing all 2556 articles
Browse latest View live

Web services and SAP Crystal Server 2013

$
0
0

Good Morning,

I would like to know how to use web services to open reports of a SAP Crystal Server 2013.

 

Thanks.


subreport causes report to ask for parameter that has been provided.

$
0
0

Using visual studio 2010 and Crystal reports, I have developed a main report with one subreport.  It looks perfect in the Main Report Preview mode.  The main report uses a date parameter to pull the required information from a sql server database.  I am having problems with the CrystalReportViewer code behind. The code below loads the main page.  The parameter "dJobDate" pulls the information I need for the main part of the report without Parameter Window asking for the @JobDate.

 

******************* No Sub Report

The date is passed when the window opens

Report runs without the Parameter Window appearing

 

Sub frmTrkDispatchRpt_Load(sender AsObject, e As System.EventArgs) HandlesMe.Load

   Dim rpt AsNewTruckDispatchRpt

 

      rpt.SetDataSource(GetData(dJobDate))

   rpt.SetParameterValue("@JobDate", dJobDate)

      crvDispatchReport.ReportSource = rpt

      crvDispatchReport.RefreshReport()


EndSub

 

Here I add a line to load and run the subreport.

 

************ With Sub Report

The date is passed when the window opens

Report will not run with entering a date in the parameter window

 

Sub frmTrkDispatchRpt_Load(sender AsObject, e As System.EventArgs) HandlesMe.Load

   Dim rpt AsNewTruckDispatchRpt

 

      rpt.SetDataSource(GetData(dJobDate))

 

 

     rpt.Subreports("ReqMaterials").SetDataSource("tblReqMaterial")  XXXXX The only line added XXXXX

 

   rpt.SetParameterValue("@JobDate", dJobDate)

      crvDispatchReport.ReportSource = rpt

      crvDispatchReport.RefreshReport()


EndSub

 

When I add the line for the subreport and then run the report I get a Parameter Window asking for the @JobDate.  I have tried rearranging these few lines in various ways without any success.  Just to get an idea of what may be happening i put a Messagebox.Show("HERE") in to see where the program goes.  If the messagebox is before the subreport line, it acts like you would think.  I get the message box, hit enter, and then the Parameters windows opens, asks for the job date, I enter the date and the program runs the report.  If the messagebox is after the subreport line, i get the Parameters window, I enter the job date and the report runs and I never get the messagebox.

 

Any ideas of what I am doing wrong?

looking for the uncompiled resource file for Crystal Viewer XI for all languages including english

$
0
0

I did find a download that contained de es fr it jp ko resource files that but it did not include en.  I know that sooner than later I will be asked to modify slightly the en version and might need other languages in the future.

 

Thanks in advance

GL

When I want save crystal report as pdf file, it pop up parameter window again, make me can't save pdf

$
0
0


Hi,

  When I open crystal report and want to save the report as pdf file, it pop up the parameter window and make can't save the pdf files, could you tell me how to solve this problem?

 

  crystalreportsave.jpg

 

 

crystalreportsave1.jpg

 

I use crystal report version 13.0.2000 sp5, (I install sp12 before) same problem.. visual studio 2010

 

Thanks

Kelvin

How to set the max/min value in chart axis using C#?

$
0
0

Hi, sap experts

 

As the picture shows, how can i set the max and min value in chart using C#?

 

QQ截图20141107101152.png

 

For example, in a winform, i have a textbox, when i type a number in it, the number can be automaticly filled into the max value?

 

Thanks.

How to assign custom name to the report exported as mail attachment

$
0
0

There is a situation where we want to change the exported report name and send it as mail attachment.

 

Currently, crystal reports is using loaded file name as name to be used while sending.

 

We could not find any property exposed by crystal API through which report name can be changed at run-time while sending as mail or to exchange folder.

 

Will appreciate if someone can suggest any property available or some suitable workaround if someone has faced similar kind of problem.

 

Version details:

 

VS 2010 SP1

Crystal Report for Visual Studio: Support Pack 10 (v.13.0.10.1385 )

Crystal Report Designer 2013

 

Example:

The saved report name is Report101.rpt and I want to send the exported report in mail as EmpDetails.rpt, but I could not find any property to change the report name.

 

Code Snippet:

'----------------------------------------------

Dim mailOptions As MicrosoftMailDestinationOptions = ExportOptions.CreateMicrosoftMailDestinationOptions()

Dim exportOption As New ExportOptions

 

Dim result As DialogResult = GetMailData(mailOptions.MailToList, mailOptions.MailCCList, mailOptions.MailSubject, mailOptions.MailMessage)

 

        If DialogResult.OK <> result Then

            Return

        End If

 

        exportOption.ExportDestinationOptions = mailOptions

        exportOption.ExportFormatOptions = options

        exportOption.ExportDestinationType = ExportDestinationType.MicrosoftMail

        exportOption.ExportFormatType = format.Type

 

        _mainRep.CrystalRepDoc.Export(exportOption)

'----------------------------------------------

Regards,

Prateek

Report containing subreports created via rcapi, logon data not passed through

$
0
0

Hi all

 

I've "succeeded" in generating a reportdefinition dynamically (using only C# code, didn't do any creating/defining in the Designer), based on choices made by the user of my application:

 

"succeeded", because the report definition looks ok - it contains the correct CommandTable definition, the correct subreports are imported.

When i try to view it in the designer, it looks ok, it even produces the wanted results

 

BUT: When viewing the report, i have to enter manually the password for the mainreport and for each subreport.

When i create a report using the Designer i have to enter it only once, and it seems the credentials are then passed on to the subreports.

 

This is also true when using an exporting tool like CRExport, that enters the login and password in the mainreport, but not in the subreports:

CRExport works perfectly for Designer-created reports containing subreports, but not for reports that were created by my code which is - of course - the point of the application.

 

 

Obviously i'm missing something.

I've used this tool to generate the necessary code, but even when trying this in a simple standalone testapplication, with most of the things hardcoded, i can't seem to get it to work. (I used the tool on a working report, only changed the content of CommandText)

 

Could someone please tell we what i have to set in the mainreport/subreports to make the logoninformation from the mainreport be passed on to the subreports?

 

Version: CR 2011

Crystal report Migration from 10.5 to 13 versin for Visual studio compatibility

$
0
0

Hi All,

 

I am in very critical situation in my project.I tried to upgrade my application which is using crystal report 10.5 version.We need to migrate it ot visual studio 2012 from 2008.Thus 10.5 version of crystal report is not compatibility.We downloaded the trial13 version.It is supported but looks like some code changes needed in order to make this crystal report working.But when i do some changes also,I am getting the below error.

 

"Report File Name was empty"

 

cany anybuddy tell me if they have seen/faced this issue?How can i convert my application from using crystal report 10.5 to 13 version.


VS 2010 and Access accdb causes login popup when there are no credentials for the DB

$
0
0

in all my years I have never connected an external report to an Access accdb data source. There are no log-in credentials for these DB's but the .net (VS 2010) code causes a popup from Crystal Viewer asking for username and password. Of course I am resetting every table def within the Crystal report via code to the new db name and location. What am I missing.

 

Visual Studio 2010

framework 4.0 complete

Crystal latest for Visual Studio 2010

Visual Basic .Net

testing on Windows 7 and XP

Reg: Getting exception while calling Viewer.viewcore.printReport() method

$
0
0

Hi,

 

     We are using latest version of crystal report which includes SAP WPF Viewer to display crystal reports.

     Getting an object reference exception while calling the PrintReport() Method of the report viewer. Please see the stack trace.

 

   at SAPBusinessObjects.WPF.Viewer.MainReportDocument.GetPage(PageRequestContext context)

   at SAPBusinessObjects.WPF.Viewer.ReportDocumentBase.GetPage(Int32 pageN)

   at SAPBusinessObjects.WPF.Viewer.PrintControl.ShowPrintDialog()

   at SAPBusinessObjects.WPF.Viewer.ReportAlbum.PrintReport()

   at SAPBusinessObjects.WPF.Viewer.ViewerCore.PrintReport()

  at AIMSWPFControls.AIMS360ReportViewer.ReportViewerPrint()


Please suggest is how to click on print button  which is inside the report viewer toolbar.


Regards,

Chakradhar.

Load Report Failure

$
0
0

We are using Crystal Report XI Developer full product. We have been able to access our report on the server successfully, until a week ago a "Load Report Failure" started bugging us.

 

In order to fix this issue, we do either one of the following two steps:

1) We have just re-apply the permissions of the folder "Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files on the server", and the report gets fixed

  Note: We do not add new permissions, we just open the security tab, change few settings, revert back to the original settings and just apply.

2) We recycle the app pool in IIS linked to our application

 

The above change is not a permanent fix, we are doing it every time the report fails. However we do not know the actual/root cause of this, therefore would like to know what could be the possible causes leading to this Report Failure

 

On server we have OS : Microsoft Windows Server 2003, Service Pack2

 

I have checked the memory and there is ample space left in the C: Drive

 

Please help us on this.

Load Reports with saved data twice not refresh data

$
0
0

Hi,

I have a program that load and print rpt file with saved data inside. I'm usign VS2010 with CR2010. I load and print report with:

 

rpt.Load(strFileName))

rpt.PrintToPrinter(Copies, True, 0, 0)

 

If I load and print reports, modify data inside and load and print again the second action use  the data of first load.

If I use the follow instruction all work.

 

rpt = New ReportDocument

rpt.Load(strFileName))

rpt.PrintToPrinter(Copies, True, 0, 0)

 

Seems the load function not refresh data inside if I load the same report.

Are there a property to force this without create a new object every time ?

 

Thanks Filippo

How to reference the .NET 4.0 runtime instead of .NET 2.0 Runtime

$
0
0

I'm upgrading a WinForms application from .NET 2.0 to .NET 4.5.2. I have downloaded the latest version Support Pack 12 (v.13.0.12.1494) from SAP. All clients will have a 64bit OS, so I have set the Configuration Manager to target x64 for build. I've run the application and the Reports appear, but my concern is that when I look at the references, it is targeting the .NET 2.0 runtime.

Here is a screenshot:

enter image description here

When I add a reference it only gives me one option per library type when searching for Crystal, which is apparently targeting the .NET 2.0 runtime:

enter image description here

How do I reference the Crystal Reports libraries that target the .NET 4.0 runtime?

Crazy Issue with having to set Report Source twice

$
0
0

Hi,


We are using the latest CR References (13.0.12.1494).

 

We create a report document, set some parameters and some values then set the that report document as the report source of the CR Viewer.

 

The report generates but it does not take the parameters.


If we set the report source a 2nd time, the report takes the parameters and it generates just fine.

 

Actually...if we pause the code, inspect the Report Document object in Visual Studio, then continue the code it also generates just fine. (Without setting a 2nd time).

 

Actually if we do this:

if(rd.HasRecords) and just put anything after (like Int32 I = 0 or something) the report generates just fine.

 

The other interesting item is that our project has been using the 10.5 version of the DLL's for years. We are now trying to use the 13 version. I removed and added the references...but is there something else that we need to do to 'upgrade' our project?

 

Thanks.M

Dynamic list of values in Crystal report

$
0
0

Hi,

 

I designed one crystal report with parameter type for list of values are static and dynamic.

 

Staic Type(City names are manually entered by me at design time)

Dynamic Type( I created a link for City parameter with database, so it should display whatever data available in the database for that particular field)

 

For static I can fetch the data. but For dynamic list of values, it should fetch the value from Database.

 

Is there any APIs available to identify whether it is static or dynamic?

 

How to handle this scenario using CR API's?

 

Please share your thoughts on this...


is crystal reports compatible with VS Pro 2013?

$
0
0

is crystal reports compatible with VS Pro 2013? if so, what do I need to get it to work?

Attempted to read or write protected memory

$
0
0

Hi,


I'm using visual studio 2010 with crystal reports (Support Pack 12 (v.13.0.12.1494).

 

Most of my crystal reports use data from an access database, for an unknown reason I cannot print or export my reports because I'm always presented with the following error "crystal report print Attempted to read or write protected memory. This is often an indication that other memory is corrupt." The application then crashes!

 

I have a MainForm(startup form) -> projectListForm -> reportForm(crystal report)

 

In my mainForm's Load event, I'm connecting to the access database that the crystal report also connects too, if I remove this connection in the MainForm then I can actually Export and Print from crystal report when I open the report form;

 

Also if I set my startup form to the reportForm, the Export and Print work without a problem.

 

I would greatly appreciate any help I can get!

Thank you,


The exception detail is :

 

System.AccessViolationException was unhandled

  Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

  Source=System.Windows.Forms

  StackTrace:

       at System.Windows.Forms.FileDialogNative.IFileDialog.Show(IntPtr parent)

       at System.Windows.Forms.FileDialog.RunDialogVista(IntPtr hWndOwner)

       at System.Windows.Forms.FileDialog.RunDialog(IntPtr hWndOwner)

       at System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner)

       at System.Windows.Forms.CommonDialog.ShowDialog()

       at CrystalDecisions.Windows.Forms.ReportDocumentBase.Export()

       at CrystalDecisions.Windows.Forms.PageView.ExportReport()

       at CrystalDecisions.Windows.Forms.PageView.exportButton_Clicked(Object sender, EventArgs e)

       at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)

       at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)

       at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)

       at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)

       at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)

       at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)

       at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)

       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

       at System.Windows.Forms.Control.WndProc(Message& m)

       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

       at System.Windows.Forms.ToolStrip.WndProc(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.RunDialog(Form form)

       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

       at System.Windows.Forms.Form.ShowDialog()

       at WindowsApplication1.Form1.Button3_Click(Object sender, EventArgs e) in C:\Users\fcapozio\Desktop\Ncl Envirotek\Programming\Test\NCLADMIN\NCLADMIN\Form1.vb:line 345

       at System.Windows.Forms.Control.OnClick(EventArgs e)

       at System.Windows.Forms.Button.OnClick(EventArgs e)

       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

       at System.Windows.Forms.Control.WndProc(Message& m)

       at System.Windows.Forms.ButtonBase.WndProc(Message& m)

       at System.Windows.Forms.Button.WndProc(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

       at System.Windows.Forms.Application.Run(ApplicationContext context)

       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()

       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()

       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)

       at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81

  InnerException:

Does anyone know how to set a timeout on the database call the report viewer makes when loading the rpt file?

$
0
0

I have a web app that has a crystal reports viewer that executes rpt files. The data in the rpt files are populated with a stored procedure that runs on a sql database. The crystal report viewer is the latest version. On .net framework version 4.5. The rpt files are created in crystal reports 2013. We have a case when an end user generated the a rpt file, the stored procedure gets a bad query plan, and just runs and runs on our database server until our db administrator sees it and manually cancels it. Even after the end user has closed the viewer. My question is does anyone know of a way I can set a timeout on the data call the report viewer executes? I can not set a global timeout on SQL batch types because our application has other processes that need a longer timeout property than the crystal report does. I have explored CrystalDecisions.Shared.ConnectionInfo options and haven't had any success. If there is not a way to set a specific timeout on the viewer.. is there a way to change the event type the stored procedure is executed as to RPC? Thanks in advance for your responses.

Can't open source code for VS2010 project

$
0
0

Hi

I have been looking at modifying an open source piece of software (here ... http://www.rainforestnet.com/crystal-reports-exporter/ask.htm)

 

I only need to make a small modification, so I downloaded the source code and tried to open the project in VS2010 but whenever I do it just shows up as "(unavailable)" and nothing I can do will let me open the project.

 

Would anyone be able to download the above source code and see if they can open the project - just to see if this is something I am doing wrong or there is an issue with the download?

 

All I need to do is change one line of code and recompile it but it's proving quite hard!

 

Thanks

Reportclientdocument.close or report.close

$
0
0

Hi Community,

 

I have a question about the two Close methods of the ras sdk.

 

I am using the following code to Close a printed or exported Report:

 

reportClientDocument.Close();

reportClientDocument = null;

report.Close();

report.Dispose();

 

the Report.close gets an error (an external component has raised a condition).

 

I am not sure if I Need to use all of the Statements. It seems that the reportclientdocument.close also Closes the Report and thats why the Report.close or the Report.dispose() gets error.

 

Does anybody know if the reportClientDocument.close implements the Report.close? I thougth that I have to use the Report.dispose() to release the unused objects.

 

Thanks for your help.

 

Regards

 

joerg

Viewing all 2556 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>