Barcode Font not printing from the Web interface

  • Hello,

    I think I know the answer to this, but I'd like to see if anyone else has had this issue especially if you've found a solution.

    I have a report that uses a code39 barcode font. It display's fine, and exports to Excel just fine. The problem is when I try to print it directly from the web interface, the font is lost? I am trying to avoid requiring the client to export, and then print.

    The font IS installed on the server.

    Any ideas?

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • This was removed by the editor as SPAM

  • Your problem is the font is not installed on the web server.

  • The font is installed on the webserver! That's the weird part. And you can "export" the file into Excel and print it fine, you just can't print from the web interface directly.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • I tried exporting to Excel and it clearly does NOT work.  It sends the font information within the worksheet, but it will only display if the font is installed on the client. No barcode image is displayed when the font is substituted, similar with HTML and PDF files.The only export format that seems to work is TIF because it renders EMF data.

     

    After I played around for while, I discovered a wacky solution that almost works!

     

    Attempted Procedure

     

    I created a report called Barcode and added a single parameter called barcode. I added a textbox and changed to font to my barcode font, Barcode 3 of 9. I changed the textbox value to be =Parameters!barcode.Value.

     

    Then I created a second report called TestBarcode and added an image, and pasted this url into the value:

     

    http://myserver/ReportServer?/TestReports/Barcode&rs:command=render&rs:format=image&barcode=123456

     

    What I am trying to do is let the server render the barcode image as EMF, and use that to display the barcode in the report. This way the server dynamically creates the barcode, and the user can print or export the report without the need to have the font installed client side.

     

    It actually works in layout mode in the report designer!

     

    But, when you click on the preview tab or view it normally in the report server, it fails with…

     

    The value for the image ‘image1’ is invalid. Details: The remote server returned an error: (401) Unauthorized.

     

    The image control is converted into an iframe in the html source, so I can only suspect it might have something to do with security or iframe security or this technique may just not work at all.

     

    Reproducing the Problem

     

    Add these two reports to a Visual Studio Report Project. Select a different font if desired, although it must reside on the server.

     

    Open TestBarcode in layout mode and the darned thing actually works!

     

    Click on preview mode and it fails!?!

     

    Hopefully someone can help resolve this weird issue because it would be very useful for all of us.

     

    Barcode.rdl


    <?xml version="1.0" encoding="utf-8"?>

    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

      <Body>

        <ReportItems>

          <Textbox Name="textbox1">

            <Style>

              <FontFamily>Barcode 3 of 9</FontFamily>

            </Style>

            <rdefaultName>textbox1</rdefaultName>

            <CanGrow>true</CanGrow>

            <Value>=Parameters!barcode.Value</Value>

          </Textbox>

        </ReportItems>

        <Style />

        <Height>0.5in</Height>

      </Body>

      <Code />

      <Width>1in</Width>

      <rd:SnapToGrid>true</rd:SnapToGrid>

      <PageHeight>0.5in</PageHeight>

      <rdrawGrid>true</rdrawGrid>

      <PageWidth>2in</PageWidth>

      <rd:ReportID>9087c406-eac5-4275-a314-cbef71d9c75e</rd:ReportID>

      <ReportParameters>

        <ReportParameter Name="barcode">

          <DataType>String</DataType>

          <AllowBlank>true</AllowBlank>

          <Prompt>barcode</Prompt>

        </ReportParameter>

      </ReportParameters>

      <Language>en-US</Language>

    </Report>

     

    TestBarcode.rdl


    <?xml version="1.0" encoding="utf-8"?>

    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

      <RightMargin>1in</RightMargin>

      <Body>

        <ReportItems>

          <Image Name="image1">

            <MIMEType />

            <Height>0.5in</Height>

            <Width>2in</Width>

            <Source>External</Source>

            <Style />

            <Value>http://bserver/ReportServer?/Test%20Reports/BarCode&amp;rs:command=render&amp;rs:format=image&amp;barcode=123456</Value&gt;

            <Sizing>Clip</Sizing>

          </Image>

        </ReportItems>

        <Style />

        <Height>11in</Height>

        <ColumnSpacing>1in</ColumnSpacing>

      </Body>

      <TopMargin>1in</TopMargin>

      <Code />

      <Width>8.5in</Width>

      <LeftMargin>1in</LeftMargin>

      <rd:SnapToGrid>true</rd:SnapToGrid>

      <rdrawGrid>true</rdrawGrid>

      <rd:ReportID>6ccea119-688f-40c3-a41c-278dad9adc29</rd:ReportID>

      <BottomMargin>1in</BottomMargin>

      <Language>en-US</Language>

    </Report>

  • I am trying to print code 39 barcodes in my reports as well.  I ran across a .NET wondows forms control from Reporting Services from http://idautomation.com/reporting_services.  I have attempted to install their .NET forms control I am having some trouble with it.  I can view the barcode successfully in preview mode but on the server via a browser I get an error:

    Reporting Services Error


    • Failed to load expression host assembly. Details: Request for the permission of type System.Security.Permissions.UIPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. (rsProcessingError) Get Online Help

    Microsoft Reporting Services

    I am trying to work the issue with the IDAutomation support staff.

    I will post un update if I can resolve this issue with their custom control.

     

Viewing 6 posts - 1 through 5 (of 5 total)

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