Instance name on a report

  • Hi,

    I want to display the name of the (named) instance on my report.

    I've tried using expressions, but without succes!

    Google-ing on it gives a lot of hits, but no answers....

    Suggestions?

    Thanks in advance!

  • Have you tried the globals? In the expession builder you can see what's available...


    Cheers,

    Ben Sullins
    bensullins.com
    Beer is my primary key...

  • Yes, the globals give you page numbers, userid and so on but no server\instance name!

  • Have you tried doing it with a dataset based on SELECT @@SERVERNAME?

    I don't have named instances, so no testing done on my end, but I can't see why it wouldn't work.

  • That worked for me...I don't think you can put fields in the page header or footer so this may have to go inside a textbox in the report body.


    Cheers,

    Ben Sullins
    bensullins.com
    Beer is my primary key...

  • My understanding (I haven't had a need for it yet) is that once they are in the body, you can hide them there, and then reference the textbox in the header or footer.

  • Yes that is the way to get field data into the headers and footers.

    Another method that I've seen work, keeping in mind that this was a simple single table report, was to do away with the page header/footer sections entirely and place all necessary header/footer in the table itself, then add grouping levels to add detail level header rows.

     

    --------------------
    Colt 45 - the original point and click interface

  • That works but I wouldn't really call it a solution to getting the field data in the header and footers...


    Cheers,

    Ben Sullins
    bensullins.com
    Beer is my primary key...

  • Yes definitely a workaround. One of these days we might be able to include field data in headers/footers. How hard can it be? It'd be just something along the lines of first/last functions wouldn't it?

    --------------------
    Colt 45 - the original point and click interface

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply