Selecting Start and End date for report generation

Hello All:
I’m going through report generation and creating tag historian topics. I would like to create a report with tag historian. Looks like start and end dates are selected during the report creation. I would like to select start date and end date at run time and generate the report for those dates. So, I created two tags for start and end dates, and added that tag path for start and end date for the report. But I am getting warning during the design stating that “Start date and End Date cannot be parsed”. Could anyone please give me some ideas?

Thanks,
Shwetha.

There’s a lot that can be going on here, so let me touch on some of the more common ways this can be going wrong.

First of all, reports are generated on the gateway, even when you’re in the preview panel of the designer. This means you can’t use client tags, only tags that exist on the gateway. I created two gateway expression tags, and then tied them to report parameters like this: {StartDateTag} and {EndDate Tag}, and my Preview Panel (and report itself) didn’t have any problem parsing them. Remember that parameters are expressions, so you need the braces around the tag path.

That also means you need to make those tags into parameters before you use them in the start and end dates of your tag history query datasource – you can’t just enter the tag path and hope that it works.

If you really want to use a client tag, you’d need to make report parameters with default values, then bind those parameters to a client tag in a report viewer component or in a call to system.report.executeAndDistribute. Then the tag will be evaluated before the parameter is sent to the gateway for report generation.

Hope that helps!

1 Like

Hello Kathy:
Thank you very much for the detailed explanation. I’ll try with gateway tags.

Shwetha.