0

Have a custom report just to display "Hello World!". No datasets. Looks fine when previewed in Report Builder. When run in BC just a blank page shown. Report code (.rdlc):

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
 <AutoRefresh>0</AutoRefresh>
 <ReportSections>
<ReportSection>
  <Body>
    <ReportItems>
      <Textbox Name="SimpleText">
        <CanGrow>true</CanGrow>
        <KeepTogether>true</KeepTogether>
        <Paragraphs>
          <Paragraph>
            <TextRuns>
              <TextRun>
                <Value>Hello, World!</Value>
                <Style>
                  <FontFamily>Segoe UI</FontFamily>
                  <FontSize>16pt</FontSize>
                  <Color>#000000</Color>
                </Style>
              </TextRun>
            </TextRuns>
            <Style />
          </Paragraph>
        </Paragraphs>
        <rd:DefaultName>SimpleText</rd:DefaultName>
        <Height>0.5in</Height>
        <Width>3in</Width>
        <Top>0.5in</Top>
        <Left>0.5in</Left>
        <Style>
          <Border>
            <Style>None</Style>
          </Border>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
          <PaddingBottom>2pt</PaddingBottom>
        </Style>
      </Textbox>
    </ReportItems>
    <Height>2in</Height>
    <Style />
  </Body>
  <Width>8.5in</Width>
  <Page>
    <PageFooter>
      <Height>0.5in</Height>
      <PrintOnFirstPage>true</PrintOnFirstPage>
      <PrintOnLastPage>true</PrintOnLastPage>
      <Style />
    </PageFooter>
    <LeftMargin>1in</LeftMargin>
    <RightMargin>1in</RightMargin>
    <TopMargin>1in</TopMargin>
    <BottomMargin>1in</BottomMargin>
    <Style />
  </Page>
</ReportSection>
</ReportSections>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<DataSets>
<DataSet Name="DataSet_Result">
  <Fields />
  <Query>
    <DataSourceName>DataSource</DataSourceName>
    <CommandText />
  </Query>
</DataSet>
</DataSets>
</Report>

And here is AL code to call it.

report 50053 "Test Report"
{
UsageCategory = ReportsAndAnalysis;
ApplicationArea = Sales;
DefaultLayout = RDLC;
RDLCLayout = './Reports/rpt50053.rdl';
CaptionML = ENU = 'Test Report';
Description = 'Test Report';
ShowPrintStatus = true;
PreviewMode = PrintLayout;

requestpage
{
    layout
    {
        area(content)
        {
            // No additional UI elements since the report is static
        }
    }
  }
 }

1 Answer 1

0

I can't say that I've ever tried something like this before. I believe you cannot have a report without a dataset.

If you are truly attempting to print a static report, I would suggest using the Integer table as your dataitem where Number = 1.

Sign up to request clarification or add additional context in comments.

2 Comments

I get the same empty page with a simple dataset.
You need to ensure your image is being sent out as part of your dataset. Then you need to make sure your image is referencing the dataset within the layout.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.