Date Format error in Crystal Rerports - Experts answer needed

Posted by Sathya4260 under ASP.NET on 1/31/2011 | Points: 10 | Views : 2071 | Status : [Member] | Replies : 2
Hi Experts,

I am generating Crystal Reports using data from xml, in which i have an date column which contains the date to be displayed on header.

I used the formula cdate({Date}) to convert string to date format.

This works fine for me in first page, but when click the next page i am getting error as (error in formula)

If i put the date field in section it works fine, Kindly let me now the solution ASAP...

Sathish Kumar S


Responses

Posted by: Prabhakar on: 1/31/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Sathya

i think u show ur code . i try my best .. i think some error in post back .. but u show ur code ..



Best Regard's
Prabhakar

Sathya4260, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sathya4260 on: 1/31/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,
ReportDocument report = new ReportDocument();
//report.Load(Server.MapPath("reports/TrialBalancedup.rpt"));
report.Load(Server.MapPath("reports/TrialBalance.rpt"));
lblReportPath.Text = Server.MapPath("reports/TrialBalance.rpt");
report.SetDataSource(dtTrialBalance);
report.SetDatabaseLogon("sa", "AndrewFun260474", "113.197.36.40", "GAAP_Mass_Data_Entry");
//report.DataDefinition.FormulaFields["Dates"].Text = "'" + date1.ToString("dd/MM/yyyy") + "'";
// CryRptVwIncomeStatement.ParameterFieldInfo = Dates;
CryRptVwIncomeStatement.ReportSource = report;
CryRptVwIncomeStatement.DataBind();


formula for date filed is cdate({column.date})
One think i am showing the date filed in header and if i run the report without the date filed every thing works fine so no error in .cs file, just error in date formula only,

Can you say me whether i can use the column data in header field

Sathish Kumar S

Sathya4260, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response