Hey all I am trying to use Crystal Reports 10 and have a date that I need to use from my table. I want to take that date and if it is greater than the CURRENTDATE + 6 months I need to display a message. I have part of it but not sure how to do the "6 month" thing.
if ({mytable.mydate}) > CurrentDate ("+6 months") then
'Length-Promo-Rate = 0'
I have tried this:
CurrentDate + Month({mytable.mydate},6) but it doesn't like it. Suggestions? Thanks.Hi,
for that you have to insert a formula field like :
dim msg as string
if {Report Date/date from table} >= DateAdd ("m",6 , CurrentDate) then
msg ="6 month old"
else
msg = "new"
end if
formula = msg
-Jayesh Mendpara
Showing posts with label rpt. Show all posts
Showing posts with label rpt. Show all posts
Sunday, March 25, 2012
Tuesday, March 20, 2012
Crystal Reports 10 Viewers
I have a report (Crystal Reports 10) that connects to an Access database. The Access database uses a pass-through query to retrieve data. The .rpt file and the Access database will both be stored in the same directory.
What kind of viewer will my end-users need? Where can I get it?
ThanksCan anyone give some feedback on this? I still haven't found a solution...
What kind of viewer will my end-users need? Where can I get it?
ThanksCan anyone give some feedback on this? I still haven't found a solution...
Monday, March 19, 2012
Crystal Report XI Help
Hi every one,
I am a new with crystal report and i am try to make a project under which i am to use crystal report external report file i.e. .rpt file in my project but i don't know how to use it and what is the command if we wants to use external rpt file in our project. how to open external rpt file in a project.
Can any one please help me i am in need of that urgently.U didn't mentioned on what platform u r doing project.
Lots of threads based on VB & VB.net is available regarding ur query, just go through them.|||Hi Buddy sorry for that but i work with VB 6.
And i need help for that.
I don't Find any help i had search that before posting.
Thanks and hope you can solve my problem.|||Dim conn As ADODB.Connection 'CONNECTION TO BROKER QUERIES
Dim rs As ADODB.Recordset 'HOLDS ALL DATA RETURNED FROM QUERY
Dim crystal As CRAXDRT.Application 'LOADS REPORT FROM FILE
Dim Report As CRAXDRT.Report 'HOLDS REPORT
Set conn = New ADODB.Connection
conn.Open "Provider=MSDAORA.1;User ID=scott;Data Source=qb;Persist Security Info=False", "scott", "tiger" Set rs = New ADODB.Recordset
rs.Open sql, conn, adOpenStatic, adLockReadOnly
Set crystal = New CRAXDRT.Application 'MANAGES REPORTS
Set Report = crystal.OpenReport(App.Path & "\report1.rpt") 'OPEN OUR REPORT
Report.DiscardSavedData 'CLEARS REPORT SO WE WORK FROM RECORDSET
Report.Database.SetDataSource rs 'LINK REPORT TO RECORDSET
CRViewer1.ReportSource = Report 'LINK VIEWER TO REPORT
CRViewer1.ViewReport 'SHOW REPORT
I am a new with crystal report and i am try to make a project under which i am to use crystal report external report file i.e. .rpt file in my project but i don't know how to use it and what is the command if we wants to use external rpt file in our project. how to open external rpt file in a project.
Can any one please help me i am in need of that urgently.U didn't mentioned on what platform u r doing project.
Lots of threads based on VB & VB.net is available regarding ur query, just go through them.|||Hi Buddy sorry for that but i work with VB 6.
And i need help for that.
I don't Find any help i had search that before posting.
Thanks and hope you can solve my problem.|||Dim conn As ADODB.Connection 'CONNECTION TO BROKER QUERIES
Dim rs As ADODB.Recordset 'HOLDS ALL DATA RETURNED FROM QUERY
Dim crystal As CRAXDRT.Application 'LOADS REPORT FROM FILE
Dim Report As CRAXDRT.Report 'HOLDS REPORT
Set conn = New ADODB.Connection
conn.Open "Provider=MSDAORA.1;User ID=scott;Data Source=qb;Persist Security Info=False", "scott", "tiger" Set rs = New ADODB.Recordset
rs.Open sql, conn, adOpenStatic, adLockReadOnly
Set crystal = New CRAXDRT.Application 'MANAGES REPORTS
Set Report = crystal.OpenReport(App.Path & "\report1.rpt") 'OPEN OUR REPORT
Report.DiscardSavedData 'CLEARS REPORT SO WE WORK FROM RECORDSET
Report.Database.SetDataSource rs 'LINK REPORT TO RECORDSET
CRViewer1.ReportSource = Report 'LINK VIEWER TO REPORT
CRViewer1.ViewReport 'SHOW REPORT
Sunday, March 11, 2012
Crystal Report on Remoting Problem.
Hi All,
Following is the scenario i am working on.
1. There are some .RPT files which reside on server.
2. Client will request to see the report, in that case RPT file will
be dynamically loaded on server , dataset is passed as datasource to
report and then that report is streamed to client using
ExportToStream method.
3. Client will receive this stream and reconstruct Report Document
and will display in viewer.
4. Client Server communication is mentained using .Net remoting.
Everything works fine in stand alone mode. Problem is in remoting
mode.
Problem occurs at the time of loading report file dynamically,
following is the exception i get.
The type
CrystalDecisions.CrystalReports.Engine.LoadSaveReportException in
Assembly CrystalDecisions.Shared, Version=9.1.5000.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304 is not marked as
serializable.
Server stack trace:
at
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSe
rialize(Object obj, ISurrogateSelector surrogateSelector,
StreamingContext context, SerObjectInfoInit serObjectInfoInit,
IFormatterConverter converter)
at
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serial
ize(Object obj, ISurrogateSelector surrogateSelector,
StreamingContext context, SerObjectInfoInit serObjectInfoInit,
IFormatterConverter converter)
at
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize
(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean
fCheck)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serial
ize(Stream serializationStream, Object graph, Header[] headers,
Boolean fCheck)
at
System.Runtime.Remoting.Channels.BinaryServerFormatterSink.SerializeR
esponse(IServerResponseChannelSinkStack sinkStack, IMessage msg,
ITransportHeaders& headers, Stream& stream)
at
System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMes
sage(IServerChannelSinkStack sinkStack, IMessage requestMsg,
ITransportHeaders requestHeaders, Stream requestStream, IMessage&
responseMsg, ITransportHeaders& responseHeaders, Stream&
responseStream)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
(MessageData& msgData, Int32 type)
at Hebron.Common.Interfaces.IFeesReportController.GetInvoice
(ArrayList oArrylst)
at Hebron.ReportClient.ReportTool.PrintReport(ReportName name,
ArrayList oArry)
at Hebron.FeesClient.ReviewInvoices.btnPrint_Click(Object sender,
EventArgs e)Normally if an object is serializable then you can just add an attribute [serialziable] to your class and it works.
Crystal Report Document Object is not Serializable as per the Business Object documentation(atleast till version 10). During remoting the object needs to be serialized and that is why you get the error. Try to find out from Business Objects support team if you can, at all serialize the object ? Will face the same issue if using ASP.NET "StateServer" session and try to save the Report Document object in session.
Frank
Following is the scenario i am working on.
1. There are some .RPT files which reside on server.
2. Client will request to see the report, in that case RPT file will
be dynamically loaded on server , dataset is passed as datasource to
report and then that report is streamed to client using
ExportToStream method.
3. Client will receive this stream and reconstruct Report Document
and will display in viewer.
4. Client Server communication is mentained using .Net remoting.
Everything works fine in stand alone mode. Problem is in remoting
mode.
Problem occurs at the time of loading report file dynamically,
following is the exception i get.
The type
CrystalDecisions.CrystalReports.Engine.LoadSaveReportException in
Assembly CrystalDecisions.Shared, Version=9.1.5000.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304 is not marked as
serializable.
Server stack trace:
at
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSe
rialize(Object obj, ISurrogateSelector surrogateSelector,
StreamingContext context, SerObjectInfoInit serObjectInfoInit,
IFormatterConverter converter)
at
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serial
ize(Object obj, ISurrogateSelector surrogateSelector,
StreamingContext context, SerObjectInfoInit serObjectInfoInit,
IFormatterConverter converter)
at
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize
(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean
fCheck)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serial
ize(Stream serializationStream, Object graph, Header[] headers,
Boolean fCheck)
at
System.Runtime.Remoting.Channels.BinaryServerFormatterSink.SerializeR
esponse(IServerResponseChannelSinkStack sinkStack, IMessage msg,
ITransportHeaders& headers, Stream& stream)
at
System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMes
sage(IServerChannelSinkStack sinkStack, IMessage requestMsg,
ITransportHeaders requestHeaders, Stream requestStream, IMessage&
responseMsg, ITransportHeaders& responseHeaders, Stream&
responseStream)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
(MessageData& msgData, Int32 type)
at Hebron.Common.Interfaces.IFeesReportController.GetInvoice
(ArrayList oArrylst)
at Hebron.ReportClient.ReportTool.PrintReport(ReportName name,
ArrayList oArry)
at Hebron.FeesClient.ReviewInvoices.btnPrint_Click(Object sender,
EventArgs e)Normally if an object is serializable then you can just add an attribute [serialziable] to your class and it works.
Crystal Report Document Object is not Serializable as per the Business Object documentation(atleast till version 10). During remoting the object needs to be serialized and that is why you get the error. Try to find out from Business Objects support team if you can, at all serialize the object ? Will face the same issue if using ASP.NET "StateServer" session and try to save the Report Document object in session.
Frank
Thursday, March 8, 2012
crystal report comparison
hi
I have to compare two crystal report text. Is there any tool which does this?
or Any Code which does this?
It has to be done on rpt only.No conversion of report to any other form.
With regards
RashmiIs is at runtime u want to compare 2 reports?
I have to compare two crystal report text. Is there any tool which does this?
or Any Code which does this?
It has to be done on rpt only.No conversion of report to any other form.
With regards
RashmiIs is at runtime u want to compare 2 reports?
Crystal Report 10
I'm using a particular software which uses standard .rpt files created with CR 8.5.
Now I have available Cristal Reports 10 and I'd like modifying these .rpt files.
I open 8.5 rpt file with CR10 and I save it without modifying it.
I can see .rpt file dimension is reduced about 50% and running report by using the particular software it gets an error : unable to load report.
Is it necessary conversion from 10 rpt file to 8.5 file ?
How can I use CR10 to modify 8.5 rpt file ?You need to update your software as well. It uses the runtime version of 8.5, which is unable to read version 10 reports, and now that you edit your reports these are saved using version 10 format (you saw the decrease in size). The version 10 developer can only be used to save reports in version 10 format. The runtime engine for verion 10 can however also read version 8.5 reports.
- Jukka
Now I have available Cristal Reports 10 and I'd like modifying these .rpt files.
I open 8.5 rpt file with CR10 and I save it without modifying it.
I can see .rpt file dimension is reduced about 50% and running report by using the particular software it gets an error : unable to load report.
Is it necessary conversion from 10 rpt file to 8.5 file ?
How can I use CR10 to modify 8.5 rpt file ?You need to update your software as well. It uses the runtime version of 8.5, which is unable to read version 10 reports, and now that you edit your reports these are saved using version 10 format (you saw the decrease in size). The version 10 developer can only be used to save reports in version 10 format. The runtime engine for verion 10 can however also read version 8.5 reports.
- Jukka
Wednesday, March 7, 2012
Crystal Error
HI ,
I'm trying to print a rpt. file ( C.R. 8.5) from a VB.net program
code :
Dim Reporte As New crAlmacen
Dim x As String = Reporte.FilePath()
Dim x1 As String = Reporte.ResourceName
Reporte.SetDatabaseLogon("termi", "termi", "SERVIDOR1", "mestres")
Reporte.Refresh()
' Reporte.PrintOptions.PrinterName = "Lexmark Optra S 2455"
Reporte.PrintToPrinter(1, False, 1, 1)
An unhandled exception of type 'CrystalDecisions.CrystalReports.Engine.InvalidArgumentException' occurred in crystaldecisions.crystalreports.engine.dll
Additional information: Error in File C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\temp_50488d2a-21be-4a5a-a4df-ad83112d6274.rpt:
Invalid printer specified.
thanks a lotHI ,
I HAVE SOLVED THE PROBLEM
Dim Reporte As New crAlmacen
Dim x As String = Reporte.FilePath()
Dim x1 As String = Reporte.ResourceName
Reporte.SetDatabaseLogon("termi", "termi", "SERVIDOR1", "mestres")
Reporte.Refresh()
NEW CODE LINE
---------------------
Reporte.PrintOptions.PaperSource = CrystalDecisions.[Shared].PaperSource.Auto
---------------------
' Reporte.PrintOptions.PrinterName = "Lexmark Optra S 2455"
Reporte.PrintToPrinter(1, False, 1, 1)
AND NOW GO RIGHT
BEST REGARDS|||Glad that's sorted :D
I'm trying to print a rpt. file ( C.R. 8.5) from a VB.net program
code :
Dim Reporte As New crAlmacen
Dim x As String = Reporte.FilePath()
Dim x1 As String = Reporte.ResourceName
Reporte.SetDatabaseLogon("termi", "termi", "SERVIDOR1", "mestres")
Reporte.Refresh()
' Reporte.PrintOptions.PrinterName = "Lexmark Optra S 2455"
Reporte.PrintToPrinter(1, False, 1, 1)
An unhandled exception of type 'CrystalDecisions.CrystalReports.Engine.InvalidArgumentException' occurred in crystaldecisions.crystalreports.engine.dll
Additional information: Error in File C:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\temp_50488d2a-21be-4a5a-a4df-ad83112d6274.rpt:
Invalid printer specified.
thanks a lotHI ,
I HAVE SOLVED THE PROBLEM
Dim Reporte As New crAlmacen
Dim x As String = Reporte.FilePath()
Dim x1 As String = Reporte.ResourceName
Reporte.SetDatabaseLogon("termi", "termi", "SERVIDOR1", "mestres")
Reporte.Refresh()
NEW CODE LINE
---------------------
Reporte.PrintOptions.PaperSource = CrystalDecisions.[Shared].PaperSource.Auto
---------------------
' Reporte.PrintOptions.PrinterName = "Lexmark Optra S 2455"
Reporte.PrintToPrinter(1, False, 1, 1)
AND NOW GO RIGHT
BEST REGARDS|||Glad that's sorted :D
Saturday, February 25, 2012
Crviewer or Crystal Report(rtp Control)
Is it crviewer or crystal report(rpt control) is the best option to get the report from VB.
What are the advantages and disadvantages of both.
Is Crystal report is going to stop the rpt Control SupprotSafest approach is to use CRPE object, as the ActiveX Control (CRAXDRT) is simply a COM wrapper around CRPE functionality.
crviewer is Ok to use if reports are being designed elsewhere and you just want to generate reports from VB.
dave|||Thank you.
I am using Segate Crystal report.
in that Crviewer and rpt Control is there .
Is Ceagate is going to stop support for rpt control.|||As long as OS's use activeX, I guess the viewer will stay supported.....
What are the advantages and disadvantages of both.
Is Crystal report is going to stop the rpt Control SupprotSafest approach is to use CRPE object, as the ActiveX Control (CRAXDRT) is simply a COM wrapper around CRPE functionality.
crviewer is Ok to use if reports are being designed elsewhere and you just want to generate reports from VB.
dave|||Thank you.
I am using Segate Crystal report.
in that Crviewer and rpt Control is there .
Is Ceagate is going to stop support for rpt control.|||As long as OS's use activeX, I guess the viewer will stay supported.....
Subscribe to:
Posts (Atom)