Friday, March 23, 2012
how can i pass values from .mdb to crystal report?
Create a parameter field in the report.
Then pass the value for the parameter from ur interface to report in the folg. way
Cr1.ParameterFields.GetItemByName("EnterOption").AddCurrentValue(ParamOption)
Here EnterOption is the name of the parameter created in Crystal Reports and ParamOption contains some value which u want to pass (any value)
Hope this may help|||Thanks ,
But its not working.I got an error message like this "Argument not optional". Pls explain the reason and do help me with sample code
Thanks
Hari|||Hope you are using VB code for creating interface
--------
'In the General Declarations , declare
Dim Appl As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report
'Assinging the report name
Set Report = Appl.OpenReport("report1.rpt")
Report.DiscardSavedData
'Passing the value of cmboption.Text value to the first parameter
'instead of passing by the name of the parameter, we can also use this convention
Report.ParameterFields(1).AddCurrentValue cmbOption.Text
'Assigning the report source to CRViewer Control and viewing the report
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
--------
If your code produces error, send the code fragment|||There are 3 ways to deal with this/your problem or setting/passing arguments to a report :
Sample 1
---
g_ole_crx_report.DiscardSavedData()
g_ole_crx_report.ParameterFields.item[1].AddCurrentValue("100200300")
Sample 2
---
g_ole_crx_report.DiscardSavedData()
g_ole_crx_report.ParameterFields[1].AddCurrentValue("100200300")
Sample 3
---
g_ole_crx_report.DiscardSavedData()
g_ole_crx_report.ParameterFields.GetItemByName("@.AccountNumber").AddCurrentValue("100200300")
Sample 4
---
g_ole_crx_report.DiscardSavedData()
g_ole_crx_report.ParameterFields.item[3].AddCurrentValue(date("01/01/1999"))
Look at this sample. It needs conversion. You need to use convert function like date (I dont' know about VB) to convert date to date format.
Maybe this is what causing your problem.
Thanks
How can I pass a parameter value from VB.Net to Crystal Report?
How can I pass a parameter value from VB.Net to Crystal Report 11?
I created a report from Crystal Report 11 which has a parameter field for querying the records and I created a form from VB.Net which allows the user to enter a value which will be used for the report but I don't how to pass a parameter value from VB.Net to Crystal Report.Try This...
dim Report as New ReportDocument
Report.Load("YourReport.rpt") 'This is your Crystal Report File
Report.SetParameterValues("PARAM1","Christine") 'PARAM1 should have exactly the same spelling as what can be found in your parameter list in your "*.rpt" file.
CRViewer.Reportsource = Report
Wednesday, March 21, 2012
How can I modify a report in Crystal Report 7
joined an organisation where there is an application running(developed
in VB6 and crystal report 7). I have to modify one report. In two
columns I have to make minor changes i.e put and = operator. I am
encountering following problem:
1. When I open the report using Seagate crystal report for rational /
32 bit crystal Report Designer there are three columns which are going
out side the visible area and I am not able to scroll up to them. I
increased the page margin (left / right) and made it to zero and zero
but still I am not able to see those columns. Please guide.
2. Please suggest any good web site for learning Crystal Report 7
Thanks n Regards
Deepak Sinhamicrosoft . public . sqlserver wrote:
Quote:
Originally Posted by
1. When I open the report using Seagate crystal report for rational /
32 bit crystal Report Designer there are three columns which are going
out side the visible area and I am not able to scroll up to them. I
increased the page margin (left / right) and made it to zero and zero
but still I am not able to see those columns. Please guide.
Try setting the zoom level to something less than 100%.|||microsoft . public . sqlserver (dpk.sinha@.gmail.com) writes:
Quote:
Originally Posted by
I am a Web developer. I am new to VB 6.0 and Crystal Report. I have
joined an organisation where there is an application running(developed
in VB6 and crystal report 7). I have to modify one report. In two
columns I have to make minor changes i.e put and = operator. I am
encountering following problem:
>
1. When I open the report using Seagate crystal report for rational /
32 bit crystal Report Designer there are three columns which are going
out side the visible area and I am not able to scroll up to them. I
increased the page margin (left / right) and made it to zero and zero
but still I am not able to see those columns. Please guide.
2. Please suggest any good web site for learning Crystal Report 7
http://www.businessobjects.com/
They also have a web forum, where you probably better odds to get
good answers about Crystal than in an SQL Server forum.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
Friday, February 24, 2012
How can I get digit into words in crystal report
How can I get digit into words in crystal report...
for examble
"102" in to
"hundred and two"
By RajeshHi Rajesh,
I think this code will work for you.
Function (currencyVar v1)
Local CurrencyVar RoundCents := round(remainder(v1,1)*100);
Local Stringvar Dollarpart := towords(int(v1),0);
Local Stringvar Centspart := towords(int(RoundCents),0);
if instr(dollarpart, "hundred") > 0
then dollarpart := Replace (dollarpart,"hundred" ,"hundred and" );
dollarpart + " dollars and " + centspart + " cents"