Announcement

Migration of this forum

Dear users of this forum,

we are pleased to inform you that we will be updating the software behind this forum in the near future.

Existing posts, users and categories will remain untouched.

Important:

  • Each user will need to reset their password.
  • Please select "I forgot my password".
  • Enter the email address you used to register in this forum.
  • You will receive an email with a link to set a new password.
  • Please choose a new (secure) password and confirm the process.

We will keep you informed in the pinned thread.

Kind regards,
Your ReportServer Team


Migration des Forums

Liebe Nutzer dieses Forums,

wir freuen uns, euch mitteilen zu können, dass wir in naher Zukunft die Software hinter diesem Forum aktualisieren werden.

Existierende Beiträge, Nutzer und Kategorien bleiben weiterhin bestehen!

Wichtig:

  • Jeder Nutzer muss sein Passwort neu vergeben.
  • Wählt dazu einfach "Ich habe mein Passwort vergessen".
  • Gebt die E-Mail-Adresse ein, mit der ihr registriert seid.
  • Ihr erhaltet eine E-Mail mit einem Link zur Passwortvergabe.
  • Bitte wählt ein neues (sicheres) Passwort und bestätigt den Vorgang.

Wir halten euch im angepinnten Beitrag auf dem Laufenden!

Mit vielen Grüßen
Euer ReportServer Team

#1 2021-01-25 18:56:26

bpeikes
Member
Registered: 2016-10-29

Default date parameter in report?

I have a query that I parameterized with “today”. I created a variable today which I use in the query using ${today}. What I would like is that this defaults to the current date if not set by user.

The issue is that in a derived report, ReportServer seems to require filling out the date.

I tried making it not required, but then setting default to using a function that returns current date. That doesnt seem to work either.

How do you create a parameter that defaults to a function call if not set?

Offline

#2 2021-02-05 14:26:05

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Default date parameter in report?

Hi bpeikes,

did you take a look at this? https://reportserver.net/en/guides/admi … eter-date/

6.3.5. The Date Parameter
With the date parameter you can enable the users to select from a date or time field. As a default value you can either use the current date and current time (Now as default), you can allocate a fixed date, or you can determine the default value by using a ReportServer formula expression (e.g. ${today.firstDay()} for the first day of the current month). For further information on the ReportServer formula language refer to the User manual.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB