Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter Date Format problem #86

Open
RodFoulcher opened this issue Apr 16, 2019 · 1 comment
Open

Parameter Date Format problem #86

RodFoulcher opened this issue Apr 16, 2019 · 1 comment

Comments

@RodFoulcher
Copy link

Have created a report with two parameters in VS. In Preview my input dates are accepted as dd/MM/yyyy. In SSRS my input dates are also accepted as dd/MM/yyyy.

Have found that it does not seem to matter whether I use either of the following, Both seem to work much the same:

public ActionResult MatchDrawReport()
{
var model = this.GetReportViewerModel(Request);
model.ReportPath = "/Reports/MatchDrawReport";

    return View("ReportViewer", model);
    }

OR
public ActionResult MatchDrawReport(string namedCalendarDate, string namedRound)
{
var model = this.GetReportViewerModel(Request);
model.ReportPath = "/Reports/MatchDrawReport";
model.AddParameter("CalendarDate", CalendarDate);
model.AddParameter("Round", Round);
return View("ReportViewer", model);
}

In Report Viewer for either of above this format is invalid and throws an error (check parameter).
It will only accept an input of MM/dd/yyyy (which will be very annoying to users).

Have tried DateTime instead of string and .ToString(dd/MM/yyyy) but this gives an error on execution.

Is there a way around this problem please?

I note issue 44 is also about the same thing but that was a year and a half ago. The comment then was ... I saw that you have put "en-us" in your reporthelpers.cs file so I thought there may be a solution via your Report Viewer.

Suspect the "en-us" is the problem.

@RodFoulcher
Copy link
Author

Have waited patiently for 5 months - not even a comment.
Hard to believe no one has a work around for the above date format problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant