Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all 3636 articles
Browse latest View live

Crystal reports barcode shrink when generate pdf from asp.net mvc

$
0
0

im use following code to generate pdf from crystal report in ASP.NET MVC platform


[HttpGet]   public ActionResult ClassCard()   {   ReportDocument rd = new ReportDocument();  rd.Load(Path.Combine(Server.MapPath("~/Reports"), "ClassCard.rpt"));  rd.SetParameterValue("ClassName", "Kandy");  rd.SetParameterValue("Type", "Group Theory");  rd.SetParameterValue("year", "2016");  rd.SetParameterValue("Student", "KDG0012");  rd.SetDatabaseLogon("DB_74931_rmsecon_user", "snb123");   Response.Buffer = false;   Response.ClearContent();   Response.ClearHeaders();   try   {   Stream stream = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);  stream.Seek(0, SeekOrigin.Begin);   return File(stream, "application/pdf", "EverestList11.pdf");   }   catch (Exception ex)   {   throw ex;   }   }

this give me pdf as below


http://i.stack.imgur.com/hB2Qi.png

but as you see the barcode is shrinked ,how im solve this problem in ASP.NET MVC enviroment

i saw most people say add registy key ,but i cannot do this coz this is asp.net mvc web application and im going host this app on sheared server

if im Add below regiter keys the problem will solve only for if im generate crystal report in local desktop app please help

 

 



Operation not yet implemented error in PDF export

$
0
0

Greetings!  This error started to appear just this morning (everything was working just fine yesterday) when the users attempt to export a Crystal Report to a PDF file.  I've searched the net, and nothing out there solves the problem.  The report is using just Arial font, so it is not do to some esoteric font.  The msvcp100 and msvcr100 files are from July, so they are fine.  Frankly, I'm stumped, so if anyone has any suggestions on what we can try, I'd appreciate the input.  In the meantime, I have modified the code to export to a Word format, which is working just fine, as does exporting to an RTF format; it is just the PDF export that is causing this issue.  Help!  Thanks....

Load report failed when it opens in the outside of VS.

$
0
0

Hello, I'm new to this forum.

I'm having a problem and the deadline of this project is this week.

The problem is appears when the project is nearly done.

The report is loaded completely in my VS 2010 where I make the project, and I'm about to running in the built version before the application will be used for the other clients.

FYI, I built them with a setup wizard.

And when I was about to click the print doc. this unexpected problem was appeared.

 

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

 

 

************** Exception Text **************

CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.

   at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options)

   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options)

   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

   --- End of inner exception stack trace ---

   at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)

   at WindowsApplication1.Form5.Form5_Load(Object sender, EventArgs e) in D:\FEBRIAN\Monthly Report\New folder\report\report\Form5.vb:line 32

   at System.Windows.Forms.Form.OnLoad(EventArgs e)

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

   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

   at System.Windows.Forms.Control.CreateControl()

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

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

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

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

   at System.Windows.Forms.Form.WmShowWindow(Message& m)

   at System.Windows.Forms.Form.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

I did some codes in the preview to sort the report by date button. I think this is just the problem of the path report, but I have no idea how to fix it.

And here is the code I applied to the BtnPreview.

 

Dim ReportKu As New ReportDocument               ReportKu.Load("..\..\CrystalReport4.rpt")               ReportKu.SetParameterValue("Start", dtpTanggalMulai.Value)               ReportKu.SetParameterValue("End", dtpTanggalSelesai.Value)        CrystalReportViewer1.ReportSource = ReportKu        CrystalReportViewer1.Refresh()

 

Also I did a formula in the report too. Here it is.

DateTimeValue({Start}) <= DateTimeValue({wwt.tanggal}) and DateTimeValue({wwt.tanggal}) <= DateTimeValue ({?End})

Any suggestions? Thanks in advance!

Speed up Crystal Reports generation on CRS2013

$
0
0

Hi all,

 

I used Crystal Reports Server 9 to generate report, the datasource is a dataset object which then set to the report in run time. The report contains 10 subreports and it takes around 20 seconds to generate and export to PDF.

 

However, after I switch the Crystal Reports Server to 2013 version, and all reports are now managed by the server. Generating the same report takes around 1 minutes which is much slower then the older version.

 

Could everyone tell me why it takes more time to generate the report? It shouldn't be problem of database or SQL since the report is not connecting to DB.

 

Also, is there any way to speed up the generation process?

 

Thank you.

C ++ 2005 Redistributable requirement

$
0
0

As far as I know, Microsoft Visual C ++ 2005 redistributable must be installed for Crystal Reports runtime engine to run.  Microsoft is ending support for Microsoft Visual C ++ 2005 on April 2016; is there a plan for Crystal Reports to migrate from having Microsoft Visual C ++ 2005 as a prerequisite in the near future.  My company will only certify my software to April 2016 due to the fact a required prerequisite will only be supported till April 2016. Thanks in advance for your assistance. Ray

DivisionByZeroException using WPF Viewer

$
0
0

Hello, on some computers we experience DivisionByZeroException when trying to print report.

 

The full stack trace is :

 

System.DivideByZeroException: Attempted to divide by zero.

  at SAPBusinessObjects.WPF.Viewer.ReportPaginator.paginate()

  at SAPBusinessObjects.WPF.Viewer.ReportPaginator.GetPage(Int32 pageNumber)

  at System.Windows.Xps.Serialization.Toolbox.GetPage(DocumentPaginator paginator, Int32 index)

  at System.Windows.Xps.Serialization.DocumentPaginatorSerializer.PersistObjectData(SerializableObjectContext serializableObjectContext)

  at System.Windows.Xps.Serialization.DocumentPaginatorSerializer.SerializeObject(Object serializedObject)

  at System.Windows.Xps.Serialization.XpsSerializationManager.SaveAsXaml(Object serializedObject)

  at System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(Object serializedObject, Boolean isSync)

  at System.Windows.Xps.XpsDocumentWriter.Write(DocumentPaginator documentPaginator)

  at System.Windows.Controls.PrintDialog.PrintDocument(DocumentPaginator documentPaginator, String description)

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

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

  at SAPBusinessObjects.WPF.Viewer.CrystalReportsViewer.PrintReport_Executed(Object sender, ExecutedRoutedEventArgs e)

  at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)

  at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)

  at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)

  at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)

  at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)

  at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)

  at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)

  at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

  at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

  at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

  at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

  at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)

  at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)

  at System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)

  at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)

  at System.Windows.Controls.Primitives.ButtonBase.OnClick()

  at System.Windows.Controls.Button.OnClick()

  at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)

  at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)

  at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

  at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

  at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

  at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

  at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)

  at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)

  at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

  at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

  at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

  at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

  at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

  at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)

  at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)

  at System.Windows.Input.InputManager.ProcessStagingArea()

  at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

  at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

  at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)

  at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

  at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

  at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

  at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

  at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

  at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

  at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)

  at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

  at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)

  at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

  at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)

  at System.Windows.Threading.Dispatcher.Run()

  at System.Windows.Application.RunDispatcher(Object ignore)

  at System.Windows.Application.RunInternal(Window window)

  at System.Windows.Application.Run(Window window)

 

The version we are using is SAPBusinessObjects.WPF.Viewer.dll, 13.0.1.220

 

Please advise.

Failed to load database information when connecting to SAP Cluster, Table

$
0
0

Hi,

 

We are using the .NET SDK and the SAP Crystal runtime for .Net v13.0.9.1312.

 

We are connecting to an SAP Cluster, Table or Function data source. The report works properly in the Crystal Report Designer.

 

When attempting to execute the report through the .NET runtime, we get the error:

 

"Failed to load database information"

 

The application is a .NET Web application running on ASP.NET 4.0.

 

We have used Process Monitor to capture traces but there was nothing to indicate any problem. Are there any specific security settings or permissions issues related to the database drivers for this data source that we need to be aware of?

 

Has anyone run into this issue before?

 

We are planning to upgrade to the latest service pack of the runtime but I am not sure this will resolve our problem.

 

Any help would be appreciated.

Does CRforVS_13_0_15.exe support Visual Studio 2015?

$
0
0

Hi,

 

I have VS 2015 Professional version installed on 64-bit Windows 8. I also have VS 2012 installed to support some legacy applications.

 

On install of the executable it hangs at the end (after cleaning up). I use task manager to kill it then when I run VS2012 I can see the editor is working (after all the 15 update supposedly uninstalls the previous version).

 

But I do not see the CR integration when clicking a *.rpt report in the VS2015 IDE.

 

That could be a result of the installer hanging and not completing the integration with VS2015. A bug. Is it something that can be fixed by a workaround or will it be addressed in the next update?

 

Thanks


CR Runtime 32bits on Terminal Server 2008 R2

$
0
0

Hi,

We have the same program ( .Net x86 ) running on TSE and Win 7x64 environment, All are shared on PrintServer 2008R2.

We got this error only on TSE and not all time, the CR runtime is 32bit 13.0.15

Any ideas about the reason of error ?

Regards,

 

 

Type d'exception : System.ComponentModel.Win32Exception

Method : Void OnStartPrint(System.Drawing.Printing.PrintDocument, System.Drawing.Printing.PrintEventArgs)

Message : Descripteur non valide

Source : System.Drawing

Stack : à System.Drawing.Printing.StandardPrintController.OnStartPrint(PrintDocument document, PrintEventArgs e)
à System.Drawing.Printing.PrintController.Print(PrintDocument document)
à System.Drawing.Printing.PrintDocument.Print()
à CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)
à CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, PrintLayoutSettings layoutSettings, Boolean reformatReportPageSettings)
à CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(PrinterSettings printerSettings, PageSettings pageSettings, Boolean reformatReportPageSettings)
à OptionsCrystal.CrystalReportHelper.Print(Int32 nbEx)



this.SetConnection(this, this.oParams.Server, this.oParams.DataBase, this.oParams.UserLogin, this.oParams.UserPass);

//

if (this.HasSavedData)

    this.Refresh();

//---------------------------------------------------------------

PrinterSettings printerSettings = new PrinterSettings();

PageSettings pageSettings = new PageSettings(printerSettings);

 

 

if (!string.IsNullOrEmpty(this.printer))

{

    PaperSource ps = new PaperSource();

    ps.RawKind = this.bin;

    //                   

    pageSettings.PaperSource = ps;

    if (specialPage != null)

        pageSettings.PaperSize = specialPage;

    //

    printerSettings.PrinterName = this.printer;

    printerSettings.DefaultPageSettings.PaperSource = ps;

    //

    PrintDocument pDoc = new PrintDocument();

    ISCDReportClientDocument rcd = this.ReportClientDocument;

    this.PrintOptions.DissociatePageSizeAndPrinterPaperSize = true;

    if (pDoc.DefaultPageSettings.PaperSize.Height > pDoc.DefaultPageSettings.PaperSize.Width)

    {

        rcd.PrintOutputController.ModifyPaperOrientation(CrPaperOrientationEnum.crPaperOrientationPortrait);

    }

    else

    {

        rcd.PrintOutputController.ModifyPaperOrientation(CrPaperOrientationEnum.crPaperOrientationLandscape);

    }

}

printerSettings.Copies = (short)nbEx;

// ajout try catch arround reel Print 18/11/2015

try

{

    this.PrintToPrinter(printerSettings, pageSettings, false);

}

catch (InvalidPrinterException exc)

{

    OIError.ShowDialog(string.Format("Report :{0} sur :{1}", this.FileName, string.IsNullOrEmpty(this.printer) ? "Default" : this.printer), exc);

}

catch (Exception ex)

{

    OIError.ShowDialog(string.Format("Report :{0} sur :{1}", this.FileName, string.IsNullOrEmpty(this.printer) ? "Default" : this.printer), ex);

}

 

 

this.CloseConnection(this);










Failed to load database information.Error in File BillReport {Some numbers}.rpt

$
0
0

Hi Team I am having problm with Crystal Report for Visual Studio 2013.

I have developed windows application with Crystal Report and Visual Studio 2010.

Now when i try to run same code in VS 2013 with Crystal report for VS 2013. i am getting following error.

 

 

Failed to load database information.

Error in File BillReport {A677B982-B8FC-4349-8BE6-9D1DA6B33521}.rpt:

Failed to load database information.

 

Source : "CrystalDecisions.ReportAppServer.DataSetConversion"

 

I have used oledb connection to fill XML dataset.

That dataset is binded to Crystal report at run time..

Here is my code.

 

 

string sqlstr = "";

                sqlstr = "select * from billMaster where billid =  " + billId + " and merchantName = '"+merchantName+"' ";

cmd = new OleDbCommand(sqlstr, m1.ccon);

                if (m1.ccon.State == ConnectionState.Closed)

                {

                    m1.ccon.Open();

                }

                OleDbDataAdapter da = new OleDbDataAdapter(sqlstr, m1.ccon);

 

 

                BillPrint bp = new BillPrint();

Set CrystalReportViewer.Zoom level before form is visible

$
0
0

Hi,

 

I am trying to set the CrystalReportViewer Zoom level on all my reports to 2 (whole page) but only seem to be able to get this to work once the form has been fully loaded and visible to the user. The problem is that the form either needs to load up with the correct size in a set location or in a maximised state, however, the only way to get the Zoom to work is to load up the form with the wrong size then change that size to the correct one once it has fully rendered (which only seems to be once the Form.Activate event is fired).

 

If the form was to load up using just the predefined size set at design time then everything works as expected, i.e. set the .ReportSource then call .Zoom(2) and it loads correctly. However, any attempt to set the size of the form before it has been fully rendered results in the report just being displayed in the top left hand side of the preview window.

 

Setting the size to something else then correcting it in the Form.Activate event causes the form to change size (or become maximized) and therefore redraw the report, which is not very professional looking.

 

Is it not possible to make it so that the zoom level could be set at any time (regardless of having a ReportSource set or the form visible, etc.) and when it comes time to render the report to pick up those settings and apply them?

 

I have spent a significant amount of time trying all sorts of things to get this to work, including hours spent searching the community posts here and elsewhere on the web. It looks to me like there are lots of people who have had issues with setting the Zoom level over the years without there really being a satisfactory solution to the various problems.

 

Can someone please loom into this and get back to me?

 

Thanks,

Gareth

Variable declaration

$
0
0

Hi,

In my report I've to declare lot of variables, initialize them and use them in report in text object. I don't want to create a formula for each variable declaration. I s there  a way, I can declare variables in one place?

 

Thanks in advance

The document has not been opened.

$
0
0

Hi,

 

I get the following exception:

 

The document has not been opened.

 

when i initialize

 

ReportDocument reportDocument = new ReportDocument();

 

It worked in the test environment with no problems, however the error occurs on the live server where SAP Crystal Reports 2013 SP6 is installed.

 

I installed SAP Crystal Reports 2013 SP6 on the test environment and the error is replicated. Is there a way the get this to work without uninstalling SAP Crystal Reports 2013 SP6?



Refernces:

 

CrystalDecisions.CrystalReports.Engine version:14.0.3500.0

CrystalDecisions.Shared version:14.0.3500.0

 

Thanks.

SAP Crystal Reports runtime engine for .Net framework 4.0 (version 13) 32 Bit Library

$
0
0

Hi All,

 

While supporting one of our customers, they request a specific 32 bit library for .NET framework version 4.0.  Is anyone able to give me a little background on this?  If not, what more do we need to know?  Any assistance is greatly appreciated!  Here is the request:

 

"In one of the labs there is a PC which uses a ClickOnce VB applet built with the crystal reports extension for visual studio. This applet has dependencies on libraries which I do not have all the installers for. The main library I am missing an installer for is the 32-bit build of SAP Crystal Reports runtime engine for .Net framework 4.0 (version 13).

 

The developer who wrote this applet is no longer with the company. Her work was not well documented, and information on how this applet works or was built is sketchy. I was able to find the 64-bit build of the library in question on her old computer, but it does not work with this applet. Another member of the UniPath dev team says the application cannot be republished; he did not explain why. I am looking for a solution to use the application as is with its current dependencies, or to acquire the tools for the application to be republished for continued use. Any and all help you can provide will be great."

Export report definition to text using the SDK

$
0
0

Hello:

 

In CR 11.0.0.895 there is an option to export a report to a text Report Definition, via: File -> Export -> Export Report, then select Format: Report Definition (TXT) as Destination: Disk file.

 

Is it possible to get the same functionality but programmatically using the .Net SDK? I couldn't find the export option corresponding to the Report Definition (TXT) format.

 

Thanks


Getting System.NotSupportedException: Not supported within subreports.

$
0
0

Hello:

 

I am getting this exception:

 

System.NotSupportedException: Not supported within subreports.

   at CrystalDecisions.ReportAppServer.SubreportWrapper.get_IsOpen()

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_IsLoaded()

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_ReportClientDocument()

   ....

 

on this line:

CrystalDecisions.ReportAppServer.DataDefModel.Tables boTables = reportDocument.ReportClientDocument.DatabaseController.Database.Tables;

 

where reportDocument is actually a subreport of the main report. I have the following code:

  foreach (ReportDocument subreport in reportDocument.Subreports)
  {
      SetDbLogonForReport(connectionInfo, subreport);
  }

 

The code that fails is in the SetDbLogonForReport.

 

I am basically trying to loop through all the tables in the subreport and set the table location.

 

Any ideas on how to workaround the exception? I am using CR 13 SP14. The application tries to run a report with a subreport.

 

Thanks

The report filename was empty

$
0
0

Sorry if this has already been answered. I checked other threads and I didn't really see a definitive answer to the problem.

 

When running my application and attempting to view a report I am receiving the error "the report filename was empty". I am using  VS 2010 SP1 with SAP Crystal Reports, version for Microsoft Visual Studio version 13.0.15.1840. My Crystal Reports used to be an older version (13.0.2000.000), recently upgraded it.

 

The reports have always worked but at some point something changed and now I'm getting this error both on my local machine and my development server. Not sure if this happened when i updated the CR for VS or not.

 

When I run the application it always breaks at the .load() method.

 

 

override protected void OnInit(EventArgs e)

    {

        base.OnInit(e);

        String rootPath = Server.MapPath("~");

        if (Session[FCCConstants.SESSION_FCC_ID] == null)

        {

            Response.Redirect("~/NeedYouthInfo.aspx");

            return;

        }

        String fccnum = Session[FCCConstants.SESSION_FCC_ID].ToString();

        int fccNumber = Int32.Parse(Session[FCCConstants.SESSION_FCC_ID].ToString());

        string reporttype = Request.QueryString["Reporttype"].ToString();

        DataTable dt = null;

 

        DataSet dsTablesBirthHistoryRpt = null;

 

       

        int noteType;

        switch (reporttype)

        {

          case "Birthhistory":

                dsTablesBirthHistoryRpt = Passport.GetYouthBirthHistoryInfo(fccNumber);

                dsTablesBirthHistoryRpt.Tables[0].TableName = "MPBirthDT";

 

 

                CrystalReportSource1.ReportDocument.Load(rootPath + "\\" + "Reports\\MP_Reports\\MPBirthThruEarlyChildhood.rpt"); <--FAILS HERE

                CrystalReportSource1.ReportDocument.Subreports[0].SetDataSource(dsTablesBirthHistoryRpt);

 

 

               

                Utils.ExportToPDF(CrystalReportSource1, Response);

                break;

 

 

}

 

The path is correct to the report. All the reports in the application fail at the same location. CrystalReportSource1.ReportDocument.Load(rootPath)

 

Any suggestions?

How to pass Date Parameter to SubReport

$
0
0

Hi,

 

In my VB.NET database, I am recording exam results for a class and print a report using Crystal Reports filtered by term periods.

There can be two or more exams per year.

 

Problem is that I cannot find a method to pass date range filter to sub report using report viewer

 

Main report contains the student info selected by StudentID that is passed as a parameter

Sub report contains the exam date and results information.


The exam dates are in tblClassEvent on subreport.


rptViewer.SetParameterValue("theID", m_theID)

 

DateRange is also passed into text fields

 

            Dim sTermPeriod As Object

            Dim sTermDays As Object

            sTermPeriod = rptViewer.ReportDefinition.ReportObjects("txtTermPeriod")

            sTermPeriod.Text = m_strTermStart & "   To: " & m_strTermEnd

            sTermDays = rptViewer.ReportDefinition.ReportObjects("txtTermDays")

            sTermDays.Text = m_iPosAtt

 

 

Please advise on either improving on this approach or provide an alternative more sensible approach

 

All help is appreciated.

32-bit MSI redistributable not installing all dlls referenced by Visual Studio project

$
0
0

I have a C# Console Application that I built in Visual Studio 2013 using the 64-bit Visual Studio Runtime Engine sp 15.  I am building the project in x86 meaning that the project is building in 32-bit.

 

 

My project is referencing the following Crystal Report libraries located in my win32_x86 directory

 

CrystalDecisions.CrystalReports.Engine

CrystalDecisions.ReportSource

CrystalDecisions.Shared

 

 

I installed the 32-bit MSI redistibutable on the client's machine. Afterwards, when I navigated to his win32_x86 directory, the only .dll file was:

 

CrystalDecisions.Data.AdoDotNetInterop.dll

 

I have the feeling that I will need to install Visual Studio 2013 as well as full Visual Studio Crystal Report Runtime Engine on the client's machine to get the libraries installed that my program references. Thoughts?

CRforVS_13_0_15.exe VS2015 Windows 10 installation ended prematurely

$
0
0

I understand that this release (15) is validated for VS2015 and Windows 10, but I can't get it to install.

2015-10-07 12 41 53.gif

 

Where would I find the log file to see if that gives any help ?

 

I have checked to see if the problem is a previous attempt at installation but I can't see anything in "Uninstall or change program"

 

Any idea about what I should try next ?

Viewing all 3636 articles
Browse latest View live