Analysis of common problems in SQL report Builder reports _mssql

Source: Internet
Author: User

One

SQL reports often encounter a division in a table, and if the denominator is zero, an error number is usually displayed, which we can handle: (plus A/b)

=a/iif (b=0,99999999999999, B)

But we can't write this:

=IIF (b=0,0,a/b)//We can not write this, will produce bugs, as for what bugs, you can try your own

Two

We assume that the name of a lattice in the report is a, we need to refer to the value of another lattice B in a, in which case, we usually refer to the calculation formula in B again to copy in a, which is very troublesome.

We can write this directly in a:

reportitems! Name of Table B. Value

So you don't have to write the formula again.

Three

In the statement curve, if we need to change the horizontal axis, we will generally set the shaft option to automatic, but this often do not get the results we want, the following example is based on the parameters (start time and end time) of the interval dynamically change the horizontal axis style

Horizontal axis Properties "number" custom

=iif (Parameters!startime. Value=parameters!endtime. Value, "", IIf (DateAdd (dateinterval.day,-4,parameters!endtime). Value) >=parameters!startime. Value, "Mm/dd", "m/d h:mm"))

Above through three aspects to introduce the SQL report Builder reports inside the FAQ, I hope you like.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.